Get Example source ABAP code based on a different SAP table
ABAP_AMDP in ABAP Release 7.53 ITOC
ABAP_MODIFICATION_NN 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.
ABAP_MODIFICATION_NN 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.
ABAP_MODIFICATION_NN 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.
ABAP_MODIFICATION_NN 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 with DEFAULT>>.
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> , and x>. 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> and t>. 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. 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.
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.