Application Development 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: 

Here i need to convert from EA to CS.

former_member623843
Participant
0 Kudos

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.

1 REPLY 1

Former Member
0 Kudos

Hi

first ensure that the both values CS and EA exist in the table T006

then only the conversion of the units is possible using the fun module

'CONVERSION_FACTOR_GET'

Since the unit CS is not available in T006 table it is not working

This fun module in turn uses the table data T006 for the conversion of units

Regards

Anji