<?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: Catch in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763615#M330327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have a look at this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRY. 
 SELECT * FROM mard INTO TABLE lt_mard WHERE (where) ORDER BY matnr.

* Catch the error and avoid short dump

 CATCH cx_sy_dynamic_osql_semantics INTO exc_ref.
   Exc_ref-&amp;gt;get_text exc_text = (). 
   MESSAGE exc_text TYPE 'E'. 

 CATCH cx_sy_dynamic_osql_syntax INTO exc_ref. 
   Exc_ref-&amp;gt;get_text exc_text = (). 
   MESSAGE exc_text TYPE 'E'. 
ENDTRY. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2006 18:07:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-29T18:07:33Z</dc:date>
    <item>
      <title>Catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763614#M330326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to catch system exception cx_sy_dynamic_osql_semantics.  However, I believe that I need to use CATCH (not TRY) because the program will run in 4.6.  I don't see a valid exception group and OTHERS doesn't work.  Any suggestions?  I have a SELECT inside the Catch / endcatch.  This select may have invalid fields in the were clause that not associated with a dynamic itab. I would like to just catch the exception and handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 17:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763614#M330326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T17:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763615#M330327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have a look at this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRY. 
 SELECT * FROM mard INTO TABLE lt_mard WHERE (where) ORDER BY matnr.

* Catch the error and avoid short dump

 CATCH cx_sy_dynamic_osql_semantics INTO exc_ref.
   Exc_ref-&amp;gt;get_text exc_text = (). 
   MESSAGE exc_text TYPE 'E'. 

 CATCH cx_sy_dynamic_osql_syntax INTO exc_ref. 
   Exc_ref-&amp;gt;get_text exc_text = (). 
   MESSAGE exc_text TYPE 'E'. 
ENDTRY. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 18:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763615#M330327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T18:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763616#M330328</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/ENDTRY statament is not supported by 4.6C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you should check in "where" table if there are only the fields belonging to the table of the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 18:16:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch/m-p/1763616#M330328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T18:16:03Z</dc:date>
    </item>
  </channel>
</rss>

