<?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 class with SY-message in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870790#M1323217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After a while I gave up and forgot about this &lt;/P&gt;&lt;P&gt;Someone has an idea one year later?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jun 2010 15:55:20 GMT</pubDate>
    <dc:creator>alejiandro_sensejl</dc:creator>
    <dc:date>2010-06-21T15:55:20Z</dc:date>
    <item>
      <title>Exception class with SY-message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870788#M1323215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iu2019m playing around with this new-fashioned exception stuff called exception classes. To start with I want to create a common class that handles u201Cold schoolu201D exceptions of function modules. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This exception class should read the message from the syst fields automatically and return it later via (already existing interface) method GET_TEXT. Iu2019d like to avoid filling the message manually at the constructor, because I think this isnu2019t something that needs be implemented every time I use the exception, but rather be handled by the class itself. It would also be an advantage to get this done without any data definitions in the routine that invokes (RAISE EXCEPTION TYPE u2026) the exception!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there any way or best practice to achieve this without some intricate using of the TEXTID (of type IF_T100_MESSAGE=&amp;gt;T100KEY)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can understand what Iu2019m trying to do!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 11:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870788#M1323215</guid>
      <dc:creator>alejiandro_sensejl</dc:creator>
      <dc:date>2009-07-20T11:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exception class with SY-message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870789#M1323216</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;I am not really sure...but well if I understand you want the message to be in sy-* structure and raise the exception class...the best way to do is...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message XXX in l_dummy.&lt;/P&gt;&lt;P&gt;Raise exception type cx_***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in exception class constructor or catch clause you can access sy-* structure to access the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I cold answer this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jemin Tanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 06:44:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870789#M1323216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-05T06:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Exception class with SY-message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870790#M1323217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After a while I gave up and forgot about this &lt;/P&gt;&lt;P&gt;Someone has an idea one year later?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 15:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870790#M1323217</guid>
      <dc:creator>alejiandro_sensejl</dc:creator>
      <dc:date>2010-06-21T15:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Exception class with SY-message</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870791#M1323218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently  doing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO ld_message.
RAISE EXCEPTION TYPE zcx_exception EXPORTING text = ld_message.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 12:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-class-with-sy-message/m-p/5870791#M1323218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-22T12:51:10Z</dc:date>
    </item>
  </channel>
</rss>

