Open SQL refers to the subset
of ABAP statements that enable direct access to data of the central database of the current ABAP system. The Open SQL statements form the DML part of SQL in ABAP, which is supported by all database systems.
The statements of Open SQL are converted to database-specific SQL in the Open SQL interface of the database interface. They are then transferred to the database system and executed there. Open SQL statements can be used to exclusively access database tables that are declared in the ABAP Dictionary. It is also possible to access these using views.
Each Open SQL statement is synonymous with accessing the database. This applies in particularly with SELECT statements that end in ENDSELECT. Data to be read and to be written is transported in packages between the database server and the current application server. You can configure the size of the packages using profile parameters (for example, the standard 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.
Open SQL works with automatic client handling. When client-specific database tables are accessed, the client identifier cannot be explicitly specified, or is overwritten with the ID of the current client by the runtime environment. You can deactivate automatic client handling using the addition CLIENT SPECIFIED.
When using the change statements (INSERT, UPDATE, MODIFY and DELETE), it is important to keep data storage consistent. The LUW concept is designed for this purpose. In application programs of an SAP system, the implicit database LUWs are normally not sufficient for consistent data storage. Instead, you need to program explicit SAP LUWs, which normally contain several database LUWs (see the section on data consistency).
See Performance advice for Open SQL.
See Examples for using Open SQL.
There are also obsolete forms of OpenSQL statements, and obsolete statements for accessing database tables, which do not belong in the scope of Open SQL.