Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

help in mfbf user exit

Former Member
0 Kudos
144

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

2 REPLIES 2

Former Member
0 Kudos
99

done

0 Kudos
99

May you please explain how?