cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer execution control back to previous statement

0 Kudos
113

1st Select query.

Loop at itab.

Flag = x.

Exit.

Endloop.

If Flag = x.

I want to execute 1st select query and loop again .

Does sap abap have any syntax for this or any logic.

Actually , I need this logic for finding last component of bom in multi level bom.

Accepted Solutions (0)

Answers (1)

Answers (1)

FrankJentsch
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is no specific statement. But it should be easy to achieve with a nested iteration like:

DO 2 TIMES.
  your code above (SELECT, LOOP ... ENDLOOP)
  IF need_to_repeat = abap_false.
    EXIT.
  ENDIF.
ENDDO.