SAP AMDP ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_AMDP - Implementation of an SQLScript Procedure
This example demonstrates how an SQLScript procedure is implemented using AMDP.

ABAP_SOURCE_CODE
DEMO CL_DEMO_AMDP_SQL_SCRIPT

ABAP_DESCRIPTION
A simple SQLScript procedure is implemented in three AMDP methods, showing the different options for user-defined client handling, in the AMDP class CL_DEMO_AMDP:
INCREASE_PRICE
METH CL_DEMO_AMDP=>INCREASE_PRICE In this implementation, the input parameter clnt is used to access the data of the passed client, as recommended.
INCREASE_PRICE_CLIENT
METH CL_DEMO_AMDP=>INCREASE_PRICE_CLIENT In this implementation, the ABAP-specific session variable CLIENT is used to access the data of the current client.
INCREASE_PRICE_CDS_CLIENT
METH CL_DEMO_AMDP=>INCREASE_PRICE_CDS_CLIENT In this implementation, the ABAP-specific session variable CDS_CLIENT is used to access the data of the current client. The addition AMDP OPTIONS CDS SESSION CLIENT CURRENT is used for this purpose in the declaration of the method.
The database table SPFLI defined in the ABAP Dictionary must be specified after USING. On an SAP HANA database, this class works in the same way as the executable examples for ADBC and for CALL DATABASE PROCEDURE. AMDP replaces these technologies when calling database procedures for an SAP HANA database that is the standard database of an AS ABAP.
It is generally preferable to pass the client ID to an input parameter instead of using the ABAP-specific session variable CLIENT or CDS_CLIENT.



Latest notes:

This is a syntax example. The same function can be achieved with the same efficiency in AB_SQL . AMDP is not needed in simple cases like this.
NON_V5_HINTS
ABAP_HINT_END