ABAP - Keyword Documentation →  ABAP - Reference →  Processing External Data →  Data Consistency →  Database LUW → 

Database Commit

In AS ABAP, database commits are triggered either implicitly or explicitly.

Note

A database commit closes all opened database cursors. It is particularly important that database commits are not triggered (in one of the ways listed here) in SELECT loops and after the statement OPEN CURSOR.

Implicit Database Commits

The implicit database commits in an AS ABAP are caused by the fact that an AS ABAP uses its own work processes to connect to the database system. A work process can only ever execute a single database LUW but cannot interfere with the database LUWs belonging to other work processes. Since an ABAP program can be executed by different work processes during its runtime, the database LUW for the current work process must be completed each time an action takes place that leads to a change of work process. As a result, a database commit is performed implicitly in the following situation:

The implicit database commit takes place on all currently open database connections.

Note

If (in the case of implicit database commits) a global temporary table filled using Open SQL statements is not emptied by an explicit database commit or database rollback or by the statement DELETE FROM without WHERE condition, the runtime error COMMIT_GTT_ERROR occurs.

Explicit Database Commits

Database commits can be triggered explicitly in ABAP programs in the following ways:

Note

All the methods specified here for explicit database commits empty global temporary tables and prevent the runtime error COMMIT_GTT_ERROR in the case of implicit database commits.