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

syntax of loop

Former Member
0 Likes
488

i wont 2 do a loop with or but it dont working

ex.

LOOP AT itab INTO wa_itab.

<b>IF wa_itab-action = 'y1' OR 'y2' OR 'y3'.</b>

ENDIF.

ENDLOOP.

bold line is not compile.

what i have to change?

thankes

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
461


LOOP AT itab INTO wa_itab.

<b>IF wa_itab-action = 'y1' 
   OR wa_itab-action = 'y2'
   OR wa_itab-action = 'y3'.</b>



ENDIF.

ENDLOOP.




Regards,

Rich Heilman

Message was edited by: Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
462


LOOP AT itab INTO wa_itab.

<b>IF wa_itab-action = 'y1' 
   OR wa_itab-action = 'y2'
   OR wa_itab-action = 'y3'.</b>



ENDIF.

ENDLOOP.




Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
461

thankes

Read only

0 Likes
461

... or alternative

LOOP AT itab INTO wa_itab

where action(1) = 'Y' and action+1(1) between 1 and 3.

...

Regards,

Clemens