The SAP Lock Concept (BC-CST-EQ) 

Purpose

The SAP System is equipped with a special lock mechanism that synchronizes access to data on the database. The purpose of the lock mechanism is to prevent two transactions from changing the same data on the database simultaneously.

Implementation Considerations

Locks are defined generically as "lock objects" in the Data Dictionary. A lock request is a specific instance of a lock object and locks a certain database object, such as a correction or a table entry.

Lock entries are usually set and deleted automatically when user programs access a data object and release it again.

Integration

The SAP lock mechanism is closely related to the update mechanism in R/3. A description of handling lock objects is provided in the ABAP Dictionary Documentation under Lock Objects.

The ABAP documentation explains the key elements of the lock concept with regard to programming ABAP transactions in the section entitled The R/3 Lock Concept.

Features

You can use the Lock Management functions (transaction SM12) to check and delete lock entries if the SAP dispatcher, operating system, or network connection fails and the dispatcher is not able to delete these entries. In this case, invalid lock entries remain effective and block access to the locked data when the system is restarted.

For a better understanding of the R/3 lock concept, please refer to the section entitled Functions of the SAP Lock Concept.

The most important profile parameters for the R/3 lock concept are described here. You can use these parameters to tailor your system resources to your needs.