The following graphic shows the relationship between SAP locks and database locks.
SAP Locks and Database Locks
The components include:
The dialog work process that executes a transaction
The update work process that inherits the locks
The database
The Enqueue Server that manages the locks in the Lock Table. To simplify the graphic, the enqueue server is not shown.
The duration of the SAP LUW and of the SAP lock is shown on the left.
The dialog work process executes an SAP dialog transaction that comprises three screens (input windows). Each screen corresponds to one database LUW. Once the user has made an entry, the database LUW ends.
Processing is then resumed by a dialog work process. After the second user input, processing is completed and the dialog part of the SAP LUW ends.
Note
The transaction does not have to be processed by the one dialog work process only. For each screen, the dispatcher simply searches for a free work process to handle the processing.
In this example, an SAP lock is requested on the first screen of the transaction. This exists until the application data has been changed in the database, that is, in most cases, until the SAP update is completed. There is no loss of performance since it does not involve a database lock.
The database lock exists only for the duration of the database LUW, in which the changes made in the SAP system are actually updated.