‎2010 Mar 25 11:56 AM
Hi All,
We have a locked a Ztable by using the FM "ENQUEUE_E_TABLE" and the in SM12 we can see that the table is locked.
We are unlocking the ztable by uing the FM "DEQUEUE_E_TABLE" but when we check in SM12 the loked entery is not unlocked .can any one help us what is the issue with "DEQUEUE_E_TABLE " FM.
Regards
-
cb
‎2010 Mar 26 6:20 AM
‎2010 Mar 26 6:25 AM
In case your dequeue F.M is not working use
DEQUEUE_ALL
Regards
Bhanu
‎2010 Mar 26 7:56 AM
Hi Bhanu,
thanks for your reply, but i checked the DEQUEUE_ALL , it is also not working.
Regards
-
cb
‎2010 Mar 26 9:11 AM
hi,
Try this FM DEQUEUE_EMI_LOCKTABLE
hope this helps
Regards
Ritesh
‎2010 Mar 26 12:54 PM
Hi Rithesh,
thanks for your reply,
but this FM is not working.
Regards
-
cb
‎2010 Mar 26 6:25 AM
‎2010 Mar 26 7:50 AM
Hi ,
for locking
FORM F_LOCK_TABLE USING P_GV_TABLE_NAME.
DATA : lv_varkey TYPE rstable-varkey.
lv_varkey = sy-mandt.
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
TABNAME = P_GV_TABLE_NAME
VARKEY = lv_varkey
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.
ENDFORM.
for unlocking
*----------------------------------------------------------------------*
FORM F_UNLOCK_TABLE USING P_GV_TABLE_NAME.
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
TABNAME = P_GV_TABLE_NAME.
ENDFORM.
between this we are doing chages to ztable.
Regards
-
cb
‎2010 Mar 26 6:29 AM
Try FM 'DEQUEUE_ALL'.
This will dequeue all lock which are acquired by respective program.
Regards,
Sarbpreet
‎2010 Mar 26 1:18 PM
Hi,
First check weather table is locked or not. USE the FM ENQUEUE_E_TABLE
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = <table name>
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CASE sy-subrc .
WHEN '0' . "Success
WHEN '1' .
MESSAGE e045 WITH sy-msgv1 text-018. "foreign lock
WHEN '2' .
MESSAGE e045 WITH text-019. "syst. failure
WHEN OTHERS.
MESSAGE e045 WITH text-020 . "others
ENDCASE.
then unlock the table by using FM DEQUEUE_E_TABLE
Regards,
Bharani
‎2010 Mar 29 10:01 AM
Hi ,
I have just observed on starng thing in the lock and unlock FM
if i lock a ztable from SM37 using the FM " ENQUEUE_E_TABLEE " the table will lock ,but table will be unlocked only if we come back of the ENQUEUE_E_TABLEE session and then execute the FM "DEUEUE_E_TABLEE" then table will be unlocked the correclty.
but if use othere seesion to executre the FM "DEUEUE_E_TABLEE,, then it will not unlock.
how can we handle this.
Regards
-
cb
‎2010 Apr 19 5:45 PM
Hi all
the issue has been resloved,the problem is with the parmeter ,we need to var key in the deque FM also.
thanks
cb