<?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: Enhance standard class with event handler method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593588#M1661821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like SAP doesn't allow to create event handler methods in the Enhancements, even the parameters are not getting inherited from the Event.&lt;/P&gt;&lt;P&gt;But for your purpose, I would suggest to add a Post-Exit method for the event handler method HANDLE_USER_COMMAND. This way you don't need to worry about registering your custom method as the event handler method using SET HANDLER.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 21:31:29 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2012-03-19T21:31:29Z</dc:date>
    <item>
      <title>Enhance standard class with event handler method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593586#M1661819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method.&amp;nbsp; The specific example is a new method to handle the event CL_GUI_ALV_GRID-&amp;gt;USER_COMMAND.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I notice that the flag called Active has not been ticked - see image below.&amp;nbsp; Perhaps this is the reason why the event handler is not being triggered.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/82197" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Note that there is an event handler for the same event in the standard class which obviously is executed as expected.&amp;nbsp; Any ideas on limitations in the system or I am missing a step?&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 02:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593586#M1661819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T02:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Enhance standard class with event handler method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593587#M1661820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Halo John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you want to enhance standard class with Event handler method. Ideally the event handler method for&amp;nbsp; CL_GUI_ALV_GRID-&amp;gt;USER_COMMAND event should be part of your class( Z namespace ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arshad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 03:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593587#M1661820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-16T03:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Enhance standard class with event handler method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593588#M1661821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like SAP doesn't allow to create event handler methods in the Enhancements, even the parameters are not getting inherited from the Event.&lt;/P&gt;&lt;P&gt;But for your purpose, I would suggest to add a Post-Exit method for the event handler method HANDLE_USER_COMMAND. This way you don't need to worry about registering your custom method as the event handler method using SET HANDLER.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 21:31:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593588#M1661821</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2012-03-19T21:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Enhance standard class with event handler method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593589#M1661822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your replies.&lt;/P&gt;&lt;P&gt;There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug".&amp;nbsp; &lt;/P&gt;&lt;P&gt;I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 21:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593589#M1661822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-20T21:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Enhance standard class with event handler method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593590#M1661823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;Unfortunately this does not work as the following error message is raised "The class has not yet been converted to the new class-local types".&lt;/P&gt;&lt;P&gt;I suppose I have to be satisfied with the conclusion that this is a limitation within SAP.&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 21:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhance-standard-class-with-event-handler-method/m-p/8593590#M1661823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-03-20T21:35:02Z</dc:date>
    </item>
  </channel>
</rss>

