on 06-27-2008 4:12 PM
Hi,
In message mapping i am using th NEG function to negative a all amounts. The problem is it rounds the amount,
eg.
212399.46 gets round to -212399.45
I tried the multiplication function as well and had written a JAVA function for the same all seems to give the same result.
after playing a lot with this issue i found that
The rounding of amounts is done only for amount with more than 5 digits before the decimals.
If the 1st decimal number is below 5 and the second is above 5. than the second decimal gets decremented by 1 e.g. 212399.46 gets round to 212399.45 exception to this is u201C.47u201D,u201D.48 u201C donu2019t know why
If the 1st decimal number is above 5 and the second is above 5. than the second decimal gets incremented by 1e.g 254398.76 gets round to 254398.77
Amounts in decimal number u201C.88u201D u201C.77u201D u201C.66u201D,never gets round of
Can any one help me with why it rounds values and provide a solution so that it does not rounds the value and pass amount just with negative sign without rounding.
Hi,
please have a look here:
/people/thorsten.nordholmsbirk/blog/2006/04/03/never-ever-use-xis-built-in-arithmetic-functions
/people/thorsten.nordholmsbirk/blog/2006/08/25/new-arithmetic-and-statistical-functions-in-message-mappings-in-sp18
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can do this also with a standard if function:
if sourceValue > 0
then targetValue = concat (constant(-), sourceValue)
else sourceValue
Sorry forget that have more values in one context...
In this case you will need an udf.
So just use a combination of the udfs provided by Amit and Chirag and it should work.
Regards
Patrick
Edited by: Patrick Koehnen on Jun 27, 2008 6:15 PM
Thanks Chirag, Amit and Patrick.
I will first fix the XI 3.0 bug for artithmatic function.
and check.
Definetly UDF is an always an alternative.
Points awarded to all of u.
Thanks
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.