Ansicht
Dokumentation

ABENINHERITANCE_INTERFACES - INHERITANCE INTERFACES

ABENINHERITANCE_INTERFACES - INHERITANCE INTERFACES

TXBHW - Original Tax Base Amount in Local Currency   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- Inheritance and Interfaces

Interfaces are standalone constructs in ABAP Objects that support polymorphism in classes. The polymorphism of interfaces is based on the fact that each class that implements an interface can implement its methods differently. All interface components look similar externally, which is why interface reference variables can point to objects of all classes that implement the associated interface.

The interface concept exists completely independent of and in addition to the inheritance concept. The classes of an inheritance tree can implement any number of interfaces, but each interface can be implemented only once in each inheritance tree. This ensures that each interface component comp has a unique name across the entire inheritance tree intf~icomp and that it is contained in all subclasses starting with the class that implements it. Interface reference variables that can point to a class of the inheritance tree can also point to all subclasses. Once they are implemented, interface methods are fully functioning components of a class and can be redefined in subclasses. In the case of interface methods defined as optional using DEFAULT, and without explicit implementation, the default behavior is applied along a path of an inheritance tree until a redefinition with explicit implementation occurs.






Fill RESBD Structure from EBP Component Structure   General Material Data  
This documentation is copyright by SAP AG.

Length: 1846 Date: 20240423 Time: 172214     sap01-206 ( 41 ms )