<?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 selecting file in parameter screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615665#M600386</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;&lt;/P&gt;&lt;P&gt;I have designed a parameter screen where the user needs to enter in a file name. I wanted to use the windows file dialog that allows you to browse your directories and double click a file and it writes the file name in the parameter field with its full path, if you visually know what i mean. At the moment the user has to copy and paste the path and file name or write it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2007 13:50:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-02T13:50:43Z</dc:date>
    <item>
      <title>selecting file in parameter screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615665#M600386</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;&lt;/P&gt;&lt;P&gt;I have designed a parameter screen where the user needs to enter in a file name. I wanted to use the windows file dialog that allows you to browse your directories and double click a file and it writes the file name in the parameter field with its full path, if you visually know what i mean. At the moment the user has to copy and paste the path and file name or write it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 13:50:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615665#M600386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T13:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: selecting file in parameter screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615666#M600387</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;Check the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_filename .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONSTANTS: lc_file TYPE DYNPREAD-FIELDNAME VALUE 'pa_file'.    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calling the function to get file name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = syst-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = lc_file&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = pa_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " get_filename&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kannaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 13:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615666#M600387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T13:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: selecting file in parameter screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615667#M600388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this method on AT SELECTION_SCREEN ON VALUE_REQUEST event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
*  EXPORTING
*    WINDOW_TITLE            =
*    DEFAULT_EXTENSION       =
*    DEFAULT_FILENAME        =
*    FILE_FILTER             =
*    INITIAL_DIRECTORY       =
*    MULTISELECTION          =
*    WITH_ENCODING           =
  CHANGING
    file_table              =
    rc                      =
*    USER_ACTION             =
*    FILE_ENCODING           =
*  EXCEPTIONS
*    FILE_OPEN_DIALOG_FAILED = 1
*    CNTL_ERROR              = 2
*    ERROR_NO_GUI            = 3
*    NOT_SUPPORTED_BY_GUI    = 4
*    others                  = 5
        .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 14:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615667#M600388</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2007-08-02T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: selecting file in parameter screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615668#M600389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u have 2 options... use either one of them...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F4_FILENAME function module&lt;/P&gt;&lt;P&gt;or else&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 14:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615668#M600389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: selecting file in parameter screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615669#M600390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following at the AT-SELECTION-SCREEN segment whereas p_file is your file parameter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: v_filetab LIKE STANDARD TABLE OF file_table INITIAL SIZE 0,
      v_rc TYPE i.                     " Return code

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

*---- File open dialog to choose file.
  REFRESH v_filetab.
  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog
    EXPORTING
      window_title            = 'Choose File Path'    " you can add a title for the dialog
      default_extension       = '*.*'
      initial_directory       = 'C:'                         " You can provide path where it should start
    CHANGING
      file_table              = v_filetab                 
      rc                      = v_rc
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      OTHERS                  = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ixxx WITH text-001.
  ELSE.
    READ TABLE v_filetab INTO p_file INDEX 1.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Please reward points for helpful answer.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 18:47:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-file-in-parameter-screen/m-p/2615669#M600390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-02T18:47:56Z</dc:date>
    </item>
  </channel>
</rss>

