Skip to end of metadata
Go to start of metadata

Adapter design pattern, another widely used design pattern in the real world as well as the Object Oriented Programming language. Standard SAP developments build in OO ABAP also uses Adapter DP a lot.

Sometimes, we have a client who expects the object with certain interface only. We do have another object which can satisfy the requirement but both object’s interfaces are different. So, we can’t directly call the existing object with using the same interface. So, we need to create a kind of “wrapper” which can translate the objects interface to the interface which is accepted by client or other object.

Design Time Considerations
We should consider this while implementing the Adapter:

  • Create a class implmenting the same interface which is requried by Client
  • Instantiate the Object whose Interface is incompatible
  • Call the respective methods to perform an action within the implemented methods of interface.

More Information