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: 

Function Module to LOCK set of tables ?

Former Member
0 Kudos

Hi,

Which function module will help us to LOCK, set of 'Z' tables. Like i need to LOCK 6 'z' tables, where i 'm goin to pass only the table names.

OR May be i 'll pass the tables and key fields.. and the FM has to LOCK the key fields of the TABLES.

3 REPLIES 3

Former Member
0 Kudos

Use enqueue FM

Former Member
0 Kudos

You reuire to crete a lock object by SE11.

It will generate ENQUEUE and DENQUEUE FM's.

use the same.

Former Member
0 Kudos
try this

*-------------lock Table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = table_name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
 
 
 
*-------------Unlock Table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = table_name