Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!



RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book


Short Reference

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


... LEVEL idx


This statement registers the subroutine of the current program for later execution. The name of the subroutine is directly specified as subr. The subroutine is not executed immediately and is flagged for execution by one of the statements COMMIT WORK or ROLLBACK WORK instead.

The statements COMMIT WORK or ROLLBACK WORK execute the subroutines that are registered with ON COMMIT or ON ROLLBACK respectively in the current work process and before update function modules that are registered using CALL FUNCTION ... IN UPDATE TASK are called. Subroutines that are registered during execution of an update function module with ON COMMIT are executed at the end of the update. In non-local updates, this takes places in the update work process and in local updates in the current work process.

Do not implement in function modules and subroutines


  • Creating subroutines is obsolete. If new subroutines are required for PERFORM subr ON COMMIT or PERFORM subr ON ROLLBACK, they should only be used as wrappers for a method call and must not contain any other functional code.
  • Registered subroutines cannot have any parameter interface. Therefore, data can only be passed through external interfaces, for example, the ABAP memory. Subroutines that are executed in COMMIT WORK or ROLLBACK WORK are thus more suitable for management tasks, such as cleanup work at the end of a SAP LUW, than for database changes.
  • During processing of a registered subroutine after COMMIT WORK or ROLLBACK WORK, the statements PERFORM ... ON COMMIT, PERFORM ... ON ROLLBACK, COMMIT WORK, or ROLLBACK WORK must not be executed. Type "A" messages caught using the predefined exception error_message in function module calls execute the statement ROLLBACK WORK implicitly and are therefore also forbidden.
  • If, during the processing of a registered subroutine after COMMIT WORK, update function modules are registered using CALL FUNCTION ... IN UPDATE TASK, this registration still applies to the current SAP LUW.
  • If the registration of subroutines is combined with the registration of update function modules with CALL FUNCTION ... IN UPDATE TASK, special care has to be taken regarding the database LUWs involved. Especially for asynchronous update, procedures that are registered outside update processing are executed in different work processes and therefore in different database LUWs. The changes in the database LUW of the subroutine can be committed before the update function modules are executed and a database rollback during an asynchronous update does not rollback these changes.


... LEVEL idx


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.


Registering of a subroutine insert of the same program for execution in the statement COMMIT WORK. The data is passed using the ABAP memory.


General Material Data   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 6014 Date: 20230206 Time: 103900     sap01-206 ( 111 ms )