<?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 Parameter for file name with F$ ffunctionality in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362212#M179677</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 want to read a file name as an input. I tried the following syntax :&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;parameters : p_file type RLGRAP-FILENAME.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need F4 functionality too.  Does any can provide me some inputs on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2006 18:26:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-05T18:26:54Z</dc:date>
    <item>
      <title>Parameter for file name with F$ ffunctionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362212#M179677</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 want to read a file name as an input. I tried the following syntax :&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;parameters : p_file type RLGRAP-FILENAME.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need F4 functionality too.  Does any can provide me some inputs on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 18:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362212#M179677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T18:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter for file name with F$ ffunctionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362213#M179678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local variable declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: l_title       TYPE string,               " Title of dialog&lt;/P&gt;&lt;P&gt;                                                 " window&lt;/P&gt;&lt;P&gt;        l_filename    TYPE file_table,           " For getting selected&lt;/P&gt;&lt;P&gt;                                                 " File name&lt;/P&gt;&lt;P&gt;        l_filefilter  TYPE string,               " File Filter-excel&lt;/P&gt;&lt;P&gt;                                                 " files&lt;/P&gt;&lt;P&gt;        l_filerc      TYPE i,                    " Return Code&lt;/P&gt;&lt;P&gt;        l_fileaction  TYPE i.                    " User Action&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal table for getting the File name in the file selection&lt;/P&gt;&lt;P&gt;*dialog box&lt;/P&gt;&lt;P&gt;  DATA: l_filetable   TYPE filetable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The method 'file_open_dialog' of class 'cl_gui_frontend_services'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;is used for displaying the file selection dialog box.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLASS cl_gui_frontend_services DEFINITION LOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the title text from the text element to local variable&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;of type string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_title = 'Select File'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the File Filter to Excel Files&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_filefilter = cl_gui_frontend_services=&amp;gt;filetype_all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display the file open dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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            = l_title          " Title of the file&lt;/P&gt;&lt;P&gt;                                                 " Selection window&lt;/P&gt;&lt;P&gt;      default_extension       = c_extension      " Ext. of the file&lt;/P&gt;&lt;P&gt;      file_filter             = l_filefilter     " All files to&lt;/P&gt;&lt;P&gt;                                                 " be displayed in the&lt;/P&gt;&lt;P&gt;                                                 " selection window&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_table              = l_filetable      " Contains the filename&lt;/P&gt;&lt;P&gt;                                                 " selected&lt;/P&gt;&lt;P&gt;      rc                      = l_filerc         " Return code&lt;/P&gt;&lt;P&gt;      user_action             = l_fileaction     " User action&lt;/P&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;      not_supported_by_gui    = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;On File name Selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF l_fileaction EQ cl_gui_frontend_services=&amp;gt;action_ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CHECK NOT l_filetable[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Only one file can be selected at a time so read&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    the first entry of the table l_filetable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ TABLE l_filetable INTO l_filename INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    No sy-subrc check&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Displaying the selected file name in the File name Parameter&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    on the screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      p_file = l_filename-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 18:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362213#M179678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T18:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter for file name with F$ ffunctionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362214#M179679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the following sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.
 
 
parameters: p_file type localfile.
 
 
at selection-screen on value-request for p_file.
 
 
  data: ifile type filetable.
  data: xfile like line of ifile.
  data: rc type i.
 
  call method cl_gui_frontend_services=&amp;gt;file_open_dialog
    exporting
       initial_directory
        = 'C:'
    changing
      file_table              = ifile
      rc                      = rc.
 
  read table ifile into xfile index 1.
  check sy-subrc = 0.
  p_file = xfile-filename.


&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>Fri, 05 May 2006 18:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362214#M179679</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-05T18:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter for file name with F$ ffunctionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362215#M179680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi varun,&lt;/P&gt;&lt;P&gt;Try cl_gui_frontend_services=&amp;gt;file_open_dialog in the event..&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrads,&lt;/P&gt;&lt;P&gt;Tanveer.&lt;/P&gt;&lt;P&gt;Please mark helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 18:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362215#M179680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T18:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter for file name with F$ ffunctionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362216#M179681</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;&amp;lt;b&amp;gt;Great minds think alike !!!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All three gave the same answer. Thank you all guys for providing me prompt answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2006 18:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-for-file-name-with-f-ffunctionality/m-p/1362216#M179681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-05T18:44:51Z</dc:date>
    </item>
  </channel>
</rss>

