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 floating numbers with exponents

sakaxhakaboom
Explorer
0 Kudos
313

Hi all

I have a floating point value 1.4147483939E10

5.468494899E09

I want this number as 141.474 54.684

How can this be achieved ?

Note:- I have already tried moving the value to a p type variable of p decimals 3 and it's not serving the purpose

It's a include within a standard program and the fixed point arithmetic is not checked

2 REPLIES 2

Abhishek_10
Participant
0 Kudos
271

Us like this

IF var CP '*E+*'.

* --> Move to Float

DATA(lv_float) = CONV imrc_recdv( var ).

here imrc_recdv is a floating type

Sandra_Rossi
Active Contributor
0 Kudos
271

You didn't understand the solution that Matthew gave you in your previous question.

  • "Since you can't change the standard program, the simplest thing to do is put your logic into a separate class with methods. Make sure the class has "Fixed point arithmetic" set in the properties.
  • Call your method from the include."

You'd better continue a discussion, and ask question or confirmation if you don't understand.