2008 Jul 15 11:52 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 15 11:59 AM
Hi,
No need to update any table. If you update the records in I_IMSEG those will be updated automatically.
Regards,
Kalyan.
2008 Jul 15 12:03 PM
hi,
I have seen in debug mode, the value in i_imseg table got changed, but this is not update automatically in mseg. do i need to write manual statement to update.
2008 Jul 16 4:40 AM
can anyone tell how to change quantity in MFBF tocde using user exit.