Skip to Content
0
Former Member
Mar 13, 2007 at 01:44 PM

modify internal table

19 Views

here i need to modify the field name v_newqty in it_fg_xvbap-kwmeng.........by using modify or another ...but i need to send the v_newqty value to the it_fg_xvbap-kwmeng...

if not it_zfreegoods[] is initial.

loop at it_fg_xvbap.

read table it_zfreegoods with key matnr = it_fg_xvbap-matnr.

if sy-subrc eq 0.

v_mitem1_qty = it_fg_xvbap-kwmeng.

****

v_quantity = it_zfreegoods-quantity.

****

clear v_lines.

continue.

endif.

v_lines = v_lines + 1.

if it_zfreegoods-zfreemodel eq it_fg_xvbap-matnr.

******

v_newqty = v_quantity - it_fg_xvbap-kwmeng.

******

******

  • v_mitem2_qty = it_fg_xvbap-kwmeng.

  • v_newqty = it_fg_xvbap-kwmeng.

  • v_mixitem_qty = v_mitem1_qty + v_mitem2_qty.

v_quantity = v_mitem1_qty + v_newqty.

******

  • modify xvbap from it_fg_xvbap.

  • if v_mixitem_qty ne it_zfreegoods-quantity.

if v_quantity ne it_zfreegoods-quantity.

if fcode eq 'SICH'.

message e020(zsnd) with it_zfreegoods-quantity .

else.

message s020(zsnd) with it_zfreegoods-quantity .

endif.

endif.

endif.

endloop.