‎2008 Jun 20 4:57 AM
hi good morning all ,
i ahave a performance problem with a below query on bkpf table .
SELECT bukrs
belnr
gjahr
FROM bkpf
INTO TABLE ist_bkpf_temp
WHERE budat IN s_budat.
is ther any possibility to improve the performanece by using index .
plz help me ,
thanks in advance ,
regards ,
srinivas
‎2008 Jun 20 5:01 AM
Hi,
can u add any other primary or sec key fields into the WHERE clause..like bukrs, gjahr?? BUDAT forms part of index~2, so if u can add bukrs, if possible, it might help.
regards,
madhu
‎2008 Jun 20 5:08 AM
hi vasu ,
yes , but not sure , we can add company code ( Bukrs ) , if so how to do that ,
can u give me the code ,
thanks in advance ,
regards ,
srinivas
‎2008 Jun 20 5:18 AM
hi,
if u can add bukrs as input field or if u have bukrs as part of any other internal table to filter out the data u can use:
for ex:
SELECT bukrs
belnr
gjahr
FROM bkpf
INTO TABLE ist_bkpf_temp
WHERE budat IN s_budat
and bukrs in s_bukrs.or
SELECT bukrs
belnr
gjahr
FROM bkpf
INTO TABLE ist_bkpf_temp
for all entries in itab
WHERE budat IN s_budat
and bukrs = itab-bukrs.Just see , if it is possible to do any one of the above?? It has to be verified with ur requirement.
‎2008 Jun 20 5:02 AM
The bad performance is because you're not specifying the primary keys of the table BKPF in your WHERE condition; BKPF usually is a big table.
What you really need is to create a new index on database for table BKPF via the ABAP Dictionary on fields BUKRS, AWKEY, GJAHR & BSTAT. You'll find the performace of the program will significantly increase after the new index is activated. But I would talk to the Basis first to confirm they have no issues if you create a new index for BKPF on the database system.
Reward Points..
‎2008 Jun 20 5:04 AM
1.Try creating an index and use those fields in the where clause while fetching the data.Seems you are working on purchase register sort of report.
2.Make sure the selecting fields are in same order of the database table, and the Where condtion values also should be the same order,
3.use corresponding fields of statement with you select staement and check the performance .
Reward Points..
‎2008 Jun 20 5:06 AM
‎2008 Jun 20 5:29 AM
add extra conditions to the where clause in your select statement
‎2008 Jun 20 5:42 AM
Hi
BKPF always causing performance issue.Use BSIS table Instead of BKPF
Regards
Anbulakshmi
‎2008 Jun 20 5:46 AM
Hi,
Try adding key fields in your select query mate like say BELNR BUKRS or GJAHR.
Thanks
Nayan