<?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: Filedialog / Download / Upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770849#M38241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that this is what you want.  You want a filename field on the selection screen.  When the user wants F4 value help - you want a file open dialog to help them find their files.  The following should do just that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION-SCREEN *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: ifile type file_table-filename obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION SCREEN - VALUE REQUES FOR FILENAME *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen&lt;/P&gt;&lt;P&gt;   on value-request for ifile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: window_title type string.&lt;/P&gt;&lt;P&gt;  data: path type string.&lt;/P&gt;&lt;P&gt;  data: filename type string.&lt;/P&gt;&lt;P&gt;  data: fullpath type string.&lt;/P&gt;&lt;P&gt;  move 'Source Data File'(001) to window_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;file_save_dialog&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;       window_title      = window_title&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      filename          = filename&lt;/P&gt;&lt;P&gt;      path              = path&lt;/P&gt;&lt;P&gt;      fullpath          = fullpath&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      cntl_error        = 1&lt;/P&gt;&lt;P&gt;      error_no_gui      = 2&lt;/P&gt;&lt;P&gt;      others            = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    move fullpath to ifile.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would do a file-save dialog.  If you want a file-open dialog the following example would work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION SCREEN - VALUE REQUES FOR FILENAME&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen&lt;/P&gt;&lt;P&gt;   on value-request for ofile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: window_title type string.&lt;/P&gt;&lt;P&gt;  move 'Destination Data File'(002) to window_title.&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;       window_title            = window_title&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_EXTENSION       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_FILENAME        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILE_FILTER             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INITIAL_DIRECTORY       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MULTISELECTION          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      file_table              = ifile_tab&lt;/P&gt;&lt;P&gt;      rc                      = rc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   USER_ACTION             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    file_open_dialog_failed = 1&lt;/P&gt;&lt;P&gt;    cntl_error              = 2&lt;/P&gt;&lt;P&gt;    error_no_gui            = 3&lt;/P&gt;&lt;P&gt;    others                  = 4.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0 or rc &amp;lt; 1.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    loop at ifile_tab into ifile_tab_line.&lt;/P&gt;&lt;P&gt;      move ifile_tab_line-filename to ifile.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jun 2004 11:51:11 GMT</pubDate>
    <dc:creator>thomas_jung</dc:creator>
    <dc:date>2004-06-01T11:51:11Z</dc:date>
    <item>
      <title>Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770848#M38240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;i have a couple of files which are located on my local Desktop. &lt;/P&gt;&lt;P&gt;Now i want to import this files (10) to internal tabels. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I (or the User) don't know where the files are located on the Desktop. &lt;/P&gt;&lt;P&gt;I have a Selection Screen with a field called (lv_path). &lt;/P&gt;&lt;P&gt;Now i want something similar to WS_FILENAME_GET that allows me to locate the path where the files are stored. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Henning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 11:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770848#M38240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-01T11:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770849#M38241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that this is what you want.  You want a filename field on the selection screen.  When the user wants F4 value help - you want a file open dialog to help them find their files.  The following should do just that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION-SCREEN *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: ifile type file_table-filename obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION SCREEN - VALUE REQUES FOR FILENAME *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen&lt;/P&gt;&lt;P&gt;   on value-request for ifile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: window_title type string.&lt;/P&gt;&lt;P&gt;  data: path type string.&lt;/P&gt;&lt;P&gt;  data: filename type string.&lt;/P&gt;&lt;P&gt;  data: fullpath type string.&lt;/P&gt;&lt;P&gt;  move 'Source Data File'(001) to window_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;file_save_dialog&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;       window_title      = window_title&lt;/P&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      filename          = filename&lt;/P&gt;&lt;P&gt;      path              = path&lt;/P&gt;&lt;P&gt;      fullpath          = fullpath&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      cntl_error        = 1&lt;/P&gt;&lt;P&gt;      error_no_gui      = 2&lt;/P&gt;&lt;P&gt;      others            = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    move fullpath to ifile.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would do a file-save dialog.  If you want a file-open dialog the following example would work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SELECTION SCREEN - VALUE REQUES FOR FILENAME&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen&lt;/P&gt;&lt;P&gt;   on value-request for ofile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: window_title type string.&lt;/P&gt;&lt;P&gt;  move 'Destination Data File'(002) to window_title.&lt;/P&gt;&lt;P&gt;  call method cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;       window_title            = window_title&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_EXTENSION       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_FILENAME        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILE_FILTER             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INITIAL_DIRECTORY       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MULTISELECTION          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    changing&lt;/P&gt;&lt;P&gt;      file_table              = ifile_tab&lt;/P&gt;&lt;P&gt;      rc                      = rc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   USER_ACTION             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    file_open_dialog_failed = 1&lt;/P&gt;&lt;P&gt;    cntl_error              = 2&lt;/P&gt;&lt;P&gt;    error_no_gui            = 3&lt;/P&gt;&lt;P&gt;    others                  = 4.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0 or rc &amp;lt; 1.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    loop at ifile_tab into ifile_tab_line.&lt;/P&gt;&lt;P&gt;      move ifile_tab_line-filename to ifile.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 11:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770849#M38241</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-06-01T11:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770850#M38242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  try this &lt;/P&gt;&lt;P&gt;parameters: lv_path LIKE RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file.&lt;/P&gt;&lt;P&gt;Perform get_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_filename.&lt;/P&gt;&lt;P&gt;call function 'F4_FILENAME'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_NAME        = SYST-CPROG&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = mara-matnr&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;    FILE_NAME           = p_file.&lt;/P&gt;&lt;P&gt;endform.                    " get_filename&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 11:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770850#M38242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-01T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770851#M38243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;thx for the reply.&lt;/P&gt;&lt;P&gt;But the problem is that when i use this method i allways have to give or choose a filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want to select the directory name (click or double click on the directory name and ok). Not the filename.&lt;/P&gt;&lt;P&gt;I only need to know in which directory the files are located. I don't want to pick a filename for this and than exclude the path of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Henning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 13:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770851#M38243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-01T13:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770852#M38244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem. What you need is in the same class, CL_GUI_FRONTEND_SERVICES, but a different method: DIRECTORY_BROWSE.  It works very similar and does exactly what I believe you want it to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 14:09:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770852#M38244</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-06-01T14:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770853#M38245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for you help.&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Henning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 14:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770853#M38245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-01T14:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770854#M38246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a similar way to pop-up unix directories too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Bala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 17:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770854#M38246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-06-01T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770855#M38247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By UNIX I assume that you mean directories on your SAP application server.  I don't know of anything quite as nice as what is available for the front-end tools.  However you might want to check out the function module EPS_GET_DIRECTORY_LISTING and other function modules in the same function group.  By default this only returns files.  I copied the function module and made a few changes to return both files and directories.  With this you could code a pop-up of your own.  I also made some of the variables for files and directories larger.  The following is my copy of EPS_GET_DIRECTORY_LISTING from a 46C system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function z_e_get_directory_listing.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(DIR_NAME) TYPE  ZZ_UNIX_DIR_NAME&lt;/P&gt;&lt;P&gt;*"     VALUE(FILE_MASK) LIKE  EPSF-EPSFILNAM DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(DIR_NAME1) LIKE  EPSF-EPSDIRNAM&lt;/P&gt;&lt;P&gt;*"     VALUE(FILE_COUNTER) LIKE  EPSF-EPSFILSIZ&lt;/P&gt;&lt;P&gt;*"     VALUE(ERROR_COUNTER) LIKE  EPSF-EPSFILSIZ&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      DIR_LIST STRUCTURE  ZES_EPSFILI&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      INVALID_EPS_SUBDIR&lt;/P&gt;&lt;P&gt;*"      SAPGPARAM_FAILED&lt;/P&gt;&lt;P&gt;*"      BUILD_DIRECTORY_FAILED&lt;/P&gt;&lt;P&gt;*"      NO_AUTHORIZATION&lt;/P&gt;&lt;P&gt;*"      READ_DIRECTORY_FAILED&lt;/P&gt;&lt;P&gt;*"      TOO_MANY_READ_ERRORS&lt;/P&gt;&lt;P&gt;*"      EMPTY_DIRECTORY_LIST&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: begin of file,&lt;/P&gt;&lt;P&gt;          dirname(175) type c, "name of directory. (possibly truncated.)&lt;/P&gt;&lt;P&gt;          name(175)    type c, " name of entry. (possibly truncated.)&lt;/P&gt;&lt;P&gt;          type(10)    type c, " type of entry.&lt;/P&gt;&lt;P&gt;          len(8)      type p, " length in bytes.&lt;/P&gt;&lt;P&gt;          owner(8)    type c, " owner of the entry.&lt;/P&gt;&lt;P&gt;        mtime(6)    type p, " last modification date, seconds since 1970&lt;/P&gt;&lt;P&gt;          mode(9)     type c, " like "rwx-r-x--x": protection mode.&lt;/P&gt;&lt;P&gt;          errno(3)    type c,&lt;/P&gt;&lt;P&gt;          errmsg(40)  type c,&lt;/P&gt;&lt;P&gt;        end of file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: lv_eps_subdir     like epsf-epssubdir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;expand EPS subdirectory names&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if dir_name = space.                      " assume files in EPS/in&lt;/P&gt;&lt;P&gt;    raise invalid_eps_subdir.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  if dir_name = gc_eps_in  or               " get full directory name&lt;/P&gt;&lt;P&gt;     dir_name = gc_eps_out or&lt;/P&gt;&lt;P&gt;     dir_name = gc_eps_log or&lt;/P&gt;&lt;P&gt;     dir_name(4) = gc_trans_dir.&lt;/P&gt;&lt;P&gt;    lv_eps_subdir = dir_name.&lt;/P&gt;&lt;P&gt;    call function 'EPS_GET_DIRECTORY_PATH'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              eps_subdir             = lv_eps_subdir&lt;/P&gt;&lt;P&gt;              dir_name               = dir_name&lt;/P&gt;&lt;P&gt;         importing&lt;/P&gt;&lt;P&gt;              dir_name               = dir_name&lt;/P&gt;&lt;P&gt;         exceptions&lt;/P&gt;&lt;P&gt;              invalid_eps_subdir     = 01&lt;/P&gt;&lt;P&gt;              sapgparam_failed       = 02&lt;/P&gt;&lt;P&gt;              build_directory_failed = 03.&lt;/P&gt;&lt;P&gt;    case sy-subrc.&lt;/P&gt;&lt;P&gt;      when 01.&lt;/P&gt;&lt;P&gt;        raise invalid_eps_subdir.&lt;/P&gt;&lt;P&gt;      when 02.&lt;/P&gt;&lt;P&gt;        raise sapgparam_failed.&lt;/P&gt;&lt;P&gt;      when 03.&lt;/P&gt;&lt;P&gt;        raise build_directory_failed.&lt;/P&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get directory listing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call 'C_DIR_READ_FINISH'                  " just to be sure&lt;/P&gt;&lt;P&gt;        id 'ERRNO'  field file-errno&lt;/P&gt;&lt;P&gt;        id 'ERRMSG' field file-errmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call 'C_DIR_READ_START'&lt;/P&gt;&lt;P&gt;        id 'DIR'    field dir_name&lt;/P&gt;&lt;P&gt;        id 'FILE'   field file_mask&lt;/P&gt;&lt;P&gt;        id 'ERRNO'  field file-errno&lt;/P&gt;&lt;P&gt;        id 'ERRMSG' field file-errmsg.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    raise read_directory_failed.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh dir_list.&lt;/P&gt;&lt;P&gt;  clear file_counter.&lt;/P&gt;&lt;P&gt;  clear error_counter.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    clear file.&lt;/P&gt;&lt;P&gt;    clear dir_list.&lt;/P&gt;&lt;P&gt;    call 'C_DIR_READ_NEXT'&lt;/P&gt;&lt;P&gt;          id 'TYPE'   field file-type&lt;/P&gt;&lt;P&gt;          id 'NAME'   field file-name&lt;/P&gt;&lt;P&gt;          id 'LEN'    field file-len&lt;/P&gt;&lt;P&gt;          id 'OWNER'  field file-owner&lt;/P&gt;&lt;P&gt;          id 'MTIME'  field file-mtime&lt;/P&gt;&lt;P&gt;          id 'MODE'   field file-mode&lt;/P&gt;&lt;P&gt;          id 'ERRNO'  field file-errno&lt;/P&gt;&lt;P&gt;          id 'ERRMSG' field file-errmsg.&lt;/P&gt;&lt;P&gt;    dir_list-size = file-len.&lt;/P&gt;&lt;P&gt;    dir_list-name = file-name.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      if file-type(1) = 'f' or              " regular file&lt;/P&gt;&lt;P&gt;         file-type(1) = 'F' or&lt;/P&gt;&lt;P&gt;         file-type(1) = 'd'.&lt;/P&gt;&lt;P&gt;        add 1 to file_counter.&lt;/P&gt;&lt;P&gt;        if file-type(1) = 'f'.&lt;/P&gt;&lt;P&gt;          dir_list-rc   = 0.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          dir_list-rc = 1.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        append dir_list.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    elseif sy-subrc = 1.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      if error_counter &amp;gt; gc_1000.&lt;/P&gt;&lt;P&gt;        call 'C_DIR_READ_FINISH'&lt;/P&gt;&lt;P&gt;              id 'ERRNO'  field file-errno&lt;/P&gt;&lt;P&gt;              id 'ERRMSG' field file-errmsg.&lt;/P&gt;&lt;P&gt;        raise too_many_read_errors.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      add 1 to error_counter.&lt;/P&gt;&lt;P&gt;      dir_list-rc  = 18.&lt;/P&gt;&lt;P&gt;      append dir_list.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call 'C_DIR_READ_FINISH'&lt;/P&gt;&lt;P&gt;        id 'ERRNO'  field file-errno&lt;/P&gt;&lt;P&gt;        id 'ERRMSG' field file-errmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if file_counter &amp;gt; 0.&lt;/P&gt;&lt;P&gt;    sort dir_list by name ascending.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    raise empty_directory_list.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endfunction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2004 18:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770855#M38247</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-06-01T18:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filedialog / Download / Upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770856#M38248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module seems to work with the aplication server's files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/SAPDMC/LSM_F4_SERVER_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a WebAS 6.40.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vasco Dionisio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2005 09:51:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filedialog-download-upload/m-p/770856#M38248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-30T09:51:41Z</dc:date>
    </item>
  </channel>
</rss>

