Skip to Content

Here i need to convert from EA to CS.

Hi Dear friends,

iam having one requirement. that is conversion.

here is need to convert from EA to CS, for that one iam using FM: conversion_factor_get

But this is not converting and when i run program it was showing the error is "conversion of dimensionless units is possible".

Here i need to convert from EA to CS.

this is Eg:

DATA : LV_SS TYPE F,

LV_DEC(100) TYPE N,

LV_NUM(100) TYPE N.

call function 'CONVERSION_FACTOR_GET'

EXPORTING

NO_TYPE_CHECK = ' '

UNIT_IN = 'EA'

UNIT_OUT = 'CS'

IMPORTING

ADD_CONST = LV_SS

  • DECIMALS = LV_DECI

DENOMINATOR = LV_DEC

  • DIMENSION =

NUMERATOR = LV_NUM

  • EXCEPTIONS

  • CONVERSION_NOT_FOUND = 1

  • OVERFLOW = 2

  • TYPE_INVALID = 3

  • UNITS_MISSING = 4

  • UNIT_IN_NOT_FOUND = 5

  • UNIT_OUT_NOT_FOUND = 6

  • OTHERS = 7

..

if SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

write : lv_ss, lv_dec, lv_num.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 20, 2007 at 02:56 AM

    if you see the function module documentation its specifically said that

    Only measurement units in the same dimension can be converted. Units without a dimension can not be converted using the measurement unit table.

    So check in table:T006 for CS and EA

    field T006-DIMID.

    Dimensionless units must be translated material specifically.

    for that you should use

    MATERIAL_UNIT_CONVERSION

    For Dimensionless Units of Measure (Each, Piece, Box etc.) conversion depends on the given Material (see table MARM). For other Units of Measure (Length, Weigth etc.) conversion can be calculated from the T006 table or via CONVERSION_FACTOR_GET.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.