<?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: Output XML to Application Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222996#M768646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you try this in stead of BINARY mode: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET l_ofile FOR OUTPUT IN TEXT MODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The BINARY mode outputs data as a stream of single line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks,&lt;/P&gt;&lt;P&gt; Venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2008 22:39:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-16T22:39:16Z</dc:date>
    <item>
      <title>Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222995#M768645</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 have successfully output the contents of an xml document object (if_ixml_document) using the following code (where p_xml_document is my xml document object):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES:&lt;/P&gt;&lt;P&gt;    BEGIN OF xml_line,&lt;/P&gt;&lt;P&gt;      data(256) TYPE x,&lt;/P&gt;&lt;P&gt;    END OF xml_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    streamfactory     TYPE REF TO if_ixml_stream_factory,&lt;/P&gt;&lt;P&gt;    ostream           TYPE REF TO if_ixml_ostream,&lt;/P&gt;&lt;P&gt;    renderer          TYPE REF TO if_ixml_renderer,&lt;/P&gt;&lt;P&gt;    ls_xml            TYPE xml_line,&lt;/P&gt;&lt;P&gt;    lt_xml_table      TYPE TABLE OF xml_line,&lt;/P&gt;&lt;P&gt;    v_xml_size        TYPE i.&lt;/P&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;Transfer contents of xml document object into an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  streamfactory = g_ixml-&amp;gt;create_stream_factory( ).&lt;/P&gt;&lt;P&gt;  ostream = streamfactory-&amp;gt;create_ostream_itable( table = lt_xml_table ).&lt;/P&gt;&lt;P&gt;  renderer = g_ixml-&amp;gt;create_renderer( ostream = ostream document = p_xml_document ).&lt;/P&gt;&lt;P&gt;  renderer-&amp;gt;render( ).&lt;/P&gt;&lt;P&gt;  v_xml_size = ostream-&amp;gt;get_num_written_raw( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      bin_filesize = v_xml_size&lt;/P&gt;&lt;P&gt;      filename     = 'c:\hr_sl\aaa_sunlife.xml'&lt;/P&gt;&lt;P&gt;      filetype     = 'BIN'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab     = lt_xml_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is I really need to output the XML to the application server, so I need to replace the call to cl_gui_frontend_services=&amp;gt;gui_download with something that will download the xml to the app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using OPEN DATASET/TRANSFER/CLOSE DATASET, and while I am getting a file created on the app server, it only contains one line of XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code looks lile this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET l_ofile FOR OUTPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer xml to dataset&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT lt_xml_table INTO ls_xml.&lt;/P&gt;&lt;P&gt;    TRANSFER ls_xml TO l_ofile. &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close the dataset.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLOSE DATASET l_ofile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've searched and searched on SDN and have not found an answer.  Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Russell Hergott on Jan 16, 2008 10:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 21:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222995#M768645</guid>
      <dc:creator>r_hergott</dc:creator>
      <dc:date>2008-01-16T21:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222996#M768646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you try this in stead of BINARY mode: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET l_ofile FOR OUTPUT IN TEXT MODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The BINARY mode outputs data as a stream of single line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks,&lt;/P&gt;&lt;P&gt; Venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2008 22:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222996#M768646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-16T22:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222997#M768647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Venu, but I've already tried that.  My program ends up dumping on the TRANSFER statement because ls_xml is a non-character datatype (its type is x).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2008 14:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222997#M768647</guid>
      <dc:creator>r_hergott</dc:creator>
      <dc:date>2008-01-17T14:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222998#M768648</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;Instead of directly transfering it to the concern file....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why dont u concatenate ur xml data into some initial internal table first and then loop this internal table and then transfer data into ur concern file........this wud help u out..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please get me back if u've solved this.........or not.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 14:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222998#M768648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T14:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222999#M768649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi boss,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some of the code may be useful for u .&lt;/P&gt;&lt;P&gt;try like this sending into the internal table  and then try ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZTESTPROGRAMFORUPLOAD&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTESTPROGRAMFORUPLOAD message-id zmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:pa0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:begin of ty_pa0000,&lt;/P&gt;&lt;P&gt;      pernr like pa0000-pernr,&lt;/P&gt;&lt;P&gt;      endda like pa0000-begda,&lt;/P&gt;&lt;P&gt;      end of ty_pa0000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:begin of ty_pa0002,&lt;/P&gt;&lt;P&gt;      pernr like pa0002-pernr,&lt;/P&gt;&lt;P&gt;      begda like pa0002-begda,&lt;/P&gt;&lt;P&gt;      endda like pa0002-endda,&lt;/P&gt;&lt;P&gt;      vorna like pa0002-vorna,&lt;/P&gt;&lt;P&gt;      nachn like pa0002-nachn,&lt;/P&gt;&lt;P&gt;      end of ty_pa0002.&lt;/P&gt;&lt;P&gt; data:it_pa0000 type standard table of ty_pa0000 with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_pa0002 type standard table of ty_pa0002 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_pernr like pa0002-pernr,&lt;/P&gt;&lt;P&gt;      v_lines type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: W_MSG(150)  TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-FIL.&lt;/P&gt;&lt;P&gt;*SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_PC  RADIOBUTTON GROUP RAD USER-COMMAND USR.         "PC&lt;/P&gt;&lt;P&gt;*SELECTION-SCREEN COMMENT 3(5) TEXT-SC1.&lt;/P&gt;&lt;P&gt;PARAMETERS: P_UNIX  RADIOBUTTON GROUP RAD DEFAULT 'X'.         "UNIX&lt;/P&gt;&lt;P&gt;*SELECTION-SCREEN COMMENT 11(5) TEXT-SC2.&lt;/P&gt;&lt;P&gt;parameters:p_file like rlgrap-filename.&lt;/P&gt;&lt;P&gt;*SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file.&lt;/P&gt;&lt;P&gt;perform f4_help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Get the  active employyes&lt;/P&gt;&lt;P&gt;  select     pernr&lt;/P&gt;&lt;P&gt;             endda&lt;/P&gt;&lt;P&gt;             from pa0000&lt;/P&gt;&lt;P&gt;             into table it_pa0000 up to 100 rows&lt;/P&gt;&lt;P&gt;             where endda &amp;gt;= sy-datum&lt;/P&gt;&lt;P&gt;             and   begda &amp;lt;= sy-datum&lt;/P&gt;&lt;P&gt;             and   stat2 = '3'.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    sort it_pa0000 by pernr endda descending.&lt;/P&gt;&lt;P&gt;    delete adjacent duplicates from it_pa0000 comparing pernr.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr&lt;/P&gt;&lt;P&gt;       begda&lt;/P&gt;&lt;P&gt;       endda&lt;/P&gt;&lt;P&gt;       vorna&lt;/P&gt;&lt;P&gt;       nachn&lt;/P&gt;&lt;P&gt;       from pa0002&lt;/P&gt;&lt;P&gt;       into table it_pa0002&lt;/P&gt;&lt;P&gt;       for all entries in it_pa0000&lt;/P&gt;&lt;P&gt;       where pernr = it_pa0000-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_pa0002 by pernr.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_pa0002 comparing pernr.&lt;/P&gt;&lt;P&gt;append it_pa0002.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  describe table it_pa0002 lines  v_lines .&lt;/P&gt;&lt;P&gt;*---get data into Application Server.&lt;/P&gt;&lt;P&gt;PERFORM OUTPUT_CORPEDIA_VENDOR_FILE .&lt;/P&gt;&lt;P&gt;  SKIP 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE:/ 'FILE NAME :' , P_FILE .&lt;/P&gt;&lt;P&gt;  WRITE:/ 'NO OF RECORDS DOWNLOADED : ', V_LINES .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  f4_help&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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;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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f4_help .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF P_UNIX = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;F4 help for UNIX&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DYNPFIELD_FILENAME = 'P_FILE'&lt;/P&gt;&lt;P&gt;        DYNAME             = SY-CPROG&lt;/P&gt;&lt;P&gt;        DYNUMB             = SY-DYNNR&lt;/P&gt;&lt;P&gt;        FILETYPE           = 'P'&lt;/P&gt;&lt;P&gt;        LOCATION           = 'A'&lt;/P&gt;&lt;P&gt;        SERVER             = ''.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE E000 WITH TEXT-E01 P_FILE.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSEIF P_PC = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;F4 help for PC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DEF_PATH         = P_FILE&lt;/P&gt;&lt;P&gt;        MASK             = ',&lt;STRONG&gt;.&lt;/STRONG&gt;.'&lt;/P&gt;&lt;P&gt;        MODE             = '0 '&lt;/P&gt;&lt;P&gt;        TITLE            = 'Choose File'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        FILENAME         = P_FILE&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        INV_WINSYS       = 1&lt;/P&gt;&lt;P&gt;        NO_BATCH         = 2&lt;/P&gt;&lt;P&gt;        SELECTION_CANCEL = 3&lt;/P&gt;&lt;P&gt;        SELECTION_ERROR  = 4&lt;/P&gt;&lt;P&gt;        OTHERS           = 5.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " f4_help&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  OUTPUT_CORPEDIA_VENDOR_FILE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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;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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form OUTPUT_CORPEDIA_VENDOR_FILE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF P_PC = 'X'.&lt;/P&gt;&lt;P&gt;  data: v_pcfile type string.&lt;/P&gt;&lt;P&gt;  v_pcfile = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME                      = v_pcfile&lt;/P&gt;&lt;P&gt;      FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;      WRITE_FIELD_SEPARATOR           = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB                      = it_pa0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_pa0002 by pernr.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from  it_pa0002.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  data: outrec(200) type c .&lt;/P&gt;&lt;P&gt;  OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE encoding DEFAULT.&lt;/P&gt;&lt;P&gt;  loop at it_pa0002.&lt;/P&gt;&lt;P&gt;    outrec+0(8) = it_pa0002-pernr.&lt;/P&gt;&lt;P&gt;    outrec+18(8) = it_pa0002-begda.&lt;/P&gt;&lt;P&gt;    outrec+36(8) = it_pa0002-endda.&lt;/P&gt;&lt;P&gt;    outrec+54(40) = it_pa0002-vorna.&lt;/P&gt;&lt;P&gt;    outrec+104(40) = it_pa0002-nachn.&lt;/P&gt;&lt;P&gt;    transfer outrec to p_file.&lt;/P&gt;&lt;P&gt;    clear outrec.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET OUTREC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;      CLEAR W_MSG.&lt;/P&gt;&lt;P&gt;     CONCATENATE 'Corpedia Vendor Demographic File successfully written to:'&lt;/P&gt;&lt;P&gt;                 P_FILE&lt;/P&gt;&lt;P&gt;                 INTO W_MSG SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;      ULINE.  SKIP.&lt;/P&gt;&lt;P&gt;      WRITE : W_MSG.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;endform.                    " OUTPUT_CORPEDIA_VENDOR_FILE&lt;/P&gt;&lt;P&gt;&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>Mon, 25 Feb 2008 14:42:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3222999#M768649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Output XML to Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3223000#M768650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your responses, but I solved this problem a while back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was finally able to solve this by using the if_ixml_stream_factory and related classes to populate an internal table from my xml object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code populates internal table lt_xml_table from my xml object p_xml_document (type if_xml_document).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES:&lt;/P&gt;&lt;P&gt;    BEGIN OF xml_line,&lt;/P&gt;&lt;P&gt;      data(256) TYPE x,&lt;/P&gt;&lt;P&gt;    END OF xml_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    streamfactory   TYPE REF TO if_ixml_stream_factory,&lt;/P&gt;&lt;P&gt;    ostream           TYPE REF TO if_ixml_ostream,&lt;/P&gt;&lt;P&gt;    renderer           TYPE REF TO if_ixml_renderer,&lt;/P&gt;&lt;P&gt;    lt_xml_table     TYPE TABLE OF xml_line,&lt;/P&gt;&lt;P&gt;    pretty_print      TYPE ddbool_d.&lt;/P&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;  Transfer contents of xml document object into an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  streamfactory = g_ixml-&amp;gt;create_stream_factory( ).&lt;/P&gt;&lt;P&gt;  ostream = streamfactory-&amp;gt;create_ostream_itable( table = lt_xml_table ).&lt;/P&gt;&lt;P&gt;  pretty_print = 'X'.&lt;/P&gt;&lt;P&gt;  ostream-&amp;gt;set_pretty_print( pretty_print = pretty_print ).&lt;/P&gt;&lt;P&gt;  renderer = g_ixml-&amp;gt;create_renderer( ostream = ostream document = p_xml_document ).&lt;/P&gt;&lt;P&gt;  renderer-&amp;gt;render( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once this is accomplished, I can simply use open dataset/file transfer/close dataset to copy the contents of the internal table to the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 15:02:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/output-xml-to-application-server/m-p/3223000#M768650</guid>
      <dc:creator>r_hergott</dc:creator>
      <dc:date>2008-02-25T15:02:35Z</dc:date>
    </item>
  </channel>
</rss>

