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

conversion of UOM

Former Member
0 Likes
583

i want to check two Units of measure is convertible or not by SAP standards.

Please help whether any FM is used?

i want to check two Units of measure is convertible or not by SAP standards.

Please help whether any FM is used?

3 REPLIES 3
Read only

Former Member
0 Likes
561

Hi,

Try this FM MATERIAL_UNIT_CONVERSION

Read only

Former Member
0 Likes
561

Use the Function 'UNIT_CONVERSION_SIMPLE'

DATA: VALUE_IN  TYPE F,
      VALUE_OUT TYPE F,
      UNIT_IN   LIKE T006-MSEHI,
      UNIT_OUT  LIKE T006-MSEHI.

...

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
     EXPORTING
            INPUT                = VALUE_IN
           ROUND_SIGN           = 'X'
           UNIT_IN              = UNIT_IN
           UNIT_OUT             = UNIT_OUT
     IMPORTING
           OUTPUT               = VALUE_OUT
     EXCEPTIONS
          CONVERSION_NOT_FOUND = 01
          DIVISION_BY_ZERO     = 02
          INPUT_INVALID        = 03
           OVERFLOW             = 04
          OUTPUT_INVALID       = 05
          UNITS_MISSING        = 06
          UNIT_IN_NOT_FOUND    = 07
          UNIT_OUT_NOT_FOUND   = 08.

Read only

Former Member
0 Likes
561

Double click on field type MEINS to navigate to data element, then again on domain and see that convers. routine is CUNIT. Double click on that and pop up window comes up and shows function modules used in conversion