1 Introduction
When We use the BAPI for generating production order and you are in the loop. Sometimes we don’t get production order . So we must add the code in the program.
2 Solution.
We add the code in the program .
DO 100 TIMES.
WAIT UP TO '0.1' SECONDS.
SELECT COUNT(*)
FROM AUFK
WHERE AUFNR EQ LV_ORDER_NUMBER.
IF SY-SUBRC EQ 0.
EXIT.
ENDIF.
ENDDO.