Hi Gurus,
Please find the below code and let me know, whether this is correct or not.
TRY.
LOOP AT git_tc INTO gwa_tc.
IF gwa_tc-oldqty NE gv_old_qty.
IF NOT gwa_tc-newqty1 IS INITIAL.
gwa_tc-newqty1 = gwa_tc-newqty1 * gv_old_qty.
ENDIF.
IF NOT gwa_tc-newqty2 IS INITIAL.
gwa_tc-newqty2 = gwa_tc-newqty2 * gv_old_qty.
ENDIF.
IF NOT gwa_tc-newqty3 IS INITIAL.
gwa_tc-newqty3 = gwa_tc-newqty3 * gv_old_qty.
ENDIF.
IF NOT gwa_tc-newqty4 IS INITIAL.
gwa_tc-newqty4 = gwa_tc-newqty4 * gv_old_qty.
ENDIF.
IF NOT gwa_tc-newqty5 IS INITIAL.
gwa_tc-newqty5 = gwa_tc-newqty5 * gv_old_qty.
ENDIF.
SHIFT gwa_tc-newqty1 LEFT DELETING LEADING space.
SHIFT gwa_tc-newqty2 LEFT DELETING LEADING space.
SHIFT gwa_tc-newqty3 LEFT DELETING LEADING space.
SHIFT gwa_tc-newqty4 LEFT DELETING LEADING space.
SHIFT gwa_tc-newqty5 LEFT DELETING LEADING space.
ENDIF.
MODIFY git_tc FROM gwa_tc TRANSPORTING newqty1 newqty2 newqty3 newqty4 newqty5.
ENDLOOP.
CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 4.
RAISE exception.
ENDCATCH.
Please correct the above code, if needed. I need to handle any kind of Overflow errors.
Thanks,
Chandan