Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Function module for BKPF table

Former Member
0 Kudos
379

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

6 REPLIES 6

Former Member
0 Kudos
120

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

Former Member
0 Kudos
120

Hi,

Create a secindary index on BKPF with combination of fileds used in where condition.

It improves the performance.

Regards

Krishna

Former Member
0 Kudos
120

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

Former Member
0 Kudos
120

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

Former Member
0 Kudos
120

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

Former Member
0 Kudos
120

put some more where condition i think it wiil improve performance