Skip to Content
0
Former Member
Jul 15, 2008 at 10:56 AM

help in mfbf user exit

32 Views

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