Entering content frameBackground documentationCumulation of Locks Locate the document in its SAP Library structure

As described under Structure linkLock Mode, there are three types of locks:

The type of lock selected is determined by the programmer of the transaction when the lock object is created. See also Structure linkThe SAP Lock Concept in the ABAP Documentation.

A lock can be set more than once (cumulation), if the name, argument, and lock mode of the elementary lock are identical. The cumulation counter is incremented by one with each successive cumulation and reduced by one each time a lock is released. The lock is released when the counter reaches zero.

The following graphic illustrates how locks are cumulated.

Example

This graphic is explained in the accompanying text

  1. The lock request is accepted and written to the lock table. The cumulation counter of the dialog owner Owner_1 is 0. The counter of update owner Owner_2 is 1.
  2. The lock request is also accepted. The cumulation counter of dialog owner Owner_1 is still 0 (because _SCOPE was set to 2); the counter of update owner Owner_2 is now 2.
  3. This time, _SCOPE is set to 1. In other words, the cumulation counter of dialog owner Owner_1 is increased to 1 and that of update owner Owner_2 remains 2.
  4. This time _SCOPE=3, that is, the lock has two owners. The cumulation counter of dialog owner Owner_1, therefore, is increased to 2 and that of Owner_2 is increased to 3.

 

 

 

 

Leaving content frame