Show TOC

Object documentationLock Owners Locate this document in the navigation structure

 

Person who holds a lock.

 

At the start of an SAP transaction, two owners are always created and can request locks.

A lock can have one or two owners. You can specifiy this in the _SCOPE parameter.

To find out which user is currently holding a lock, use function module ENQUEUE_.... This puts the name of the lock owner into SY-MSGV1.

More information: _SCOPE Parameters

Structure

There are dialog owners and update owners.

An owner is recognized by an owner ID, as described in The Lock Table.

A lock can have one or two owners. The ABAP programmer uses the _SCOPE parameter to define this.

Example

The graphic below shows how lock owners function during a dialog transaction.

This graphic is explained in the accompanying text.

SAP LUW: Dialog Transaction with Update

At the start of a dialog transaction, the system creates 2 lock owners: The dialog owner Owner_1 and the update owner Owner_2.

During the transaction, Owner_1 requests a lock, and later so does Owner_2. When the update process is called, the lock including Owner_2 is passed on to the update process. An update work process is started, like a dialog work process, with 2 owners and has 3 owners until the update process ends. All of the locks are released with an implicit DEQUEUE_ALL at the end of the update, at the latest.