<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic xml To itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507589#M843628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm trying extract data from PDF file. (Adobe Offline scenario).&lt;/P&gt;&lt;P&gt;I'm getting this XML runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could anybody can help me to solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION id&lt;/P&gt;&lt;P&gt;SOURCE XML lv_xml_data_string&lt;/P&gt;&lt;P&gt;RESULT zscustomer12 = wa_zcustomer12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;Either the source document contains invalid XML or it is handled&lt;/P&gt;&lt;P&gt;incorrectly in the ABAP program that called the transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct the error&lt;/P&gt;&lt;P&gt;The most common cause of this error is a conflict between the encoding&lt;/P&gt;&lt;P&gt;specified in the declaration &amp;lt;?xml version="1.0" encoding="..."?&amp;gt; in the&lt;/P&gt;&lt;P&gt;document and the actual encoding of the data.&lt;/P&gt;&lt;P&gt;If the document is held in an ABAP string, the actual encoding is the&lt;/P&gt;&lt;P&gt;system code page. If this does not match the declaration, a parsing&lt;/P&gt;&lt;P&gt;error may occur.&lt;/P&gt;&lt;P&gt;These conflicts are a particular issue when XML documents are produced&lt;/P&gt;&lt;P&gt;in one system and then imported into a system with a different code page&lt;/P&gt;&lt;P&gt;(as strings).&lt;/P&gt;&lt;P&gt;For this reason, XML documents should be held as binary data (X strings)&lt;/P&gt;&lt;P&gt;, if they are extracted from the system or accessed from outside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;keywords:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"XSLT_BAD_SOURCE_CONTEXT" "CX_XSLT_RUNTIME_ERROR"&lt;/P&gt;&lt;P&gt;"ZFORM_12_RECEIVEPDF" or "ZFORM_12_RECEIVEPDF"&lt;/P&gt;&lt;P&gt;"START-OF-SELECTION"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Mar 2008 11:28:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-11T11:28:11Z</dc:date>
    <item>
      <title>xml To itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507589#M843628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm trying extract data from PDF file. (Adobe Offline scenario).&lt;/P&gt;&lt;P&gt;I'm getting this XML runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could anybody can help me to solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION id&lt;/P&gt;&lt;P&gt;SOURCE XML lv_xml_data_string&lt;/P&gt;&lt;P&gt;RESULT zscustomer12 = wa_zcustomer12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for the exception is:&lt;/P&gt;&lt;P&gt;Either the source document contains invalid XML or it is handled&lt;/P&gt;&lt;P&gt;incorrectly in the ABAP program that called the transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct the error&lt;/P&gt;&lt;P&gt;The most common cause of this error is a conflict between the encoding&lt;/P&gt;&lt;P&gt;specified in the declaration &amp;lt;?xml version="1.0" encoding="..."?&amp;gt; in the&lt;/P&gt;&lt;P&gt;document and the actual encoding of the data.&lt;/P&gt;&lt;P&gt;If the document is held in an ABAP string, the actual encoding is the&lt;/P&gt;&lt;P&gt;system code page. If this does not match the declaration, a parsing&lt;/P&gt;&lt;P&gt;error may occur.&lt;/P&gt;&lt;P&gt;These conflicts are a particular issue when XML documents are produced&lt;/P&gt;&lt;P&gt;in one system and then imported into a system with a different code page&lt;/P&gt;&lt;P&gt;(as strings).&lt;/P&gt;&lt;P&gt;For this reason, XML documents should be held as binary data (X strings)&lt;/P&gt;&lt;P&gt;, if they are extracted from the system or accessed from outside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the error occures in a non-modified SAP program, you may be able to&lt;/P&gt;&lt;P&gt;find an interim solution in an SAP Note.&lt;/P&gt;&lt;P&gt;If you have access to SAP Notes, carry out a search with the following&lt;/P&gt;&lt;P&gt;keywords:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"XSLT_BAD_SOURCE_CONTEXT" "CX_XSLT_RUNTIME_ERROR"&lt;/P&gt;&lt;P&gt;"ZFORM_12_RECEIVEPDF" or "ZFORM_12_RECEIVEPDF"&lt;/P&gt;&lt;P&gt;"START-OF-SELECTION"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 11:28:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507589#M843628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T11:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: xml To itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507590#M843629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;this link below has the same issue which is resolved.You can follow this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2761100"&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do reward  if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 11:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507590#M843629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T11:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: xml To itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507591#M843630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF T_ATTACHMENT,&lt;/P&gt;&lt;P&gt;LINE_NO(5),&lt;/P&gt;&lt;P&gt;FILENAME(200),&lt;/P&gt;&lt;P&gt;DESCRIPTION TYPE STRING,&lt;/P&gt;&lt;P&gt;END OF T_ATTACHMENT,&lt;/P&gt;&lt;P&gt;D_ATTACHMENT TYPE T_ATTACHMENT OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF T_ATTACHMENTLIST,&lt;/P&gt;&lt;P&gt;ATTACHMENT TYPE D_ATTACHMENT,&lt;/P&gt;&lt;P&gt;END OF T_ATTACHMENTLIST,&lt;/P&gt;&lt;P&gt;D_ATTACHMENTLIST TYPE T_ATTACHMENTLIST OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF T_HEADER,&lt;/P&gt;&lt;P&gt;NAME(140),&lt;/P&gt;&lt;P&gt;PHONE(23),&lt;/P&gt;&lt;P&gt;EMAIL(100),&lt;/P&gt;&lt;P&gt;ATTACHMENTLIST TYPE D_ATTACHMENTLIST,&lt;/P&gt;&lt;P&gt;END OF T_HEADER,&lt;/P&gt;&lt;P&gt;D_HEADER TYPE T_HEADER OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF T_ITEM,&lt;/P&gt;&lt;P&gt;HEADER TYPE D_HEADER,&lt;/P&gt;&lt;P&gt;END OF T_ITEM.&lt;/P&gt;&lt;P&gt;TYPES:D_ITEM TYPE T_ITEM OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF T_LIST,&lt;/P&gt;&lt;P&gt;ITEM TYPE D_ITEM,&lt;/P&gt;&lt;P&gt;END OF T_LIST,&lt;/P&gt;&lt;P&gt;D_LIST TYPE T_LIST OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF TYPE_DATA,&lt;/P&gt;&lt;P&gt;LIST TYPE D_LIST,&lt;/P&gt;&lt;P&gt;END OF TYPE_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ITEMLIST TYPE STANDARD TABLE OF T_LIST INITIAL SIZE 0.&lt;/P&gt;&lt;P&gt;DATA: XMLOUT TYPE STRING.&lt;/P&gt;&lt;P&gt;DATA: ITAB LIKE SOLI OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM UPLOAD_XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form UPLOAD_XML&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="-----------------------------" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM UPLOAD_XML .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH ITAB.&lt;/P&gt;&lt;P&gt;clear ITEMLIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = 'C:\test11.XML'&lt;/P&gt;&lt;P&gt;filetype = 'BIN'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;CONCATENATE XMLOUT ITAB-LINE INTO XMLOUT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION ('ZTEST11X2A')&lt;/P&gt;&lt;P&gt;SOURCE XML XMLOUT&lt;/P&gt;&lt;P&gt;RESULT ITEMLIST = ITEMLIST.&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;ENDFORM.[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-to-itab/m-p/3507591#M843630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:49:13Z</dc:date>
    </item>
  </channel>
</rss>

