on 03-01-2019 10:44 AM
Hi Experts,
We are replicating an ABAP report using a calculation view where we do certain calculations (decimal precision is very crucial). Along this process it seems the the decimal precision is lost. Say we have to compute the following:
14000/1.12*0.99625
NOTE: The last 2 operand are default. Only the first operand (14000) value may change via input parameter.
The result for this calculation is 12453.12500000000 whereas the expected value is 12453.124999999998.
This is the actual process and the value we derived between ABAP and HANA
1.) Calculate value as <input parameter>/1.12*0.99625
Example: 14000/1.12*0.99625
ABAP = 12453.124999999998
SAP = 12453.12500000000
2.) Get 100th decimal place
ABAP = 12453.124
SAP = 12453.125
3.) Round up to 2 decimal place
ABAP = 12453.12
SAP = 12453.13
As you notice, due to the precision we will be getting variance.
I already tried a number of combination of data type and conversion function but to no avail.
Can someone please enlighten me on this behavior and perhaps suggest fixes/workaround?
Regards,
Rod Castro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also you can try like below, keep same decimals as Frederick mentioned
(14000/1.12*0.99625)*1.000000000000
keep same number of ZERO's, check the data in Raw data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.