AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - ABAP Release News → News for ABAP Release 7.5x → News for ABAP Release 7.53 →
AMDP in ABAP Release 7.53
AMDP Scalar Functions
AMDP scalar functions are now supported alongside AMDP table functions. The AMDP function implementation of an AMDP scalar function has an elementary return value and can be used in ABAP like a regular function method.
In the implementation of AMDP scalar functions, it is possible to specify the database-specific
option DETERMINISTIC
after OPTIONS. This buffers the result of the function for the duration of a query.
Enhancement to Logical Database Schemas
In logical database schemas, a new flag can be specified that allows the current
ABAP database schema to be mapped in the transaction DB_SCHEMA_MAP.
The predefined name :abap_db_schema should be used for mappings of this type.
Access to the Current ABAP Database Schema
In an AMDP method, a
logical database schema to which the current
ABAP database schema is mapped (using the predefined name :abap_db_schema)
can be specified in the macro $ABAP.schema.
For each logical database schema used in a macro like this, the new addition
USING SCHEMA must be specified in the statement METHOD
to declare the used objects. In this way, an AMDP method can access database objects located in different
database schemas in different systems (including the ABAP database schema) without needing to modify the syntax.
Restrictions Removed
The following restrictions were removed:
In AMDP methods, the addition DEFAULT now behaves in the same way as in regular methods. It still cannot be specified for the data types string, xstring, decfloat16, and decfloat34, however, and no literals can be specified that cannot be converted into the data type of the input parameter.
Option CDS SESSION CLIENT Mandatory
The option CDS SESSION CLIENT is now mandatory when an AMDP method accesses the CDS managed DDIC view of a CDS view whose client handling is determined by the annotation @ClientHandling.algorithm: #SESSION_VARIABLE. If this option is not specified in this case, a syntax error occurs. The option sets the session variable of the database that can be addressed under the name $session.client in the CDS DDL of the ABAP CDS to a particular value when the method is called from ABAP. An exception of the class CX_AMDP_CDS_CLIENT_MISMATCH can now no longer be raised.