2007 Feb 15 4:54 PM
Hi
i have used <b>control break</b> statements inside <b>Loop at intrenal table with where</b> condition.How can i modified with out change the code?
LOOP AT itab INTO wa_itab WHERE col01 = 'H' OR col01 = 'I' .
-
-
-
-
AT END OF col01.
IF wa_itab-col01 EQ 'I'.
CLEAR item_no.
CLEAR flag.
ENDIF.
ENDAT.
-
---
ENDLOOP.
plz help me out from this issue
thanks
2007 Feb 15 5:10 PM
<b>delete itab where col01 ne 'H' or col01 = 'I'.</b>
LOOP AT itab INTO wa_itab.
-
-
-
-
AT END OF col01.
IF wa_itab-col01 EQ 'I'.
CLEAR item_no.
CLEAR flag.
ENDIF.
ENDAT.
-
---
ENDLOOP.
Hi
i have used <b>control break</b> statements inside <b>Loop at intrenal table with where</b> condition.How can i modified with out change the code?
LOOP AT itab INTO wa_itab WHERE col01 = 'H' OR col01 = 'I' .
-
-
-
-
AT END OF col01.
IF wa_itab-col01 EQ 'I'.
CLEAR item_no.
CLEAR flag.
ENDIF.
ENDAT.
-
---
ENDLOOP.
plz help me out from this issue
thanks
2007 Feb 15 4:57 PM
Hi,
We do not use the Where condition with a Loop if we use the Control break statments,
LOOP AT itab INTO wa_itab.
IF wa_itab-col01 = 'H' OR wa_itab-col01 = 'I' .
-
-
-
-
AT END OF col01.
IF wa_itab-col01 EQ 'I'.
CLEAR item_no.
CLEAR flag.
ENDIF.
ENDAT.
-
---
ENDIF.
ENDLOOP.
Regards
Sudheer
2007 Feb 15 5:05 PM
then how can we change the code without effect to previous code
plz help me
thanks
2007 Feb 15 5:10 PM
<b>delete itab where col01 ne 'H' or col01 = 'I'.</b>
LOOP AT itab INTO wa_itab.
-
-
-
-
AT END OF col01.
IF wa_itab-col01 EQ 'I'.
CLEAR item_no.
CLEAR flag.
ENDIF.
ENDAT.
-
---
ENDLOOP.
2007 Feb 15 5:13 PM
Your above code should work, just check that the table itab is sorted on field col01 before looping it.
Thanks.