ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Releases 7.5x → Changes in Release 7.53
AMDP in Release 7.53
2. Enhancement to logical database schemas
3. Access to the current ABAP database schema
5. Option CDS SESSION CLIENT
mandatory
Other versions:
7.31 | 7.40 | 7.54
Modification 1
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.
Modification 2
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.
Modification 3
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.
Modification 4
Restrictions Removed
The following restrictions were removed:
- Tabular input parameters are now allowed in AMDP function implementations for CDS table functions. Previously, only elementary input parameters were allowed. In AMDP function implementations for CDS table functions, however, the restriction that only elementary input parameters are allowed still applies.
-
Tabular input parameters of AMDP procedure implementations and of
AMDP function implementations
can now be made optional using
OPTIONAL
, but it is still not possible to specify a start value withDEFAULT
. -
When a replacement parameter declared using
DEFAULT
is specified for an elementary input parameter of an AMDP method, the following (previously undocumented) restrictions were lifted:
- Constants declared using the addition VALUE
IS INITIAL can now be specified for the data types
d
,t
, andx
. This previously produced a syntax error.
- Constants declared using the addition VALUE
'00010101' can now be specified for the data type
d
, or the literal'00010101'
can be specified directly. Both previously produced a syntax error.
- Constants declared by specifying numeric literals after
VALUE and whose lengths are not precisely 8 or 6 can now be specified for the data types
d
andt
. This previously produced a syntax error. Until now, values of literals with lengths of precisely 8 or 6 were handled like a string. This incorrect behavior was also modified and the numeric value is handled as the number of days since 01.01.001 or as the number of seconds since 00:00:00. This modification is incompatible if an AMDP procedure or function with an input parameter of this type is called from other database procedures or functions without an actual parameter being assigned to the parameter in question.
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.
Modification 5
Option CDS SESSION CLIENT Mandatory
The option CDS SESSION CLIENT
is now mandatory when an AMDP method accesses the
CDS database 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.