04-21-2010 12:32 PM
can anybody send me example of NOT IN with loop at itab where filed not in (a, ,b, c )
when i use brackets becomes red..i dont know why
04-21-2010 12:35 PM
04-21-2010 12:38 PM
I think you are missing a space & have added an additional comma.
LOOP AT itab WHERE field NOT IN ( a, b, c ).
"Processing
ENDLOOP.
04-21-2010 12:43 PM
you can use like
LOOP AT IT_ITAB INTO WA_ITAB WHERE FIELD NE 'A' OR FIELD NE 'B'.
ENDLOOP.
04-21-2010 12:44 PM
else you can got this way:
Loop at itab.
If <field> CO 'a,b,c'
exit.
else.
<<--------Processing
endif.
04-21-2010 12:45 PM
Hi,
You can write like the below mentioned method also
LOOP AT ITAB INTO WA WHERE FLD NE ( FLD1, FLD1.1, FLD1.2 )
Endloop.
Check and let me know
04-21-2010 12:58 PM
Code like the way below;
data: st_tab type table of selopt with header line.
st_tab-sign = 'I'.
st_tab-option = 'EQ'.
st_tab-low = 'A'.
append st_tab. clear st_tab.
st_tab-sign = 'I'.
st_tab-option = 'EQ'.
st_tab-low = 'B'.
append st_tab. clear st_tab.
st_tab-sign = 'I'.
st_tab-option = 'EQ'.
st_tab-low = 'C'.
append st_tab. clear st_tab.
loop at itab not in st_tab.
endloop.
04-21-2010 1:33 PM
Please consult ABAP online documentation before posting.
Thread locked.
Thomas