cancel
Showing results for 
Search instead for 
Did you mean: 

PI XML and special character like apostrophe

Former Member
0 Kudos

Hello,

I have just define an Interface SOAP (in ERP) -> File (sFTP communication channel).

In one value I have a apostrophe. In ERP, this apostrophe in UTF-8 it's ok but at the end in the file, this apos is change like an HTML character: '

The end file is an xml to.

Can you have any idea why the apos character is change like &apo;?

Thank you for your help

Carole

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thank's Inaki, I understand that apostrophe it's a reserved character in XML. And Harish's solution it's a good Idea. But I want to understand, why in interface synchronous SOAP <-> RFC, I don't have the problem.

In mapping, the character special are change in 2 cases. But SOAP response the apostrophe is correct like '. So how the SOAP CC change this? And do you know if a CC module exist for change the caracter special in sFTP CC?

Former Member
0 Kudos

Thank's for your answer, but I don't have this problem in another interface: Synchronus SOAP-> RFC. The RFC return a apostrophe in the SOAP without change.

Why in Communication Channel sFTP this character it's change?

iaki_vila
Active Contributor
0 Kudos

Hi Carole,

Mark has explained yet your doubt, i will try in different way. SFTP adapter doesn't make any change, the "change" is being done by SAP PI because in the XML standard the apostrophe is a character reserved like <  or >.  This character is used as part of the syntax, when you define an attribute, then a XML parsers doesn't know what is its usage if you don't escape it.

If you are familiarized with ABAP programming when you make a char variable you can not use the apostrophe itself you need to set double apostrophe to make understand to ABAP engine that you are not setting the end of the char variable, you are inserting an apostrophe like value.

Go ahead with Baskar and Harish suggestions.

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Carole,


In ERP, this apostrophe in UTF-8 it's ok but at the end in the file, this apos is change like an HTML character: &apos;

The end file is an xml to.

Can you have any idea why the apos character is change like &apos;?

Apostrophe is a special XML character and needs to be escape to &apos; . You will only see the &apos; when you use the view source, if directly open the XML using a browser this would be escaped to an ' automatically. You don't have to do anything in your case.

Regards,

Mark

Harish
Active Contributor
0 Kudos
baskar_gopalakrishnan2
Active Contributor
0 Kudos

you might want to check this thread