cancel
Showing results for 
Search instead for 
Did you mean: 

Replace control characters in IDoc

Former Member
0 Kudos

Hello!

In an IDoc -> XI -> IDoc scenario we have messages failing with

com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x0(:main:, row:1, col:5446)

Once I opened the XML using a HEX editor and had a look at the row 5446 it shows several 0x0 values as mentioned in the error message in SXMB_MONI.

Characters with a hexcode less than 0x20 are non-printable control characters which are not allowed to appear in the text of an XML tag according to the XML specification.

However, I'm wondering why the IDoc adapter does not delete or replace those control characters with corresponding XML entities before it reaches the Integration Engine.

The control records are entered by business users in SAP once they fill out free text fields. Any ideas, what could be done on SAP or XI side to automatically prevent those parsing errors and have the message processing successfully? Thanks.

Regards, Tanja

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Are u using "Apply Control Record Values from Payload" in the idoc receiver communciation channel

Regards,

Prateek

Former Member
0 Kudos

Hello!

Are u using "Apply Control Record Values from Payload" in the idoc receiver communciation channel

Yes, we have the "Apply Control Record Values from Payload" indicator turned on in the receiver IDoc adapter as we need to have the IDoc control record fields filled from the IDoc XML payload.

Regards, Tanja