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

Lock Owner

Former Member
0 Kudos
214

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
Read only

Former Member
0 Kudos
185

Use the FM ENQUEUE_READ.

Read only

0 Kudos
185

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.

Read only

0 Kudos
185

Hi Hui,

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

I guess this should solve your problem.

Thanks,

Arun

Read only

0 Kudos
185

I tried but somehow i got error

"zvpafinal" is not an internal table

Read only

0 Kudos
185

Go to T-Code SM12

Enter the table name

You will get the id who has locked it.

Reward points if helpful

Regards

Bikas

Read only

0 Kudos
185

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.