‎2008 Feb 22 5:11 AM
How to create lock object,- by going to se11 i have created but when i am going to sm12 to see wheather the table is locked or not then it is showing no entries found.
Please help me how to create Lock object and see wheather thetable is lock is locked or not.
Thnks in advance
‎2008 Feb 22 5:14 AM
Goto SE11
Entern Lock Object Name : EZTAB1. (Should start with EZ or EY).
Select Create Button..
Enter the Primary Table (your ztable).
Save and Activate .
It will generate two FMs
1. ENQUEUE_EZTAB1 (To lock the record)
2. DEQUEUE_EZTAB1. (To release the Lock)
Using Pattern call these FMs in your program
Regards,
‎2008 Feb 22 5:31 AM
I have created the lock object it is active and i have called the function enqueue_lockobject name, even the program is active but i want to see the wheather the table is locked or not by sm12.
‎2008 Feb 22 11:24 AM
Hi,
correct me if I am wrong. After u create, if u or anyone else opens that table then only its locked, right?
if u dont see that entry in SM 12, that means its not locked.
Deepti
‎2008 Feb 22 5:14 AM
Hi venkateshwar,
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
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.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=115258&messageID=2656474
Do the following steps..
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
<b>Reward points if this helps.
Manish</b>
‎2008 Feb 22 8:24 AM
Hi,
look into the following link for your answer...
http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm