<?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: XML data file upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018112#M1167673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just read the file (READ DATASET, see forums), put content into a string variable named your_string and do:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lo_xml TYPE REF TO cl_xml_document_base.
CREATE OBJECT lo_xml.
lo_xml-&amp;gt;parse_string( stream = your_string ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2009 19:35:05 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2009-01-13T19:35:05Z</dc:date>
    <item>
      <title>XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018109#M1167670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I upload XML data file to SAP? I cannot use class method import_from_file of class cl_xml_document&lt;/P&gt;&lt;P&gt;because I want to run the program in background and with this Method it only run in foreground&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 15:30:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018109#M1167670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T15:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018110#M1167671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;         Use the below FM's:&lt;/P&gt;&lt;P&gt;/SMB/SC_UL_XML_DOC&lt;/P&gt;&lt;P&gt;/XFT/DIO_DEMO_CP_XML_2_STR&lt;/P&gt;&lt;P&gt;/AIN/IF_XML_TO_C255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;GReetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 17:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018110#M1167671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T17:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018111#M1167672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where can I look at these FM's?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 17:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018111#M1167672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T17:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018112#M1167673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just read the file (READ DATASET, see forums), put content into a string variable named your_string and do:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lo_xml TYPE REF TO cl_xml_document_base.
CREATE OBJECT lo_xml.
lo_xml-&amp;gt;parse_string( stream = your_string ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 19:35:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018112#M1167673</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-01-13T19:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018113#M1167674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I use READ DATASET with the upload?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 08:41:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018113#M1167674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T08:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018114#M1167675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's an elementary abap statement, read the doc, or read forum if you don't understand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 09:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018114#M1167675</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-01-14T09:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018115#M1167676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is not that I want to read the xml data file into a string, the problem is that I can't use any upload method to upload the data file in background, this is want I want to solve, when I run the program in the foreground everything works with my method but not in the background, for this I get a dump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 09:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018115#M1167676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T09:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018116#M1167677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to upload a file from your desktop in background ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT'S NOT POSSIBLE !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See forum on this, it's very well known and discussed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oops bad oss user used, sorry!&lt;/P&gt;&lt;P&gt;I am sandra rossi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sandra Rossi on Jan 14, 2009 1:57 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 12:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018116#M1167677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018117#M1167678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I know this, but is there no method or something else where I can upload something from the server in background?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 12:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018117#M1167678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T12:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018118#M1167679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you show the dump?&lt;/P&gt;&lt;P&gt;Could you show your method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise use READ DATASET to read the file, why don't you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 13:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018118#M1167679</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-01-14T13:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018119#M1167680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;currently I use following methods tu opload and to transfor the xml into a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Method to create XML from data file

  CALL METHOD instance-&amp;gt;import_from_file
    EXPORTING
      filename = gf_filename
    RECEIVING
      retcode  = ch_retcode.

* Convert into XML-Stream

  CALL METHOD instance-&amp;gt;render_2_string
*  EXPORTING
*    pretty_print = 'X'
    IMPORTING
    retcode      = ch_retcode
      stream       = lf_string .
*    size         = .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use read dataset the output of the xml is into an internal table where I have many lines depending on the XML data file, this means if my xml has 10lines the internal table of read dataset has also 10 lines but I need a string to make the transformation of the xml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 13:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018119#M1167680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T13:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: XML data file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018120#M1167681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do it this way so that "all_lines" is a string that contains the whole file (if you had SEARCHED THE FORUM you would have found it yourself):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA line TYPE string.
DATA all_lines TYPE string.
OPEN DATASET ... IN TEXT MODE ...
DO
  READ DATASET ... INTO line.
  IF sy-subrc &amp;lt;&amp;gt; 0. EXIT. ENDIF.
  CONCATENATE all_lines line INTO all_lines.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and then use :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lo_xml TYPE REF TO cl_xml_document_base.
CREATE OBJECT lo_xml.
lo_xml-&amp;gt;parse_string( stream = all_lines ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sandra Rossi on Jan 14, 2009 2:54 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 13:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-data-file-upload/m-p/5018120#M1167681</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-01-14T13:53:31Z</dc:date>
    </item>
  </channel>
</rss>

