<?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 CONVT_OVERFLOW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412634#M538284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Catchable runtime errors are handled with CATCH SYSTEM-EXCEPTIONSusing the name of the runtime error. To detect semantically related runtime errors using a common name, they are combined into exception groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can handle catchable runtime errors in an ABAP program using the following control statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS exc1 = rc1 ... excn = rcn.&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;Check the sample code to handle the exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETERS number TYPE i. &lt;/P&gt;&lt;P&gt;DATA: result TYPE p DECIMALS 2, &lt;/P&gt;&lt;P&gt;      oref TYPE REF TO cx_root, &lt;/P&gt;&lt;P&gt;      text TYPE string. &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;    PERFORM calculation USING    number &lt;/P&gt;&lt;P&gt;                      CHANGING result &lt;/P&gt;&lt;P&gt;                               text. &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; &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; &lt;/P&gt;&lt;P&gt;WRITE: / 'Final result:', result. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM calculation USING    p_number LIKE number &lt;/P&gt;&lt;P&gt;                 CHANGING p_result LIKE result &lt;/P&gt;&lt;P&gt;                          p_text   LIKE text &lt;/P&gt;&lt;P&gt;                          RAISING  cx_sy_arithmetic_error. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  DATA l_oref TYPE REF TO cx_root. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  TRY. &lt;/P&gt;&lt;P&gt;      p_result =  1 / p_number. &lt;/P&gt;&lt;P&gt;      WRITE: / 'Result of division:', p_result. &lt;/P&gt;&lt;P&gt;      p_result = SQRT( p_number ). &lt;/P&gt;&lt;P&gt;      WRITE: / 'Result of square root:', p_result. &lt;/P&gt;&lt;P&gt;    CATCH cx_sy_zerodivide INTO l_oref. &lt;/P&gt;&lt;P&gt;      p_text = l_oref-&amp;gt;get_text( ). &lt;/P&gt;&lt;P&gt;    CLEANUP. &lt;/P&gt;&lt;P&gt;      CLEAR p_result. &lt;/P&gt;&lt;P&gt;  ENDTRY. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 07:08:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-05T07:08:49Z</dc:date>
    <item>
      <title>Catch CONVT_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412633#M538283</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;&lt;/P&gt;&lt;P&gt;I want below code (if sy-subrc = &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; to work when the CONVT_OVERFLOW is fired.&lt;/P&gt;&lt;P&gt;However, here &amp;lt;b&amp;gt;CONVT_OVERFLOW&amp;lt;/b&amp;gt; is not being catched in catch ...endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clues what shall I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   catch system-exceptions CONVT_OVERFLOW = 8&lt;/P&gt;&lt;P&gt;        delete t_vtbez from z_vtbez.&lt;/P&gt;&lt;P&gt;      endcatch.                                                      &lt;/P&gt;&lt;P&gt;        IF SY-SUBRC EQ 8.                                                     &lt;/P&gt;&lt;P&gt;DELETE TABLE T_VTBEZ WITH TABLE KEY vtbez = z_vtbez-vtbez &lt;/P&gt;&lt;P&gt;                                        index_i = z_vtbez-index_i.          &lt;/P&gt;&lt;P&gt;ENDIF.              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also How do I find out system-exception number for various system exceptions which might occur.&lt;/P&gt;&lt;P&gt;For Ex : CONVT_OVERFLOW system exception no is 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 07:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412633#M538283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T07:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Catch CONVT_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412634#M538284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Catchable runtime errors are handled with CATCH SYSTEM-EXCEPTIONSusing the name of the runtime error. To detect semantically related runtime errors using a common name, they are combined into exception groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can handle catchable runtime errors in an ABAP program using the following control statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS exc1 = rc1 ... excn = rcn.&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;Check the sample code to handle the exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETERS number TYPE i. &lt;/P&gt;&lt;P&gt;DATA: result TYPE p DECIMALS 2, &lt;/P&gt;&lt;P&gt;      oref TYPE REF TO cx_root, &lt;/P&gt;&lt;P&gt;      text TYPE string. &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;    PERFORM calculation USING    number &lt;/P&gt;&lt;P&gt;                      CHANGING result &lt;/P&gt;&lt;P&gt;                               text. &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; &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; &lt;/P&gt;&lt;P&gt;WRITE: / 'Final result:', result. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM calculation USING    p_number LIKE number &lt;/P&gt;&lt;P&gt;                 CHANGING p_result LIKE result &lt;/P&gt;&lt;P&gt;                          p_text   LIKE text &lt;/P&gt;&lt;P&gt;                          RAISING  cx_sy_arithmetic_error. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  DATA l_oref TYPE REF TO cx_root. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  TRY. &lt;/P&gt;&lt;P&gt;      p_result =  1 / p_number. &lt;/P&gt;&lt;P&gt;      WRITE: / 'Result of division:', p_result. &lt;/P&gt;&lt;P&gt;      p_result = SQRT( p_number ). &lt;/P&gt;&lt;P&gt;      WRITE: / 'Result of square root:', p_result. &lt;/P&gt;&lt;P&gt;    CATCH cx_sy_zerodivide INTO l_oref. &lt;/P&gt;&lt;P&gt;      p_text = l_oref-&amp;gt;get_text( ). &lt;/P&gt;&lt;P&gt;    CLEANUP. &lt;/P&gt;&lt;P&gt;      CLEAR p_result. &lt;/P&gt;&lt;P&gt;  ENDTRY. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 07:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412634#M538284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T07:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Catch CONVT_OVERFLOW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412635#M538285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(1) Is VTBEZ packed, if yes CONVT_OVERFLOW cannot be catched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) You choose the exception number in the CATCH instruction, &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;catch system-exceptions CONVT_OVERFLOW = 1. would have worked in a similar way
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 07:12:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-convt-overflow/m-p/2412635#M538285</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-07-05T07:12:52Z</dc:date>
    </item>
  </channel>
</rss>

