Is there any way to improve the performance and optimize the coding.
SELECT mblnr mjahr zeile mat_kdauf mat_kdpos matnr kdauf kdpos menge
FROM mseg INTO CORRESPONDING FIELDS OF TABLE imseg
FOR ALL ENTRIES IN itab
WHERE bwart IN ('309', '311', '315', '413', '411', '412')
AND xauto EQ 'X'
AND matnr EQ itab-matnr
AND mat_kdauf EQ itab-vbeln
AND mat_kdpos EQ itab-posnr.
ENDIF.
SORT imseg BY kdauf kdpos matnr .
LOOP AT itab.
LOOP AT imseg WHERE kdauf = itab-vbeln AND
kdpos = itab-posnr. "
itab-trfr_stk = itab-trfr_stk + imseg-menge.
ENDLOOP.
itab-balqty = itab-kwmeng - ( itab-rfmng + itab-kalab + itab-trfr_stk ).
MODIFY itab ."TRANSPORTING trfr_stk balqty itab.
ENDLOOP.
Moderator message - Please see the thread at the top of this forum: . You must show some evidence that there is a performance problem and that you have put in some effort to find where that problem is.}
Edited by: Rob Burbank on Apr 20, 2009 9:33 AM