Get Example source ABAP code based on a different SAP table
AB-SQL Access to ABAP-Managed Database Objects AB_SQL > includes a set of AB-SQL statements> for use in ABAP programs. The database is accessed using the AB-SQL interface> of the database interface>, which transforms the AB-SQL statements into platform-dependent SQL. AB_SQL can be used to access ABAP-managed database objects> as follows:
Reads and writes on database tables> and DDIC database views> defined in the ABAP Dictionary. Writes on DDIC database views are restricted.
Reads on the database objects of CDS views, CDS table functions, and CDS hierarchies. When a CDS table function is accessed, the associated AMDP table function> is called internally and its result is provided as the result set of the AB-SQL statement. The most important AB_SQL features are as follows:
AB_SQL is largely platform-independent
AB_SQL is based on the data types defined in the ABAP Dictionary and their possible enhancements.
AB_SQL respects the order of fields defined in the ABAP Dictionary, since this can differ from the order in the database.
AB_SQL checks the compatibility of host variables> with the associated dictionary types or database types.
AB_SQL enables conversions between ABAP types and platform-dependent data types in accordance with uniform ABAP-specific rules.
AB_SQL has its own handler> for null values>.
AB_SQL supports the following ABAP Dictionary and ABAP CDS functions:
Implicit client handling>
Table buffering>
Evaluating CDS access control>
Enhancement categories of DDIC structures> are respected
Logging of database tables>
AB_SQL accesses a CDS entity> using its name and respects all its relevant properties. Access to ABAP_CDS_MNG_VIEWS > is obsolete> and forbidden in ABAP_STRICT_762 strict mode from ABAP_RELEASE ABAP_762 / .
Implicit client handling> depends on how client dependency is defined using the corresponding annotations in the DDL source code>.
The CDS roles> mapped to the CDS entity are evaluated.
The key fields defined in the CDS entity are respected.
Actual parameters> can be assigned to the input parameters of a CDS entity in uniform syntax.
SQL path expressions> can be specified for CDS associations>.
When AB_SQL is used to access a CDS hierarchy>, the additional hierarchy columns> can also be read.
All session variables> are set correctly on all platforms when AB_SQL is used to access a CDS view entity> or ABAP_CDS_V1_VIEW >. More specifically, the addition USING CLIENT >> modifies the session variable client>.