2010 Oct 03 12:11 PM
Hi
I have a requirement like i want to change the material value from one unit to other.
Example: i have 123 material value in KG 1200 and i want to convert the value to Grams.
Can you please let me know is there any function module?
I have tried different functin modules but none of them are giving correct result.
Regards,
Srinath
2010 Oct 03 12:20 PM
You can use function module "MD_CONVERT_MATERIAL_UNIT"
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
I_MATNR = I_MATNR "Material number
I_IN_ME = I_MEINH_IN "Input unit
I_OUT_ME = I_MEINH_OUT "Output unit
I_MENGE = LD_MENGE_IN "Inout quantity
IMPORTING
E_MENGE = LD_MENGE_OUT "Output quantity
EXCEPTIONS
OTHERS = 4.
2010 Oct 03 12:20 PM
You can use function module "MD_CONVERT_MATERIAL_UNIT"
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
I_MATNR = I_MATNR "Material number
I_IN_ME = I_MEINH_IN "Input unit
I_OUT_ME = I_MEINH_OUT "Output unit
I_MENGE = LD_MENGE_IN "Inout quantity
IMPORTING
E_MENGE = LD_MENGE_OUT "Output quantity
EXCEPTIONS
OTHERS = 4.
2010 Oct 03 12:22 PM
UNIT_CONVERSION_SIMPLE should fulfil you requirement. You could also look at the sample at [To convert the Unit of Measure to alternate UOM |http://wiki.sdn.sap.com/wiki/display/ABAP/ToconverttheUnitofMeasuretoalternateUOM] (or use the search tool at SDN. )
Regards,
Raymond
2010 Oct 03 12:35 PM
Hi Srinath,
Check Table MARM, here cobversions will get stored with its conversion factor. I used this table for a similar requirement.
Thanks & Regards,
Rock.
2010 Oct 03 12:42 PM