2009 Mar 02 4:34 PM
hi all,
i am using following code to get FI accounting doc and year. but it is taking around 5 min to execute this select stmt can any one suggest me to improve the performance.
if not i_rseg[] is initial.
select belnr
gjahr
budat
awkey
from bkpf
into table i_bkpf
for all entries in i_rseg
where bukrs = i_rseg-bukrs
and awkey = i_rseg-awkey.
endif.
there are around 15000 entries exist in the table which are related to select query.
thanking you ,
srujan.p
2009 Mar 02 4:44 PM
hi,
1) Create a view for that table , or
2) Check for any existence of duplicate key valued entries in the internal table
delete them, because you are using
for all entries in itab
, or
3) If you don't need all the 15000 entries and you can get your work done with
a minimal number of values then use the statement
up to N rows
with your select query this way, you can improve the performance
and also hit the database only once in the entire operation
Thanks
Sharath
2009 Mar 02 4:46 PM
2009 Mar 02 4:49 PM
hi,
comming to performance better to use views ,it gives better performance.
Regards,
jaya
2009 Mar 02 4:55 PM
hi is there any standard view for that, i did'nt used that concept, can you explain me how to do that.
2009 Mar 02 4:59 PM
>
> comming to performance better to use views ,it gives better performance.
Why do you say that? The problem here is with the index.
Rob
2009 Mar 02 5:00 PM
hi ,
Over here I am trying to concatenate Rseg-Belnr, Rseg-Gjahr and pass this value to Bkpf-Awkey.
I require the entries of FI Doc data. And this is the place where my performance is affected badly!
Any inputs on this?
2009 Mar 02 5:07 PM
>
> hi ,
>
> Over here I am trying to concatenate Rseg-Belnr, Rseg-Gjahr and pass this value to Bkpf-Awkey.
I understand that. You are trying to use index BKPF~4 (Index by application type and key). But here AWTYP is the first non-client field of the index, so you have to include it in the WHERE.
Rob
2009 Mar 02 6:29 PM
BKPF have the index 8 by the field AWKEY, try this index ... without using the field BUKRS