Skip to Content
author's profile photo Former Member
Former Member

Regarding Lock Object

Hi Experts,

Can you please guide me how i can find out the lock object name. If i know the table name. is there any table which stores the table name and lock object name for that table.

Or any function module to which i can pass table name in return i can get lock object name.

i have to do all this by coding.

Its very urgect.

Thanks in advance.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2007 at 11:59 AM


    Lock Objects Tables is: <b>DD25L</b>

    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.

    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.


    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.

    check this link for example.


    call function 'ENQUEUE_EZLOCK3'


    mode_vbak = 'E'

    mandt = sy-mandt

    vbeln = vbak-vbeln

    • X_VBELN = ' '

    • _SCOPE = '2'

    • _WAIT = ' '

    • _COLLECT = ' '


    • FOREIGN_LOCK = 1


    • OTHERS = 3


    if sy-subrc <> 0.




    Reward points if useful



    Message was edited by:

    Anji Reddy Vangala

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Anji,

      Thanks for your reply. But i know this. we can use in this way.

      But the requirment is in dynamic programming i m passing table name on selection screen. so i have to find out lock object name by programming for that particular table.


  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2007 at 12:04 PM


    if u create a lock object system will generate enqueue_<lock object> and dequeue_<lock object>.

    goto abapdocu tcode.

    select ABAP Database Access ->SAP Transaction Concept ->Setting and Releasing Locks .

    see the that program to lock and unlock.

    goto se11 and see the lock object "EDEMOFLHT"(this is related to the above program).



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I think you can use either of this 2 function modules

      1. ENQUEUE_E_TABLE - Pass the table name and the fields based on which table should be locked in TABNAME and VARKEY parameters respectively. If you want to lock the table based on more than one key field, concatenate the key and pass it to VARKEY field.

      e.g. to lock VBAP for client 100 order no 0000000001 and item 000010 pass

      VBAP to TABNAME and

      1000000000001000010 to VARKEY

      also MODE_RSTABLE should be given E or S or X

      2. VIEW_ENQUEUE - this will also lock the table which you pass in VIEW_NAME parameter. i didnot get much success on this one.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.