SAP® Documentation

Single view

/SRMERP/CL_A_LOCK - Lock and Unlock for ERP eProc BOs and their COs

ROGBILLS - Synchronize billing plans   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book


Generic lock class to lock on node level by the instance key (global unified unique identifier).

The lock class supports all kinds of lock modes like optimistic lock, propagation of optimistic lock, shared lock and exclusive lock. In addition the class supports locking on node level and a generic lock (complete subtree).


The class supports a depth of 3 of lockable nodes, i.e. with the construction of the lock argument generic locks of the subtree are supported by this class. If this class is used for the very unlikely case of a higher depth of lockable nodes these nodes are also locked, but the generic lock is not supported any more, i.e. it could happen that a node of depth 3 is deleted and concurrently a node of depth 4 is created with the deleted node instance as parent what would lead to inconsistencies on the database. If such scenarios could happen an own lock implementation needs to be provided.



The business object name and the business object node name (only for 2-level locking depth) are shown in transaction SM12 to identify the lock entries.

The lock argument is built in the following way:

  • 1-level locking depth (only root node lockable)
  • Business object name

  • Key of root node

  • 2-level locking depth
  • Business object name

  • Key of root node

  • Node name (of locked node)

  • Key of locked node

  • 3-level and higher locking depth
  • Business object name

  • Key of root node

  • Key of 2nd-level lockable node

  • Key of locked node

Further information

General Material Data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2660 Date: 20190617 Time: 151032     sap01-206 ( 11 ms )

Our Service

Looking for Support? Questions?




Leave us your contact details and we will call you back. Panels marked with * are mandatory.