2008 Jul 15 11:56 AM
hi all,
I want to calculate the quantity with some logic & replace it in mfbf transaction.
I am using user exit , EXIT_SAPLBARM_002 of
XMRM0001. I have written the following code , in the debug mode it is coming but I am not knowing how to update & to what table to update the data..
DATA : v_erfmg TYPE erfmg,
ind LIKE sy-tabix.
DATA : w_imseg TYPE imseg,
w_mseg TYPE imseg.
LOOP AT i_imseg INTO w_imseg.
ind = sy-tabix.
IF w_imseg-bwart = '131'.
READ TABLE i_imseg INTO w_mseg WITH KEY bwart = '261'.
IF sy-subrc = 0.
v_erfmg = w_mseg-erfmg.
*formula
v_erfmg = v_erfmg - v_erfmg * ( 20 + 30 ) / 100.
ENDIF.
w_imseg-erfmg = v_erfmg.
MODIFY i_imseg FROM w_imseg INDEX ind TRANSPORTING erfmg.
ENDIF.
ENDLOOP.
the above formula logic is working fine, but
after this what should i do to update the data .
thanks in advance
2008 Jul 25 10:26 AM
2009 Jan 30 2:17 PM