Skip to Content
0
Apr 03, 2013 at 08:03 AM

Better to use 'WAIT UP TO...' or 'ENQUE_SLEEP'?

905 Views

Hi,

I am looping on and processing IDOCS, i.e.:

LOOP AT lt_edidc INTO ls_edidc.
SUBMIT rbdapp01

WITH docnum = ls_edidc-docnum
AND RETURN.

* wait up to 100 seconds.

* CALL FUNCTION 'ENQUE_SLEEP'
* EXPORTING
* seconds = 100.

ENDLOOP.

When the SUBMIT is executed I would like it to finish processing the IDOC before it commences with the next one.

Is it better/safer (in my case above) to use 'WAIT UP TO 100 SECONDS' or to use the 'ENQUE_SLEEP' function?