‎2008 Apr 25 2:03 PM
Hi All,
I need FM to covert price to one unit to another.
Any suggestion welcome.
Regards,
‎2008 Apr 25 2:05 PM
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = w_lqua-matnr
i_in_me = w_lqua-meins
i_out_me = text-011
i_menge = w_lqua-gesme
IMPORTING
e_menge = w_lqua-gesme.
‎2008 Apr 25 2:07 PM
Hello,
Here is another one:
CALL FUNCTION 'CF_UT_UNIT_CONVERSION'
EXPORTING
matnr_imp = itab_pot-matnr
unit_new_imp = ztb_vend_min-min_uom
unit_old_imp = itab_pot-meins
value_old_imp = w_conv_qty
IMPORTING
value_new_exp = w_conv_qty.
Thanks,
Venu
‎2008 Apr 25 2:07 PM
sorry the earlier one will convert the quantity this one will covert price
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = sy-datum
foreign_amount = w_material-stprs
foreign_currency = t001-waers
local_currency = p_waers
type_of_rate = 'M'
IMPORTING
local_amount = w_material-stprs
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
OTHERS = 5.