cancel
Showing results for 
Search instead for 
Did you mean: 

problem in the character conversion

Former Member
0 Kudos

Hi Guys,

I am facing problem in the character conversion

I am posting data from SAP to third party system using XI , by converting whole input message to a String .I am using SOAP adapter to communicate XI to third party system.

Thirdparty system needs String to be wrapped in CDATA so that it will not choke by looking at the special characters. I did Wrap the output string in CDATA, using ABAP mapping but when I do that XI is converitng arrow brackets < and >. into &lt and u2018&gtu2019 my assumption is it is double encoding.

example -

before map - <AppSystemInfo>

after mapping it is converted as - <![CDATA[ &ltAppSystemInfo&gt]]>

Edited by: Vamsi on Jun 17, 2010 10:00 PM

Edited by: Vamsi on Jun 17, 2010 10:01 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Did you try to see the output?

bcz if you are trying this in mapping testing it will show you like this as this conversion if for xml, so xml will not do anything wrong with the special characters, so for that special characters will be converted like that.

Once try to run end to end interface and try to see at receiver side that how data looks like.

Thanks,

Hetal

Former Member
0 Kudos

I did end to end testing..special characters for arrow brackets, quotations, & are carried all the way.

In the ABAP mapping I did find and replace these respectively. and it looked good. But Iam not happy with my solution.

Is there any other way to achieve this.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vamsi,

I would suggest you to go with XSLT mapping to convert String to xml.

you can use the below code by importing the same in ESR as.xsl file.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://www.yourmessage.com">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
	<xsl:template match="/">
		<m:RequestMessage>
			<m:SimpleTag>
				<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[
				
				]]
				>
			
		
	
]]>

Please revert back for further info

Thanks

Nidhi