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: 

Convert FLTP .

Former Member
0 Kudos
5,863

Hi all,

i hope there is someone that can help me: i've to convert the field IMRG-CDIFF in a new field type QUAN or type not equal FLTP.

How can i do it?

Is there a FM?

Regards,

Alex.

1 ACCEPTED SOLUTION

Pawan_Kesari
Active Contributor
0 Kudos
1,136

I think a simple move will do the conversion..

DATA : lv_value TYPE imrg-cdiff ,
       lv_quan  TYPE ekpo-menge .

lv_value = '100.23' .

lv_quan  = lv_value .

WRITE : / lv_value , lv_quan .

7 REPLIES 7

Former Member
0 Kudos
1,136

Hi Alex,

Check if you can use FM FLTP_CHAR_CONVERSION.

This function module works fine we try to conver Float to character.

Regards,

Komal

former_member183990
Active Contributor
1,136

quan is inturn character i guess

so you can convert FLTP to character

FLTP_CHAR_CONVERSION

QSS0_FLTP_TO_CHAR_CONVERSION

hope you can use this

cheers

s.janagar

Pawan_Kesari
Active Contributor
0 Kudos
1,137

I think a simple move will do the conversion..

DATA : lv_value TYPE imrg-cdiff ,
       lv_quan  TYPE ekpo-menge .

lv_value = '100.23' .

lv_quan  = lv_value .

WRITE : / lv_value , lv_quan .

0 Kudos
1,136

Thank Pawan Kesari for yout suggest but i've used your routine and the output is:

FLT 5,200000000000001E-02 --> convert 0,052

i've need 52,00

How can ido it?

Thanks a lots,

Alex.

0 Kudos
1,136

> Thank Pawan Kesari for yout suggest but i've used your routine and the output is:

> FLT 5,200000000000001E-02 --> convert 0,052

>

> i've need 52,00

>

> How can ido it?

>

> Thanks a lots,

>

> Alex.

Alex,

5,200000000000001E-02.i.e. 5.2 exponential -2 is equal to 0.052. Its a totally correct conversion. The way you need will change the actual value.

igor_barreto_br
Discoverer
0 Kudos
1,136

Hi guy!
<request removed by moderator>.
tks;

  DATA oauszt TYPE eauszt.
  DATA: loauszt TYPE f.


  CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
    EXPORTING
      input                 = loauszt  (6.4920000000000000E+03)
      unit_in              = 'S'                         "Einheit 1
      unit_out            = 'H'                        "Einheit 2
    IMPORTING
      output               = loauszt
    EXCEPTIONS
      conversion_not_found = 2
      input_invalid        = 4
      output_invalid       = 4
      type_invalid         = 4
      division_by_zero     = 6
      overflow             = 8
      units_missing        = 10
      unit_in_not_found    = 12
      unit_out_not_found   = 12.

oauszt = loauszt.

Message was edited by: Thomas Zloch

0 Kudos
1,136

Asking for points so openly in such a way 😮

You may need to read the rule of engagement in SCN