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

Reg : Unit Conversion FM

Former Member
0 Likes
780

hi,

what is the FM to Convert from one UOM to Another UOM.

ex :

input uom : LV

output uom: KG

if i give LV as input then in KG it will give 2.2046

Regards

Ashok Parupalli.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
693

Hi,

Use these FMs..

MATERIAL_UNIT_CONVERSION

MD_CONVERT_MATERIAL_UNIT

Thanks,

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
694

Hi,

Use these FMs..

MATERIAL_UNIT_CONVERSION

MD_CONVERT_MATERIAL_UNIT

Thanks,

Naren

Read only

Former Member
0 Likes
693

Hi,

Try using fm <b>UNIT_CONVERSION_SIMPLE

MATERIAL_UNIT_CONVERSION</b>

Regards,

Sailaja.

Read only

Former Member
0 Likes
693

chk this thread

Read only

Former Member
0 Likes
693

Hi Ashok,

1) Use Function module <b>UNIT_CONVERSION</b> to get unit conversion from one unit to other.

CALL FUNCTION <b>'UNIT_CONVERSION'</b>

EXPORTING

meinh = 'LV' "UNIT FROM

meins = 'KG' "UNIT TO

mgame = FROM_VALUE "VALUE OF UNIT_FROM

IMPORTING

o_mglme = TO_VALUE. "VALUE OF UNIT_TO

2) Use Function module <b>UNIT_CONVERSION_SIMPLE</b> to get unit conversions.

CALL FUNCTION <b>'UNIT_CONVERSION_SIMPLE'</b>

EXPORTING

input = UNIT_FROM_VALUE

unit_in = 'LV' "UNIT_FROM

unit_out = 'KG' "UNIT_TO

IMPORTING

output = UNIT_IN_VALUE

EXCEPTIONS

conversion_not_found = 1

division_by_zero = 2

input_invalid = 3

output_invalid = 4

overflow = 5

type_invalid = 6

units_missing = 7

unit_in_not_found = 8

unit_out_not_found = 9

OTHERS = 10.

Thanks,

Vinay