Get Example source ABAP code based on a different SAP table
VERSION 5 OUT
Native SQL The term Native SQL> refers to all platform-dependent statements and calls that can be passed to the Native SQL interface> of the database interface. By default, the standard connection> is used to access the ABAP database schema> of the standard AS ABAP database>. Native SQL can be passed to the database interface as follows:
In strings passed to objects of ADBC> classes.
As statically embedded Native SQL statements>. ADBC is recommended. New developments and improvements, such as support for new SQL statements or optimized performance using bulk access across internal tables, are now made only for ADBC. The existing static embedding of Native SQL statements between EXEC SQL> > and ENDEXEC>> is still supported but should no longer be used in new programs.
ABAP_PGL Use AB_SQL for general database accesses where possible.> ABAP_PGL_END
Latest notes:
When using Native SQL, the order of the columns in database tables defined in the ABAP Dictionary in the database system does not have to match the order of the structure definition in the ABAP Dictionary. When using AB_SQL >, this is respected accordingly in the database interface > and the order in the ABAP Dictionary can always be assumed. When using Native SQL, the order of the columns in the database system must be respected explicitly.
Special care must be taken when using Native SQL to pass data from ABAP to the database system and vice versa. This applies both when using ABAP data objects as host variables or bound parameters in Native SQL statements and when binding ABAP data object to the parameter interface of stored procedures or database procedures. Not all built-in ABAP types have matching types in the type system of the database system used. Although types from the ABAP Dictionary can be mapped to ABAP types and the appropriate conversions can be executed from the AB-SQL interface when using AB_SQL , when using Native SQL only matching data types should be mapped> and conversions should be avoided. This is particularly relevant for the ABAP types n>, d>, and t> and decimal floating point numbers.
Native SQL does not support implicit client handling>. When accessing client-dependent database tables or views, the required client ID must be selected explicitly. In application programs, only the current client should be used to do this.
Table buffering> is bypassed when using Native SQL.