Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Locking a table and then releasing the lock...

Gurus,

I ant to lock a table DMS_LO_CD1 and then do certain upodate and then release the lock after that.

How can I d this ?

Thanks.

Regards,

Rajesh.

Tags:
replied
* Lock the table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.

IF sy-subrc = 0.

* Modify the database table with these changes
MODIFY (p_table) FROM TABLE <dyn_tab_temp>.

REFRESH <dyn_tab_temp>.

* Unlock the table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table.

ENDIF.
0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question