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

PERFORM - ON COMMIT, ROLLBACK

Quick Reference

Syntax

PERFORM subr ON { {COMMIT [LEVEL idx]} | ROLLBACK }.

Addition:

... LEVEL idx

Effect

This statement registers the subroutine directly specified using subr in the same program. The subroutine is not executed immediately, but a flag is set for execution when one of the statements COMMIT WORK or ROLLBACK WORK is reached.

The registered subroutines are executed if the statement COMMIT WORK or ROLLBACK WORK is executed in their work process and before update function modules registered using CALL FUNCTION ... IN UPDATE TASK. Subroutines that are registered during execution of an update function module for COMMIT are executed at the end of the non-local update in the update work process.

Programming Guideline

No implementations in function modules and subroutines

Notes

Addition

... LEVEL idx

Effect

In the case of subroutines registered for COMMIT, the order of execution can be controlled using the addition LEVEL, where idx expects a data object of the type i. The execution then takes place, sorted according to ascending value of idx. idx has the value 0, if a value is not explicitly specified. If the value is the same as idx or if no value is specified, the order of execution is the same as the order of registration. A subroutine registered multiple times for COMMIT or ROLLBACK is executed once in each case.