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

urgent

Former Member
0 Likes
710

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
692

<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.

4 REPLIES 4
Read only

Former Member
0 Likes
692

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

Read only

0 Likes
692

then how can we change the code without effect to previous code

plz help me

thanks

Read only

Former Member
0 Likes
693

<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.

Read only

Former Member
0 Likes
692

Your above code should work, just check that the table itab is sorted on field col01 before looping it.

Thanks.