1. ROLLBACK
WORK.
2. ROLLBACK CONNECTION con.
Closes a logical unit of work. However, all database changes are reversed and the database state is
reset (for example, by using COMMITWORK).
All database locks are released.
You use this statement if you cannot be certain that all the database changes have been executed correctly.
ROLLBACK WORK.
All database changes on all database connections are reversed
and reset to the last saved status(for example, using
COMMIT WORK). All database
locks on all database connections are released. Before that, the system executes the subprograms
registered using PERFORM ... ON ROLLBACK.
The update routines are not performed.
Executing the
ROLLBACK WORK triggers the event RAISE_TRANSACTION_FINISHED
of the class CL_SYSTEM_TRANSACTION_STATE with parameter value CL_SYSTEM_TRANSACTION_STATE=>ROLLBACK_WORK.
ROLLBACK CONNECTION con.
The ROLLBACK command is not executed on the standard database,
but on the
secondary database connection specified with con.
con is the name of the database connection as it was specified
in the table
DBCON in the column CON_NAME.
The database connection con can also be specified dynamically
in the form
(source_text), where the source_text
field contains the name of the database connection. The source_text field must be type C or STRING.
Non-Catchable Exceptions
Writing Changes to the Database