Skip to Content
avatar image
Former Member

Unit of measurement conversion

Hi all

does anyone know a function module that allow me to convert beetween different unit of measurement.

For instance from liter to KG?

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 02, 2005 at 03:50 PM

    Thank you all

    the function MATERIAL_UNIT_CONVERSION works fine if I have the material it can

    convert from different unit of measurement, but whan I don't have the material I have

    to use UNIT_CONVERSION_SIMPLE and this returns to me anythig. For istance if I try to convert

    50 L to KG it does nothing.

    Someone can help me?

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Alessandro,

      You cannot convert litres to kilos or any such non-standard conversions with this function module. This is useful only to do standard unit conversions of the same DIMID(dimension ID specifies whether the unit is for measuring MASS or VOLUME or LENGTH etc).

      Imagine you have a litre of crude oil and a litre of water. Obviously they don't convert to the same KG weight. So for such conversions you have to maintain the conversion factors in the material master. But 1 litre of crude oil and 1 litre of water convert to the same number of gallons, because both are the same measurement group.

      Hope this clarifies.

      Srinivas

  • avatar image
    Former Member
    Dec 02, 2005 at 09:30 AM

    chk this function module UNIT_CONVERSION_SIMPLE

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2005 at 09:33 AM

    Hi,

    You can make use the function modules,

    1.UNIT_CONVERSION_SIMPLE

    2. Material_unit_conversion,

    Hope this helps,

    Rgds,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2005 at 09:31 AM

    hi,

    check it this fm CF_UT_UNIT_CONVERSION

    I hope helps.

    regards,

    srini

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2005 at 09:31 AM

    Hi!

    Use UNIT_CONVERSION_SIMPLE or MATERIAL_UNIT_CONVERSION.

    Regards,

    Maxim.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 30, 2007 at 11:47 AM

    Hi all,

    I am trying to use the FM 'UNIT_CONVERSION_SIMPLE' to convert the values into KG.

    Here w_gross_ship = 1000

    wa_vbrkk-gewei = LB

    'c_grossinkg' = A constant Value 'KG'.

    w_gross_ship_kg = Output I need in KG.

    When tried to execute the FM in Se37 with the values as above it is showing an error

    Exception INPUT_INVALID

    Message ID: BM

    Message: Please use a number field for the input value

    CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

    EXPORTING

    input = w_gross_ship

    • NO_TYPE_CHECK = 'X'

    • ROUND_SIGN = ' '

    UNIT_IN = wa_vbrkk-gewei

    UNIT_OUT = 'c_grossinkg'

    IMPORTING

    • ADD_CONST =

    • DECIMALS =

    • DENOMINATOR =

    • NUMERATOR =

    OUTPUT = w_gross_ship_kg

    • EXCEPTIONS

    • CONVERSION_NOT_FOUND = 1

    • DIVISION_BY_ZERO = 2

    • INPUT_INVALID = 3

    • OUTPUT_INVALID = 4

    • OVERFLOW = 5

    Please help me .

    Thanks in advance

    Add comment
    10|10000 characters needed characters exceeded