on 04-01-2011 6:36 PM
Hi,
I have to compare two float fields, one fetched from database and one passed as importing parameter.
Now, i get "0.1" as a value in importing parameter for comparison. and the same is stored in the database, i.e. "0.1".
But when I put a select query on the table and read the value, the value i get is 9.9999999999999995E-02.
as a result, my comparison fails and the rest of logic crumbles.
I am aware of the usual standard - not to compare two float variables, but in this case, it is a equipment reading - it has to be in float, which i am comparing against a threshold, which again has to be float.
Is there any way to fix this through ABAP program?
I think ,
you have to use conversion exits then you have to compare.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.