Skip to Content
0
Nov 19, 2007 at 05:02 PM

Here i need to convert from EA to CS.

13 Views

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.