<?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 Application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542959#M852324</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;thanks for the response. I tried to locate the path using AL11. I did not find it. Does that mean I do not have the authorisation to read files from APP server? How should I go about from here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2008 12:43:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-27T12:43:31Z</dc:date>
    <item>
      <title>Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542955#M852320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to upload a CSV file from the application server (SAP PRd server) The file is not opening&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file like rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In p_file here is the path  ' &lt;EM&gt;E:\sapprd\int_files\sap2008\import-export scripts\123.csv'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'&lt;STRONG&gt;sap2008&lt;/STRONG&gt;' is the folder in SAP PRD server and &lt;STRONG&gt;'import-export scripts'&lt;/STRONG&gt; a sub folder and &lt;STRONG&gt;'123.csv'&lt;/STRONG&gt; is the file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET p_file FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt; if sy-subrc = 8.&lt;/P&gt;&lt;P&gt; WRITE:/ 'FILE', P_FILE, 'cannot be opened'.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;while sy-subrc = 4.&lt;/P&gt;&lt;P&gt;  READ DATASET ld_file into wa_string.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   MOVE-CORRESPONDING wa_string to itab.&lt;/P&gt;&lt;P&gt;   append itab.&lt;/P&gt;&lt;P&gt;   clear itab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The result is sy-subrc = 8... file cannot open.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something here? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 20:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542955#M852320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T20:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542956#M852321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I schedule to run this in batch mode as an automated process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to run this process 2 to 3 times per week and each time I get the file with the date convention attached to it. I need to set this process automatic because running the file manually is cumbersome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance in this regard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 20:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542956#M852321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T20:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542957#M852322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try changing E:\sapprd\int_files\sap2008\import-export scripts\123.csv to \sapprd\int_files\sap2008\import-export scripts\123.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, they leave the file with a date attached and that same day you pick the file?&lt;/P&gt;&lt;P&gt;Then, just add sy-datum to the name of the file and make it the default value, if someone is running a job it should pick the file of that day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 20:44:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542957#M852322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T20:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542958#M852323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinu.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to AL11 and take the exact path... i think path would be \sapprd\int_files\sap2008\import-export scripts\123.csv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the path once again and not only that go to that path and double click on the file... and see whether u r able to open the file or not........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are not able to open the file then that means u don't have the authorization to do .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check that once if u have any further issues let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 20:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542958#M852323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T20:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542959#M852324</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;thanks for the response. I tried to locate the path using AL11. I did not find it. Does that mean I do not have the authorisation to read files from APP server? How should I go about from here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 12:43:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542959#M852324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T12:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542960#M852325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to mention, the filepath that I had mentioned earlier, is the same physical path that I assign to the logical filenames to write a file on App server from various interfaces. Does it have to be different the other way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 13:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542960#M852325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542961#M852326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remember correctly, when using OPEN DATASET, the file name can not have spaces in the name.  Try renaming your file removing spaces and retry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your code, you'll need to breakdown the CSV file by the delimiter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code makes an archive file while reading the main file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    OPEN DATASET filname IN TEXT MODE MESSAGE t_mesg.
    IF sy-subrc NE 0.
      MOVE 'X' TO t_error.
      MESSAGE e100(z0) WITH 'Error reading file:' t_mesg.
      EXIT.
    ENDIF.

    IF p_load = 'X'.
      OPEN DATASET archfilname FOR OUTPUT IN TEXT MODE MESSAGE t_mesg.
      IF sy-subrc NE 0.
        MOVE 'X' TO t_error.
        MESSAGE e100(z0) WITH 'Error opening achrive file:' t_mesg.
        EXIT.
      ENDIF.
    ENDIF.
    DO.
      READ DATASET filname INTO my_rec.
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
      IF p_load = 'X'.
        TRANSFER my_rec TO archfilname.
      ENDIF.
      SPLIT my_rec AT c_tab       " Here my delimter was a tab change to ',' for comma
        INTO  in_rec-id
              in_rec-fname
              in_rec-lname
              in_rec-addr
              in_rec-apt
              in_rec-city
              in_rec-state
              in_rec-zip
              in_rec-branch
              in_rec-phone1
              in_rec-phone2
              in_rec-phone3
              in_rec-phone3_ext
              in_rec-email
              in_rec-hear
              in_rec-prefcont
              in_rec-ownland
              in_rec-build
              in_rec-ownhome
*              in_rec-get_promo
              in_rec-cmt1
              in_rec-subdate.
      APPEND in_rec TO it_input.
    ENDDO.
    CLOSE DATASET filname.
    IF p_load = 'X'.
      CLOSE DATASET archfilname.
      DELETE DATASET filname.
    ENDIF.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 13:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542961#M852326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T13:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542962#M852327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. It gives the message 'No such file or directory'.  Coming to the use of Split command, I am using that piece of code in my subsequent lines. I am reading the data into a line string and then moving into the individual data elements of the itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if I am missing something here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 13:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542962#M852327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T13:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542963#M852328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to get more info about the error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data: lv_messg type text50.

  open dataset my_file for input... ... message lv_messg.

  write: / sy-subrc, lv_messg.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that would help to know which is the error exactly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 14:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542963#M852328</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2008-03-27T14:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CSV file from Application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542964#M852329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resolved the issue with the help of basis guy and it was related to file path and file type it is stored in the application server. Shall award the points and close the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 19:09:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-csv-file-from-application-server/m-p/3542964#M852329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-27T19:09:45Z</dc:date>
    </item>
  </channel>
</rss>

