Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP mapping

former_member10771
Active Participant
0 Likes
486

HI All,

I have a XML structure in SAP XI. which is as below.Here when I do the mapping I get the desired result. But for the string under rdata the XML tag gets replaced by "&lt"and "&gt" less than and greater than. I need to write a ABAP mapping code to change this.Can anyone help me on the same.

<recordset>

<name>ABC</name>

<version>12</version>

<desc>XYZ</desc>

<validity>123456</validity>

<data>

<recdata><!CDATA<AAA>1234</AAA><BBB>3456</BBB></recdata>

</data>

</recordset>

And the target which i get the fields related to name version descr and vaidity are perfectly fine. But the <recdata> value is a string and as a result it gives me the following under recdata.

<recdata>"<"AAA">"1234"< "</recdata>.

That is the < sign gets replaced by "&lt"and "&gt"" .. Can some one provide me the code which can help in eliminating this "&lt"and "&gt" at the target.

How can this be achieved in ABAP mapping..

1 REPLY 1
Read only

guillaume-hrc
Active Contributor
0 Likes
388

Hi,

I would be surprised if there is no conversion utility for unescaping this kind of thing !

Try methods of class cl_http_utility.

IF_HTTP_UTILITY~UNESCAPE_URL

IF_HTTP_UTILITY~ESCAPE_HTM

...

best regards,

Guillaume