<?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 catch in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028418#M962716</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;We can use CX_DYNAMIC_CHECK for root exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following text is from ABAP help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Classes for ABAP Statements &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions in ABAP statements that can be handled can be caught using the predefined exception classes listed below. These exception classes are all subclasses of the CX_DYNAMIC_CHECK and CX_NO_CHECK classes. They replace the previous catchable runtime errors. The keyword documentation lists all the exceptions that can occur for each statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To improve the structure, intermediate abstract classes were introduced so that groups of exceptions can be caught simultaneously. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each exception class includes message texts, which you can display by choosing the Texts tab in the Class Builder. The following links open the Class Builder for the corresponding exception class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_ROOT &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_STATIC_CHECK &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_DYNAMIC_CHECK &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ARITHMETIC_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ZERODIVIDE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ARITHMETIC_OVERFLOW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ARG_OUT_OF_DOMAIN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PRECISION_LOSS &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ASSIGN_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ASSIGN_CAST_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_ASSIGN_CAST_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_ASSIGN_CAST_UNKNOWN_TYPE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ASSIGN_OUT_OF_RANGE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CODEPAGE_CONVERTER_INIT &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CONVERSION_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_CODEPAGE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_DATA_LOSS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_BOOLEAN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_DATE_TIME &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_NUMBER &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_RAW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_UUID &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_OVERFLOW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_ROUNDING &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_UNKNOWN_LANGU &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CREATE_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CREATE_OBJECT_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CREATE_DATA_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_DATA_ACCESS_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_RANGE_OUT_OF_BOUNDS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_TAB_RANGE_OUT_OF_BOUNDS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_OFFSET_NOT_ALLOWED &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_DYN_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_CLASS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_FORM &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_FUNC &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_METHOD &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_PARAMETER_ERROR &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_EXCP_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_ILLEGAL_TYPE &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_PARAM_MISSING &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_PARAM_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_EXPORT_NO_SHARED_MEMORY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_FILE_ACCESS_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_AUTHORITY &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_CLOSE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_IO &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_OPEN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_OPEN_MODE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_POSITION &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_TRUNCATE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_FIND_INFINITE_LOOP &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_GEN_SOURCE_TOO_WIDE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_IMPORT_MISMATCH_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_IMPORT_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ITAB_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ITAB_DUPLICATE_KEY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_MATCHER &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_REGEX_TOO_COMPLEX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_INVALID_REGEX_FORMAT &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_MOVE_CAST_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_PROGRAM_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_PROVIDE_EXCEPTION &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PROVIDE_INTERVAL_OVERLAP &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PROVIDE_TABLE_NOT_SORTED &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_READ_SRC_LINE_TOO_LONG &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REF_IS_INITIAL  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REGEX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_INVALID_REGEX &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REPLACE_INFINITE_LOOP &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_SCAN_SOURCE_TOO_WIDE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_OPEN_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_OPEN_SQL_DB &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_DYNAMIC_OSQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |         | &lt;/P&gt;&lt;P&gt;  |    |    |         |--CX_SY_DYNAMIC_OSQL_SEMANTICS &lt;/P&gt;&lt;P&gt;  |    |    |         | &lt;/P&gt;&lt;P&gt;  |    |    |         |--CX_SY_DYNAMIC_OSQL_SYNTAX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_NATIVE_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_UNKNOWN_CURRENCY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_WRITE_INVALID_STYLE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_WRITE_SRC_LINE_TOO_LONG &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_TRANSFORMATION_ERROR &lt;/P&gt;&lt;P&gt;  |         | &lt;/P&gt;&lt;P&gt;  |         |--CX_ST_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CALL_METHOD_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CONSTRAINT_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CONDITION &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_DESERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_INVALID_XML &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_MATCH &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_REF_ACCESS &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_RUNTIME_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_SERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |         | &lt;/P&gt;&lt;P&gt;  |         |--CX_XSLT_EXCEPTION &lt;/P&gt;&lt;P&gt;  |              | &lt;/P&gt;&lt;P&gt;  |              |--CX_XSLT_SYSTEM_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_ABAP_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_DESERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_RUNTIME_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_SERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_NO_CHECK &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_BADI &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_CONTEXT_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_FILTER_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_INITIAL_CONTEXT &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_INITIAL_REFERENCE &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_NOT_SINGLE_USE &lt;/P&gt;&lt;P&gt;       |    |    | &lt;/P&gt;&lt;P&gt;       |    |    |--CX_BADI_MULTIPLY_IMPLEMENTED &lt;/P&gt;&lt;P&gt;       |    |    | &lt;/P&gt;&lt;P&gt;       |    |    |--CX_BADI_NOT_IMPLEMENTED &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_UNKNOWN_ERROR &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_EXPORT_BUFFER_NO_MEMORY &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_GENERATE_SUBPOOL_FULL &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_ILLEGAL_HANDLER &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_LOCALIZATION_ERROR &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_NESTED_PRINT_ON &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_NO_HANDLER &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_PIPES_NOT_SUPPORTED &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_PIPE_REOPEN &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_REMOTE_CALL_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_COMM_FAILURE &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_INVALID_STATUS &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_SYSTEM_FAILURE &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_TOO_MANY_FILES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jun 2008 14:29:17 GMT</pubDate>
    <dc:creator>sivasatyaprasad_yerra</dc:creator>
    <dc:date>2008-06-13T14:29:17Z</dc:date>
    <item>
      <title>Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028416#M962714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a form routine, and I try to read an excel file, I would like to know ( as there could be different kind of exceptions happends ) is there any standard or top most exceptoin class which I can use to catch all exception ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this way from java, would like to konw if we have something like this in abap as welll....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 14:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028416#M962714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T14:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028417#M962715</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; If you are using TRY then you can catch all the all the exceptions in CX_ROOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH CX_ROOT.&lt;/P&gt;&lt;P&gt;  &amp;lt;handle the exception&amp;gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 14:26:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028417#M962715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T14:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028418#M962716</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;We can use CX_DYNAMIC_CHECK for root exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following text is from ABAP help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception Classes for ABAP Statements &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions in ABAP statements that can be handled can be caught using the predefined exception classes listed below. These exception classes are all subclasses of the CX_DYNAMIC_CHECK and CX_NO_CHECK classes. They replace the previous catchable runtime errors. The keyword documentation lists all the exceptions that can occur for each statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To improve the structure, intermediate abstract classes were introduced so that groups of exceptions can be caught simultaneously. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each exception class includes message texts, which you can display by choosing the Texts tab in the Class Builder. The following links open the Class Builder for the corresponding exception class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_ROOT &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_STATIC_CHECK &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_DYNAMIC_CHECK &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ARITHMETIC_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ZERODIVIDE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ARITHMETIC_OVERFLOW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ARG_OUT_OF_DOMAIN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PRECISION_LOSS &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ASSIGN_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ASSIGN_CAST_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_ASSIGN_CAST_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_ASSIGN_CAST_UNKNOWN_TYPE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ASSIGN_OUT_OF_RANGE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CODEPAGE_CONVERTER_INIT &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CONVERSION_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_CODEPAGE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_DATA_LOSS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_BOOLEAN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_DATE_TIME &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_NUMBER &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_RAW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_NO_UUID &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_OVERFLOW &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_ROUNDING &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CONVERSION_UNKNOWN_LANGU &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_CREATE_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CREATE_OBJECT_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_CREATE_DATA_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_DATA_ACCESS_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_RANGE_OUT_OF_BOUNDS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_TAB_RANGE_OUT_OF_BOUNDS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_OFFSET_NOT_ALLOWED &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_DYN_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_CLASS &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_FORM &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_FUNC &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_ILLEGAL_METHOD &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_DYN_CALL_PARAMETER_ERROR &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_EXCP_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_ILLEGAL_TYPE &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_PARAM_MISSING &lt;/P&gt;&lt;P&gt;  |    |         | &lt;/P&gt;&lt;P&gt;  |    |         |--CX_SY_DYN_CALL_PARAM_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_EXPORT_NO_SHARED_MEMORY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_FILE_ACCESS_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_AUTHORITY &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_CLOSE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_IO &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_OPEN &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_OPEN_MODE &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_POSITION &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_FILE_TRUNCATE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_FIND_INFINITE_LOOP &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_GEN_SOURCE_TOO_WIDE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_IMPORT_MISMATCH_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_IMPORT_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_ITAB_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_ITAB_DUPLICATE_KEY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_MATCHER &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_REGEX_TOO_COMPLEX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_INVALID_REGEX_FORMAT &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_MOVE_CAST_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_PROGRAM_NOT_FOUND &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_PROVIDE_EXCEPTION &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PROVIDE_INTERVAL_OVERLAP &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_PROVIDE_TABLE_NOT_SORTED &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_READ_SRC_LINE_TOO_LONG &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REF_IS_INITIAL  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REGEX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_INVALID_REGEX &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_REPLACE_INFINITE_LOOP &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_SCAN_SOURCE_TOO_WIDE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_OPEN_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_OPEN_SQL_DB &lt;/P&gt;&lt;P&gt;  |    |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |    |--CX_SY_DYNAMIC_OSQL_ERROR &lt;/P&gt;&lt;P&gt;  |    |    |         | &lt;/P&gt;&lt;P&gt;  |    |    |         |--CX_SY_DYNAMIC_OSQL_SEMANTICS &lt;/P&gt;&lt;P&gt;  |    |    |         | &lt;/P&gt;&lt;P&gt;  |    |    |         |--CX_SY_DYNAMIC_OSQL_SYNTAX &lt;/P&gt;&lt;P&gt;  |    |    | &lt;/P&gt;&lt;P&gt;  |    |    |--CX_SY_NATIVE_SQL_ERROR &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_UNKNOWN_CURRENCY &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_WRITE_INVALID_STYLE &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_SY_WRITE_SRC_LINE_TOO_LONG &lt;/P&gt;&lt;P&gt;  |    | &lt;/P&gt;&lt;P&gt;  |    |--CX_TRANSFORMATION_ERROR &lt;/P&gt;&lt;P&gt;  |         | &lt;/P&gt;&lt;P&gt;  |         |--CX_ST_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CALL_METHOD_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CONSTRAINT_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_CONDITION &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_DESERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_INVALID_XML &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_MATCH &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_REF_ACCESS &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_RUNTIME_ERROR &lt;/P&gt;&lt;P&gt;  |         |    | &lt;/P&gt;&lt;P&gt;  |         |    |--CX_ST_SERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |         | &lt;/P&gt;&lt;P&gt;  |         |--CX_XSLT_EXCEPTION &lt;/P&gt;&lt;P&gt;  |              | &lt;/P&gt;&lt;P&gt;  |              |--CX_XSLT_SYSTEM_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_ABAP_CALL_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_DESERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_FORMAT_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_RUNTIME_ERROR &lt;/P&gt;&lt;P&gt;  |                   | &lt;/P&gt;&lt;P&gt;  |                   |--CX_XSLT_SERIALIZATION_ERROR &lt;/P&gt;&lt;P&gt;  | &lt;/P&gt;&lt;P&gt;  |--CX_NO_CHECK &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_BADI &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_CONTEXT_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_FILTER_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_INITIAL_CONTEXT &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_INITIAL_REFERENCE &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_NOT_SINGLE_USE &lt;/P&gt;&lt;P&gt;       |    |    | &lt;/P&gt;&lt;P&gt;       |    |    |--CX_BADI_MULTIPLY_IMPLEMENTED &lt;/P&gt;&lt;P&gt;       |    |    | &lt;/P&gt;&lt;P&gt;       |    |    |--CX_BADI_NOT_IMPLEMENTED &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_BADI_UNKNOWN_ERROR &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_EXPORT_BUFFER_NO_MEMORY &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_GENERATE_SUBPOOL_FULL &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_ILLEGAL_HANDLER &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_LOCALIZATION_ERROR &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_NESTED_PRINT_ON &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_NO_HANDLER &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_PIPES_NOT_SUPPORTED &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_PIPE_REOPEN &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_REMOTE_CALL_ERROR &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_COMM_FAILURE &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_INVALID_STATUS &lt;/P&gt;&lt;P&gt;       |    | &lt;/P&gt;&lt;P&gt;       |    |--CX_SY_RMC_SYSTEM_FAILURE &lt;/P&gt;&lt;P&gt;       | &lt;/P&gt;&lt;P&gt;       |--CX_SY_TOO_MANY_FILES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 14:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028418#M962716</guid>
      <dc:creator>sivasatyaprasad_yerra</dc:creator>
      <dc:date>2008-06-13T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028419#M962717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As mentioned above CX_ROOT is the Parent class of all exceptions, however it wont give you specific messages back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to know what exceptions are thrown by a statment , press F1 and in the help of that statment you will generally get the exceptions it throws. So you must catch them and in the end catch the cx_root exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a code snippet which tries to open a file on the application server and when failed it catches certian exceptions and displays message : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Try to open the data set and catch the appropriate exception
  TRY.

      OPEN DATASET l_fsap FOR OUTPUT IN BINARY MODE.

    CATCH cx_sy_file_open INTO lex_file_open.
      MESSAGE lex_file_open-&amp;gt;errortext TYPE 'I'.
    CATCH cx_sy_file_access_error INTO lex_file_access.
      MESSAGE lex_file_access-&amp;gt;filename TYPE 'I'.
   CATCH cx_root INTO lex_root.
      MESSAGE 'Exception occured TYPE 'I'.


  ENDTRY.

  IF sy-subrc = 0.
    LOOP AT it_binarcobj INTO w_binarcobj.

      TRY.

          TRANSFER w_binarcobj TO l_fsap.

        CATCH cx_sy_file_io INTO lex_file_io.
          MESSAGE lex_file_io-&amp;gt;errortext TYPE 'I'.
        CATCH cx_sy_file_access_error INTO lex_file_access.
          MESSAGE lex_file_access-&amp;gt;filename TYPE 'I'.
   CATCH cx_root INTO lex_root.
      MESSAGE 'Exception occured TYPE 'I'.

      ENDTRY.
    ENDLOOP.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 14:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028419#M962717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T14:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028420#M962718</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;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/83/636d1712fc11d5991e00508b5d5211/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/83/636d1712fc11d5991e00508b5d5211/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/02/c4e6aa19e911d5969b00a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/02/c4e6aa19e911d5969b00a0c94260a5/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f86c9290-0201-0010-7a93-dda3716dc0d2" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f86c9290-0201-0010-7a93-dda3716dc0d2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class-based exceptions are handled in the following control structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... " TRY block (application coding)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH cx_... cx_... ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... " CATCH block (exception handler)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH cx_... cx_... ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... " CATCH block (exception handler)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEANUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... " CLEANUP block (cleanup context)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TRY statement opens a control structure to be ended with ENDTRY, in which three statement blocks can be listed in a specified order (this is not obligatory).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. A TRY block, in which exceptions can occur.&lt;/P&gt;&lt;P&gt;This exception block consists of all the statements between the TRY and the CATCH statement.&lt;/P&gt;&lt;P&gt;2. One or more CATCH blocks for catching exceptions.&lt;/P&gt;&lt;P&gt;These exception blocks are initiated with CATCH and ended with a further CATCH, CLEANUP, or ENDTRY.&lt;/P&gt;&lt;P&gt;3. A CLEANUP block for cleanup work after the exceptions have been caught.&lt;/P&gt;&lt;P&gt;This statement block is initiated by CLEANUP and ended with ENDTRY. A TRY-ENDTRY structure must not contain more than one CLEANUP block in precisely this position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like all ABAP control structures, TRY-ENDTRY structures can be nested in any statement blocks (see Controlling the Program Flow). In particular, the three statements blocks above can also contain complete TRY-ENDTRY blocks. Like all ABAP control structures, each TRY-ENDTRY structure must be contained fully in a processing block (event block, dialog module, procedure). This means that the application coding of a TRY-ENDTRY structure cannot include several processing blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY Block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TRY block contains the application coding whose exceptions are to be handled. This statement block is processed sequentially. It can contain further control structures and calls of procedures or other ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an exception occurs in the TRY block or in a procedure called up here, the system starts by searching for a CATCH statement of the same TRY-ENDTRY structure. It then searches from the inside out for a CATCH statement in any enclosing TRY-ENDTRY structures that handle the event. The system may call this handler. If the system does not find a handler, but the TRY-ENDTRY structure is contained in a procedure, it tries to propagate the exception to the caller (see also Propagating Exceptions). Exceptions cannot be propagated in any processing blocks without a local data area (event blocks, dialog modules). A runtime error occurs immediately if the handler is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no exceptions occur in the TRY block, program execution is continued directly after ENDTRY after the block has been completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH Block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A catch block contains the exception handler that is executed when a particular exception has occurred in the TRY block of the same TRY-ENDTRY structure. A TRY-ENDTRY structure can contain several exception handlers. The syntax for introducing an exception handler is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH cx_... cx_... INTO ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any number of exception classes can be specified after CATCH. This defines an exception handler for all the specified exception classes and their subordinate classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After an exception occurs, the system searches through the listed exception handlers in the specified order. The first exception handler whose CATCH statement contains the corresponding exception class or one of its superclasses is executed. The system then continues program execution directly after ENDTRY. No subsequent exception handlers are considered. For this reason, the order of the different exception handlers within a TRY-ENDTRY structure must be based on the inheritance hierarchy of the specified exception classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax check ensures that the handlers for more specific exceptions (subordinate classes) can only be listed before the handlers for more general exceptions (superclasses). For example, a handler for the most general exception class CX_ROOT can only ever be the last statement block before CLEANUP or ENTRY. Otherwise, none of the subsequent handlers would ever be reached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the INTO addition, a reference to the exception object can be placed a reference variable. This enables the attributes of the exception object to be accessed in the handler. The reference variable must be suitable for the exception. Its static type must be the exception class itself or one of its superclasses. You are advised to use an exception class below CX_ROOT or CX_ROOT itself rather than the general class OBJECT. Only these classes contain the methods relevant for exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 14:44:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028420#M962718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T14:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028421#M962719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my form routine I wrote the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form xyz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;**my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Catch CX_SY_CONVERSION_NO_NUMBER.&lt;/P&gt;&lt;P&gt;CATCH cx_root.&lt;/P&gt;&lt;P&gt;       WRITE 'exception occured'.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;Endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am still getting the shot-dump ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestion ?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:35:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028421#M962719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Exception catch</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028422#M962720</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 like this ,&lt;/P&gt;&lt;P&gt;give your catch (CX_SY_CONVERSION_NO_NUMBER).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : 
  a TYPE i ,
  b TYPE i VALUE 10.
TRY.
    a = b / 0.
  CATCH cx_sy_zerodivide.
    WRITE 'shah'.
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_webas610/helpdata/en/c3/021950f06111d4b2eb0050dadfb92b/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_webas610/helpdata/en/c3/021950f06111d4b2eb0050dadfb92b/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have any furthur query let me knw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 15:47:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-catch/m-p/4028422#M962720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T15:47:56Z</dc:date>
    </item>
  </channel>
</rss>

