<?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: return file path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293708#M1221027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Function Modules hampers the performance of your program because the memory of the function group get loaded into you program at runtime.So for small requirement avoid FM.. use codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:w_path(255) TYPE c VALUE 'c:\folder1\folder2\folder3\abc.txt',
     w_file(255) TYPE c,
     w_len TYPE i.

w_len = strlen( w_path ).

DO.

  IF w_path+w_len(1) = '\'.
    w_file = w_path+w_len.
    w_path+w_len = space.
    EXIT.
  ENDIF.
  SUBTRACT 1 FROM w_len.
  IF w_len LT 1.
    EXIT.
  ENDIF.
ENDDO.


WRITE : w_path,w_file+1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out these codes it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2009 08:05:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-10T08:05:11Z</dc:date>
    <item>
      <title>return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293704#M1221023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to return file path without the filename c:\folder1\folder2\folder3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass in c:\folder1\folder2\folder3\abc.txt&lt;/P&gt;&lt;P&gt;Want to return c:\folder1\folder2\folder3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any code sample or function module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 07:34:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293704#M1221023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T07:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293705#M1221024</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;SO_SPLIT_FILE_AND_PATH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 07:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293705#M1221024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T07:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293706#M1221025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    use this code,,this will solve ur probelm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DAAT  : F_NAME  LIKE RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         parameter: f_path like rlgrap-filename obligatory.&lt;/P&gt;&lt;P&gt;&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  = sy-repid&lt;/P&gt;&lt;P&gt;            dynpro_number = sy-dynnr&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            file_name     = f_name&lt;/P&gt;&lt;P&gt;        exceptions&lt;/P&gt;&lt;P&gt;             others        = 1.&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0  .&lt;/P&gt;&lt;P&gt;    write : / 'Enter File Name'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;T.Durai murugan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 07:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293706#M1221025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T07:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293707#M1221026</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;u can use either of these FM's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRINT_SPLIT_FILE_AND_PATH or&lt;/P&gt;&lt;P&gt;SO_SPLIT_FILE_AND_PATH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 07:53:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293707#M1221026</guid>
      <dc:creator>keerthy_k</dc:creator>
      <dc:date>2009-03-10T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293708#M1221027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Function Modules hampers the performance of your program because the memory of the function group get loaded into you program at runtime.So for small requirement avoid FM.. use codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:w_path(255) TYPE c VALUE 'c:\folder1\folder2\folder3\abc.txt',
     w_file(255) TYPE c,
     w_len TYPE i.

w_len = strlen( w_path ).

DO.

  IF w_path+w_len(1) = '\'.
    w_file = w_path+w_len.
    w_path+w_len = space.
    EXIT.
  ENDIF.
  SUBTRACT 1 FROM w_len.
  IF w_len LT 1.
    EXIT.
  ENDIF.
ENDDO.


WRITE : w_path,w_file+1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out these codes it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 08:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293708#M1221027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T08:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293709#M1221028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please search before posting ....here is one of the search result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1613481"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 08:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293709#M1221028</guid>
      <dc:creator>former_member203501</dc:creator>
      <dc:date>2009-03-10T08:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293710#M1221029</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;Call the method &lt;STRONG&gt;DIRECTORY_BROWSE&lt;/STRONG&gt; from class &lt;STRONG&gt;CL_GUI_FRONTEND_SERVICES&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shailaja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 08:18:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293710#M1221029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T08:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293711#M1221030</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;PRE&gt;&lt;CODE&gt;
use below fm to browser for foler or path
TMP_GUI_BROWSE_FOR_FOLDER 

or use the below fm to browse the path or get the path by passing full file length

TMP_GUI_GET_TEMPPATH 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 12:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293711#M1221030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T12:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293712#M1221031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*FORM fr_f4_app_server  CHANGING p_path1.
*
*  DATA: lv_input TYPE dxfields-longpath,
*        lv_output TYPE dxfields-longpath.
*
*  lv_input = p_path1.
*
*  CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
*    EXPORTING
*      i_location_flag = 'A'
*      i_path          = lv_input
*    IMPORTING
*      o_path          = lv_output
*    EXCEPTIONS
*      rfc_error       = 1
*      error_with_gui  = 2
*      OTHERS          = 3.
*  IF sy-subrc EQ 0.
*    DATA: lv_path TYPE rlgrap-filename.
*    lv_path  = lv_output.
*
*    CALL FUNCTION 'LIST_SPLIT_PATH'
*      EXPORTING
*        filename = lv_path
*      IMPORTING
*        pathname = lv_path.
*    IF sy-subrc EQ 0.
*      p_path1 = lv_path.
*    ENDIF.
*  ENDIF.
*
*ENDFORM.                    " FR_F4_APP_SERVER&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 12:37:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293712#M1221031</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-10T12:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: return file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293713#M1221032</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;U can use both the fms to get the op as e.x:&lt;/P&gt;&lt;P&gt;TRINT_SPLIT_FILE_AND_PATH or&lt;/P&gt;&lt;P&gt;SO_SPLIT_FILE_AND_PATH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u pass the parameter as c:\data\abc.text then u will get &lt;/P&gt;&lt;P&gt; STRIPPED_NAME                   ABc.TXT&lt;/P&gt;&lt;P&gt; FILE_PATH                       C:\DATA\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 12:46:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-file-path/m-p/5293713#M1221032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T12:46:04Z</dc:date>
    </item>
  </channel>
</rss>

