11-15-2006 11:06 AM
I have to update a table named bnka, can anyone tel me the FM for locking and unlocking a table before updating the same..
thnkx
amit
11-15-2006 11:08 AM
Use the fms:
ENQUEUE_E_TABLE passing BNKA to the tabname parameter. and
DEQUEUE_E_TABLE passing BNKA to the tabname parameter.
or
ENQUEUE_EFBNKA and DEQUEUE_EFBNKA
Regards,
ravi
Message was edited by:
Ravi Kanth Talagana
11-15-2006 11:08 AM
Use the fms:
ENQUEUE_E_TABLE passing BNKA to the tabname parameter. and
DEQUEUE_E_TABLE passing BNKA to the tabname parameter.
or
ENQUEUE_EFBNKA and DEQUEUE_EFBNKA
Regards,
ravi
Message was edited by:
Ravi Kanth Talagana
11-15-2006 11:09 AM
Hi Amit
you can use FM ENQUEUE_EFBNKA to lock the table BNKA
and DEQUEUE_EFBNKA to unlock it
Example:
call function 'ENQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
update BNKA .....
call function 'DEQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl.
Cheers,
Manuel
11-15-2006 11:10 AM
Hi Amit,
You can use ENQUEUE_E_TABLES or ENQUEUE_E_TABLE function module.
Thanks
Ramakrishna
11-15-2006 11:20 AM
Hello,
Use,
ENQUEUE_* and DEQUEUE_* function modules.
Regards,
Shehryar Dahar
11-15-2006 11:25 AM
you can use FM ENQUEUE_EFBNKA to lock the table vbak
and DEQUEUE_EFBNKA to unlock it
Example:
call function 'ENQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
update BNKA .....
call function 'DEQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl.
11-15-2006 12:39 PM