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 modules to lock and unlock the table BSEG

Former Member
0 Kudos
944

Hi all,

Could you please let me know the function modules which can be used to lock and unlock the table BSEG.

Thanks and regards,

Anishur

4 REPLIES 4

Former Member
0 Kudos
308

Reward points..

prabhu_s2
Active Contributor
0 Kudos
308

ENQUEUE_EFVIBSEG

Former Member
0 Kudos
308

hi,

Locks are maintained in a central lock table. This ensures that also programs that run on a different

application server of the same SAP System, are informed of the locks.

Before a database update is triggered, the program requests a lock using a special function module. You

can set a lock for a data record in a database table, or even a set of records, according to you

requirements. The function module first checks whether there is an existing lock that will obstruct the

lock request. If a lock does not already exist then the lock is set.

If another program tries to set the same lock, the function module sends a message to say that the

record is already locked. This is carried out using an exception of the function module. Afterwards the

return code is set to the value <> 0. The return code must be supplied with values in the program. You

can inform the user of a corresponding message.

If the database change is successful, then the lock entry in the central lock table is deleted using a

different function module.

You set a lock entry by calling an ENQUEUE function module for an appropriate lock object. You can

find out which lock objects are available for a database table from the table's where-used list in the

ABAP Dictionary.

The "lock" and "unlock" function modules for the selected lock object require only the

ENQUEUE_<Name of lock object> and DEQUEUE_<Name of lock object> naming conventions. In

general, you need only pass the interface key fields. Default values are passed to all the other

parameters.

Hope this helps, Do reward.

Former Member
0 Kudos
308

Hi

Use FM DEQUEUE_E_TABLE

to unlcok ENQUEUE_E_TABLE

Regards

Shiva