Get Example source ABAP code based on a different SAP table
ABAP_AMDP - AMDP Functions This example demonstrates AMDP functions and how they are used.
ABAP_SOURCE_CODE DEMO CL_DEMO_AMDP_FUNCTIONS_DEMO
ABAP_DESCRIPTION This example accesses AMDP functions> that are declared and implemented in the AMDP class> CL_DEMO_AMDP_FUNCTIONS_INPCL>.
The method GET_SCARR_SPFLI> is an AMDP function implementation> for an AMDP table function> that can only be called in other AMDP methods. It has an explicitly declared interface. METH CL_DEMO_AMDP_FUNCTIONS_INPCL=>GET_SCARR_SPFLI This method cannot be called in ABAP.
The method SELECT_GET_SCARR_SPFLI> is an AMDP procedure implementation> that uses SELECT> to access the AMDP table function implemented in the method GET_SCARR_SPFLI>. METH CL_DEMO_AMDP_FUNCTIONS_INPCL=>SELECT_GET_SCARR_SPFLI This method is called in the example class.
The method GET_SCARR_SPFLI_FOR_CDS> is an AMDP function implementation> for the CDS table function> DEMO_CDS_GET_SCARR_SPFLI_INPCL>, which is also shown as an example of the DDL statement DEFINE TABLE FUNCTION>> >: DDLS DEMO_CDS_GET_SCARR_SPFLI_INPCL This method is declared using the addition FOR TABLE FUNCTION>> and its interface is determined using the CDS table function. METH CL_DEMO_AMDP_FUNCTIONS_INPCL=>GET_SCARR_SPFLI_FOR_CDS The example class uses SELECT>> to access the CDS table function. The input parameter is filled here. Access to both AMDP table functions produces the same result, which is ensured by the ASSERT>> statement.