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: 

FLTP_CHAR_CONVERSION_FROM_SI "Parameters" issue

Former Member

Hi ,

I am trying to use this

function Module "FLTP_CHAR_CONVERSION_FROM_SI" to convert Float to Char.

The parameters i am using are

CHAR_UNIT = KM

DECIMALS = 15

Exponent = 0

FLTP_VALUE_SI = 1.222222222222222E+06

Indicator VALUE = X

When I execute it , its giving me error message .

"please use number field for Input Value". If any one can tell me what I am using wrong. I really appreciate the time and full marks would be rewarded.

Thanks,

Mili-

1 ACCEPTED SOLUTION

mvoros
Active Contributor

Hi,

your input variable has to have some numeric type. Check this small example which works for me:


  DATA: l_string(20) TYPE c,
        l_float TYPE f VALUE '1.222222222222222E+06'.

  CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'
    EXPORTING
     char_unit              = 'KM'
     fltp_value_si          = l_float
     indicator_value        = 'X'
   IMPORTING
     char_value             = l_string
   EXCEPTIONS
     no_unit_given          = 1
     unit_not_found         = 2
     OTHERS                 = 3.

5 REPLIES 5

mvoros
Active Contributor

Hi,

your input variable has to have some numeric type. Check this small example which works for me:


  DATA: l_string(20) TYPE c,
        l_float TYPE f VALUE '1.222222222222222E+06'.

  CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'
    EXPORTING
     char_unit              = 'KM'
     fltp_value_si          = l_float
     indicator_value        = 'X'
   IMPORTING
     char_value             = l_string
   EXCEPTIONS
     no_unit_given          = 1
     unit_not_found         = 2
     OTHERS                 = 3.

Former Member
0 Kudos

Hi I tried this one but its not working. you can explain me step by step what to do?

Former Member
0 Kudos

I see this error "Literals that take up more than one line not permitted." when I try to execute it.

0 Kudos

check some where you missed the quote or it extended to next line. make sure the quotes are in same line.

test = '                            '.

post your code here.

0 Kudos

declare string like this and pass it to fm

DATA: l_string(10) TYPE c.