Dear All,
How to increase performance for the following query BSIS
select a~saknr as glcode
b~txt50 as gldesc
into corresponding fields of table it_final
from skb1 as a
inner join skat as b
on asaknr = bsaknr
where a~saknr in p_glcode
and a~bukrs eq company
and b~spras eq 'EN'
and b~ktopl eq 'ABIX'.
sort it_gl by saknr.
the above query get 220 G/L accounts.*
if not it_final[] is initial.
select
bukrs
hkont
augdt
augbl
zuonr
gjahr
belnr
buzei
budat
werks
kostl
aufnr
shkzg
dmbtr
prctr
into corresponding fields of table it_bseg
from bsis
for all entries in it_final
where bukrs eq company
and prctr eq s_prctr
and gjahr eq s_year
and hkont eq it_final-glcode
and budat in s_budat "BETWEEN fromdt AND todt .
*above query taken above 30 minutes in production.
give me suggestions to tune query .
Regards,
Moon
Edited by: GoldMoon on Jan 13, 2010 4:35 PM