cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Optimization BSIS table selection

edward-matei
Newcomer
0 Likes
882

image.png

Hi,

I have the below standard code(SAP Note) from an ECC6.0 system and the selection performance from BSIS is very poor. I mention that I have 73.000.000 records in BSIS table.

How can I improve the below code?(see the picture attached)

DEFINE mac_select_amount.
SELECT xnegp shkzg dmbtr
APPENDING CORRESPONDING FIELDS OF TABLE lt_acc_amount
FROM &1
JOIN bkpf
ON &1~bukrs = bkpf~bukrs
AND &1~belnr = bkpf~belnr
AND &1~gjahr = bkpf~gjahr
WHERE &1~bukrs = iv_bukrs
AND &1~hkont = iv_hkont
AND bkpf~budat > iv_budat_from
AND bkpf~budat <= iv_budat_to
AND bkpf~rldnr IN mr_rldnr
AND bkpf~ldgrp IN mr_ldgrp
AND bkpf~bstat IN mcl_utility_tables->mr_bstat.
END-OF-DEFINITION.

CLEAR rv_amount.
CLEAR lt_acc_amount[].
* we shall check the indicator "Line Items Display"
* read items from other tables or just from BSEG
IF iv_xkres IS NOT INITIAL.
mac_select_amount bsis.
mac_select_amount bsas.
mac_select_amount bseg_add.
ELSE.

.............

Accepted Solutions (0)

Answers (0)