An SAP transaction can, depending on how it is programmed, carry out database changes directly without using the SAP Update System; the database changes are made at the end of a database LUW.
The transaction can, however, also use the SAP Update System and bundle the updates of several database LUWs (see
Functional Description of Updates).Bundling is an ABAP programming technique which collects database changes and performs these together at the end of a transaction. (See also
Update Techniques.)In the examples described so far, the updates have always been bundled.
Bundling updates involves combining important changes made by an SAP transaction in a database LUW. Only changes that are performed in a single database LUW can be reversed. If it is important to be able to reverse all of the changes made with an SAP transaction for the sake of maintaining data consistency, all of the changes must be bundled in one database LUW.
In order to bundle the updates, the special ABAP form routines and function modules for the database changes are not processed until the ABAP keyword
COMMIT WORK is output.The SAP System also features its own locking mechanism for restricting data access. This mechanism is used, in certain cases, to hold SAP locks within an SAP transaction beyond the boundaries of database LUWs. (At the start of a new database LUW, the database locks of the previous LUW are released. The SAP locks, however, remain active). Further information on SAP locks can be found in the documentation on
The SAP Lock Concept.Update bundling and the SAP lock system maintain data integrity in processes that cover several database LUWs, and fulfill the requirements regarding rollback. This means that all of the data changes can be reversed if a runtime error occurs during the update.
Further information on LUWs and bundling can be found in the ABAP manual.