Application Development and Automation 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: 
Read only

TIME CONSUMING FOR BKPF TABLE

Former Member
0 Likes
703

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
659

Hi manikandan,

Can you please paste select query for BKPF ?

Regards,

Mohaiyuddin

Read only

0 Likes
659

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' ).

Read only

0 Likes
659

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

Read only

0 Likes
659

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

Read only

Former Member
0 Likes
659

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