2009 May 14 4:55 PM
Hi Guru's,
SELECT bukrs
belnr
gjahr
budat
monat
waers
awkey
FROM bkpf
INTO TABLE i_bkpf_data
WHERE bukrs EQ pa_bukrs AND
budat IN so_budat.
This Query making performance issue in my program so i want use function module for reading the content in BKPF table..
Please Help me on this issue..
Regards
P.Senthil Kumar
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on May 14, 2009 12:18 PM
2009 May 14 5:07 PM
Hi,
What is your requirement?
With those filters to select from BKPF you will have performance issues. You need to select from BKPF with the complete key or use a more limited BUDAT for the search.
Regards,
Gilberto Li
2009 May 14 5:09 PM
Hi,
Create a secindary index on BKPF with combination of fileds used in where condition.
It improves the performance.
Regards
Krishna
2009 May 14 5:14 PM
Please see: [Quickly Retrieving FI document Data from BSEG|/people/rob.burbank/blog/2007/11/12/quickly-retrieving-fi-document-data-from-bseg|Ignore the title - it helps with BKPF as well]
Rob
2009 May 15 5:49 AM
1.Use the Complete Secondary index for Posting Date in the WHERE condition
bstat = ' ' (for normal Acc Doc Number) along with bukrs and budat.
2.Ensure pa_bukrs AND so_budat have value (Make it mandatory)
Cheers
2009 May 18 8:56 AM
Hi,
Try to use the PACKAGESIZE as the example given below:
DATA: I_VBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
DATA: I_VBAK_1 LIKE VBAK OCCURS 0 WITH HEADER LINE.
DATA: V_LINES TYPE I.
* RANGES INITIALIZATION
RANGES R1 FOR VBAK-VBTYP.
R1-SIGN = 'I'.
R1-OPTION = 'EQ'.
R1-LOW = 'K'.
APPEND R1.
* Query with PACKAGE & RANGES
SELECT *
FROM VBAK
INTO TABLE I_VBAK
PACKAGE SIZE 1000
WHERE VBTYP IN R1.
APPEND LINES OF I_VBAK TO I_VBAK_1.
ENDSELECT.
Thanks and regards,
Raj
2009 May 18 9:12 AM
put some more where condition i think it wiil improve performance