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

ABAP query..

Former Member
0 Likes
749

I want to select all customers from table KNKK into internal table where KKBER = '1000' and CRBLB = 'X' or GRUPP = 'Z'.

How can I do this ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
725

Try this:

select kunnr

from KNKK

into table i_kunnr

where ( KKBER = '1000' AND

CRBLB = 'X' ) or

GRUPP = 'Z'.

6 REPLIES 6
Read only

Former Member
0 Likes
725

>

> I want to select all customers from table KNKK into internal table where KKBER = '1000' and CRBLB = 'X' or GRUPP = 'Z'.

>

>

> How can I do this ?

select * from KNKK
into table it_knkk
where KKBER = '1000'
         and ( CRBLB = 'X'  or GRUP = 'Z' ).

Read only

Former Member
0 Likes
726

Try this:

select kunnr

from KNKK

into table i_kunnr

where ( KKBER = '1000' AND

CRBLB = 'X' ) or

GRUPP = 'Z'.

Read only

0 Likes
725

It sys incorrect nesting. Structure should be concluded by endselect,,,

Read only

0 Likes
725

In my sys. there is no syntax error for this code

data: i_kunnr type standard table of kunnr.

select kunnr

from KNKK

into table i_kunnr

where ( KKBER = '1000' AND

CRBLB = 'X' ) or

GRUPP = 'Z'.

Regards,

joy.

Read only

Former Member
0 Likes
725

Rajesh - please use a more meaningful subject line. This is the ABAP forum so any query shoud be about ABAP.

You have to decide what your logic should be and place parenthesis correctly to implement that logic. But only you can tell what that logic should be.

Rob

Read only

Former Member
0 Likes
725

<LOCKED BY MODERATOR - USE APPROPRIATE TITLES>

Greetings,

Blag.