0% found this document useful (0 votes)
61 views1 page

Lock Objects Understanding Sap Lock Object Mechanism

Lock objects are a mechanism in SAP to control how updates occur when multiple users access the same data table simultaneously. There are two function modules, ENQUEUE and DEQUEUE, that place and remove locks on tables. ENQUEUE generates a lock entry making the table only accessible to one user. DEQUEUE releases the locks. There are two types of locks: shared locks that prevent changes during reads, and exclusive locks that prevent changes during updates.

Uploaded by

cecileekove
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views1 page

Lock Objects Understanding Sap Lock Object Mechanism

Lock objects are a mechanism in SAP to control how updates occur when multiple users access the same data table simultaneously. There are two function modules, ENQUEUE and DEQUEUE, that place and remove locks on tables. ENQUEUE generates a lock entry making the table only accessible to one user. DEQUEUE releases the locks. There are two types of locks: shared locks that prevent changes during reads, and exclusive locks that prevent changes during updates.

Uploaded by

cecileekove
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

LOCK OBJECTS

admin | May 23, 2008 | ABAP | No Comments

UNDERSTANDING SAP LOCK OBJECT MECHANISM


Lock objects are a mechanism to control as to how the update takes place when more
than one user is updating the data in the same table.
To create lock objects you will need two function modules.
1. ENQUEUE_<LOCK_OBJECT_NAME>
This function module is used to generate a lock entry in the table making it only
accessible to only one user. Incase, for any reason if the lock object function module is
not able to lock the table. It will reflect in the return code.
2. DEQUEUE_<LOCK_OBJECT_NAME>
This function module is used to release the locks.
Now, If you want to end up having different programs trying to update the same
database table. To avoid problems code your database updates between 1 & 2.
There are basically two types of lock:

TYPES OF LOCK
Shared Lock : Is a read only lock that prevents the data from being changed when
another user is reading it.
Exclusive Lock: Is a write lock that prevents data from being changed when another
user is updating it.
COPYRIGHT SAP Database : Repository of all the freely available information on SAP.

You might also like