<?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 for file path in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467196#M1252269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the method FILE_EXIST of the class CL_GUI_FRONTEND_SERVICES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOL: abap.

PARAMETER : p_file LIKE rlgrap-filename .

DATA: 
rcbool type ABAP_BOOL,
v_file TYPE string.

v_file = p_file.

  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_EXIST
    EXPORTING
      FILE                 = v_file
    RECEIVING
      RESULT               = rcbool
   EXCEPTIONS
     CNTL_ERROR           = 1
     ERROR_NO_GUI         = 2
     WRONG_PARAMETER      = 3
     NOT_SUPPORTED_BY_GUI = 4
     OTHERS               = 5.
IF sy-subrc &amp;lt;&amp;gt; 0.
" Do your error handling here
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 12:35:30 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2009-04-15T12:35:30Z</dc:date>
    <item>
      <title>check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467189#M1252262</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;Is there any check for right or wrong file path.&lt;/P&gt;&lt;P&gt;for exa. &lt;/P&gt;&lt;P&gt;I have decleared&lt;/P&gt;&lt;P&gt;PARAMETER : p_file LIKE  rlgrap-filename .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and give f4 help &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_name = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I give only text.txt in file path it is giving succesful message.&lt;/P&gt;&lt;P&gt;That time it should give error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:09:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467189#M1252262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467190#M1252263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PARAMETERS: p_path LIKE rlgrap-filename OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_NAME        = SYST-CPROG&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     file_name           = p_path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_path&lt;/P&gt;&lt;P&gt;      i_begin_col             = 1&lt;/P&gt;&lt;P&gt;      i_begin_row             = p_start&lt;/P&gt;&lt;P&gt;      i_end_col               = 6&lt;/P&gt;&lt;P&gt;      i_end_row               = p_end&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      intern                  = it_excel&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;      upload_ole              = 2&lt;/P&gt;&lt;P&gt;      OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE i001(ZCS).&lt;/P&gt;&lt;P&gt;    "i001(zmm01)  'File not exsits!!Please check again'.&lt;/P&gt;&lt;P&gt;    CLEAR p_path.&lt;/P&gt;&lt;P&gt;    CALL SELECTION-SCREEN 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467190#M1252263</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-04-15T12:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467191#M1252264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is custom developed error checks. Based on the ur business create folder in a common drive and make sure the user is picking the file from this folder path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:13:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467191#M1252264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467192#M1252265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi  AMar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PC_CHECK_DRIVE 	                     "check drive
PC_CHECK_PATH 		    "check Path 
PC_CHECK_FILENAME 	   "check file name	
PC_CHECK_EXTENSION 	         "Check extension ex:-xls,dat,csv	
PC_CHECK_PATH_WITH_DRIVE          ""check drive and path	 	
PC_CHECK_FILENAME_WITH_EXT 		
PC_BUILD_COMPLETE_FILENAME 		
PC_SPLIT_COMPLETE_FILENAME 		

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467192#M1252265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467193#M1252266</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;  KD_GET_FILENAME_ON_F4 just gives file path popup.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when u provide the same file path to GUI_UPLOAD , an exception ll get triggered saying required file path does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There u can identify the file path error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:21:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467193#M1252266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467194#M1252267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi do liike this ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this 'SO_SPLIT_FILE_AND_PATH'  and put a message if there is not a file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467194#M1252267</guid>
      <dc:creator>former_member203501</dc:creator>
      <dc:date>2009-04-15T12:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467195#M1252268</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&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;directory_exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Natasha Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467195#M1252268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467196#M1252269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the method FILE_EXIST of the class CL_GUI_FRONTEND_SERVICES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOL: abap.

PARAMETER : p_file LIKE rlgrap-filename .

DATA: 
rcbool type ABAP_BOOL,
v_file TYPE string.

v_file = p_file.

  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_EXIST
    EXPORTING
      FILE                 = v_file
    RECEIVING
      RESULT               = rcbool
   EXCEPTIONS
     CNTL_ERROR           = 1
     ERROR_NO_GUI         = 2
     WRONG_PARAMETER      = 3
     NOT_SUPPORTED_BY_GUI = 4
     OTHERS               = 5.
IF sy-subrc &amp;lt;&amp;gt; 0.
" Do your error handling here
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:35:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467196#M1252269</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-04-15T12:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: check for file path</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467197#M1252270</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;u can  use CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_EXIST for file and  CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTRY_EXIST for directry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~linganna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 12:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-for-file-path/m-p/5467197#M1252270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T12:40:37Z</dc:date>
    </item>
  </channel>
</rss>

