Application Development 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: 

problem with select

Former Member
0 Kudos
105

hi see the below select statement

select * from ce4e001 where bukrs eq s_bukrs-low.

check s_kndnr.

check s_prctr.

move-corresponding ce4e001 to v_ce4e001.

append v_ce4e001.

endselect.

can i replace this select statement with

select * from ce4e001 into corresponding fields of table v_ce4e001 where bukrs eq s_bukrs-low

and kudnr in s_kndnr

amd s_prctr in s_prctr.

if not tell me the correct way

points are for sure

1 ACCEPTED SOLUTION

Former Member
0 Kudos
62

Yes, you can replace with the second select query.

Regards,

Satish

9 REPLIES 9

Former Member
0 Kudos
62

hi,

you can do that way.

regards,

chandu

Former Member
0 Kudos
62

Hi Ram,

the second select statement is correct u can do in this way.

The second select is better than the first statement.

select * from ce4e001 
into corresponding fields of table v_ce4e001 
where bukrs eq s_bukrs-low
and kudnr in s_kndnr
amd s_prctr in s_prctr.

This statement is better than the first because the first select statement will be looping SELECT and ENDSELECT.

select * from ce4e001 
where bukrs eq s_bukrs-low.
check s_kndnr.
check s_prctr.
move-corresponding ce4e001 to v_ce4e001.
append v_ce4e001.

i dint find into clause in this select statement

<REMOVED BY MODERATOR>

raam

Edited by: Alvaro Tejada Galindo on Apr 22, 2008 5:10 PM

Former Member
0 Kudos
62

U can write ...

select * from ce4e001 into corresponding fields of table

v_ce4e001 where bukrs eq s_bukrs-low

and kudnr in s_kndnr

amd s_prctr in s_prctr.

Former Member
0 Kudos
63

Yes, you can replace with the second select query.

Regards,

Satish

Former Member
0 Kudos
62

Hi,

Yes, You can write, it will works.

Thanks

Ganesh

Former Member
0 Kudos
62

yes you can replace with second select statement,for better performance remove * inplace use fields what you need in the output,and remove into corresponding fields addition ..try to use the fields in order of database fields.

<REMOVED BY MODERATOR>

Dara.

Edited by: Alvaro Tejada Galindo on Apr 22, 2008 5:10 PM

Former Member
0 Kudos
62

Hi

Ram,

You can Replace the First Select Query with the Second one .

Infact the Second one is better than the First one in terms of Performance.

Regards,

SUNIL

Former Member
0 Kudos
62

Hi

The second way u have approached works fine and has nothing problem...

it can also be done in this way

select * from ce4e001 into corresponding fields of

table v_ce4e001 where

bukrs = s_bukrs-low-bukrs and

kudnr = s_kndnr-kudnr and

s_prctr = s_prctr-s_prctr .

hope it is useful. <REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 22, 2008 5:11 PM

Former Member
0 Kudos
62

thanks