Skip to Content
0
Former Member
Dec 11, 2009 at 01:24 PM

Need help in Conversion of Distance using the FM 'UNIT_CONVERSION_SIMPLE'

132 Views

Hi Group,

I have a requirement to convert a value of type (NUMC - length 4) which has the value for Distance.

Now I am using the FM 'UNIT_CONVERSION_SIMPLE' to convert the value of the above from 'Meter' to 'KM' as under:

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

input = value_in(value of the above mentioned field)

unit_in = 'M'

unit_out = 'KM'

IMPORTING

output = value_out(this value should have the calculated value of the Distance in KM).

and now, I will pass this(value_out) to the field of (NUMC - lenght 4).

I was facing issues while executing the Function Module as :

'Please use a number field for the input value'.

please let me know how to overcome this error or else let me know any other alternative solution is available to overcome this.

thanks for your help in advance.

Regards

Vishnu.