<?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: Check if files exist using ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038305#M718903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use OPEN DATASET. The file wil be opened in READ Mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc is 0 that means file exists.&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;Aj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 14:57:52 GMT</pubDate>
    <dc:creator>former_member195698</dc:creator>
    <dc:date>2007-10-30T14:57:52Z</dc:date>
    <item>
      <title>Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038304#M718902</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'm currently using FM: FILE_GET_NAME_USING_PATH, and I'd like to do a check to see if the filepath with file (i.e. /com/tmp/file.txt) I am getting back exists or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very simple question, just not sure what to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038304#M718902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038305#M718903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use OPEN DATASET. The file wil be opened in READ Mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc is 0 that means file exists.&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;Aj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038305#M718903</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-10-30T14:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038306#M718904</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;You will have to open the file using OPEN DATASET or GUI_UPLOAD. If this fails, it will return sy-subrc 4 which will show that file exists or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038306#M718904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T14:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038307#M718905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try the method DIRECTORY_EXIST of class CL_GUI_FRONTEND_SERVICES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038307#M718905</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-30T14:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038308#M718906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a class that provides methods to check, if a file exist or if a certain directory does exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;directory_exist&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      directory            = lv_path&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      result               = lv_valid&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      cntl_error           = 1&lt;/P&gt;&lt;P&gt;      error_no_gui         = 2&lt;/P&gt;&lt;P&gt;      wrong_parameter      = 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;&lt;/P&gt;&lt;P&gt;      CALL METHOD cl_gui_frontend_services=&amp;gt;file_exist&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          file                 = x_file_with_path&lt;/P&gt;&lt;P&gt;        RECEIVING&lt;/P&gt;&lt;P&gt;          result               = y_file_exists&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          cntl_error           = 1&lt;/P&gt;&lt;P&gt;          error_no_gui         = 2&lt;/P&gt;&lt;P&gt;          wrong_parameter      = 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;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:59:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038308#M718906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T14:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038309#M718907</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;You can use FM EPS_OPEN_INPUT_FILE.&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>Tue, 30 Oct 2007 14:59:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038309#M718907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T14:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038310#M718908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;looks like there is an FM as well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFL_CHECK_DIRECTORY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038310#M718908</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-30T15:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038311#M718909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use fm's EPS_GET_FILE_ATTRIBUTES&lt;/P&gt;&lt;P&gt;or EPS_GET_DIRECTORY_LISTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 15:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038311#M718909</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2007-10-30T15:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038312#M718910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You may try the following class method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_EXIST&lt;/P&gt;&lt;P&gt; EXPORTING&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = File_Path " e.g.'C:\Temp\file.dat'&lt;/P&gt;&lt;P&gt; RECEIVING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ret_code. " type i.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 05:44:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038312#M718910</guid>
      <dc:creator>thokane</dc:creator>
      <dc:date>2013-06-19T05:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Check if files exist using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038313#M718911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 09:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-if-files-exist-using-abap/m-p/3038313#M718911</guid>
      <dc:creator>juryrychko</dc:creator>
      <dc:date>2015-11-26T09:15:53Z</dc:date>
    </item>
  </channel>
</rss>

