Skip to Content
1
May 31, 2014 at 07:37 AM

Decimal rounding issue

2474 Views

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