Ansicht
Dokumentation

ABENAMDP_CALLS - AMDP CALLS

ABENAMDP_CALLS - AMDP CALLS

Fill RESBD Structure from EBP Component Structure   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- Use

AMDP methods can be used in ABAP programs as follows:

An AMDP procedure implementation is called from an ABAP program in the same way as any other ABAP Objects method.

A prerequisite is that the standard database of the current AS ABAP is managed by the database system for which the AMDP method is implemented. If not, a runtime error is produced.

Before the method is used for the first time, the ABAP runtime framework creates the procedure or function implemented in the AMDP method in the database system of the standard AS ABAP database or, if necessary, updates any existing database procedure or database function. Execution takes place in the database system and the interface parameters are passed from the Native SQL interface to the database system or applied by the database system itself.

Once a database procedure or database function managed using AMDP has been created on the database, this procedure can be used in other database procedures or database functions using the database syntax if the database allows this type of access. These can themselves be AMDP procedures or AMDP functions, but also database procedures or database functions not managed by AMDP. If an AMDP procedure or function uses a different AMDP procedure or function, this procedure must be specified after the addition USING of the calling method.

Notes

  • It is recommended that AMDP procedure implementations that are not to be able to be called from the AMDP methods of other classes are created as private methods of an AMDP class and that they are called in a regular method depending on the standard AS ABAP database. In database systems that do not support AMDP, a regular method can be created using an alternative implementation in or Native SQL.
  • For the caller of an AMDP procedure implementation from ABAP, it is usually transparent whether the method is an AMDP method and in which database system it is executed. For this reason, the implementation of the method must ensure that the interface parameters are returned in a format expected by the caller. This applies in particular to ABAP types for which there is no equivalent type in the type system of the database system. These types must either not be offered in the interface or an appropriate casting must take place in the procedure.
  • Generally, the database procedures and database functions managed using AMDP are called using AMDP methods from ABAP only or in .
  • It is not advisable to make calls of AMDP-managed database procedures or database functions from non-AMDP-managed database objects or by using Native SQL. If, in exceptional cases, calls like this are necessary, all required database objects must exist. The public methods of the documented class CL_AMDP_RUNTIME_SERVICES can be used to do this (see ADBC, Stored Procedures).
  • The constant CALL_AMDP_METHOD of the class CL_ABAP_DBFEATURES can be used to query whether the current database supports AMDP procedures.





General Data in Customer Master   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 4850 Date: 20240508 Time: 203555     sap01-206 ( 93 ms )