Relationship Between SAP Locks and Database Locks

The following graphic shows the relationship between 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 administers the locks in the Lock Table. To improve the clarity of 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 a database LUW (see Functions of the Update). Once the user has made an input, the database LUW ends.

Once the user has entered his or her input, processing is then resumed by a dialog work process. After the second user input, processing is completed and the dialog section of the SAP LUW is terminated.

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. This does not impair performance, since the lock is not 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.