Hello Everyone,
I am using the fields VKONT, BUKRS, BUDAT to hit DFKKOP.
I tried using PACKAGE SIZE method and PACKAGE SIZE along with OPEN CURSOR method. Also I verified in ST05 that the query is making use of an index designed for "BUKRS and BUDAT".
However, the query in all cases is taking a huge amount of time and the report never gets past this statement.
OPEN CURSOR WITH HOLD cursor FOR SELECT vkont hvorg tvorg budat FROM dfkkop
FOR ALL ENTRIES IN it_unqca
WHERE bukrs = c_ui01
AND vkont = it_unqca-vkont
AND budat BETWEEN v_6mstartdate AND sy-datum.
DO.
FETCH NEXT CURSOR cursor APPENDING TABLE it_lp PACKAGE SIZE c_5000.
IF sy-subrc NE 0.
EXIT.
ENDIF.
CALL FUNCTION 'DB_COMMIT'.
ENDDO.
CLOSE CURSOR cursor.
Could anyone suggest a way to overcome this performance issue? Any suggestion will be helpful.
I searched SDN and nothing seems to satisfy this question. ( Performance issue after using index)
Thanks,
Sam