<?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: exception handling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178376#M756521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then before assigning vaues check the string cntents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. if var1 cs '0123456789.,'.&lt;/P&gt;&lt;P&gt;        var2 = var1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2007 09:42:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-18T09:42:04Z</dc:date>
    <item>
      <title>exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178370#M756515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have an assignment &lt;/P&gt;&lt;P&gt;var1 = var2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for some values it gives dump &lt;/P&gt;&lt;P&gt;how can i handle it thru exception handling&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 07:33:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178370#M756515</guid>
      <dc:creator>Karan_Chopra_</dc:creator>
      <dc:date>2007-12-18T07:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178371#M756516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;plz help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 07:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178371#M756516</guid>
      <dc:creator>Karan_Chopra_</dc:creator>
      <dc:date>2007-12-18T07:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178372#M756517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;helppppppppppppp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 08:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178372#M756517</guid>
      <dc:creator>Karan_Chopra_</dc:creator>
      <dc:date>2007-12-18T08:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178373#M756518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Be patient, you only posted half an hour ago...  it's polite to wait a little while before bumping your post up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under what circumstances do you get a dump?  What is the nature of the dump?  What version are you running.  Read the help on TRY and CATCH SYSTEM-EXCEPTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;  var1 = var2.&lt;/P&gt;&lt;P&gt;CATCH cx_root INTO o_ref.&lt;/P&gt;&lt;P&gt;  " Do error messages etc here&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace cx_root with a more specific exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For older versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: result TYPE i, &lt;/P&gt;&lt;P&gt;      number TYPE i. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 4 &lt;/P&gt;&lt;P&gt;                        OTHERS = 8. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  result = 1 / number. &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;IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 08:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178373#M756518</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-18T08:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178374#M756519</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 using CATCH SYSTEM EXCEPTION statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS [exc1 = n1 exc2 = n2 ...] &lt;/P&gt;&lt;P&gt;                        [OTHERS = n_others]. &lt;/P&gt;&lt;P&gt;  [statement_block] &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;Effect &lt;/P&gt;&lt;P&gt;The statement CATCH SYSTEM-EXCEPTIONS introduces a control structure containing a statement block statement_block that is always processed. In the list exc1 = n1 exc2 = n2 ..., you can execute catchable runtime errors and exception groups in any order. The numberic literal n1 n2 ... must be assigned to each of them. . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OTHERS addition can be executed independently or after the list exc1 = n1 exc2 = n2 .... Its effect is the same as the specification of an exception group that includes all catchable runtime errors of the runtime environment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system treats the CATCH control structure as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If one of the specified catchable runtime errors or a catchable runtime error contained in the specified exception groups occurs, the execution of the statement block is immediately terminated, the program continues after the statement ENDCATCH, and the number n1 n2 ... assigned to the catchable runtime error or the exception group, is stored for evaluation in the system field sy-subrc. If the list contains a catchable runtime error and its exception group or if a catchable runtime error occurs in some of the specified exception groups, sy-subrc contains the assigned number of the first position in the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a catchable runtime error that is not listed in the statement CATCH SYSTEM-EXCEPTIONS or is not contained in one of the specified exception groups occurs in the statement block, the program terminates with a short dump &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the end of the statement block is reached and no runtime error occurs, sy-subrc is set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A CATCH control structure cannot be defined in the same processing block, in which the class-based exceptions are handled in a TRY control structure or are triggered by the statement. RAISE EXCEPTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;Catchable runtime errors are not passed from called Prozeduren to the caller. They can only be caught within a processing block. Within a processing block, catchable runtime errors are caught in control structures that can be nested in any depth. If multiple CATCH control structures are nested, the system branches behind the ENDCATCH statement of the inner CATCH control structure that handles the runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of release 6.10, the handling of catchable runtime errors using CATCH SYSTEM-EXCEPTIONS is replaced with a TRY control structure. Since class-based exceptions are assigned to all catchable runtime errors, this is possible without restriction. The exceptions can be passed using a TRY control structures from procedures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Catching all possible catchable runtime errors in a statement block. Catchable runtime errors of the exception group ARITHMETIC_ERRORS set sy-subrc to 4, all other catchable runtime errors set sy-subrc to 8. The division by 0 causes the catchable runtime error COMPUTE_INT_ZERODIVIDE, which is contained in the exception group ARITHMETIC_ERRORS. In this case, sy-subrc is also set to 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: result TYPE i, &lt;/P&gt;&lt;P&gt;      number TYPE i. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 4 &lt;/P&gt;&lt;P&gt;                        OTHERS = 8. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  result = 1 / number. &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;IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDIF. &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;pRashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 08:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178374#M756519</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-12-18T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178375#M756520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i need to assign a char value to quantity field &lt;/P&gt;&lt;P&gt;if it contains special sym and alpha numeric eg asd %&amp;amp;$ it gives dump &lt;/P&gt;&lt;P&gt;so i need to chk 4 it &lt;/P&gt;&lt;P&gt;if value is 1.33 or 56 etc then it works fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 09:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178375#M756520</guid>
      <dc:creator>Karan_Chopra_</dc:creator>
      <dc:date>2007-12-18T09:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: exception handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178376#M756521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then before assigning vaues check the string cntents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. if var1 cs '0123456789.,'.&lt;/P&gt;&lt;P&gt;        var2 = var1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 09:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/3178376#M756521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T09:42:04Z</dc:date>
    </item>
  </channel>
</rss>

