<?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: Upload CSV file from PC to Application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437612#M208487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vikrant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its a one time activity you can use the transactions CG3Y and CG3Z transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If NOT, then you will have to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Call the method GUI_UPLOAD METHOD of the class, CL_GUI_FRONTEND_SERVICES. This will prompt the user to enter the file path and name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Once the data is uploaded to a internal table, use the OPEN DATASET, TRANSFER, CLOSE DATASET commands to save the data to a file on the app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note  :Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jul 2006 06:42:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-03T06:42:03Z</dc:date>
    <item>
      <title>Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437611#M208486</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'm not a abaper so need help from ABAP gurus.&lt;/P&gt;&lt;P&gt;We have a simple requirement, and need two abap programs for these requirements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. First program should upload a .CSV file from PC to Application server. No data transformation/modification is required. The .CSV file should be uploaded as it is. Also Users should be able to provide PC and Application server path at run time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Once file has been uploaded, we want it to be renamed by appending current date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea, how can I achieve it. I know there exist GUI_UPLOAD function module but not sure how to use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikrant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 06:37:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437611#M208486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T06:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437612#M208487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vikrant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its a one time activity you can use the transactions CG3Y and CG3Z transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If NOT, then you will have to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Call the method GUI_UPLOAD METHOD of the class, CL_GUI_FRONTEND_SERVICES. This will prompt the user to enter the file path and name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Once the data is uploaded to a internal table, use the OPEN DATASET, TRANSFER, CLOSE DATASET commands to save the data to a file on the app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note  :Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 06:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437612#M208487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T06:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437613#M208488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try the tcode CG3Z to upload your file into application server from your PC&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 06:42:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437613#M208488</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-07-03T06:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437614#M208489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;CG3Z&amp;lt;/b&amp;gt; to upload your file into application server from your PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or  appliction to pc.&lt;/P&gt;&lt;P&gt;report zkish_0001&lt;/P&gt;&lt;P&gt;       no standard page heading.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.csv'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      fld1(20) type c,&lt;/P&gt;&lt;P&gt;      fld2(20) type c,&lt;/P&gt;&lt;P&gt;      fld3(20) type c,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;data: wa(2000) type c.&lt;/P&gt;&lt;P&gt; &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;  open dataset d1 for input in text mode.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;      read dataset d1 into wa.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      split wa at ',' into itab-fld1 itab-fld2 itab-fld3.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  close dataset d1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 06:44:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437614#M208489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T06:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437615#M208490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi USE FM GUI_DOWNLOAD to transfer your .CSV file to an internal table itab.&lt;/P&gt;&lt;P&gt;after that use the code to create a file on the application server and transfer the internal table data to the application server file.&lt;/P&gt;&lt;P&gt;    OPEN DATASET p_ofile_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;    OPEN DATASET p_ofile_file1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      CLEAR: wa_local.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT p_local_table INTO wa_local.&lt;/P&gt;&lt;P&gt;        TRANSFER wa_local TO p_ofile_file.&lt;/P&gt;&lt;P&gt;        CLEAR: wa_local.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;      append p_ofile_file sy-datum to p_ofile_file1 &lt;/P&gt;&lt;P&gt;      CLOSE DATASET p_ofile_file.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET p_ofile_file1..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 06:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437615#M208490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T06:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437616#M208491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikrant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have a look here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1298016"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 07:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437616#M208491</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-07-03T07:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from PC to Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437617#M208492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello kishan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You forgot to include the encoding addition in the &lt;STRONG&gt;OPEN DATASET&lt;/STRONG&gt; command.&lt;/P&gt;&lt;P&gt;Setting encoding to DEFAULT or UTF-8 works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, niche way to read .csv files from the presentation server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 11:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-pc-to-application-server/m-p/1437617#M208492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-03-08T11:40:17Z</dc:date>
    </item>
  </channel>
</rss>

