Ansicht
Dokumentation

ABENABAP_MANAGED_DB_OBJECTS_AMDP - ABAP MANAGED DB OBJECTS AMDP

ABENABAP_MANAGED_DB_OBJECTS_AMDP - ABAP MANAGED DB OBJECTS AMDP

CPI1466 during Backup   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Access to ABAP-Managed Database Objects

ABAP Managed Database Procedures (AMDP) is a class-based AS ABAP framework for managing and calling database procedures and database functions in the SAP HANA database. No other database platforms are currently supported. AMDP methods are implemented in SQLScript. The AMDP framework creates and manages the procedures and functions as ABAP-managed database objects. From ABAP, AMDP procedures or AMDP scalar functions are called using method calls. AMDP table functions, on the other hand, are called by accessing the associated CDS table function using . The AMDP framework itself uses the AS ABAP Native SQL interface internally to access the database.

AMDP can be used to access ABAP-managed database objects as follows:

  • Reads and writes on the following ABAP-managed database objects in the SQLScript implementation of an AMDP method.

  • Calls of the following ABAP-managed database procedures or database functions:

The most important AMDP features are as follows:

  • The management of AMDP procedures and AMDP functions is the full responsibility of the AMDP framework. This framework creates these database objects before they are used for the first time in ABAP or updates them as required.
  • AMDP methods are implemented as platform-dependent methods and their implementation is currently restricted to SQLScript in the SAP HANA database.
  • Data types defined in the ABAP Dictionary and their possible enhancements are not currently known in the actual implementation of AMDP methods. Dictionary types are, however, respected as follows:
  • If possible, AMDP respects the order of fields defined in the ABAP Dictionary, which can differ from the order in the database. To do this, a view is generated internally. The prerequisite for this feature is that the AMDP framework detects that a database object defined in the ABAP Dictionary is being accessed.

  • The typing of the formal parameters of an AMDP method using dictionary types is one way of creating appropriate variables. Here, a predefined mapping takes place between ABAP types and database types.

  • Any null values passed from formal parameters to ABAP data objects are transformed to their type-dependent initial values. There is no special handling, however, within the implementation of an AMDP method.

  • The interface parameters of AMDP methods can be tabular. Internal ABAP tables can be bound to all categories of parameters. In the case of input/output parameters declared using CHANGING, the parameters are transformed internally to a pair of input and output parameters declared using IN and OUT.

  • The AMDP macro $ABAP.type can be used to specify ABAP Dictionary types and other ABAP types in the implementation of an AMDP method. The AMDP framework transforms this information into the respective HANA types.

  • AMDP does not support the following ABAP Dictionary and ABAP CDS functions:
  • AMDP does not support implicit client handling. The client ID must either be passed explicitly using an input parameter (recommended) or the ABAP-specific session variables CLIENT and CDS_CLIENT can be accessed. When an AMDP method is called whose declaration specifies the addition AMDP OPTIONS CDS SESSION CLIENT, the value of the session variable CDS_CLIENT can be set to the value of an input parameter here.

  • AMDP accesses the database objects of CDS entities directly and ignores any other properties of CDS entities:
  • When a CDS-managed DDIC view of a is accessed, its database-specific instance must be known. This applies in particular to with input parameters.

  • When an instance of a CDS table function is accessed, its AMDP table function must be called.

  • Care must be taken that all session variables used in a CDS view entity or a have the correct value. This applies in particular to the session variable client, to which the HANA session variable CDS_CLIENT is assigned and not CLIENT.

  • The ABAP-managed database objects accessed in an AMDP method must be declared with USING in the implementation of the method. This guarantees that the AMDP methods are recorded in the where-used list.
  • DDL statements are not allowed in AMDP methods. Furthermore, no statements are allowed that are only possible in database tables and not in views, such as TRUNCATE TABLE or LOCK TABLE.
  • The SQLScript used to implement AMDP methods can use the input parameters of the AMDP as operands but does not support dynamic tokens.

Note

Implementations of AMDP methods can be debugged in the ABAP Development Tools (ADT).






BAL Application Log Documentation   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 13594 Date: 20240425 Time: 160612     sap01-206 ( 156 ms )