sap lock objects

Upload: cecileekove

Post on 01-Mar-2016

219 views

Category:

Documents


0 download

DESCRIPTION

sap lock object

TRANSCRIPT

LOCK OBJECTS

admin|May 23, 2008|ABAP|No CommentsUNDERSTANDING 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_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_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.

COPYRIGHTSAP Database: Repository of all the freely available information on SAP.