<?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: Program dump when file not found... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529362#M242084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very strange indeed...release is 9.00.2047.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2006 19:40:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-09T19:40:22Z</dc:date>
    <item>
      <title>Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529346#M242068</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;I'm using ALSM_EXCEL_TO_INTERNAL_TABLE to load a spreadsheet from the desktop. I've notcied that if I type some garbage into the file name field and execute the program it dumps and does not provide me with an opportunity to catch the error and gracefully execute the program. am I missing something in ALSM_EXCEL_TO_INTERNAL_TABLE or is there another way i can check for the existence of the file and prevent the user from executing the program with a non-existent fiel name?&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;Mat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Mathew Laba&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 18:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529346#M242068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T18:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529347#M242069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure that your exceptions are specified for this function module.  Then this should catch the error for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       exporting
            filename                = file
            i_begin_col             = '1'
            i_begin_row             = '1'
            i_end_col               = '200'
            i_end_row               = '5000'
       tables
            intern                  = xcel.
&amp;lt;b&amp;gt;       exceptions
            inconsistent_parameters = 1
            upload_ole              = 2
            others                  = 3.&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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>Wed, 09 Aug 2006 18:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529347#M242069</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T18:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529348#M242070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you commented the exceptions part of that function module ??&lt;/P&gt;&lt;P&gt;if so, un comment them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  message i000.....will be there , make it un commented&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this SDN Post to know how to call this FM&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="2161939"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;added SDN link,&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 18:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529348#M242070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T18:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529349#M242071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Mathew,&lt;/P&gt;&lt;P&gt; Before using that one check whether that file exists with FM &amp;lt;b&amp;gt;CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_EXIST&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;file_exist
    EXPORTING
      file   = l_filename
    RECEIVING
      result = l_ret
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Santosh Kumar P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 18:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529349#M242071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T18:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529350#M242072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following is my code but the crash appears to take place within ALSM_EXCEL_TO_INTERNAL_TABLE and no return takes place. Following is my code...&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;&lt;/P&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e999 WITH 'FM call unsuccessful - file could not be loaded.'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 18:37:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529350#M242072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T18:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529351#M242073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can we see all your code please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;Please mark this post as a question.  Thanks.&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>Wed, 09 Aug 2006 18:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529351#M242073</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T18:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529352#M242074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the following did not DUMP for me..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zexcel.
DATA meta_xl_itab TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  exporting
    filename                      = '*xcvzxcvxzcv*'
    i_begin_col                   = '1'
    i_begin_row                   = '1'
    i_end_col                     = '200'
    i_end_row                     = '5000'
  tables
    intern                        =  meta_xl_itab
 EXCEPTIONS
   INCONSISTENT_PARAMETERS       = 1
   UPLOAD_OLE                    = 2
   OTHERS                        = 3.
if sy-subrc &amp;lt;&amp;gt; 0.
 message i016(rp) with 'invalid file name'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like Rich hinted, there must be something else in your code that caused the DUMP..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529352#M242074</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-08-09T19:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529353#M242075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;File Exists checks for bogus file names like the one you typed &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; Look at the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529353#M242075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529354#M242076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code Pls??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529354#M242076</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-08-09T19:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529355#M242077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one more guess,&lt;/P&gt;&lt;P&gt;is your file variable is of type RLGRAP-FILENAME or any other thing ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529355#M242077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529356#M242078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I mark a post as a question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_file_name TYPE STRING.&lt;/P&gt;&lt;P&gt; l_file_name = u_file. (where u_file is of type rlgrap-filename)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*C-- Check for existence of file&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   = l_file_name&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      result = l_fm_rc&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0 OR l_fm_rc EQ ' '.&lt;/P&gt;&lt;P&gt;    MESSAGE e999 WITH 'FM call unsuccessful - file not found.'.&lt;/P&gt;&lt;P&gt;  ENDIF.&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                = u_file&lt;/P&gt;&lt;P&gt;      I_BEGIN_COL             = '1'&lt;/P&gt;&lt;P&gt;      I_BEGIN_ROW             = '1'&lt;/P&gt;&lt;P&gt;      I_END_COL               = '100'&lt;/P&gt;&lt;P&gt;      I_END_ROW               = '25000'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      INTERN                  = c_raw_data&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;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e999 WITH 'FM call unsuccessful - file could not be loaded.'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What return value should I check for in FILE_EXIST? I notice that if I pass a bogus file name I now get my error message and graceful exit...but if I pass a file name that exists then FILE_EXISTS throws and error within it's code...saying something about 'X' not being a number in DIRECTORY_LIST_FILES...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529356#M242078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529357#M242079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srikanth,&lt;/P&gt;&lt;P&gt;I think you're on to something here...I do pass a variable into ALSM_EXCEL_TO_INTERNAL_TABLE that is of type rlgrap-filename...should I not do that? seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529357#M242079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529358#M242080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the value = 1.  If 1, then the file is there, if 0, it is not there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.

data: c_raw_data type table of  ALSMEX_TABLINE with header line.
data: l_file_name type string.
data: l_fm_rc type i.
parameters: u_file type localfile default 'C:test.xls'.

l_file_name = u_file.

*C-- Check for existence of file
call method cl_gui_frontend_services=&amp;gt;file_exist
exporting
  file = l_file_name
receiving
    result = l_fm_rc
exceptions
others = 1.

check l_fm_rc = 1.  " If 0, then the file doesn't exits.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
     exporting
          filename                = u_file
          i_begin_col             = '1'
          i_begin_row             = '1'
          i_end_col               = '100'
          i_end_row               = '25000'
     tables
          intern                  = c_raw_data
     exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.

if sy-subrc &amp;lt;&amp;gt; 0.
*  message e999 with 'FM call unsuccessful - file could not be loaded.'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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>Wed, 09 Aug 2006 19:32:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529358#M242080</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T19:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529359#M242081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--this is enough i guess&lt;/P&gt;&lt;P&gt;MESSAGE e999 WITH 'FM call unsuccessful - file not found.'.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;else.&amp;lt;/b&amp;gt;&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 = u_file&lt;/P&gt;&lt;P&gt;I_BEGIN_COL = '1'&lt;/P&gt;&lt;P&gt;I_BEGIN_ROW = '1'&lt;/P&gt;&lt;P&gt;I_END_COL = '100'&lt;/P&gt;&lt;P&gt;I_END_ROW = '25000'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;INTERN = c_raw_data&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;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE e999 WITH 'FM call unsuccessful - file could not be loaded.'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:32:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529359#M242081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529360#M242082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your function call is fine.  It works quite well in my system and does not dump when giving a bogus file path/name.  What release are you on?&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>Wed, 09 Aug 2006 19:34:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529360#M242082</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T19:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529361#M242083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry, its a BOOLEAN,  so "X" if the file is found, space if it is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.

data: c_raw_data type table of  ALSMEX_TABLINE with header line.
data: l_file_name type string.
&amp;lt;b&amp;gt;data: l_fm_rc type c.&amp;lt;/b&amp;gt;
parameters: u_file type localfile default 'C:test.xls'.

l_file_name = u_file.

**C-- Check for existence of file
call method cl_gui_frontend_services=&amp;gt;file_exist
exporting
  file = l_file_name
receiving
    result = l_fm_rc
exceptions
others = 1.

&amp;lt;b&amp;gt;check l_fm_rc = 'X'.  " If space, then the file doesn't exits.&amp;lt;/b&amp;gt;
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
     exporting
          filename                = u_file
          i_begin_col             = '1'
          i_begin_row             = '1'
          i_end_col               = '100'
          i_end_row               = '25000'
     tables
          intern                  = c_raw_data
     exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.

if sy-subrc &amp;lt;&amp;gt; 0.
*  message e999 with 'FM call unsuccessful - file could not be loaded.'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There should be a checkbox somewhere on your post that says  " Mark this post as a question".   This will allow you to award points for helpful answers.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529361#M242083</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T19:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529362#M242084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very strange indeed...release is 9.00.2047.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:40:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529362#M242084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529363#M242085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not recoginize 9.00.2047 as a realease.   Are you on 46c, 4.7, ECC 5.0, ECC 6.0?&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>Wed, 09 Aug 2006 19:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529363#M242085</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T19:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529364#M242086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2006 19:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529364#M242086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-09T19:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Program dump when file not found...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529365#M242087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its working good in my 46c system.  Anyway, there is nothing wrong with checking for the file existance first.  Just follow the sample program above, it should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark you post as a question and award points for helpful answers and mark as solved when solved completely.  Thanks.&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>Wed, 09 Aug 2006 19:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-dump-when-file-not-found/m-p/1529365#M242087</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-09T19:49:34Z</dc:date>
    </item>
  </channel>
</rss>

