Show TOC

Background documentationCumulating Locks Locate this document in the navigation structure


The different types of locks are described in the SAP Lock Concept section.

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

If the name, argument, and lock mode of the elementary lock are identical, and if a lock is not exclusive and non-cumulative, it can be set more than once (a cumulation). 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 shows an example of how locks are cumulated.

This graphic is explained in the accompanying text.

Cumulating Locks — Example

  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 the 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.