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

select statement

Former Member
0 Likes
470

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.

3 REPLIES 3
Read only

Former Member
0 Likes
442

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

Read only

Former Member
0 Likes
442

Astonishingly basic question, but here goes....

where .....

and <c> in ('aaa', 'bbb', 'ccc').

Read only

ThomasZloch
Active Contributor
0 Likes
442

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