ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP Database Access → AMDP - ABAP Managed Database Procedures
AMDP - Methods
There are two types of AMDP methods, methods without a return code that define AMDP procedures and methods with a return code that define AMDP functions.
In AMDP classes, AMDP methods are flagged as followed:
- In AMDP procedure implementations and AMDP function implementations that do not implement any
CDS table functions,
flagging is not necessary in the declaration with
METHODS
orCLASS-METHODS
. However, an optional additionAMDP OPTIONS
can be used to declare attributes of the AMDP method.
- AMDP function implementations that must be able to implement
CDS table functions,
declared as static methods using
CLASS-METHODS
, and associated with their CDS table function using the additionFOR TABLE 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 saved to the ABAP database schema by the ABAP runtime environment. In an AMDP method, it is possible to access objects in the same database schema directly. The name of the current database schema 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.
Other versions:
7.31 | 7.40 | 7.54
Note
Constructors cannot be implemented as AMDP methods.
Continue
AMDP - Procedure Implementations
AMDP - Function Implementations
[CLASS-]METHODS - AMDP OPTIONS
CLASS-METHODS - FOR TABLE FUNCTION