Skip to Content
0
Apr 23, 2009 at 12:12 PM

Lock Table questions

126 Views

I am trying to lock a ztable. I did a search and see that you can use ENQUEUE_E_TABLE/DEQUEUE_E_TABLE to lock/unlock a table. I have also created lock objects for the table. If I run ENQUEUE_E_TABLE for my ztable I get a sy-subrc = 0 and I see the entry in SM12. However, I am unsure how I can check to see if a lock exists.

Basically I have a table which contains a report number (unique system wide, think of a PO number). I need to lock this table so that I can find the largest number and create the next number.

When I call ENQUEUE_E_TABLE it creates the lock on the table. However, when I call it a second time I don't get an error returned. Is this because the lock is specific to my user? Therefore I would need to use two users to see an error returned on the second ENQUEUE_E_TABLE call?

Regards,

Davis