<?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: all files from a specified folder in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387421#M813377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA direc TYPE string.&lt;/P&gt;&lt;P&gt;data file_count TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;directory_list_files&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    directory  = direc&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    file_table = it_files&lt;/P&gt;&lt;P&gt;    count      = file_count.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'direc' is a variable which has the path of the directory.&lt;/P&gt;&lt;P&gt; 'it_files' is an internal table of any type.&lt;/P&gt;&lt;P&gt;The method returns all the filenames in the directory 'direc' in the table 'it_files'. Variable 'FIle_count' contains the number of files in the directory. Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Vidhya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Sep 8, 2008 1:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2008 05:55:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-11T05:55:39Z</dc:date>
    <item>
      <title>all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387416#M813372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to read all the files having particular date in its file name from aa folder at specifies path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i get all file names from a folder.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Sep 8, 2008 1:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 04:27:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387416#M813372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T04:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387417#M813373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AT SELECTION_SCREEN on FIELD REQUEST.&lt;/P&gt;&lt;P&gt;CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;directory = ' '&lt;/P&gt;&lt;P&gt;filemask = ' '&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;serverfile = p_afile&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;canceled_by_user = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 04:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387417#M813373</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-11T04:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387418#M813374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but i dont require F4 help..i want to upload in program itself...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 04:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387418#M813374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T04:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387419#M813375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;playing with file mask like * sy-datum *.. should help you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I doubt if it can be automatically..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 04:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387419#M813375</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-11T04:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387420#M813376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using FM: &lt;STRONG&gt;EPS_GET_DIRECTORY_LISTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 05:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387420#M813376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T05:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387421#M813377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the following method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA direc TYPE string.&lt;/P&gt;&lt;P&gt;data file_count TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;directory_list_files&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    directory  = direc&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    file_table = it_files&lt;/P&gt;&lt;P&gt;    count      = file_count.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'direc' is a variable which has the path of the directory.&lt;/P&gt;&lt;P&gt; 'it_files' is an internal table of any type.&lt;/P&gt;&lt;P&gt;The method returns all the filenames in the directory 'direc' in the table 'it_files'. Variable 'FIle_count' contains the number of files in the directory. Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;removed_by_moderator&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Vidhya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Sep 8, 2008 1:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 05:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387421#M813377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T05:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387422#M813378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vidhya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this method by giving directory name as /usr/sap/D62/DVEBMGS04/work. but it is not displaying list..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 06:43:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387422#M813378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T06:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387423#M813379</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;The method that I gave before is to get the filenames in a directory which is present in the local machine say 'D:\sap' . To get the file names from the application server, try the following FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data RFC_DESTINATION LIKE  RFCDES-RFCDEST.&lt;/P&gt;&lt;P&gt;Data DIRECTORY LIKE  EPSF-EPSDIRNAM.&lt;/P&gt;&lt;P&gt;Data FILE_MASK LIKE  EPSF-EPSFILNAM DEFAULT SPACE.&lt;/P&gt;&lt;P&gt;Data REMOTE_DIRECTORY LIKE  EPSF-EPSDIRNAM.&lt;/P&gt;&lt;P&gt;Data FILE_COUNTER LIKE  EPSF-EPSFILSIZ.&lt;/P&gt;&lt;P&gt;Data ERROR_COUNTER LIKE  EPSF-EPSFILSIZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'&lt;/P&gt;&lt;P&gt;       DESTINATION                 RFC_DESTINATION&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;           DIR_NAME                = DIRECTORY&lt;/P&gt;&lt;P&gt;           FILE_MASK               = FILE_MASK&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;           DIR_NAME                = REMOTE_DIRECTORY&lt;/P&gt;&lt;P&gt;           FILE_COUNTER            = FILE_COUNTER&lt;/P&gt;&lt;P&gt;           ERROR_COUNTER           = ERROR_COUNTER&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;           DIR_LIST                = DIR_LIST&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;           SYSTEM_FAILURE          = 03 MESSAGE LV_RFC_MESSAGE&lt;/P&gt;&lt;P&gt;           COMMUNICATION_FAILURE   = 04 MESSAGE LV_RFC_MESSAGE&lt;/P&gt;&lt;P&gt;           INVALID_EPS_SUBDIR      = 11&lt;/P&gt;&lt;P&gt;           SAPGPARAM_FAILED        = 12&lt;/P&gt;&lt;P&gt;           BUILD_DIRECTORY_FAILED  = 13&lt;/P&gt;&lt;P&gt;           NO_AUTHORIZATION        = 14&lt;/P&gt;&lt;P&gt;           READ_DIRECTORY_FAILED   = 17&lt;/P&gt;&lt;P&gt;           TOO_MANY_READ_ERRORS    = 22&lt;/P&gt;&lt;P&gt;           EMPTY_DIRECTORY_LIST    = 23.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E012 WITH SY-SUBRC DIRECTORY FILE_MASK&lt;/P&gt;&lt;P&gt;                      LV_RFC_MESSAGE&lt;/P&gt;&lt;P&gt;                 RAISING GET_DIR_LIST_FAILED.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DIR_LIST is an internal table of structure EPSFILI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vidhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 07:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387423#M813379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T07:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387424#M813380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks vidhya,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for class method i am not able to use filter.....if i set like '.xls' then also it shows all the files...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387424#M813380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387425#M813381</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 "RZL_READ_DIR" Function Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'RZL_READ_DIR'&lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;name = p_file " Give Application server directory&lt;/P&gt;&lt;P&gt;srvname = ' '&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;file_tbl = lt_file " this internal table having list of file names&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;argument_error = 1&lt;/P&gt;&lt;P&gt;not_found = 2&lt;/P&gt;&lt;P&gt;send_error = 3&lt;/P&gt;&lt;P&gt;system_failure = 4&lt;/P&gt;&lt;P&gt;others = 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 13:13:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387425#M813381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-08T13:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: all files from a specified folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387426#M813382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls check the thread's date before posting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS:These thread has been updating by mods to maintain the forum quality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2008 13:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/all-files-from-a-specified-folder/m-p/3387426#M813382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-08T13:16:31Z</dc:date>
    </item>
  </channel>
</rss>

