‎2010 Jun 03 6:44 PM
Hello programmers,
I need to know how to write a select query in this given condition
select <f> from <t> into corresponding fields of itab
where <a> eq <b.a>
and < c > eq 'aaa'.
i want to take 3 values of <C> say 'aaa' 'bbb' 'ccc' ,
i tested more AND condition to it like
select <f> from <t> into corresponding fields of itab
where <a> eq <b.a>
and < c > eq 'aaa'
and < c > eq 'bbb'
and < c > eq 'ccc'.
but its not showing values .Please help.
‎2010 Jun 03 6:47 PM
Hi,
It´s a very, very basic question...
Think about:
where
and < c > eq 'aaa'
and < c > eq 'bbb'
and < c > eq 'ccc'.
Never will occurs, because nothing is igual to 'aaa' and 'bbb' at same time!
use:
where
and ( < c > eq 'aaa' or < c > eq 'bbb' or < c > eq 'ccc' ).
Best regards,
Leandro Mengue
‎2010 Jun 03 8:12 PM
Astonishingly basic question, but here goes....
where .....
and <c> in ('aaa', 'bbb', 'ccc').
‎2010 Jun 03 9:35 PM
Yes, I believe this is enough help, please always search for existing information before posting.
These forums are not meant to provide basic ABAP or general logic training.
Thread locked.
Thomas