Application Development and Automation 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: 
Read only

floating point with out exponential

Former Member
0 Likes
1,734

Hi,

Value of the floating point field is 2.6400000000000001E0, Now i want to remove the exponential format and change it as "2.6400000000000001"

How it can be done?

Srinivas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,542

Hi Srinivas,

For your requirement a simple keyword will do the trick.Have a look in the following code :



REPORT  ZSAMPLE.

parameters : radius type i.
data area type f.

constants pi type p decimals 2 value '3.14'.

area = pi * radius ** 2.

write : area exponent 0 .

Here in the code, due to the addition exponent to the write statement has done the trick and will show the output as desired.

Regards,

Abhinab Mishra.

P.S : Please close down the thread if you have got your answers.

Hi,

Value of the floating point field is 2.6400000000000001E0, Now i want to remove the exponential format and change it as "2.6400000000000001"

How it can be done?

Srinivas

7 REPLIES 7
Read only

Former Member
0 Likes
1,542

Hi,

Check this FM C14W_NUMBER_CHAR_CONVERSION'

Read only

0 Likes
1,542

>

> Hi,

>

> Check this FM C14W_NUMBER_CHAR_CONVERSION'

Hi Avinash

when i use the FM

and pass the value 2.6400000000000001E0 into I_float

My oupput is as below

E_STRING 2.6400000000000

E_FLOAT 2.6400000000000001E+00

E_DEC 2.6400

E_DECIMALS 15

But i want the same value as 2.6400000000000001 with out exponents

Thanks

Srinivas

Read only

0 Likes
1,542

Hi,

try this way..


w_curr = 2.6400000000000001E+00.
data : w_dummy(10)  type c.

split w_curr  at 'E' into w_curr 
                                 w_dummy.

Prabhu

Read only

0 Likes
1,542

Hi,

Check this statement

WRITE INPUT TO FLSTR EXPONENT EXPON DECIMALS DECIM.

Read only

0 Likes
1,542

>

> Hi,

>

>

>

> try this way..

>


> w_curr = 2.6400000000000001E+00.
> data : w_dummy(10)  type c.
> 
> split w_curr  at 'E' into w_curr 
>                                  w_dummy.
> 

> Prabhu

Prabhu,

This logic does not work if the value like '2.6400000000000001E+01

Read only

Former Member
0 Likes
1,543

Hi Srinivas,

For your requirement a simple keyword will do the trick.Have a look in the following code :



REPORT  ZSAMPLE.

parameters : radius type i.
data area type f.

constants pi type p decimals 2 value '3.14'.

area = pi * radius ** 2.

write : area exponent 0 .

Here in the code, due to the addition exponent to the write statement has done the trick and will show the output as desired.

Regards,

Abhinab Mishra.

P.S : Please close down the thread if you have got your answers.

Read only

Former Member
0 Likes
1,542

Thanks for all your answers