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: 

mfbf user exit

Former Member
0 Kudos
179

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

3 REPLIES 3

KalC
Active Participant
0 Kudos
93

Hi,

No need to update any table. If you update the records in I_IMSEG those will be updated automatically.

Regards,

Kalyan.

Former Member
0 Kudos
93

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.

Former Member
0 Kudos
93

can anyone tell how to change quantity in MFBF tocde using user exit.