‎2008 Oct 31 10:32 AM
Have a requirement to create a lock object on database table. Can anyone table if lock object can be created individually on any database table? Not sure if i can apply on any database table. Please confirm
‎2008 Oct 31 10:33 AM
Hi,
You can create the locks for tables and views too.
There might not be any issues while you lock the any database table it all depends on the table that you lock and the data follow from the table.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 31, 2008 4:04 PM
‎2008 Oct 31 10:33 AM
Hi,
You can create the locks for tables and views too.
There might not be any issues while you lock the any database table it all depends on the table that you lock and the data follow from the table.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 31, 2008 4:04 PM
‎2008 Oct 31 10:42 AM
Hello,
You try with this FMs.
You will get it?
CONSTANTS: y_lk_plaf TYPE rstable-tabname VALUE 'PLAF',
y_lk_plnum TYPE rstable-varkey VALUE 'PLNUM'.
*Lock Table
CALL FUNCTION 'ENQUEUE_E_TABLEE'
EXPORTING
mode_rstable = 'E'
tabname = y_lk_plaf
varkey = y_lk_plnum
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
Update Field PLAF-YYSHORT
UPDATE plaf
SET yyshort = y_k_x
WHERE plnum = y_lv_plnum.
ENDIF.
Unlock Table
CALL FUNCTION 'DEQUEUE_E_TABLEE'
EXPORTING
mode_rstable = y_k_e
tabname = y_lk_plaf
varkey = y_lk_plnum.
‎2008 Oct 31 11:30 AM