<?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 what is catch Command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793159#M651756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is CATCH COMMAND WHERE we use this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2007 12:26:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-13T12:26:48Z</dc:date>
    <item>
      <title>what is catch Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793159#M651756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is CATCH COMMAND WHERE we use this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 12:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793159#M651756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T12:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: what is catch Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793160#M651757</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;catch command we will use for handling the exceptions.&lt;/P&gt;&lt;P&gt;see this link for more help&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;example:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters NUMBER type I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data RESULT type P decimals 2.&lt;/P&gt;&lt;P&gt;data OREF type ref to CX_ROOT.&lt;/P&gt;&lt;P&gt;data TEXT type STRING.&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;  write: / 'Testing division and Sqare root with', NUMBER.&lt;/P&gt;&lt;P&gt;  uline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    try.&lt;/P&gt;&lt;P&gt;    if ABS( NUMBER ) &amp;gt; 100.&lt;/P&gt;&lt;P&gt;      raise exception type CX_DEMO_ABS_TOO_LARGE.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;    try.&lt;/P&gt;&lt;P&gt;      RESULT =  1 / NUMBER.&lt;/P&gt;&lt;P&gt;      write: / 'Result of division:', RESULT.&lt;/P&gt;&lt;P&gt;      RESULT = SQRT( NUMBER ).&lt;/P&gt;&lt;P&gt;      write: / 'Result of square root:', RESULT.&lt;/P&gt;&lt;P&gt;      catch CX_SY_ZERODIVIDE into OREF.&lt;/P&gt;&lt;P&gt;      TEXT = OREF-&amp;gt;GET_TEXT( ).&lt;/P&gt;&lt;P&gt;      cleanup.&lt;/P&gt;&lt;P&gt;        clear RESULT.&lt;/P&gt;&lt;P&gt;  endtry.&lt;/P&gt;&lt;P&gt;    catch CX_SY_ARITHMETIC_ERROR into OREF.&lt;/P&gt;&lt;P&gt;      TEXT = OREF-&amp;gt;GET_TEXT( ).&lt;/P&gt;&lt;P&gt;    catch CX_ROOT into OREF.&lt;/P&gt;&lt;P&gt;      TEXT = OREF-&amp;gt;GET_TEXT( ).&lt;/P&gt;&lt;P&gt;  endtry.&lt;/P&gt;&lt;P&gt;  if not TEXT is initial.&lt;/P&gt;&lt;P&gt;    write / TEXT.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  write: / 'Final result:', RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 12:28:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793160#M651757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T12:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: what is catch Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793161#M651758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Catch commands are used to catch the errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on whether your report has the flag "Unicode-enabled" set or not you will get a different result of the syntax check (SLIN) for statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_struc-t_table = itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Unicode-enabled = 'X': =&amp;gt; syntax error if the structures do not match exactly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Unicode-enabled = ' ': =&amp;gt; perhaps no syntax error but system-exceptions due to type conversion errors possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the latter case you would use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS &amp;lt;type conversion error&amp;gt; = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_struc-t_table = itab1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, please note that the CATCH SYSTEM-EXCEPTIONS is different from class-based exception handling because this statement does not return any error object.&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;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 12:32:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-catch-command/m-p/2793161#M651758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T12:32:49Z</dc:date>
    </item>
  </channel>
</rss>

