Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to use FM enqueue_read

hi experts,

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.

refresh: 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'

EXPORTING

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 = ' '

  • IMPORTING

  • NUMBER =

  • SUBRC =

TABLES

ENQ = it_enq. == the table initailized above

  • EXCEPTIONS

  • COMMUNICATION_FAILURE = 1

  • SYSTEM_FAILURE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

write: 'processed'.

else.

write 'no'.

ENDIF.

this code always returns 'no' even if i'm currently processing the document.

Thanks in advance!

Former Member
Former Member replied

Hi karshbax,

>

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.

Regards,

Clemens

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question