<?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: browsing a file using parameter declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443516#M547119</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 this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS P_FILE(80) TYPE C.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

  DATA:
      d_rc    TYPE sysubrc,
      d_title TYPE string,
      t_files TYPE filetable,
      s_files TYPE file_table.


*   popup file open dialog
  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
    EXPORTING
      window_title = 'Open file'
    CHANGING
      file_table   = t_files
      rc           = d_rc
    EXCEPTIONS
      OTHERS       = 1.

  IF sy-subrc = 0.
    IF d_rc &amp;gt; 0.
      READ TABLE t_files INDEX 1 INTO s_files.
      p_file = s_files-filename.
    ENDIF.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 14:24:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-05T14:24:45Z</dc:date>
    <item>
      <title>browsing a file using parameter declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443514#M547117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds,&lt;/P&gt;&lt;P&gt;               I am using a parameter to extract a file from the local server. but i m not getting the way how to do that so that once i get the selection-screen if i press f4 it will ak for location where i can browse and give the file location.&lt;/P&gt;&lt;P&gt;I am not getting the logic for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;regards,&lt;/P&gt;&lt;P&gt;suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 14:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443514#M547117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: browsing a file using parameter declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443515#M547118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check with below logic :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_name        like rlgrap-filename&lt;/P&gt;&lt;P&gt;                          default 'C:\My Documents\InputFile.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;possible entry list (F4 dropdown) for input file name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;at selection-screen on value-request for p_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-SELECT FILE FROM USERS LOCAL PC&lt;/P&gt;&lt;P&gt;  call function 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         DEF_FILENAME     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           def_path         = 'C:\Temp\'&lt;/P&gt;&lt;P&gt;           mask             = ',&lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;STRONG&gt;.&lt;/STRONG&gt;.'&lt;/P&gt;&lt;P&gt;           mode             = 'O'&lt;/P&gt;&lt;P&gt;           title            = 'Select File '(007)&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;           filename         = p_name&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         RC               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;           inv_winsys       = 1&lt;/P&gt;&lt;P&gt;           no_batch         = 2&lt;/P&gt;&lt;P&gt;           selection_cancel = 3&lt;/P&gt;&lt;P&gt;           selection_error  = 4&lt;/P&gt;&lt;P&gt;           others           = 5.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;also you can use f4_filename for F4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 14:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443515#M547118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T14:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: browsing a file using parameter declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443516#M547119</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 this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS P_FILE(80) TYPE C.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

  DATA:
      d_rc    TYPE sysubrc,
      d_title TYPE string,
      t_files TYPE filetable,
      s_files TYPE file_table.


*   popup file open dialog
  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
    EXPORTING
      window_title = 'Open file'
    CHANGING
      file_table   = t_files
      rc           = d_rc
    EXCEPTIONS
      OTHERS       = 1.

  IF sy-subrc = 0.
    IF d_rc &amp;gt; 0.
      READ TABLE t_files INDEX 1 INTO s_files.
      p_file = s_files-filename.
    ENDIF.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 14:24:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443516#M547119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T14:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: browsing a file using parameter declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443517#M547120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ifiletable type filetable.&lt;/P&gt;&lt;P&gt;data: xfiletable like line of ifiletable.&lt;/P&gt;&lt;P&gt;data: rc type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file1 type localfile default'C:\test.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file1.&lt;/P&gt;&lt;P&gt;&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WINDOW_TITLE            =&lt;/P&gt;&lt;/LI&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;/UL&gt;&lt;P&gt;     INITIAL_DIRECTORY       = 'C:\'&lt;/P&gt;&lt;UL&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              = ifiletable&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;        .&lt;/P&gt;&lt;P&gt; read table ifiletable into xfiletable index 1.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  p_file1 = xfiletable-FILENAME.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[/code&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>Thu, 05 Jul 2007 14:28:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/browsing-a-file-using-parameter-declaration/m-p/2443517#M547120</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-05T14:28:23Z</dc:date>
    </item>
  </channel>
</rss>

