Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem of FM ENQUEUE_EVVBLKE return code 2.

Former Member
0 Likes
4,026

The delivery picking program is customizing. I used FM 'ENQUEUE_EVVBLKE' in order to lock the delivery no. before picking. I also used FM 'DEQUEUE_EVVBLKE' after the user finish picking the delivery. But the delivery still be locked if another user run the same program again. The return code of the FM 'ENQUEUE_EVVBLKE' is 2. That's why? Thanks!

The codes are as follows:

  • lock delivery

CALL FUNCTION 'ENQUEUE_EVVBLKE'

EXPORTING

MODE_LIKP = 'E'

MANDT = SY-MANDT

vbeln = v_vbeln

EXCEPTIONS

foreign_lock = 2

system_failure = 3.

*unlock delivery

CALL FUNCTION 'DEQUEUE_EVVBLKE'

EXPORTING

MODE_LIKP = 'E'

MANDT = SY-MANDT

VBELN = v_vbeln.

  • X_VBELN = ' '

  • _SCOPE = '3'

  • _SYNCHRON = ' '

  • _COLLECT = ' '

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,176

Hi,

put a break-point on CALL FUNCTION 'DEQUEUE_EVVBLKE' and check if it is always reached and if the value of v_vbeln is the same as at the point of calling FM 'ENQUEUE_EVVBLKE'. Also check if no 'ENQUEUE_EVVBLKE' is called after 'DEQUEUE_EVVBLKE' for the same v_vbeln. If these things are ok, try to call dequeue function module with SYNCHRON = 'X'. You can also check locks in transaction SM12 after call of DEQUEUEEVVBLKE.

Regards,

Adrian

4 REPLIES 4
Read only

Former Member
0 Likes
2,176

Does any one can help me?

Read only

Former Member
0 Likes
2,177

Hi,

put a break-point on CALL FUNCTION 'DEQUEUE_EVVBLKE' and check if it is always reached and if the value of v_vbeln is the same as at the point of calling FM 'ENQUEUE_EVVBLKE'. Also check if no 'ENQUEUE_EVVBLKE' is called after 'DEQUEUE_EVVBLKE' for the same v_vbeln. If these things are ok, try to call dequeue function module with SYNCHRON = 'X'. You can also check locks in transaction SM12 after call of DEQUEUEEVVBLKE.

Regards,

Adrian

Read only

Former Member
0 Likes
2,176

Hi,

You can try the following too:

CALL FUNCTION 'ENQUEUE_E_TABLE'

EXPORTING

MODE_RSTABLE = 'X'

TABNAME = 'EVVBLKE'.

CALL FUNCTION 'DEQUEUE_E_TABLE'

EXPORTING

MODE_RSTABLE = 'X'

TABNAME = 'EVVBLKE'.

Regards,

Gilberto Li

Read only

0 Likes
2,176

It will lock the whole table.It is dangerours.