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: 

splitting for all entries statement

Former Member
0 Kudos

Hi,

I want to split the following select stmt with for all entries into 2 statements. Plz tell me how to do it?

select ebeln

ebelp

xblnr

kschl

stunr

zaehk

lifnr

gjahr

budat

menge

arewr

dmbtr

vgabe

shkzg

belnr

buzei

bewtp

from ekbz

into corresponding fields of table e_ekbz_tmp

for all entries in t_bsisgr

where ebeln eq t_bsisgr-ebeln

and ebelp eq t_bsisgr-ebelp

and kschl in r_price_cond_typ.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

First of all u should be very carefull while using this FOR ALL ENTRIES in the select statement.

either u should select full key fieds in the select clause or full key fields in the where clause or else u will get some unwanted fileds ...

maximum try to avoid this for all entries statement...

try to do like this.

loop at t_table into fs_table.

select field1

field2

field3

from table

into appending table t_some_table

where filed1 eq fs_table-filed1

filed2 eq fs_table-field2.

endloop.

regards

Sunil Kumar Mutyala

2 REPLIES 2

Former Member
0 Kudos

Hi,

if you are able to achieve something by making use of a single statement, why r u trying to do using two statements.

can u please specify your exact requirement?

Reward points if this helps,

Kiran

Former Member
0 Kudos

Hi,

First of all u should be very carefull while using this FOR ALL ENTRIES in the select statement.

either u should select full key fieds in the select clause or full key fields in the where clause or else u will get some unwanted fileds ...

maximum try to avoid this for all entries statement...

try to do like this.

loop at t_table into fs_table.

select field1

field2

field3

from table

into appending table t_some_table

where filed1 eq fs_table-filed1

filed2 eq fs_table-field2.

endloop.

regards

Sunil Kumar Mutyala