cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting negative xsd:decimal in RFC

Former Member
0 Kudos

I have a file-to-rfc scenario. The source file contains values like: -1,49

Which represent decimal values. In R/3 we have a field of the type decimal (15,5)

which translates in PI to xsd:decimal

I am located in Europe that is why there is a comma instead of a dot as decimal separator.

In the mapping i use replaceString to replace the comma with a dot.

After this step in the mapping i use FormatNumber to convert to the following

format 0000000000.00000 since this is the format of the decimal-type we defined in R/3.

When trying to run the scenario in the RFC Receiver communication channel i get the following error:


Message processing failed. 
Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: 
com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing 
message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: 
could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: 
(122) JCO_ERROR_CONVERSION: Integer '000000001.49000' 
has to many digits at field PRICE

I do not understand this error since xsd:Decimal is allowed to have 18 digits.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

try to format with less Zero likes this "00000.00000"

Also the RFC acept decimal with 15,5 maybe the length is too much.

Let me know what happend.

Former Member
0 Kudos

i formatted the field as suggested, the error remains:


Message processing failed. 
Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: 
com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: 
error while processing message to remote system:com.sap.aii.adapter.
rfc.core.client.RfcClientException: could not convert request from XML to RFC:
com.sap.mw.jco.JCO$ConversionException:(122) JCO_ERROR_CONVERSION: 
Integer '00001.49000' has to many digits at field PRICE

However if i format the field to 0.00000 then it works.... So the error of too many digits seems to be correct. But then the question arises: what is the maximum number of digits allowed and what if we need more digits than allowed?

The PRICE field, was of type STRING but was changed to Decimal in the RFC. The RFC is reimported and activated in PI after this change. The RFC definition in PI is the same as in R/3...

Hopefully there is a solution....

udo_martens
Active Contributor
0 Kudos

Hi,

obvisiously the channel is caching the meta data. Just delete and recreate the Com Channel should help (may be with other name).

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

thanks for your reply. Could you expain how you come to this conclusion? Since the receiver channel for RFC's is used by many other scenario's and im reluctant to delete that one.

The file sender communication channel i cana throw away, but this is not one that causes problems i think, since the problem is at the RFC Receiver Adapter....

Thanks for your valuable help.

udo_martens
Active Contributor
0 Kudos

Hi,

yes, its the RFC adapter. First delete the channel, activate and recreate with same name (may be copy it before with other name as backup). Then test. Could be succesful, if the meta data are stored together with the channel. If not, the meta data are stored with the channel name. If that was successful, all other links to the channel should work.

If that wasnt successful, open the channel, press "Where-Used List" button and let the list open during next steps. Then delete the channel and create with new name. Go to the list, it should contain ONLY Receiver Agreements and Configuration Scenarios (may be folders). In the Receiver Agreements you just need to choose your new channel with the automatic help. In the scenario (or folder) just add the new channel, press save and you should get a popup reminding you the there is a link to a not exsting object what will be deleted now from the scenario. Just press ok. So you walk throught the list and everything should be ok.

Regards,

Udo

Former Member
0 Kudos

Thank you Udo, you usolved my problem! Im in luck that i could use the same name for the Comm. Channel. Thanks!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Please refer to SAP Notes 730870 and 775765 for the resolution.

And also check this link.

Regards

Ramesh

udo_martens
Active Contributor
0 Kudos

Hi,

did you change the field PRICE?

Regards,

Udo