If you want to mimic the quantity shown in MIRO (transaction) while posting incoming invoice, you need to use the following function module
CALL FUNCTION 'MRM_ASSIGNMENT'
EXPORTING
i_display = v_display
ti_drseg_old = i_drseg
TABLES
t_drseg = ti_drseg
t_rbselbest = ti_rbselbest
t_rbsellifs = ti_rbsellifs
t_rbselfrbr = ti_rbselfrbr
t_rbselwerk = ti_rbselwerk
t_rbselerfb = ti_rbselerfb
t_errprot = ti_errprot
t_ebelntab = ti_ebelntab
CHANGING
c_rbkpv = w_rbkpv
t_limit = w_limit.
IF sy-subrc = 0.
IF ti_errprot[] IS INITIAL AND ti_drseg[] IS NOT INITIAL.
LOOP AT ti_drseg ASSIGNING w_drseg WHERE koart = c_koart_initial.
CALL FUNCTION 'MRM_AMOUNT_QUANTITY_PROPOSE_N'
EXPORTING
i_rbkpv = w_rbkpv
CHANGING
c_drseg = w_drseg .
ENDLOOP. "
ENDIF. "
ENDIF. "