cancel
Showing results for 
Search instead for 
Did you mean: 

File sender adapter - Encoding issue

Former Member
0 Kudos

Hi,

On my customer site, we have an interface taking a file and sending an IDoc to the non Unicode ERP system. Unfortunately, when we have cyrillic characters in the file, the processing files with the error:

com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x6(:main:, row:17776, col:893)

This is of course the result of using an invalid encoding in the communication channel. Until now, it was left blank, so UTF8 was used. I want to improve this interface in order to never again have this error because it involves some manual work fixing it and it's getting annoying in production to see this once a month.

What I want to do next is finding out the encoding from the guys delivering the file and then placing it in the communication channel. Pretty straightforward, right? On SAP, I think the cyrillic, non ASCII character will be replaced by #, but this is acceptable by the business. Not acceptable is this constant error.

Because I want to be sure of my assessment before I ask for approval on doing this modification with the associated testing, communication and everything, my question to you is: have you experienced this before in PI? Are all my conclusions accurate? How would you solve the problem?

Thanks in advance and best regards,

George

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

did you try giving the encoding as ISO 8859-5 in the file adapter?

File Type

Specify the document data type.

u25CB       Binary

u25CB       Text

Under File Encoding, specify a code page.

The default setting is to use the system code page that is specific to the configuration of the installed operating system. The file content is converted to the UTF-8 code page before it is sent.

also ref: http://en.wikipedia.org/wiki/Cyrillic_alphabet#Computer_encoding

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Answers (3)

Answers (3)

Former Member
0 Kudos

The error was actually not because of a wrong encoding, but it was due to the inability of the provider to acquire in their database non ASCII characters, so they would send out unprintable characters.

This is why I eliminated these characters with a Java mapping as explained on SDN,

.

Regards,

George

Former Member
0 Kudos

Hi,

It's text file. I will test everything you specified as soon as I get an actual file with errors, hopefully today.

Regards,

George

stefan_grube
Active Contributor
0 Kudos

Is your file an XML file? In that case the encoding declaration of the XML header might be wrong or missing. When the XML encoding is missing, the default value for XML is UTF-8. So let your collueges know that they have to add the correct encoding to the XML header in the file.

Is your file a plain text? So you can add the encoding the communication channel.

Regards

Stefan