<?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: write XML file in application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768713#M1306158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no reason why your approach would not work. I agree that yours is a better approach provided opening the file in Binary Mode suffices Mario's requirements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution that I proposed would work for unicode program when file needs to be opened in text mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2009 21:21:07 GMT</pubDate>
    <dc:creator>former_member723628</dc:creator>
    <dc:date>2009-06-18T21:21:07Z</dc:date>
    <item>
      <title>write XML file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768710#M1306155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a transformation to generate a xml file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL TRANSFORMATION zdatafechomes&lt;/P&gt;&lt;P&gt;  SOURCE ficheiroexecucao = gt_source[]&lt;/P&gt;&lt;P&gt;  RESULT XML  xml_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's working fine. But i'm having problems in putting the "xml_result" (it's a type xtring) into the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows how to do it ? Transaction cg3z it's different because the file comes from C:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mário.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 20:10:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768710#M1306155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T20:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: write XML file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768711#M1306156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mário,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since your result data object "xml_result" is of xstring type you may take this approach&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Convert this into unicode string using function HR_KR_XSTRING_TO_STRING &lt;/P&gt;&lt;P&gt;2. Convert string into standard table using function HR_EFI_CONVERT_STRING_TO_TABLE.&lt;/P&gt;&lt;P&gt;3. Write contents of this table to application server using OPEN DATASET and TRANSFER statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 20:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768711#M1306156</guid>
      <dc:creator>former_member723628</dc:creator>
      <dc:date>2009-06-18T20:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: write XML file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768712#M1306157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see why the following logic should not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_XML_XSTRING_APPLSERVER
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZUS_SDN_XML_XSTRING_APPLSERVER.

DATA:
  gd_dsn            type string,
  gd_xstring        type xstring,
  gt_kna1           type STANDARD TABLE OF kna1.

start-of-selection.

  select * from kna1 into table gt_kna1 up to 10 rows.

  BREAK-POINT.

  call TRANSFORMATION id
    source itab = gt_kna1
    result xml = gd_xstring.

    gd_dsn = '/tmp/xml_as_xstring.file'.

    open DATASET gd_dsn for OUTPUT in BINARY MODE.
    check ( syst-subrc = 0 ).

    TRANSFER gd_xstring to gd_dsn.

    CLOSE DATASET gd_dsn.

end-of-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 20:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768712#M1306157</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-06-18T20:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: write XML file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768713#M1306158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no reason why your approach would not work. I agree that yours is a better approach provided opening the file in Binary Mode suffices Mario's requirements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution that I proposed would work for unicode program when file needs to be opened in text mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 21:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768713#M1306158</guid>
      <dc:creator>former_member723628</dc:creator>
      <dc:date>2009-06-18T21:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: write XML file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768714#M1306159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Uwe and Gajendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is solved, the sample code povided by Uwe it's working fine. I gave points to both of u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if i want to read a xml file from application server, and populate a internal table using the transformation , how can it be done ? Do you have a sample code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL TRANSFORMATION zdatafechomes&lt;/P&gt;&lt;P&gt;      SOURCE XML xml_result (this info comes from application server)&lt;/P&gt;&lt;P&gt;      RESULT ficheiroexecucao = gt_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards and thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 09:00:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-xml-file-in-application-server/m-p/5768714#M1306159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T09:00:41Z</dc:date>
    </item>
  </channel>
</rss>

