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: 

Report: Fetching data more time

Former Member
0 Kudos

HI,

My report is facing the performance issue. Actually for a PO I am getting the BELNR from the EKBE. for all the BELNR in EKBE where BWTYP = 'Q'. I need to get the Invoice No. This I am fetching from BKPF based on AWKEY as input. When I saw in debug mode I found that fetching data from BKPF is taking much more time. Here to get the data from BKPF I am giving only input AWKEY (EKBE-BELNR + GJAHR). I am able to find the correct keys to get the invoice details. Is there any other table which maintain Invoice document No. and invoice posting data. or can i tune my report. Please help.

Regards

Ram

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

use AWTYP = 'RMRP' where clause to get the accounting document number for the corresponding invoice..

There is an index on the field AWTYP, AWKEY, AWSYS..

This should make the SQL run faster.

SELECT bukrs belnr gjahr INTO TABLE T_BKPF

FROM bkpf

INTO lwa_bkpf

WHERE awtyp = 'RMRP'

AND awkey = lv_awkey.

Thanks,

Naren

1 REPLY 1

Former Member
0 Kudos

Hi,

use AWTYP = 'RMRP' where clause to get the accounting document number for the corresponding invoice..

There is an index on the field AWTYP, AWKEY, AWSYS..

This should make the SQL run faster.

SELECT bukrs belnr gjahr INTO TABLE T_BKPF

FROM bkpf

INTO lwa_bkpf

WHERE awtyp = 'RMRP'

AND awkey = lv_awkey.

Thanks,

Naren