Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Decimal rounding issue

$
0
0

Hi,

 

I am facing rounding issues in decimal calculation. In my model I have 3 fields.

AmountinEUR    Decimal (13,2)          = 33698.12

Rate                   Decimal (9,5)          = 1/0.77275

Result               Decimal (13,2)          = wrong value 43,608.12 expected value 43,608.13

 

Calculation is very simple, Result = Amount in EUR * Rate

 

When I do calculations with all of the above variables as Double type then I get below Value

43,608.12828109429

But when I use Result as Decimal (13,2), Value is getting calculated as 43,608.12

 

Has anyone face this issue? Looks like its truncating when calculating decimal but not rounding it.

 

We have HANA on SPS69. Are there any notes around this?

 

Thanks,

Nitesh


Viewing all articles
Browse latest Browse all 5653

Trending Articles