<?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 help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493054#M840087</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;STRONG&gt;Point 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can use &lt;STRONG&gt;F4_FILENAME_SERVER&lt;/STRONG&gt; function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When i manually enter the path say E:\usr\sap\file1.txt then it should check whether the path &lt;STRONG&gt;E:\usr\sap&lt;/STRONG&gt; exist or not in the application server irrespective of the file name.&lt;/P&gt;&lt;P&gt;Also is there any function module where i can separate the directory and file name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Point 3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can perform the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF v_filename CA '*/%'.&lt;/P&gt;&lt;P&gt; MESSAGE e002(sy) with 'Filename contains special characters'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2008 05:27:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-27T05:27:38Z</dc:date>
    <item>
      <title>Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493052#M840085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abapers,&lt;/P&gt;&lt;P&gt;I have 3 queries&lt;/P&gt;&lt;P&gt;1) I hv a parameter Filename.When i press f4 help the path of the application server should be displayed. Is there any function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When i manually enter the path say E:\usr\sap\file1.txt then it should check whether the path &lt;STRONG&gt;E:\usr\sap\&lt;/STRONG&gt; exist or not in the application server irrespective of the file name.&lt;/P&gt;&lt;P&gt;Also is there any function module where i can separate the directory and file name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Suppose if i enter any any special characters say * or / or : etc it should also give an error message tht special characters are not allowed. is there any way for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Salish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493052#M840085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493053#M840086</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;1.Use FILE_GET_NAME function module. U can get the application server path.  Pass client = sy-mandt, logical filename, operating system = sy-opsys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.You can use SPLIT command to separate the path .&lt;/P&gt;&lt;P&gt;Ex: SPLIT filename at '/' into gwa_input-var1 gwa_input-var2.... This way, the last variable will give u the filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.The above functional module will automatically give u the physical location of the file. So, no need for this validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493053#M840086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493054#M840087</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;STRONG&gt;Point 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can use &lt;STRONG&gt;F4_FILENAME_SERVER&lt;/STRONG&gt; function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When i manually enter the path say E:\usr\sap\file1.txt then it should check whether the path &lt;STRONG&gt;E:\usr\sap&lt;/STRONG&gt; exist or not in the application server irrespective of the file name.&lt;/P&gt;&lt;P&gt;Also is there any function module where i can separate the directory and file name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Point 3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can perform the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF v_filename CA '*/%'.&lt;/P&gt;&lt;P&gt; MESSAGE e002(sy) with 'Filename contains special characters'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493054#M840087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493055#M840088</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;1) To provide F4 help for the application server, you can use the FM 'F4_DXFILENAME_TOPRECURSION'.&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;    v_l_path = '/TECHDATA/INTERFACES/IN/FIN/'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  In case Unix Server Radio button is checked&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       i_location_flag       = 'A'&lt;/P&gt;&lt;P&gt;       i_server              = ' '&lt;/P&gt;&lt;P&gt;       i_path                =  v_l_path&lt;/P&gt;&lt;P&gt;       filemask              = '*'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     FILEOPERATION         = 'R'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      O_LOCATION_FLAG   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      O_SERVER                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         o_path                       = v_l_file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ABEND_FLAG            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       rfc_error             = 1&lt;/P&gt;&lt;P&gt;       error_with_gui        = 2&lt;/P&gt;&lt;P&gt;       OTHERS                = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)  You can use following code for validation.&lt;/P&gt;&lt;P&gt;    OPEN DATASET &amp;lt;File Path&amp;gt; FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0. &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) you can use SEARCH FOR command to check for the special characters in the path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493055#M840088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493056#M840089</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;STRONG&gt;Solution 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;F4_FILENAME_SERVER&lt;/STRONG&gt; function module or yppu can also use FM &lt;STRONG&gt;FILE_GET_NAME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taking into account the filename provided by you as &lt;EM&gt;E:\usr\sap\file1.txt&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Split Filename at '\' into var1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                    var2,&lt;/P&gt;&lt;P&gt;                                    var3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* To get the Directory Name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate var1 var2 into v_directory&lt;/STRONG&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var3 contains your Filename.&lt;/STRONG&gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution 3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF filename CA '*/%'.&lt;/P&gt;&lt;P&gt;Message for Invalid Filename.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if you find it useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493056#M840089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493057#M840090</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;For the third solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You neeed to check for special characters in the Filename only.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;after splitting, catch the filename in a variable v_filename.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF v_filename CA '&lt;/STRONG&gt;/%'.*&lt;/P&gt;&lt;P&gt;Message for Invalid Filename.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 05:49:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493057#M840090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T05:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493058#M840091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for all of ur replies.&lt;/P&gt;&lt;P&gt;But the directory can be many u cannot use split.&lt;/P&gt;&lt;P&gt;Is there any fonction module tht can separate the filename and the directory name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Salish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 06:13:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493058#M840091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T06:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Function module help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493059#M840092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Salish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module &lt;STRONG&gt;BC_TOOLS_PATH_FILE_SPLIT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 07:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-help/m-p/3493059#M840092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T07:19:36Z</dc:date>
    </item>
  </channel>
</rss>

