2009 Jun 01 7:29 PM
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
2009 Jun 04 8:06 AM
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
2009 Jun 01 7:43 PM
2009 Jun 01 7:58 PM
>
> 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
2009 Jun 01 8:04 PM
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
2009 Jun 01 8:12 PM
Hi,
Check this statement
WRITE INPUT TO FLSTR EXPONENT EXPON DECIMALS DECIM.
2009 Jun 01 8:26 PM
>
> 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
2009 Jun 04 8:06 AM
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.
2009 Jul 07 2:54 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |