Skip to Content
0
Aug 04, 2005 at 08:28 PM

Problem with ABS Arithmetic Function

187 Views

Hi,

I'm doing a SUM(precision of two decimal places) of array of values. I collate the Idocs and then do the sum of that absolute value of AMT field available in the IDoc.

My mapping is simple:

AMT>ABS(XI supplied)>myFUNC_SUM-->TOTAL

When i run a test and investigate the queues of AMT and ABS, I noticed that XI supplied ABS function actually manuplates the decimal part value.

For e.g.

if AMT is 2848275.98 on applying ABS it becomes 2848276

if AMT is 351428.73 on applying ABS it becomes 351428.72

I find it really strange since ABS should only remove the sign.Has anyone experienced this problem before?

I also tested using my own adv.java function (using Java's Math.abs())to do ABS. In this case the decimal part value are not manuplated.

AMT>myFUNC_ABS>myFUNC_SUM-->TOTAL

if AMT is 2848275.98 on applying user-defined ABS it becomes 2848275.98

if AMT is 351428.73 on applying user-defined ABS it becomes 351428.73

Regards,

Sridhar