Application Development and Automation 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: 
Read only

Unit Conversion

Former Member
0 Likes
951

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
882

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.

4 REPLIES 4
Read only

Former Member
0 Likes
883

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
882

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

Read only

Former Member
0 Likes
882

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.

Read only

Former Member
0 Likes
882

Thanks All !!