<?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 ENQUEUE and Class-based Exceptions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-class-based-exceptions/m-p/6445283#M1412904</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 I use the ENQUEUE Function module in a method which also raises class-based exceptions, I'd like to be able to raise equivalent class-based exceptions which map to the standard ENQUEUE function module exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally I'd simply propogate the FM exception by calling MESSAGE ... RAISING and then raise my own exception with the message that the ENQUEUE FM returned in sy-msg* etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can't have normal exceptions and class-based ones in the same method interface. Does anyone know if there's a SAP standard CX exception which has all the same messages and parameters in it so that we can raise the relevant class-based exception in the method after an ENQUEUE fails?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2009 17:03:18 GMT</pubDate>
    <dc:creator>paul_abrahamson_sap</dc:creator>
    <dc:date>2009-12-16T17:03:18Z</dc:date>
    <item>
      <title>ENQUEUE and Class-based Exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-class-based-exceptions/m-p/6445283#M1412904</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 I use the ENQUEUE Function module in a method which also raises class-based exceptions, I'd like to be able to raise equivalent class-based exceptions which map to the standard ENQUEUE function module exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally I'd simply propogate the FM exception by calling MESSAGE ... RAISING and then raise my own exception with the message that the ENQUEUE FM returned in sy-msg* etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can't have normal exceptions and class-based ones in the same method interface. Does anyone know if there's a SAP standard CX exception which has all the same messages and parameters in it so that we can raise the relevant class-based exception in the method after an ENQUEUE fails?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2009 17:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-class-based-exceptions/m-p/6445283#M1412904</guid>
      <dc:creator>paul_abrahamson_sap</dc:creator>
      <dc:date>2009-12-16T17:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: ENQUEUE and Class-based Exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-class-based-exceptions/m-p/6445284#M1412905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure whether I understand your problem correctly, so please excuse me if I am completely off track &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you want to transport the information that is normally stored in sy-msg variables via class-based exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define your own exceptions, you can add attributes to the exception class. Any attributes, basically. I did something along this line by adding all relevant fields (message class, type, number, the four variables) as attributes to my exception class. Then, if you raise an exception with RAISE EXCEPTION TYPE &amp;lt;yourExceptionClass&amp;gt; and you use, for example, drag-and-drop from SE80 or the pattern feature for that, in the EXPORTING part of the statement you can fill these fields. As they are public fields, any method catching your exception can look into these and figure out what went wrong with the ENQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps (if I understood your question right)&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 10:21:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enqueue-and-class-based-exceptions/m-p/6445284#M1412905</guid>
      <dc:creator>joerg_wegener</dc:creator>
      <dc:date>2009-12-22T10:21:32Z</dc:date>
    </item>
  </channel>
</rss>

