Skip to Content

Handling Data in ABAP Proxy

I have a scenario from ABAP Proxy to JDBC.I have "ShipTo Name " Field in the ABAP Proxy.When the Data has comma it is working,but when the field has teh value as "LACOMBE FERTILIZER & FARM SUPPLY LT" it is throwing error as "The entity name must immediately follow the '&' in the entity reference. com.sap.aii.utilxi.misc.api.BaseRuntimeException: The entity name must immediately follow the '&' in the entity reference".Please let me know ho wto handle this erroe.Appreciate for your Answer.Thanks in Advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Apr 24, 2012 at 02:17 PM

    Hi,

    This is happening because the ampersand (&) character is not allowed by itself in the XML specification. To use (&) within the XML content you want to replace & with & in the ABAP proxy and then it should work fine.

    Regards,

    Ryan Crosby

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2012 at 02:20 PM

    Hi, where in the scenario does the error occur?

    First guess is that you have to replace the '&' with '&'. The ampersand character is an XML/HTML entity which is reserved. See e.g. w3schools

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 24, 2012 at 02:39 PM

    Hi Sahithi,

    You could use a CDATA XML structure in order to avoid that exception. Later you could extract the values from that field.

    http://en.wikipedia.org/wiki/CDATA

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Thanks for your Reply.

      But i have to implement the Logic in Mapping.Can anyone Give me the Idea how it can be Done??

      From ABAP Proxy we are getting the data as LACOMBE FERTILIZER & FARM SUPPLY LT" ,,,Now in Mapping how can i handle this "&" .

      Thanks..

  • Posted on Apr 25, 2012 at 06:13 AM

    Hi,

    I believe you have two basic options here:

    1. Replace all the XML special characters with escape sequences, like & for the ampersand ("&"). The best option would be dealing with it on the sender side. Since you are using ABAP Proxy, simply use the ESCAPE_HTML static method of CL_HTTP_UTILITY class for each of the fields there you expect XML special characters (like: for customer name, but not necessarily customer number).

    2. Enclose the tags where special characters can occur in CDATA sections, as suggested earlier. Again, you could possibly do this on the sender side, for each potentially problematic field.

    I did not really get it from the earler discussion, where is it that you get the error in processing: while sending data from ECC to PI? at the mapping step in PI? at the receiver adapter? Depending on the answer, you could also think of converting to XML escape sequences or CDATA sections during mapping.

    Regards,

    Greg

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.