‎2006 Jan 10 8:09 AM
Hi ,
I have a select statement in my program as below:
select bukrs belnr gjahr blart bldat budat monat
cpudt tcode waers bstat psobt
into table t_bkpf
from bkpf
where bukrs in s_bukrs and
budat in s_budat and
monat = p_monat and
blart = p_blart.
This takes long time to fetch data. Could someone help me improving the performance of the statement.
‎2006 Jan 10 8:16 AM
Hi
Your SELECT statement looks ok for me.
Well if possible add the following also in the WHERE condition,
belnr,
gjahr
Abdul
‎2006 Jan 10 8:16 AM
Hi
Your SELECT statement looks ok for me.
Well if possible add the following also in the WHERE condition,
belnr,
gjahr
Abdul
‎2006 Jan 10 8:18 AM
Adding to what Abdul said , Also check if the parameters or select options which you are passing is blank or not.
Ankur Bhandari
‎2006 Jan 10 8:17 AM
Hi Sumi,
maybe start to had the GJAHR in your selection criteria.
and check your index, that must feet the selection criteria.
Rgd
Frédéric
‎2006 Jan 10 8:18 AM
Hi Sumi,
1. The sql is perfectly ok.
2. With some constraints, (if possible)
we can do this :
a) take bukrs as parameter (instead of select-option)
so that sql is bukrs = s_bukrs
b)arrange the sequencde of where conditions as
bukrs
blart
bldat
monat
e) Still, want more perfroamnce, then
final optino is :
SECONDARY INDEX
(using se11)
on fields
budat, monat , blart
(this will imporove the performance DRASTICALLY)
regards,
amit m.
‎2006 Jan 10 8:27 AM
And sometimes, when you know the size of the data you will have, you could specify the good size of the internal table. But that could be dangerous.
Fred