<?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 Exception 'error_message' in ABAP Objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113411#M106738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a heterogeneous scenario with new program parts in ABAP objects and older parts in classical ABAP.&lt;/P&gt;&lt;P&gt;In the older parts some R/3 standard functions are called which dump dialog messages which are not allowed at that state of the program flow ('on commit').&lt;/P&gt;&lt;P&gt;The simple solution in classical ABAP was to use standard exception 'error_message' in the top level 'call function' statement thus catch all dialog messages in lower levels.&lt;/P&gt;&lt;P&gt;I am looking for an analog solution in object oriented ABAP. But exception 'error_message' is not allowed with 'call method'. It cannot be defined statically in the methods declaration. And the system exception caused by the dialog error message is not included in the set of catchable system errors.&lt;/P&gt;&lt;P&gt;I would be grateful for any hints concerning this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2005 08:59:01 GMT</pubDate>
    <dc:creator>manfred_oster</dc:creator>
    <dc:date>2005-12-28T08:59:01Z</dc:date>
    <item>
      <title>Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113411#M106738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a heterogeneous scenario with new program parts in ABAP objects and older parts in classical ABAP.&lt;/P&gt;&lt;P&gt;In the older parts some R/3 standard functions are called which dump dialog messages which are not allowed at that state of the program flow ('on commit').&lt;/P&gt;&lt;P&gt;The simple solution in classical ABAP was to use standard exception 'error_message' in the top level 'call function' statement thus catch all dialog messages in lower levels.&lt;/P&gt;&lt;P&gt;I am looking for an analog solution in object oriented ABAP. But exception 'error_message' is not allowed with 'call method'. It cannot be defined statically in the methods declaration. And the system exception caused by the dialog error message is not included in the set of catchable system errors.&lt;/P&gt;&lt;P&gt;I would be grateful for any hints concerning this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 08:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113411#M106738</guid>
      <dc:creator>manfred_oster</dc:creator>
      <dc:date>2005-12-28T08:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113412#M106739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see excellent doc on new exception handling in abap objects, with also detailed description about interaction between 'classical' error handling and abap objects:&lt;/P&gt;&lt;P&gt;'A Programmer's guide to the New Exception Handling Concept in ABAP' available on SDN.&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;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 13:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113412#M106739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T13:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113413#M106740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi please see at &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-press.com/downloads/h958_preview.pdf" target="test_blank"&gt;http://www.sap-press.com/downloads/h958_preview.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;for more info on exception handling in abap objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 13:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113413#M106740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T13:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113414#M106741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer. But unfortunately this document is incorrect exactly in the detail concerning my problem.&lt;/P&gt;&lt;P&gt;According to the authors it is possible to use "error_message" with call method (p. 44, last sentence: "If the message is of type "E" or "A" it can be caught directly by calling methods and function modules using the EXCEPTION clause and the special (classical) exception name error_message."). &lt;/P&gt;&lt;P&gt;But that is not true at least not in release 6.20. Syntax check says that the declaration for that exception is missing. Maybe there is a certain trick that I didn't find out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2005 13:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113414#M106741</guid>
      <dc:creator>manfred_oster</dc:creator>
      <dc:date>2005-12-29T13:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113415#M106742</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;Excuse me! But I didn't want to sent you my answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_my_class DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS my_method&lt;/P&gt;&lt;P&gt;              EXPORTING&lt;/P&gt;&lt;P&gt;                EXCEPTION TYPE CHAR1 &lt;/P&gt;&lt;P&gt;              EXCEPTIONS error_messages.&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "LCL_MY_CLASS DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_my_class IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD my_method.&lt;/P&gt;&lt;P&gt;    IF EXCEPTION = 'X'.&lt;/P&gt;&lt;P&gt;      MESSAGE e208(00) WITH 'Message error'&lt;/P&gt;&lt;P&gt;                  RAISING error_messages.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      MESSAGE I208(00) WITH 'OK!'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "MY_METHOD&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "LCL_MY_CLASS IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you did want to do a call like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD lcl_my_class=&amp;gt;my_method&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     error_messages = 1&lt;/P&gt;&lt;P&gt;     error_message  = 2&lt;/P&gt;&lt;P&gt;     OTHERS         = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No! you can't do it, but you try to insert your call in fm where you use ERROR_MESSAGE addition. I think you can do it if your methods are std.&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2005 13:59:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113415#M106742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-29T13:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113416#M106743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have looked at the help of the 'call method' statement, and unfortunately it says the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes: &lt;/P&gt;&lt;P&gt;As with function modules, you can catch the exception OTHERS predefined by the system to handle various user-defined exceptions simultaneously. Specifying the exception ERROR_MESSAGE is, however, not supported for method calls. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine that you are calling some standard methods, so you can not change the way the messages are triggered, so you can not raise an other exception in the method itself.  &lt;/P&gt;&lt;P&gt;Message.. raising...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can try to do, is to encapsulate the method call in a function 'Z_CALL_METHOD_...' and call that function with exception error_message. I have not tried this, but might be a workaround to still use the methods you want to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2005 08:21:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113416#M106743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-30T08:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113417#M106744</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;this might help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.s001.org/ABAP-Hlp/abapcall_function-.htm" target="test_blank"&gt;http://www.s001.org/ABAP-Hlp/abapcall_function-.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2005 08:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113417#M106744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-30T08:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113418#M106745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joris for the last suggestion.&lt;/P&gt;&lt;P&gt;I had that already in mind as my last straw to clutch at.&lt;/P&gt;&lt;P&gt;But what is the benefit of ABAP Objects if I have to fall back to classical ABAP because the new technologie is less powerful? So I hope there is another solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2005 08:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113418#M106745</guid>
      <dc:creator>manfred_oster</dc:creator>
      <dc:date>2005-12-30T08:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exception 'error_message' in ABAP Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113419#M106746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime we're 5 years further, anything changed in that time that allows now error_message in ABAP objects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeroen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 13:42:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-error-message-in-abap-objects/m-p/1113419#M106746</guid>
      <dc:creator>jeroen_verbrugge2</dc:creator>
      <dc:date>2011-04-05T13:42:26Z</dc:date>
    </item>
  </channel>
</rss>

