cancel
Showing results for 
Search instead for 
Did you mean: 

SAP generating invalid XML for ORDERS05 IDOC

bruce_hartley
Active Participant
0 Kudos
110

We have XI 3.0 SP 20 installed here.

I just started working with XI/PI, so bear with me if this has been asked - I already searched SAP for a note on this and couldn't find one.

We have integrated sales orders into another system - we have SAP generating an IDOC to be sent when a sales order is created. We use XI to route it to a 3rd party provider.

The problem that is occuring is that if an item on the order has an ampersand in the description, the system receiving it tells us that the XML is in error. In examining the message, it is in error as it doesn't properly escape the ampersand.

Is there a workaround or patch for this?

Also - it's not XI that is complaining about the issue, it's our 3rd party provider that is.

Edited by: Bruce Hartley on Dec 22, 2010 9:34 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

When you check sxmb_moni, is the & escaped there (you have to check the payload with notepad)

Do you use mapping? which adapter is used for connecting the receiving system?

You the & is not escaped in SXMB_MONI, then it is a bug. Check out for SAP notes.

Edited by: Stefan Grube on Dec 22, 2010 3:56 PM

bruce_hartley
Active Participant
0 Kudos

Stefan;

Where I got the XML from was using the message monitor within SXMB_IFR - it's definitely wrong and I think it's a bug in SAP - I was just checking here to see if anyone knew of a fix - I had already searched SAP support for a solution and was unable to find one.

Here's the XML that's causing the issue:

<ns0:SHORTTEXT>E&H ProMass flow meter 51 mm 84F50</ns0:SHORTTEXT>

I pulled the entire XML and fed it into Internet Explorer and it also stated it was in error ( as it should ).

The adapter's I'm using is the IDOC adapter on the SAP end and SOAP on the end where the message gets sent to. So what it looks like is as follows:

SAP ==> IDOC ==> XI ==> SOAP ==> 3rd party system

Edited by: Bruce Hartley on Dec 22, 2010 10:16 AM

former_member200962
Active Contributor
0 Kudos

If you try to test the IDOC data in IR --> Mapping --> Test...even there you may get the error due to &.

Check the blog: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420

Do not forget to read Stefan's comments in there.

Regards,

Abhishek.

bruce_hartley
Active Participant
0 Kudos

Stefan and Abhishek;

I read the blog - and unless SAP support does not have a fix for issue, I'm not going to use the suggestion in the blog for the exact reasons pointed out by Stefan in the most recent comment. I have opened a case for this with SAP support and when I get a resolution on it that is not covered by the blog post I will post it here.

To me, this should work out of the box by SAP and I shouldn't have to write code to work around it. We're not doing anything fancy or special, we just want to send the order to the 3rd party system via an IDOC interface. If I was generating the XML by myself, then I would have to convert the stuff.

I don't think we have < or > in our item descriptions, but I'm sure we have quote characters in there as well.

We have other systems we use XML with and we did have this issue a long time ago and since I was the one doing the programming and had total control over the process, I was the one who had to fix it - so at least I was aware of it.

stefan_grube
Active Contributor
0 Kudos

> To me, this should work out of the box by SAP and I shouldn't have to write code to work around it.

I have tested this with PI 7.11 and it works correct.

So there must be any bug fix mean while.

bruce_hartley
Active Participant
0 Kudos

Stefan;

You raise a good point I had not thought of - what generates the XML? Is it the system sending the IDOC or is it the PI system? I would have thought it was the SAP system, but it may very well be the XI system and especially since it's on the part where XI has already received the IDOC and the XML that has the issue is on the SOAP end.

Our version of XI is much older than yours - it's about 3 versions behind yours.

stefan_grube
Active Contributor
0 Kudos

> You raise a good point I had not thought of - what generates the XML? Is it the system sending the IDOC or is it the PI system? I would have thought it was the SAP system, but it may very well be the XI system and especially since it's on the part where XI has already received the IDOC and the XML that has the issue is on the SOAP end.

Good question, I thought the IDoc adapter inside PI creates the XML.

> Our version of XI is much older than yours - it's about 3 versions behind yours.

The question is only, when SP20 was issued. The IDoc adapter is not much different in the various PI versions, so there might be a bugfix in a later SP version for XI 3.0 also.

stefan_grube
Active Contributor
0 Kudos

by the way: which SAP R/3 version do you use?

bruce_hartley
Active Participant
0 Kudos

Stefen;

In this particular case, it's ECC 500.

We also are putting in the same interface for and ECC 600 system as well.

After thinking about it - I'm pretty sure you're right about the fact that the XI system is what is creating the XML from the IDOC as part of the SOAP adapter. I also think there is a fix for this as I'm sure I'm not the only one who has had this issue.

bruce_hartley
Active Participant
0 Kudos

I found out from SAP that this is not supported in ECC 500 and that one has to do this manually - what a pain in the neck!

stefan_grube
Active Contributor
0 Kudos

You think the R/3 version is the issue?

It works for me with R/3 4.7, which is older than ECC 500.

bruce_hartley
Active Participant
0 Kudos

Stefan;

No, it's my version of XI, not my version of R/3. It's the version of the adapter that is causing it.