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: 

Example Lock Objects

Former Member
0 Kudos

Hi Experts

Is there any standard lock objects exist, if so, pls guide me how

it works and locks the database with standard example for better understanding.

Thanks in advance.

Regards

Rajaram

10 REPLIES 10

former_member195698
Active Contributor
0 Kudos

Lock objects are used if you want to Lock the table at ROW Level.

Every lock object will generate two Function MOdules. One for ENQUEUE and one for DEQUEUE.

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

For the example check the link

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

Reward if useful

Regards,

Abhishek

Message was edited by:

Abhishek Jolly

0 Kudos

I thank for your valuable reply.

but can we check existing lock objects by doing standard transactions.

is there any objects applied by default pls.

0 Kudos

I am not able to understand your question. What exactly is your requirement

0 Kudos

You can do a WHERE USED LIST on the Lock Object and check the place where its being used.

But if your requirement is to search whether there is any lock object used in the Transaction. Then While running the transaction you can check the SM12 transaction. Or Search for ENQUEUE in your Transaction.

<b>

Reward Points if useful</b>

Regards,

Abhishek

0 Kudos

Any lock objects has been created alreday in SAP system.

If so, pls tell me , it would be helpful for me to understand better the concept.

Regards

Rajaram

0 Kudos

Ok.

Check the Lock Object EMMARAS. In SE11

Its a lock on the table ( Lock MARA and MARM/MAKT: shared )

SAP generated two FM's for that

DEQUEUE_EMMARAS Release lock on object EMMARAS

ENQUEUE_EMMARAS Request lock for object EMMARAS

See the where used list for the Lock Object and you can see the Include MM03SI00 in which the Lock FM is being used.

<b>Reward Points if useful</b>.

Regards,

Abhishek

0 Kudos

How to know that lock object is working.

In what transaction we can know this lock process happening.

Tell me any transaction and locking process also pls.

0 Kudos

debug the report wherever the lock object is getting used i.e. enqueue and dequeue...

if the sy-subrc returned by enqueue is 0 that means lock object is working...

<b>lock object always work properly.. if</b> you have selected all the key fields of the table in lock object .. and while locking the object you are passing all the parameters to the enqueue function...

0 Kudos

Whenever a Lock is acquired by SAP it will appear in transaction SM12 (Both table level locks and Row level locks).

Regards,

Abhishek

0 Kudos

i just want to know how the particular transaction or object is locked in physically.

in which transaction or when we trying to change particular transaction mutually.

tell me the transaction code for example MM01 and any another transaction, which we try to work on it, it comes locked.