2008 Jan 09 6:27 AM
HI EXPERTS,
I HAVE WRITTEN AN ALV REPORT PROGARM FOR TAKING DEBTOR LIST.
I AM USING BKPF,BSID AND BSEG TABLE .
BUT IT TAKES LOT OF TIME EXECUTION.
MAINL;Y WHILE SELECTING FROM BKPF TABLE .
WHAT IS THE ALTERNATIVE FOR THIS ......
REGARDS,
MANI
2008 Jan 09 6:30 AM
Hi manikandan,
Can you please paste select query for BKPF ?
Regards,
Mohaiyuddin
2008 Jan 09 6:34 AM
SELECT BELNR BUDAT FROM BKPF INTO CORRESPONDING FIELDS OF TABLE IT_BKPF WHERE BUDAT IN DATE1 AND ( BLART EQ 'AB' or BLART EQ 'RV' OR BLART EQ 'DR' OR BLART EQ 'BR' ).
2008 Jan 09 6:37 AM
Hi, time consumig taken is not from the BKPF table. May be BSEG will take lot time because of huge data and its a cluster table. So, you take allthe table fields once in your program start time and use READ TABLE sstatement wherever you required. Only the way u can minimise your time.
Suku
2008 Jan 09 6:39 AM
Hi,
Do like this
Avoid using Into corresponding, declare the internal table with the required fields.
Try to use BUKRS & GJAHR in Where clause, at least try to pass blank values.
SELECT BELNR BUDAT FROM BKPF
INTO TABLE IT_BKPF
WHERE BUDAT IN DATE1
AND BLART IN ( 'AB', 'RV', 'DR','BR' ).
Regards,
Satish
2008 Jan 09 6:43 AM
As both field are not in primary key, create secondary index on BKPF for field BUDAT and BLART from SE11. This will improve performance to great extent.. you can retrieve all primary key in internal table and pass them to BSEG, so BSEG processing will also improve.
Regards,
Mohaiyuddin
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |