Ansicht
Dokumentation

ABENAMDP_POLYMORPHISM_ABEXA - AMDP POLYMORPHISM ABEXA

ABENAMDP_POLYMORPHISM_ABEXA - AMDP POLYMORPHISM ABEXA

Vendor Master (General Section)   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- AMDP Methods in Interfaces and Superclasses

This example demonstrates how AMDP methods are implemented from interfaces and superclasses.

Source Code

Execute

Description

An interface IF_DEMO_AMDP_INTERFACE and an abstract superclass CL_DEMO_AMDP_SUPERCLASS implement the tag interface IF_AMDP_MARKER_HDB and contain the method GET_SCARR, which meets the prerequisites of an AMDP method.

The interface method is implemented once as an AMDP method and once as a regular method in the classes CL_DEMO_AMDP_IMPLEMENT_HDB and CL_DEMO_AMDP_IMPLEMENT_OPEN. In the same way, the method of the abstract superclass is redefined in the fixed subclasses CL_DEMO_AMDP_SUBCLASS_HDB and CL_DEMO_AMDP_SUBCLASS_OPEN.

This program demonstrates how objects are created using either the AMDP method or the regular method and called polymorphically, depending on the current database.






General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 1479 Date: 20240420 Time: 114929     sap01-206 ( 25 ms )