<?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 validate filename and filepath in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448129#M212425</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a physical file name and file path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send code or FM for the validation of corrct file path and existance of file in application server .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Jul 2006 19:54:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-24T19:54:04Z</dc:date>
    <item>
      <title>validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448129#M212425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a physical file name and file path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send code or FM for the validation of corrct file path and existance of file in application server .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 19:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448129#M212425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T19:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448130#M212426</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 this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_filedir occurs 10.&lt;/P&gt;&lt;P&gt;include structure salfldir.&lt;/P&gt;&lt;P&gt;data: end of it_filedir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;validation of corrct file path&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Current Directory Listing for OUT Dir&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'RZL_READ_DIR_LOCAL'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;name = p_fdir&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;file_tbl = it_filedir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if 'it_filedir' contains any records , that means given path is valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;existance of file in application server&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;List of files are contained within table it_filedir&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at it_filedir.&lt;/P&gt;&lt;P&gt;if x_file eq  it_filedir-NAME.&lt;/P&gt;&lt;P&gt;   -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;file exist&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this FM : '/SAPDMC/LSM_F4_SERVER_FILE' also&lt;/P&gt;&lt;P&gt;&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;Appana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 20:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448130#M212426</guid>
      <dc:creator>Laxmana_Appana_</dc:creator>
      <dc:date>2006-07-24T20:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448131#M212427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also try to simply open it, if sy-subrc &amp;lt;&amp;gt; 0, then you know the path/filename is not correct.&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>Mon, 24 Jul 2006 20:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448131#M212427</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-24T20:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448132#M212428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharadha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure of any function modules . If you are trying to check the existence of any file in any directory this piece of code should work :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FNAME(60) VALUE 'myfile'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET FNAME FOR INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  WRITE / 'File opened'.&lt;/P&gt;&lt;P&gt;  .....&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE / 'File not found'.&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;Varun .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 20:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448132#M212428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T20:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448133#M212429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharadha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you looked FM &amp;lt;b&amp;gt;EPS_GET_DIRECTORY_LISTING&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;EPS_GET_DIRECTORY_PATH&amp;lt;/b&amp;gt;?&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 20:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448133#M212429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448134#M212430</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 the following code to check the correct file path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS  : C_FLNAME(100) VALUE&lt;/P&gt;&lt;P&gt; 'abcdefghijklmnopqrstuvwxyz0123456789./ABCDEFGHIJKLMNOPQRSTUVWXYZ_'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(P_UFILE - file path)&lt;/P&gt;&lt;P&gt;  CONDENSE P_UFILE.&lt;/P&gt;&lt;P&gt;  CLEAR V_STRLEN.&lt;/P&gt;&lt;P&gt;  V_STRLEN = STRLEN( P_UFILE ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check File name should not contain spaces / special chars.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF P_UFILE CN C_FLNAME.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Enter valid filename&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE E000 WITH 'Unix file should contain only'&lt;/P&gt;&lt;P&gt;                      'alphabets, numbers, ''_'' and ''.'''   .&lt;/P&gt;&lt;P&gt;  ELSEIF P_UFILE+0(V_STRLEN) CA SPACE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Enter valid filename&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MESSAGE E000 WITH 'Unix file should not contain any spaces'.&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;vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 20:16:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448134#M212430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T20:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: validate filename and filepath</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448135#M212431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with following function module&lt;/P&gt;&lt;P&gt;EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 20:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validate-filename-and-filepath/m-p/1448135#M212431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-24T20:25:32Z</dc:date>
    </item>
  </channel>
</rss>

