03-17-2009 11:58 AM
Hello,
I am planning to lock the table only if its not currently locked. does anyone knows any FM for the same.
Thanks in advance.
Regards
Rajeev
03-17-2009 12:06 PM
03-17-2009 12:03 PM
Hi,
You have to create a lock object for the database table in TCODE SE11.
And you can use the function module automatically generated for the lock object <lockobj> which you have created, namely, ENQUEUE_<lockobj> and DEQUEUE_<lockobj>...
If you use ENQUEUE_<lockobj>, if the table has been locked, then the function module raises an exception saying locked, which you can check from sy-subrc.
If sy-subrc = 0.
Then the table will be locked by you, you can perform any operations, and you can DEQUEUE it using the function module DEQUEUE_<lockobj> after performing the operations.
Best Regards,
Suresh
03-17-2009 12:06 PM
03-17-2009 12:09 PM
Hi:
Use FM DEQUEUE_E_TABLE / EQUEUE_E_TABLE it asks the locking mode and table name.
Regards
Shashi
03-30-2009 11:47 AM