<?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: error while downloading data from internal table into XML file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082897#M432303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wojciech,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i already included that tag in my XML file, but also iam getting that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me if there is any other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2007 11:08:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-19T11:08:21Z</dc:date>
    <item>
      <title>error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082894#M432300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i developed a program to download data from into internal table to xml file like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_matnr like mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab_mara occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;            ernam like mara-ernam,&lt;/P&gt;&lt;P&gt;            aenam like mara-aenam,&lt;/P&gt;&lt;P&gt;            vpsta like mara-vpsta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      end of itab_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_field_seperator type c,     " value 'X',&lt;/P&gt;&lt;P&gt;      lv_xml_doc_name(30) type c,    " string value &amp;#145;my xml file&amp;#146;,&lt;/P&gt;&lt;P&gt;      lv_result type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      lv_field_seperator = 'x'.&lt;/P&gt;&lt;P&gt;      lv_xml_doc_name = 'my xml file'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of truxs_xml_line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          data(256) type x,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      end of truxs_xml_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:truxs_xml_table type table of truxs_xml_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:lv_tab_converted_data type truxs_xml_line,&lt;/P&gt;&lt;P&gt;     lt_tab_converted_data type truxs_xml_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_xml_file type rlgrap-filename value 'c:\simp.xml'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr ernam aenam vpsta from mara into table itab_mara up to 5&lt;/P&gt;&lt;P&gt;       rows where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   I_FIELD_SEPERATOR          = lv_field_seperator&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_LINE_HEADER              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_FILENAME                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_APPL_KEEP                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   I_XML_DOC_NAME             = lv_xml_doc_name&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   PE_BIN_FILESIZE            = lv_result&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    I_TAB_SAP_DATA             = itab_mara&lt;/P&gt;&lt;P&gt; CHANGING&lt;/P&gt;&lt;P&gt;   I_TAB_CONVERTED_DATA       = lt_tab_converted_data&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONVERSION_FAILED          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset lv_xml_file for output in binary mode.&lt;/P&gt;&lt;P&gt;loop at lt_tab_converted_data into lv_tab_converted_data.&lt;/P&gt;&lt;P&gt;transfer lv_tab_converted_data to lv_xml_file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset lv_xml_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this program is syntactically correct and getting executed, but when i open the target xml file it is showing the following error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The XML page cannot be displayed &lt;/P&gt;&lt;P&gt;Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. &lt;/P&gt;&lt;P&gt;&lt;/P&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;XML document must have a top level element. Error processing resource 'file:///C:/simp.xml'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will anyone show me the possible solution to rectify this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 19:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082894#M432300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082895#M432301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Probably there is a lack of this preambule:&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Wojciech&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 20:03:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082895#M432301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T20:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082896#M432302</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;Here is a small sample program to convert data in an internal table into XML format and display it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: itab  TYPE TABLE OF spfli,
      l_xml TYPE REF TO cl_xml_document.
* Read data into a ITAB
SELECT * FROM spfli INTO TABLE itab.
* Create the XML Object
CREATE OBJECT l_xml.
* Convert data in ITAB to XML
CALL METHOD l_xml-&amp;gt;create_with_data( name = 'Test1'
                                     dataobject = t_goal[] ).
* Display XML Document
CALL METHOD l_xml-&amp;gt;display.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some other sample SAP programs to handle XML in ABAP:&lt;/P&gt;&lt;P&gt;BCCIIXMLT1, BCCIIXMLT2, and BCCIIXMLT3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sumant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2007 20:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082896#M432302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-18T20:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082897#M432303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wojciech,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i already included that tag in my XML file, but also iam getting that error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me if there is any other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 11:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082897#M432303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T11:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082898#M432304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mr. Sumanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to develop that program in 4.6c version. when i tested that program it is showing that the class CL_XML_DOCUMENT  is unknown, there iam stuck. is there any other solution to deal this scenario or is there any coding to download internal table data into XML file without using the class CL_XML_DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur reply,&lt;/P&gt;&lt;P&gt;anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 11:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082898#M432304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T11:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: error while downloading data from internal table into XML file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082899#M432305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mr. Sumanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry Mr. Sumanth the coding which u have provided for downloading internal table data into a XML file worked well apart from having CL_XML_DOCUMENT. but the problem is that it is downloading the internal table content by creating a XML file. but my requirement is i will have a predefined location in which the XML file will be present like 'c:\simp.xml'. into this predefined location i have to download the internal table content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz suggest me some coding for this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;anil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 12:14:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-while-downloading-data-from-internal-table-into-xml-file/m-p/2082899#M432305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T12:14:33Z</dc:date>
    </item>
  </channel>
</rss>

