ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP Database Access → ABAP SQL
ABAP SQL - Overview
ABAP SQL defines the subset of ABAP statements that enable direct access to data from the standard database of the current AS ABAP. The ABAP SQL statements form the DML part of SQL in ABAP, which is supported by all database systems. The statements of ABAP SQL are converted to database-specific SQL in the ABAP SQL interface of the database interface. They are then transferred to the database system and executed there. By default, ABAP SQL statements use implicit client handling to access only the data of the current client. To improve performance when accessing the database, table buffering can be activated for individual database tables, classic views, or CDS views to avoid accessing the database directly each time.
ABAP SQL is closely integrated with ABAP Dictionary. In ABAP SQL statements, only those database tables. views, and non-abstract CDS entities can be accessed that are defined in ABAP Dictionary. These items are specified directly in ABAP SQL statements without specifying a database schema. By default, the ABAP SQL interface of the database interface accesses the associated database objects in the ABAP database schema of the standard database.
The ABAP SQL interface of the database interface respects the fact the order of the columns in the data source in the database system can differ from the order in the definition of the data source in ABAP Dictionary. If ABAP SQL is used, the order in ABAP Dictionary applies and the database interface performs a transformation if necessary. The function SQL Trace of the Performance Trace tool (transaction ST05) can be used to analyze the SQL statements actually passed to the database by the database interface.
Each non-buffered ABAP SQL statement is synonymous with an access to the database. This applies in particular
with SELECT
statements that end in
ENDSELECT. Data to be read and to be modified is transported in packages between the database server and the current AS Instance. The size of the packages can be configured using
profile parameters (for example, the default value for Oracle is 65 KB).
Other versions: 7.31 | 7.40 | 7.54
Note
If more than approximately 2^32 entries are addressed in a single database access, the behavior of the database is undefined.