04-12-2006 7:54 AM
Hi experts,
How to convert 6.800000000000000E+02 to 680?
Can any one give me FM pls...!!
thanks
kaki
04-12-2006 7:58 AM
Declare a variable of type P (Packed) and move your Float value into it.
For ex:
data: p type p,
f type f value '10'. " It writes '1.0000000000000000E+01'
write: f.
p = f.
write:/ p. "writes '10'
04-12-2006 8:00 AM
Hi Kaki,
I don't think you need a FM for this purpose,
Just assign the value to an integer value.
This will work.
As an example, just check this.
data: a type f value 680 ,
b type i.
b = a.
Now b will be displayed as 680.
Hope your query is solved.
Regards,
SP.
04-12-2006 8:04 AM
Create variable ot I assingn this variable to interger variable.
Type I is always treated in the same way as type P without decimal places. Wherever type P is mentioned, the same applies to type I fields.
If the program attribute Fixed point arithmetic is set, the system rounds type P fields according to the number of decimal places or fills them out with zeros.
regards
vinod
04-12-2006 8:13 AM
04-12-2006 8:16 AM
Hi Kaki,
Did you Check the Sravanthi's Post.
Don't forget to reward for helpful answers.
Regards
vijay