Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

REG. performance issue

i am having one report with following code i have to change it.

LOOP AT IT_CSSL INTO WA_CSSL.

LOOP AT IT_AUFK INTO WA_AUFK.

SELECT SINGLE BELNR PERIO WOGBTR MEGBTR OBJNR GJAHR PAROB1 OWAER MEINH MEINB WERKS MATNR BUKRS

FROM COEP INTO WA_COEP WHERE WRTTP = '04' AND GJAHR = S_GJAHR

AND OBJNR = WA_AUFK-OBJNR AND PAROB1 = WA_CSSL-OBJNR.

IF SY-SUBRC = 0.

APPEND WA_COEP TO IT_COEP.

ENDIF.

ENDLOOP.

ENDLOOP.

i modified with for all entries that also not used like below. the following works for single objnr only for more it takes more time.

SELECT BELNR PERIO WOGBTR MEGBTR OBJNR GJAHR PAROB1 OWAER MEINH MEINB WERKS MATNR BUKRS

FROM COEP INTO TABLE IT_COEP FOR ALL ENTRIES IN IT_AUFK WHERE WRTTP = '04' AND GJAHR = S_GJAHR

AND OBJNR = IT_AUFK-OBJNR.

CLEAR:WA_CSSL,WA_COEP1.

LOOP AT IT_CSSL INTO WA_CSSL.

READ TABLE IT_COEP INTO WA_COEP WITH KEY PAROB1 = WA_CSSL-OBJNR.

IF SY-SUBRC = 0.

APPEND WA_COEP TO IT_COEP1.

ENDIF.

ENDLOOP.

REFRESH: IT_COEP.

IT_COEP[] = IT_COEP1[].

SORT IT_COEP BY BELNR.

and i create the seondary index for COEP table with key fields mandt, wrttp, gjahr and objnr that is also not working

please help me for this performance change

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question