<?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: Read all Files from a Folder on Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497890#M230955</link>
    <description>&lt;P&gt;Problem with this FM is that it can only have 32 character filename, is there any other FM which can help choose files having long filenames?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 08:44:56 GMT</pubDate>
    <dc:creator>amnsrivastava</dc:creator>
    <dc:date>2022-03-09T08:44:56Z</dc:date>
    <item>
      <title>Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497884#M230949</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;Can anyone help me in finding if there's any way to read all files in a folder on the server?Any Function module or anything.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:24:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497884#M230949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497885#M230950</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;Try the method DIRECTORY_LIST_FILES of class CL_GUI_FRONTEND_SERVICES for Presentation server or/and fm SUBST_GET_FILE_LIST for Application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:28:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497885#M230950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497886#M230951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sirisha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the FM 'RZL_READ_DIR_LOCAL'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;do reward if it helps,&lt;/P&gt;&lt;P&gt;priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497886#M230951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497887#M230952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On App server?  Try this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .

data: begin of itab occurs 0,
      rec(1000) type c,
      end of itab.
data: wa(1000) type c.

data: p_file type localfile.
data: ifile type table of  salfldir with header line.

parameters: p_path type salfile-longname
                    default '/usr/sap/TST/DVEBMGS01/data/'.


call function 'RZL_READ_DIR_LOCAL'
     exporting
          name           = p_path
     tables
          file_tbl       = ifile
     exceptions
          argument_error = 1
          not_found      = 2
          others         = 3.

loop at ifile.
  format hotspot on.
  write:/ ifile-name.
  hide ifile-name.
  format hotspot off.
endloop.


at line-selection.

  concatenate p_path ifile-name into p_file.

  clear itab.  refresh itab.
  open dataset p_file for input in text mode.
  if sy-subrc = 0.
    do.
      read dataset p_file into wa.
      if sy-subrc &amp;lt;&amp;gt; 0.
        exit.
      endif.
      itab-rec = wa.
      append itab.
    enddo.
  endif.
  close dataset p_file.

  loop at itab.
    write:/ itab.
  endloop.

&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497887#M230952</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-26T15:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497888#M230953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your replies.&lt;/P&gt;&lt;P&gt;Points awarded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 16:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497888#M230953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T16:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497889#M230954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wrong thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Moisés Lorenzo on Jul 7, 2009 1:01 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 11:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497889#M230954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-07T11:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497890#M230955</link>
      <description>&lt;P&gt;Problem with this FM is that it can only have 32 character filename, is there any other FM which can help choose files having long filenames?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 08:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497890#M230955</guid>
      <dc:creator>amnsrivastava</dc:creator>
      <dc:date>2022-03-09T08:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read all Files from a Folder on Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497891#M230956</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;amnsrivastava&lt;/SPAN&gt; please, ask your own question&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 08:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-all-files-from-a-folder-on-server/m-p/1497891#M230956</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-03-09T08:46:29Z</dc:date>
    </item>
  </channel>
</rss>

