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 object on database table

Former Member
0 Likes
544

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
476

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

3 REPLIES 3
Read only

Former Member
0 Likes
477

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

Read only

Former Member
0 Likes
476

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.

Read only

Former Member
0 Likes
476

This message was moderated.