<?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 Re: Upload XML file from application server to internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008692#M1345561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this article I've written will help you:&lt;/P&gt;&lt;P&gt;[heidoc.net|http://www.heidoc.net/joomla/en/technology-science/sap-and-xslt/5-tutorial-data-exchange-between-abap-and-xml]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jan Krohn on Jul 15, 2011 10:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2009 14:07:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-10T14:07:53Z</dc:date>
    <item>
      <title>Upload XML file from application server to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008690#M1345559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a requirement where we need to upload XML file from application server to the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a blank internal table, with the following error message in bapirept2 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;line   1 col   1-unexpected symbol; expected '&amp;lt;', '&amp;lt;/', entity reference, character data, CDATA section, processing instruction or c&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code extract is as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Open DATASET p_file for INPUT in BINARY MODE.

  if sy-subrc = 0.
    Do.
      READ DATASET p_file into gt_data LENGTH g_length.
      IF sy-subrc &amp;lt;&amp;gt; 0.
        EXIT.
      ENDIF.
      APPEND gt_data.
    ENDDO.
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
      EXPORTING
        INPUT_LENGTH       = g_length
*      FIRST_LINE         = 0
*       LAST_LINE          = 0
     IMPORTING
      BUFFER             = g_xstring
      TABLES
        BINARY_TAB         = gt_data
     EXCEPTIONS
       FAILED             = 1
       OTHERS             = 2
              .
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
CALL FUNCTION 'SMUM_XML_PARSE'
      EXPORTING
        XML_INPUT       = g_xstring
      TABLES
        XML_TABLE       = gt_smum_xmltb
        RETURN          = gt_bapiret2
              .
Close DATASET p_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please rectify me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 09:47:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008690#M1345559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T09:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Upload XML file from application server to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008691#M1345560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Please rectify me.&lt;/P&gt;&lt;P&gt;You'ved poste in the wrong forum. This forum is about the gui and your requirement has nothing to do with that.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 15:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008691#M1345560</guid>
      <dc:creator>jurjen_heeck</dc:creator>
      <dc:date>2009-08-07T15:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Upload XML file from application server to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008692#M1345561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this article I've written will help you:&lt;/P&gt;&lt;P&gt;[heidoc.net|http://www.heidoc.net/joomla/en/technology-science/sap-and-xslt/5-tutorial-data-exchange-between-abap-and-xml]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jan Krohn on Jul 15, 2011 10:44 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 14:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-xml-file-from-application-server-to-internal-table/m-p/6008692#M1345561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T14:07:53Z</dc:date>
    </item>
  </channel>
</rss>

