<?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: FILENAME in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596898#M866197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the previous guys mentioned, we can use OPEN DATASET for the files on the Application server only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But instead of changing the entire code, u can put the same file in the application server &amp;amp; use the same code.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the transaction CG3Z for uploading the files in presentation server to Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But specify a filepath (in which u want to upload the file in AL11 transaction) in the same transaction CG3Z.Then in that path, the file will be stored. Then u assign that filepath to FNAME in ur program. This will surely works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this &amp;amp; let me know in case of any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forget to reward points if helpful.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Apr 2008 07:27:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-01T07:27:35Z</dc:date>
    <item>
      <title>FILENAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596894#M866193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;am using the simple program below.But am getting the output as FILE NOT READ.I hav a file with the same name in the 'C' drive.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZBDC_3A.&lt;/P&gt;&lt;P&gt;DATA : FNAME(30) VALUE 'C:\ZFCHR1.TXT'.&lt;/P&gt;&lt;P&gt;DATA : STR(255).&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.&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 FNAME INTO STR.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;WRITE : / STR.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;WRITE : 'FILE NOT FOUND TO READ'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLOSE DATASET FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 06:33:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596894#M866193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T06:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596895#M866194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to read a file from your PC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files stored on your PC are presentation server files and should be read using the FM WS_UPLOAD or GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unix files or Application server files are read using OPEN DATASET statement. These files can be seen in transaction AL11.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 06:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596895#M866194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T06:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596896#M866195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use this FM GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;Declare an interna table same as your File in the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code is given below:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = filepath
*   FILETYPE                      = 'ASC'
    has_field_separator           = 'X'

   TABLES
                       data_tab   = i_tab


 EXCEPTIONS
   file_open_error               = 1
   file_read_error               = 2
   no_batch                      = 3
   gui_refuse_filetransfer       = 4
   invalid_type                  = 5
   no_authority                  = 6
   unknown_error                 = 7
   bad_data_format               = 8
   header_not_allowed            = 9
   separator_not_allowed         = 10
   header_too_long               = 11
   unknown_dp_error              = 12
   access_denied                 = 13
   dp_out_of_memory              = 14
   disk_full                     = 15
   dp_timeout                    = 16
   OTHERS                        = 17
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sandipan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sandipan Ghosh on Apr 1, 2008 12:15 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 06:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596896#M866195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T06:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596897#M866196</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;Use Upload or download FM instead of Open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u&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;Vijay K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 07:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596897#M866196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T07:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596898#M866197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the previous guys mentioned, we can use OPEN DATASET for the files on the Application server only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But instead of changing the entire code, u can put the same file in the application server &amp;amp; use the same code.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the transaction CG3Z for uploading the files in presentation server to Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But specify a filepath (in which u want to upload the file in AL11 transaction) in the same transaction CG3Z.Then in that path, the file will be stored. Then u assign that filepath to FNAME in ur program. This will surely works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this &amp;amp; let me know in case of any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forget to reward points if helpful.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 07:27:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filename/m-p/3596898#M866197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T07:27:35Z</dc:date>
    </item>
  </channel>
</rss>

