cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in dealing with "xsd:decimal" DataType in PI 7.1

Former Member
0 Kudos

Hi ,

I am using SOAP to RFC synchronous scenario in which I have to deal with decimal values. The remote function module used have an "amount" FIELD of decimal datatype. eg: 9876543.87 .

Whereas I am using the same xsd:decimal in the Data type in PI. When we pass the decimal value in webservice, it doesn't execute.

The concern is as we are taking decimal datatype in Remote function module in R/3 system, so which related datatype need to be  taken in PI or what else needs to be done.

Please suggest....

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

mightbe below approach is  helpful

in pi , u can use string data type and

on message mapping, u have to use formatNumber

for ex:

1. ur input is 1234 then OP is 0001234.00

2. IP : 1234.56 then  OP: 0001234.56

3: IP: 1234.567 then op : 0001234.57

Former Member
0 Kudos

Thanks,it solved my problem

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>The concern is as we are taking decimal datatype in Remote function module in R/3 system, so which related datatype need to be  taken in PI or what else needs to be done

The easiest approach is using string. You might also try using xsd:double or xsd:float over here.

Former Member
0 Kudos

Hello everybody...

Seem to have the same issue here except that formatNum doesn't work for me - used both approaches ('.' or ',') and any possible combination but I always end up with a mapping error eventhough that message mapping testing works just fine. Seems like I have a specific problem with xsd: decimal  - I got these from SXMB_MONI:

A name contained an invalid character. Error processing resource 'file:///C:/Documents and Settings/gkamp/Local Settings/Te...

<?xml version="1.0"?><ns1:MT_Material xmlns:ns1="http://www.sap-press.com/pi/training/ZZ"><BRGEW>1.200<...

Missing character seems to be the closing tag ">"

<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_Material_to_MATMAS_MATMAS02_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: > expected (:main:, row:1, col:372)</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

I get the error whatever format I choose in the formatNum, even with integer data.

Any ideas?

Thanks in advance

Greg

PS: SLD Cache looks OK

udo_martens
Active Contributor
0 Kudos

Hi,

most easy is to use data type string. If you need to convert with leading zeros or decimal separator use standard function formatNum.

Regards,

Udo