<?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 create and upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131669#M1365545</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;how can simply a file be uploaded to application server. Please note the file is not existing on local PC. It must be created&lt;/P&gt;&lt;P&gt;during application runtime and finally uploaded.  How can this req be achieved ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reply back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2009 10:06:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-08T10:06:01Z</dc:date>
    <item>
      <title>create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131669#M1365545</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;how can simply a file be uploaded to application server. Please note the file is not existing on local PC. It must be created&lt;/P&gt;&lt;P&gt;during application runtime and finally uploaded.  How can this req be achieved ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reply back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:06:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131669#M1365545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131670#M1365546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your requirement is getting data from any table and put in application server as a file, here is the code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN DATASET pa_fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
  IF sy-subrc EQ 0.
* Process Data
    LOOP AT lt_data INTO lw_data.
*     Write the data into the file
      TRANSFER lw_data TO pa_fname.
    ENDLOOP.
  ELSE.
    WRITE :/ 'Error while opening the file'.
  ENDIF.
* Close the dataset
  CLOSE DATASET pa_fname.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:10:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131670#M1365546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131671#M1365547</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 am not sure what you mean by " the file must be created during runtime and get uploaded in application server". If you are meaning a internal table as a file , then it can be used to create a file in the application server with the internal table data in the application server file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: dsn type string.
dsn = '\tmp\usr\abc.txt'            " valid application server file path
OPEN DATASET dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
  IF sy-subrc EQ 0.
    LOOP AT ltab.
      TRANSFER itab TO dsn.
    ENDLOOP.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131671#M1365547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131672#M1365548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm well u have to write a program.....and fill an internal table (collect data from database).........then using above open dataset staments send it to application server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131672#M1365548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131673#M1365549</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;You can create a file on application server by using OPEN DATASET statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fetch data from required tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;select matnr spart form mara into table itab&lt;/P&gt;&lt;P&gt;where............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create a file on application server&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gv_file = path + file name&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Transfer the records to the file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab nto wa_itab&lt;/P&gt;&lt;P&gt;      TRANSFER wa_itab TO gv_file.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Close the file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; CLOSE DATASET gv_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:19:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131673#M1365549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: create and upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131674#M1365550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for this very fast reply. I will check it an let you know if I have had success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 10:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-and-upload/m-p/6131674#M1365550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-08T10:20:21Z</dc:date>
    </item>
  </channel>
</rss>

