Skip to Content
0
Jan 31, 2023 at 08:46 AM

instead of open cursor what can be added to increase performance please help me

110 Views Last edit Jan 31, 2023 at 08:48 AM 2 rev

OPEN CURSOR WITH HOLD gv_cursor FOR

SELECT a~mblnr
a~mjahr
a~zeile
a~bwart
a~matnr
a~werks
a~lgort
a~charg
a~lifnr
a~kunnr
a~shkzg
a~dmbtr
a~menge
a~meins
a~ebeln
a~ebelp
a~aufnr
a~kzbew
b~budat
b~vgart FROM mseg AS a INNER JOIN mkpf AS b ON b~mblnr = a~mblnr AND
b~mjahr = a~mjahr
FOR ALL ENTRIES IN it_temp1"it_mard
WHERE a~matnr EQ it_temp1-matnr AND
a~werks EQ it_temp1-werks AND
a~charg EQ it_temp1-charg AND
a~shkzg EQ 'S'.
DO.
FETCH NEXT CURSOR gv_cursor
APPENDING TABLE lt_mseg PACKAGE SIZE 25000.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
CLOSE CURSOR gv_cursor.
ENDIF.

thanks in advance ...

Regards ,

Mohammed Mubashir.

sap abap consult.