12-18-2006 10:44 PM
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
12-18-2006 10:47 PM
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
12-18-2006 10:47 PM
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