Application Development and Automation 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: 
Read only

How to create lock object?

Former Member
0 Likes
14,185

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

5 REPLIES 5
Read only

Former Member
0 Likes
7,681

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,

Read only

0 Likes
7,681

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.

Read only

0 Likes
7,681

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

Read only

Former Member
7,681

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>

Read only

Former Member
0 Likes
7,681