2008 Mar 11 7:14 AM
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
2008 Mar 11 7:19 AM
2008 Mar 11 7:20 AM
2008 Mar 11 7:24 AM
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.
2008 Mar 11 7:45 AM
Hi
Use FM DEQUEUE_E_TABLE
to unlcok ENQUEUE_E_TABLE
Regards
Shiva