Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

data dictionary

Former Member
0 Kudos

waht is the exac use of lock object

5 REPLIES 5

Former Member
0 Kudos

Normally locking is used for synchronisation purpose.

check out

http://help.sap.com/saphelp_nw04/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm

Former Member
0 Kudos

The R/3 System <b>synchronizes simultaneous access of several users to the same data records</b> with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules. These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

Have a look at below link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm

<b>Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.</b>

SAP Provide three type of Lock objects.

- Read Lock(Shared Locked)

protects read access to an object. The read lock allows other transactions read access but not write access to

the locked area of the table

- Write Lock(exclusive lock)

protects write access to an object. The write lock allows other transactions neither read nor write access to

the locked area of the table.

- Enhanced write lock (exclusive lock without cumulating)

works like a write lock except that the enhanced write lock also protects from further accesses from the

same transaction.

You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.

Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.

Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.

Technicaly:

When you create a lock object System automatically creat two function module.

1. ENQUEUE_<Lockobject name>. to insert the object in a queue.

2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.

You have to use these function module in your program.

I hope this gives you some idea abt lock objects.

Best Regards,

Vibha

*Please mark all the helpful answers

Former Member
0 Kudos

hi Abhay,

They are used to lock the database table while making the modifications on the database table so that consistency is obtained.

1.ENQUEUE is used to lock the database table

2.DEQUEUE is uset unlock it

u pls chk the below link which will make u very clear

<a href="http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm">click here for lock object</a>

hope this will u ,dnt forget to reward .

regards,

shan

Former Member
0 Kudos

hi,

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

from

chetan vishnoi