Skip to Content
0
Jun 23, 2021 at 09:20 AM

Sales Register Performance

62 Views

I am facing an issue regarding the performance of sales register.

When we executed the report for 1 month. The internal table T_VBRK contains the 36447 records and internal table

T_VBRP contains the 167426 records and the T_KONV table contains the 11113633 records. The T_KONV contains lots of discount conditions. The output getting very very slow.

LOOP AT T_VBRP INTO W_VBRP.

CLEAR:W_VBRK.
READ TABLE T_VBRK INTO W_VBRK WITH KEY VBELN = W_VBRP-VBELN.
IF SY-SUBRC = 0.

LOOP AT T_KONV INTO W_KONV WHERE KNUMV = W_VBRK-KNUMV AND KPOSN = W_VBRP-POSNR.
CASE W_KONV-KSCHL .
WHEN 'JOSG'.
WHEN 'JOCG'.

based on conditions do the calculations.....

ENDCASE.

ENDLOOP .

ENDLOOP.

My report is giving poor performance. And even when we execute the report for more than 6 months the data records in T_KONV tables becomes in crores. Report is not giving output in foreground and even in background.Because loop inside loop and inner loop contains very heavy records....Is there any other way round for this report as user wants sales dump even for 2 years..