04-21-2008 12:11 PM
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.
04-21-2008 12:22 PM
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
04-21-2008 12:18 PM
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
04-21-2008 12:22 PM
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