LUW – Logical Unit Of Work are the sequence of database operations which ensure data consistency & integrity, and is logically bundled together forming a very single & invisible transaction.
LUW ensure all operations are executed either together successfully or none of them are executed. Operations in a single LUW are either committed completely or fully reverted/rolled back as a single unit.
Operations performed in single LUW are isolated from other separate LUWs.
Types of LUWs in SAP:
->Database LUW:
INSERT, UPDATE, DELETE , COMMIT WORK
->SAP LUW:
Sequence of operations in ABAP Program that execute as a single logical unit.
How LUW works?
When LUW starts, system begin the tracking of the database and its changes. If the operations are successful, LUW is committed, if error occurs, LUW is rolled back.
LUWs are important for ensuring the integrity of the database transactions. They enable robust and consistent data processing.