ABAP Keyword Documentation → ABAP - Reference → Processing External Data → Data Consistency → Database LUW
Database Rollback
Database rollbacks are triggered implicitly or explicitly in AS ABAP.
Other versions: 7.31 | 7.40 | 7.54
Note
A database rollback closes all opened
database cursors. It is particularly important that database rollbacks are not triggered (in one
of the ways listed here) in SELECT
loops and after the statement OPEN CURSOR
.
Implicit Database Rollbacks
The following exceptions trigger an implicit database rollback:
- A termination message is sent.
- A program is terminated when a message is sent.
Notes
- A termination message also produces a database rollback if the message is handled by the predefined
exception
error_message
when a function module is called.
- Termination and exit messages always terminate the program. Other message types can also terminate a program in certain contexts .
Explicit Database Rollbacks
Explicit database rollbacks in ABAP programs can be triggered in the following ways:
- The relevant database-specific Native SQL statement is used.
- The Open SQL statement
ROLLBACK WORK
is executed.
- The Open SQL statement
ROLLBACK CONNECTION
is executed.