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: 

Lock Owner

Former Member
0 Kudos

Hi,

I have used enqueue to lock a table, how can I get the name of the person who lock the table? Is there a function or table to check?

6 REPLIES 6

Former Member
0 Kudos

Use the FM ENQUEUE_READ.

0 Kudos

Hi

I get error when i enter the table in enq. What should i enter?

CALL FUNCTION 'ENQUEUE_READ'

  • EXPORTING

  • GCLIENT = SY-MANDT

  • GNAME = ' '

  • GARG = ' '

  • GUNAME = SY-UNAME

  • LOCAL = ' '

  • FAST = ' '

  • IMPORTING

  • NUMBER =

  • SUBRC =

TABLES

enq = ZVPAFINAL

  • EXCEPTIONS

  • COMMUNICATION_FAILURE = 1

  • SYSTEM_FAILURE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

0 Kudos

Hi Hui,

Pass the table in single quotes like...'ZVAPFINAL'.

I guess this should solve your problem.

Thanks,

Arun

0 Kudos

I tried but somehow i got error

"zvpafinal" is not an internal table

0 Kudos

Go to T-Code SM12

Enter the table name

You will get the id who has locked it.

Reward points if helpful

Regards

Bikas

0 Kudos

The best thing to do is to put a break-point in the FM ENQUEUE_READ then run SM12. In debug mode you will then see what you need to pass to the FM.