Implementation of Interface Inside Class in SAP ABAP
INTERFACE interface_name
Explanation: First we create a class inside that we use above syntax to implement interface. here interface_name means name of interface.
Implementing method of an interface inside class in SAP ABAP
METHOD interface_name~interface_method_name
satements
ENDMETHOD
Explanation: we use METHOD keyword to implement method of interface inside implementing class, interface_name~interface_method_name refers to the name of interface along with method name declare in interface.
SAP ABAP | Interfaces
ABAP(Advanced Business Application Programming) is an object-oriented programming language that supports many oops concepts like other programming languages. It supports all the four pillars of oops i.e. Inheritance, Polymorphism, Abstraction, and Encapsulation. The interface is one of the oops concepts that ABAP supports and it plays a very important role in implementing all these oops concepts.
Table of Content
- What is Interface in SAP ABAP
- Syntax for Creating an Interface in SAP ABAP
- Implementation of Interface Inside Class in SAP ABAP
- Example Program
- Program Execution – Creating Objects ‘object1’ and ‘object2’
- Benefits and Application of Interface in SAP ABAP