cancel
Showing results for 
Search instead for 
Did you mean: 

FormatNumber bug

Former Member
0 Kudos

Hi guys!

I have this very strange issue I've never seen before.

I use RFC Lookup to get some data from the SAP system. This works fine and returns the required data from the function module in SAP system. After this process I have the standard function FormatNumber wich has the format 000000 with decimal separator '.' which is mapped to the target field.

Now to the strange part:

When the RFC lookup returns with a value say: 7310400024487 then it works correct = 7310400024487 or 73104000244 becomes 0073104000244.

But sometimes it happens that the RFC lookup returns 99997310400024487 (which is correct), it is now when FormatNumber changes the last digit and gives output i.e 99997310400024480. And there is no logic in this last digit change...none that I can see.

I have also tried to concatenate with constant '9999' just to make sure that the RFC lookup doesn't make any strange changes but the FormatNumber still changes the last digit as soon as '9999' comes.

I have experimented alot with this and found out that anything less that 17 digits then it will work fine, but if the length is more than 17 then something happens in FormatNumber.

Have anyone experienced this? Is this a bug in PI 7.1?

I don't know if I explained this good enough but any input or question is appreciated.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

seems to be a bug.

do report it by raising a customer message and hopefully you should get a fix

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I know formatnum has some limitation for the larger size number. If you deal with higher number of digits then create UDF and use java math package. Explore java.math.Round class for your requirement.

Example: see whether this [link |http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html]is helpful.