Ansicht
Dokumentation

ABENAMDP_CLIENT_HANDLING - AMDP CLIENT HANDLING

ABENAMDP_CLIENT_HANDLING - AMDP CLIENT HANDLING

Addresses (Business Address Services)   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- Client Handling

AMDP does not support implicit client handling. When accessing client-dependent database tables or views in an AMDP method, the required client ID must be selected explicitly. Therefore, the parameter interface of an AMDP method must usually contain an input parameter for the client ID, and this parameter must be used in a WHERE condition. Exceptions to this rule are explained in the note below.

Notes

  • Using an input parameter for the client ID is particularly advisable for AMDP function implementations of client-dependent CDS table functions. In reads, only the data of the current client or clients specified using USING CLIENT in the result set is respected by default. Selecting exactly this data in the function implementation is recommended both for performance reasons and to ensure that the correct data is read.
  • In SQLScript implementations, the built-in function SESSION_CONTEXT can also be used to access the ABAP-specific session variables CLIENT and CDS_CLIENT of the SAP HANA database. In a call from ABAP, these variables contain a client ID:
  • CLIENT always contains the nominal value of the ABAP system field sy-mandt.

  • CDS_CLIENT contains the same value as CLIENT by default, but can be modified during the execution of an statement by the addition USING CLIENT and in an AMDP method call from ABAP by the addition AMDP OPTIONS CDS SESSION CLIENT.

Access of this type should be used only if it is guaranteed that an AMDP method is called only from ABAP and accesses exactly the data of this client ID. In other cases, the result is undefined. Therefore, it is usually recommended that an input parameter is used to pass the required client ID to AMDP functions and use it as an access condition.

Example

The executable example of how to implement an SQLScript procedure demonstrates explicit client handling using an input parameter and using the ABAP-specific session variable CLIENT.






BAL Application Log Documentation   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 6493 Date: 20240427 Time: 024157     sap01-206 ( 122 ms )