Get Example source ABAP code based on a different SAP table
ABAP_AMDP - Methods There are two types of AMDP methods, methods without a return value that define AMDP procedures> and methods with a return value that define AMDP functions>.
AMDP procedure implementations>
AMDP function implementations> In AMDP classes, AMDP methods are flagged as follows:
In AMDP procedure implementations and AMDP function implementations that do not implement any CDS table functions > or CDS scalar functions >, flagging is not necessary in the declaration with METHODS>> or CLASS-METHODS>>. However, an optional addition AMDP OPTIONS>> can be used to declare properties of the AMDP method.
AMDP function implementations that implement CDS table functions> must be declared as static methods using CLASS-METHODS>, and linked with the associated CDS table function using the addition FOR TABLE FUNCTION>>.
AMDP function implementations that implement CDS scalar functions> must be declared as static methods using CLASS-METHODS>, and linked with the associated CDS scalar function using the addition FOR SCALAR FUNCTION>>.
When implemented, all AMDP methods must be flagged using the statement METHOD>.
AMDP procedure implementations with the addition BY DATABASE PROCEDURE>>
AMDP function implementations with the addition BY DATABASE FUNCTION>> The implementation of an AMDP method is stored in the ABAP database schema> by the ABAP runtime framework. In an AMDP method, it is possible to access objects in the same database schema directly. The name of the current database schema need not and must not be specified here. If the correct authorization is granted, it is possible to access objects in a different database schema by specifying its name.
Latest notes: Constructors> cannot be implemented as AMDP methods. NON_V5_HINTS ABAP_HINT_END