Using the new AMDP, the editing, activation, transport, and life cycle management of the database procedures are performed on the ABAP application server.
AMDP performs the following functions:
The implementation of ABAP Managed Database Procedures is achieved using methods of ABAP classes. Whether a method is implemented in ABAP or native code, such as SQL script, is determined in the method implementation part, and not in the method definition part of the ABAP class. However, to create an AMDP method, there are some prerequisites that must be fulfilled in the class definition part, before a method can be used as an AMDP method.
Classes that are to act as a container for AMDPs have to implement a so-called Marker interface IF_AMDP_MARKER_HDB.
AMDP method parameters can import, export, or change parameters. Returning parameters cannot be used. All AMDP method parameters have to be passed by value and must be of either table or scalar types and AMDP doesn’t support nested tables.
AMDP methods are identified with the syntax BY DATABASE PROCEDURE. The database system(for example, HDB) and language(for example, SQL Script) must also be specified. Optionally, the AMDP method can be marked as a READ-ONLY database procedure. It is also necessary to list all ABAP Dictionary tables, views, and other procedures used in the procedure body in the USING clause. The method body can then be implemented using native SQL Script source code. Almost the full SQL Script reference can be used in the method body, except the CE function CE_COLUMN_TABLE.
All ABAP Dictionary tables or views, and other AMDP methods that will be called in the procedure body must be declared with the USING keyword. In the procedure body, these objects are addressed without the need for the SAP<SID> prefix.
AMDP can detect the following types of syntax-errors in active or inactive source code:
You use the ABAP Development Tools for full AMDP support, including the following functions:
Window->Preferences->General->Appearance->Colors and Fonts
AMDP Usage
An AMDP Method is called like any ABAP method, as follows:
AMDP makes sure that a database procedure is available at runtime:
AMDP Enhancement
To allow for the enhancement of AMDP, the following must apply: