<?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 CATCH...ENDCATCH not working with SUBMIT. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348308#M175157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAPients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  catch system-exceptions others = 1.&lt;/P&gt;&lt;P&gt;    submit (lvc_progid) via selection-screen.&lt;/P&gt;&lt;P&gt;  endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the error is not catched, I always get a short dump when program doesn't exist, I also tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  catch system-exceptions LOAD_PROGRAM_NOT_FOUND = 1.&lt;/P&gt;&lt;P&gt;    submit (lvc_progid) via selection-screen.&lt;/P&gt;&lt;P&gt;  endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I syntax check the program I get the error "system-exception" expected, not "LOAD_PROGRAM_NOT_FOUND".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jun 2006 16:34:47 GMT</pubDate>
    <dc:creator>ricardo_fernndezvzquez3</dc:creator>
    <dc:date>2006-06-06T16:34:47Z</dc:date>
    <item>
      <title>CATCH...ENDCATCH not working with SUBMIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348308#M175157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAPients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  catch system-exceptions others = 1.&lt;/P&gt;&lt;P&gt;    submit (lvc_progid) via selection-screen.&lt;/P&gt;&lt;P&gt;  endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the error is not catched, I always get a short dump when program doesn't exist, I also tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  catch system-exceptions LOAD_PROGRAM_NOT_FOUND = 1.&lt;/P&gt;&lt;P&gt;    submit (lvc_progid) via selection-screen.&lt;/P&gt;&lt;P&gt;  endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I syntax check the program I get the error "system-exception" expected, not "LOAD_PROGRAM_NOT_FOUND".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 16:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348308#M175157</guid>
      <dc:creator>ricardo_fernndezvzquez3</dc:creator>
      <dc:date>2006-06-06T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: CATCH...ENDCATCH not working with SUBMIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348309#M175158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;submit (lvc_progid) via selection-screen.&lt;/P&gt;&lt;P&gt;CATCH LOAD_PROGRAM_NOT_FOUND.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 16:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348309#M175158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-06T16:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: CATCH...ENDCATCH not working with SUBMIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348310#M175159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the TRY statement doesn't exists in 4.6C. I get the error message Statement "TRY" is not defined. Please check your spelling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 16:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348310#M175159</guid>
      <dc:creator>ricardo_fernndezvzquez3</dc:creator>
      <dc:date>2006-06-06T16:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: CATCH...ENDCATCH not working with SUBMIT.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348311#M175160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The LOAD_PROGRAM_NOT_FOUND is not a system exception.  This is the reason for the sytax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not on newer version of SAP, then the TRY statement will not be avaialbe for you.  You can try this code.  It checks the report name against the report program table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: xtrdir type trdir.

data: report(30) type c value 'ZTEST'.

select single * from trdir
         into xtrdir
                 where name = report.
if sy-subrc = 0.
  submit (report) via selection-screen.
else.
  message e001(00) with 'Program does not exists'.
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>Tue, 06 Jun 2006 16:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-endcatch-not-working-with-submit/m-p/1348311#M175160</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-06T16:49:19Z</dc:date>
    </item>
  </channel>
</rss>

