Skip to Content
author's profile photo Former Member
Former Member

Invalid XML Character in IDOCS

Hello All,

ECC version: ECC 6.0 Release 731 SP 8

NW Version 7.3

MII Version: 12.2.5 Build (72)

SM59 Unicode Enabled, Connection & Unicode Test Passed.

We recently migrated our Production Orders from Legacy ECC to another ECC system and downloaded the new Prod Orders into MII via IDOCS.

The converted IDOCS when downloaded into to MII fails to process as they are not well formed due to the special character in the IDOC.

The Special Characters are provided below:

I also get these:



When I try to open the IDOC in MII using Read Message, I get the following exception:

When I opened the IDOC using IE, I got this message:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)

Timestamp: Wed, 15 Oct 2014 21:11:11 UTC

Message: An invalid character was found in text content.

Line: 1

Char: 1839

Code: 0

URI: http://server:port/webdynpro/dispatcher/

So, as a work around, I am reading the IDOCS as a string input and removing the special characters using stringreplace and converting it back to XML using String_To_XML_Parser which works fine so far.

Moreover, the above process will not work if I read and process message using Query/Read message action block since the IDOC is not well formed. So, I have to rely on Processing Type: transaction under Message Processing rule.

Ideally the best place is to rectify this is in ECC, But, I would like to know if there is a best practice or an efficient way to remove these special characters in MII.

Any help or advise is highly appreciated.

Thank You,


Error.JPG (15.7 kB)
IDOC.JPG (10.6 kB)
Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Oct 15, 2014 at 10:40 PM

    Hi Thejo,

    Unfortunately that is the same workaround I have had to use in the past. Why people insist on using invalid characters (for Databases and for XML), I have no idea.

    Hope you can find a better workaround.

    Cheers, Mike

    SAP Customer Experience Group - CEG

    Add comment
    10|10000 characters needed characters exceeded