cancel
Showing results for 
Search instead for 
Did you mean: 

Format Number function in PI 7.10 SPS 7

Former Member
0 Kudos

Hi,

for those of you who used the FormatNumber function inside the Message Mapping, there is a quite strange change.

You must enter a decimal delimiter. Inside release 7.00 this was not a must. The error message you will receive from the mapping is a little, well, unusefull:

Check result for Message Mapping: MM_OSRBG_PP_SFC_TECO_RFC_REQUEST | http://osram-os.com/rbg/pp/sfc/teco/xi013:

Target field mapping '/ns0:MT_OSRBG_PP_SFC_TECO_RFC/ROW/ORDERID' incomplete; reason: char should be not empty

Well on my side the lead to several problems, because I had to assign fixed number length (without decimal digits).

The only solution I had on this is to build an own user function in java doing the same.

These are the two parameters given to the function:

numberString

numberFormat

You have to import this:


import java.text.*;

And that's the code:


int numberInteger = Integer.parseInt(numberString.trim());

DecimalFormat piNumberFormat = new DecimalFormat(numberFormat);

return piNumberFormat.format(numberInteger);

BR Markus

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

how to do this?

BR Markus

VijayKonam
Active Contributor
0 Kudos

Hi Jan,

Thanks for updating the forum with your finding. But uncheck the box "Mark this thread as a question" so that i does not look like a question.

VJ