Application Development 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: 

Lock particular row in a database

Former Member
0 Kudos

Hi,

Is it possible to use ENQUEUE_E_TABLE to lock a particular row of a database table?

Regards,

Rayden

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Yes; you can lock a set of records. If material and plant form the composite key of a table and if varkey is plant, you can lock all materials of that plant.

You will find some info in this link [http://searchsap.techtarget.com/tip/1,289483,sid21_gci858655,00.html]

Thanks,

Venu

4 REPLIES 4

Former Member
0 Kudos

Hello,

Yes; you can lock particular record. You may concatenate key fields of the record into w_varkey and then use the function as shown below:

call function 'ENQUEUE_E_TABLE'

exporting

mode_rstable = 'E'

tabname = '<Table Name>'

varkey = w_varkey

_scope = '3'

exceptions

foreign_lock = 1

system_failure = 2

others = 3.

Thanks,

Venu

0 Kudos

Hi Venu,

Thanks for the reply, that mean I'm able to lock a set of record too right. Is there any link / resource where I can read more on the parameter on the function ENQUEUE_E_TABLE & DEQUEUE_E_TABLE?

Regards,

Rayden

Former Member
0 Kudos

Hello,

Yes; you can lock a set of records. If material and plant form the composite key of a table and if varkey is plant, you can lock all materials of that plant.

You will find some info in this link [http://searchsap.techtarget.com/tip/1,289483,sid21_gci858655,00.html]

Thanks,

Venu

0 Kudos

Hi Venu,

Thanks for the info.

Regards,

Rayden