ABAP Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Open SQL
Open SQL - Overview
Open SQL defines the subset of ABAP statements that enable direct access to data from the central database of the current AS ABAP. The Open SQL statements form the DML part of SQL in ABAP, which is supported by all database systems. By default, Open SQL statements use automatic client handling to access only the data of the current client. To improve performance when accessing the database, SAP buffering can be activated to avoid accessing the database or view directly each time.
The Open SQL statements are transformed to database-specific SQL in the Open SQL interface of the database interface. They are then passed to the database system and executed there. In Open SQL statements, only those database tables and views can be accessed that are defined in ABAP Dictionary. The Open SQL interface of the database interface respects the fact the order of the columns in the database table in the database system can differ from the order in the definition of the database table in ABAP Dictionary. If Open 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 Open 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 application server. The size of the packages can be configured using
profile parameters
(for example, the default value for Oracle is 65 KB). The number of characters that can be transported in one package depends on whether the system is a Unicode system or a non-Unicode system.
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.