<?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: function module to return file path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319768#M795201</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 using FM &lt;/P&gt;&lt;P&gt;F4_DXFILENAME_TOPRECURSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2008 07:56:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-30T07:56:48Z</dc:date>
    <item>
      <title>function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319766#M795199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in my program i have a parameter where the user writes down where he wants the file to be saved when the program is over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I need a function module that will allow the user to select in which folder he wants to save his files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a FM that does this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks.&lt;/P&gt;&lt;P&gt;parvez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 07:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319766#M795199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T07:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319767#M795200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use FM 'F4_FILENAME'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;theja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 07:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319767#M795200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T07:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319768#M795201</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 using FM &lt;/P&gt;&lt;P&gt;F4_DXFILENAME_TOPRECURSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 07:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319768#M795201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T07:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319769#M795202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;For application server file path :&lt;/STRONG&gt;&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'F4_DXFILENAME_4_DYNP'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        dynpfield_filename = 'P_OFILE'&lt;/P&gt;&lt;P&gt;        dyname             = sy-repid&lt;/P&gt;&lt;P&gt;        dynumb             = sy-dynnr&lt;/P&gt;&lt;P&gt;        filetype           = 'P'&lt;/P&gt;&lt;P&gt;        location           = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;For presentation server file path&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM help_local_file  CHANGING p_path TYPE any .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  lt_file_table TYPE filetable,&lt;/P&gt;&lt;P&gt;         la_file_table LIKE LINE OF lt_file_table,&lt;/P&gt;&lt;P&gt;         l_rc TYPE i,&lt;/P&gt;&lt;P&gt;         l_pcdsn TYPE cffile-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH lt_file_table.&lt;/P&gt;&lt;P&gt;  CLEAR la_file_table.&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_table = lt_file_table&lt;/P&gt;&lt;P&gt;      rc         = l_rc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE lt_file_table INTO la_file_table INDEX 1.&lt;/P&gt;&lt;P&gt;  l_pcdsn = la_file_table-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE l_pcdsn TO p_path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 07:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319769#M795202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T07:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319770#M795203</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;&lt;/P&gt;&lt;P&gt;CHeck this prog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab_string occurs 0,&lt;/P&gt;&lt;P&gt;record type char255,&lt;/P&gt;&lt;P&gt;end of itab_string.&lt;/P&gt;&lt;P&gt;data: L_FILETABLE TYPE FILETABLE,&lt;/P&gt;&lt;P&gt;L_FILETAB_H TYPE FILETABLE WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: p_file1 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection screen . &lt;/P&gt;&lt;P&gt;PARAMETERS: P_FILE TYPE LOCALFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;IF THE USER SELECT EXTENTION BUTTON IT WILL OPEN THE LOCAL DIRECTORY FOR SELECTING THE FILE LOCATION. &lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_OPEN_DIALOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;WINDOW_TITLE = &lt;/P&gt;&lt;P&gt;DEFAULT_EXTENSION = 'CSV' &lt;/P&gt;&lt;P&gt;DEFAULT_FILENAME = 'C:\Documents and Settings\196093\Desktop\STATUS.csv' &lt;/P&gt;&lt;P&gt;FILE_FILTER = &lt;/P&gt;&lt;P&gt;INITIAL_DIRECTORY = 'C:\Documents and Settings\196093\Desktop\' &lt;/P&gt;&lt;P&gt;MULTISELECTION = &lt;/P&gt;&lt;P&gt;WITH_ENCODING = &lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;FILE_TABLE = L_FILETABLE&lt;/P&gt;&lt;P&gt;RC = RC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USER_ACTION = &lt;/P&gt;&lt;P&gt;FILE_ENCODING = &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;others = 5&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;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT l_filetable INTO L_FILETAB_H.&lt;/P&gt;&lt;P&gt;P_FILE = L_FILETAB_H-FILENAME.&lt;/P&gt;&lt;P&gt;move p_file to p_file1.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;&lt;/P&gt;&lt;P&gt;passing the selected file name to gui_upload for loading the data &lt;/P&gt;&lt;P&gt;into internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = p_file1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC' &lt;/P&gt;&lt;P&gt;HAS_FIELD_SEPARATOR = ' ' &lt;/P&gt;&lt;P&gt;HEADER_LENGTH = 0 &lt;/P&gt;&lt;P&gt;READ_BY_LINE = 'X' &lt;/P&gt;&lt;P&gt;DAT_MODE = ' ' &lt;/P&gt;&lt;P&gt;CODEPAGE = ' ' &lt;/P&gt;&lt;P&gt;IGNORE_CERR = ABAP_TRUE &lt;/P&gt;&lt;P&gt;REPLACEMENT = '#' &lt;/P&gt;&lt;P&gt;CHECK_BOM = ' ' &lt;/P&gt;&lt;P&gt;NO_AUTH_CHECK = ' ' &lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;FILELENGTH = &lt;/P&gt;&lt;P&gt;HEADER = &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = itab_string&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_READ_ERROR = 2&lt;/P&gt;&lt;P&gt;NO_BATCH = 3&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 4&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 5&lt;/P&gt;&lt;P&gt;NO_AUTHORITY = 6&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 7&lt;/P&gt;&lt;P&gt;BAD_DATA_FORMAT = 8&lt;/P&gt;&lt;P&gt;HEADER_NOT_ALLOWED = 9&lt;/P&gt;&lt;P&gt;SEPARATOR_NOT_ALLOWED = 10&lt;/P&gt;&lt;P&gt;HEADER_TOO_LONG = 11&lt;/P&gt;&lt;P&gt;UNKNOWN_DP_ERROR = 12&lt;/P&gt;&lt;P&gt;ACCESS_DENIED = 13&lt;/P&gt;&lt;P&gt;DP_OUT_OF_MEMORY = 14&lt;/P&gt;&lt;P&gt;DISK_FULL = 15&lt;/P&gt;&lt;P&gt;DP_TIMEOUT = 16&lt;/P&gt;&lt;P&gt;OTHERS = 17&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC 0.&lt;/P&gt;&lt;P&gt;MESSAGE I000(Z00) WITH 'PLEASE PROVIDE CORRECT FILE NAME'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 08:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319770#M795203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T08:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319771#M795204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sir ,&lt;/P&gt;&lt;P&gt;Please have a look below .Hope it is suitable and simpler solution for your question.&lt;/P&gt;&lt;P&gt;Please do reward if useful.&lt;/P&gt;&lt;P&gt;Thankx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simply write this code in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter:&lt;/P&gt;&lt;P&gt;      p_file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file.&lt;/P&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    = 'P_FILE'&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      file_name     = p_file&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      mask_too_long = 1&lt;/P&gt;&lt;P&gt;      others        = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 08:29:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319771#M795204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T08:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319772#M795205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your useful answers, but nothing has improved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FMs mentioned, only works when selecting a file. I need to select a folder and not a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will make my question clearer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will be rewarded, don;t worry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 10:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319772#M795205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T10:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319773#M795206</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;Please use this call method, that should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class is CL_GUI_FRONTEND_SERVICES and method is DIRECTORY_BROWSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 10:38:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319773#M795206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T10:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: function module to return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319774#M795207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks omkar,&lt;/P&gt;&lt;P&gt;but here I have another problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I press F4, nothing happens.&lt;/P&gt;&lt;P&gt;But when I press F8 to execute my program, then the popup appears. The cancel button is ineffective and my files are note created inthe folder I have chosen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be the problem???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2008 10:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-return-file-path/m-p/3319774#M795207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-30T10:52:19Z</dc:date>
    </item>
  </channel>
</rss>

