how to use FM enqueue_read
i already used fms ENQUEUE_EVVBAKE and DEQUEUE_EVVBAKE for identifying locked quotations but i had trouble when the last entry for quotation is locked, all documents shows tahat they are locked too.
i wanted to know how to use enqueue_read FM.
Please tell me what's wrong with the concept i know.
This is what i've tried:
PARAMETER: p_vbeln type vbeln. == the document number which i wanted to check if on process
DATA: it_enq TYPE STANDARD TABLE OF seqg3 WITH DEFAULT KEY, == to be used in the TABLES
c_garg type seqg3-garg. == to be used in GARG parameter
clear: c_garg, it_enq.
concatenate sy-mandt p_vbeln into c_garg. == concatenated the client and the document number to be used in garg
CALL FUNCTION 'ENQUEUE_READ'
GCLIENT = SY-MANDT == client
GNAME = 'EVVBAKE' == lock object name found in sm12
GARG = c_garg == combination of client and the document number
GUNAME = ' ' == space
LOCAL = ' '
FAST = ' '
ENQ = it_enq. == the table initailized above
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
this code always returns 'no' even if i'm currently processing the document.
Thanks in advance!
when the last entry for quotation is locked, all documents shows tahat they are locked too.
Please check that you do not call ENQUEUE with initial document number - this will lead to lock for all.
Usually you do not need the ENQUEUE_READ, it is used for display of all locks in SM12.