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

Check Enqueue

Former Member
0 Likes
2,790

Hi guys,

I want to check if

CALL FUNCTION 'ENQUEUE_

was executed

meaning check that the block was already done , i know about the exception foreign_lock = 1 but for get that i need to execute iteh function and i dont want that, is there any other function or a table i could read which inform me about a block object status ??

thank you guys.

Edited by: José M. Sánchez on May 16, 2011 7:00 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,427

no, there is no other way, you need to try to lock it then you know if its locked already.

5 REPLIES 5
Read only

Former Member
0 Likes
2,428

no, there is no other way, you need to try to lock it then you know if its locked already.

Read only

ThomasZloch
Active Contributor
0 Likes
2,427

...and if it was not locked before, then it is now locked by your ENQUEUE call, so you can immediately unlock it again via the corresponding DEQUEUE call to achieve your "check" functionality.

Thomas

Read only

0 Likes
2,427

Hi Thomas ,

thank you for answered me, yes I have thought about that solution, is just i believed that maybe someone else could maybe know some other solution .

tnxs.

Edited by: José M. Sánchez on May 16, 2011 8:08 AM

Read only

Maciej_DomagaBa
Contributor
2,427

See function module ENQUEUE_READ.

regards

Read only

raphaelbertani
Explorer
0 Likes
2,427
*&---------------------------------------------------------------------*
*& Report YRB_ENQUEUE_CHECK
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT yrb_enqueue_check.


DATA: g_belnr TYPE RBKP-BELNR .
DATA: g_gjahr TYPE RBKP-GJAHR 

g_belnr = '5106289422'.
g_gjahr = '2024'.


CALL FUNCTION 'ENQUEUE_E_RBKP'
EXPORTING
belnr = g_belnr
gjahr = g_gjahr
_wait = 'X'
EXCEPTIONS
foreign_lock = 1
system_failure = 2.


IF sy-subrc = 0.
ENDIF.


DATA: lv_garg TYPE eqegraarg,
lt_enq TYPE STANDARD TABLE OF seqg3,
ls_enq TYPE seqg3.
CONCATENATE sy-mandt g_belnr g_gjahr '*' INTO lv_garg.
" Get Lock Records
CALL FUNCTION 'ENQUEUE_READ'
EXPORTING
gname = 'RBKP'
garg = lv_garg
guname = '*'
TABLES
enq = lt_enq.
BREAK-POINT.<br>

Lock and lock check example