<?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: Event Handling Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191483#M1714343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't follow your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your sample code, it would call both methods M2 &amp;amp; M3 as you are raising events E1 and E2 within M1. Can you point, what exactly you are not able to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jan 2013 17:49:01 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2013-01-07T17:49:01Z</dc:date>
    <item>
      <title>Event Handling Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191482#M1714342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I searched many threads in sdn and i am not able to understand that event handling problem that is i am registering method m3 and m2 but it is raising events e1 and e2 and when i am trying for single event e1 for both the methods m2 ,m3&amp;nbsp; it is raising based on registration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class abc definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;events :&amp;nbsp; e1 , e2.&lt;/P&gt;&lt;P&gt;methods : m1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m2 for event e1 of abc,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m3 for event e2 of abc.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class abc implementation.&lt;/P&gt;&lt;P&gt;method m1.&lt;/P&gt;&lt;P&gt;raise event e1.&lt;/P&gt;&lt;P&gt;raise event e2.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m2.&lt;/P&gt;&lt;P&gt;write : / 'Event Handler method m2 '.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m3.&lt;/P&gt;&lt;P&gt;write : 'Eventhandler method m3'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : obj_abc type ref to abc.&lt;/P&gt;&lt;P&gt;create object obj_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set handler obj_abc-&amp;gt;m3 for obj_abc.&lt;/P&gt;&lt;P&gt;set handler obj_abc-&amp;gt;m2 for obj_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method obj_abc-&amp;gt;m1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raghunadh.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2013 04:05:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191482#M1714342</guid>
      <dc:creator>former_member226225</dc:creator>
      <dc:date>2013-01-06T04:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handling Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191483#M1714343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't follow your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your sample code, it would call both methods M2 &amp;amp; M3 as you are raising events E1 and E2 within M1. Can you point, what exactly you are not able to understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 17:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191483#M1714343</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2013-01-07T17:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handling Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191484#M1714344</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; what my problem is: check the code here i am taking only one event and raising in m1 and after that i am registering m3 and m2 so my o/p is &lt;/P&gt;&lt;P&gt;'method m3 for event e1'.&lt;/P&gt;&lt;P&gt;'method m2 for event e1'.&lt;/P&gt;&lt;P&gt;and it is executing&amp;nbsp; based on registration &lt;/P&gt;&lt;P&gt;but when i am taking two events it is not executing based on registration and it is based up on raising the events in m1.&amp;nbsp; why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class abc definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;events e1.&lt;/P&gt;&lt;P&gt;methods : m1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m2 for event e1 of abc,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m3 for event e1 of abc.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class abc implementation.&lt;/P&gt;&lt;P&gt;method m1.&lt;/P&gt;&lt;P&gt;raise event e1.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m2.&lt;/P&gt;&lt;P&gt;write : / 'Method m2 for event e1'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m3.&lt;/P&gt;&lt;P&gt;write : / 'method m3 for event e1'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : obj_abc type ref to abc.&lt;/P&gt;&lt;P&gt;create object obj_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set handler obj_abc-&amp;gt;m3 for obj_abc.&lt;/P&gt;&lt;P&gt;set handler obj_abc-&amp;gt;m2 for obj_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method obj_abc-&amp;gt;m1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raghunadh.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 10:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191484#M1714344</guid>
      <dc:creator>former_member226225</dc:creator>
      <dc:date>2013-01-08T10:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handling Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191485#M1714345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you have more than one event handler for a single event, system will try to process the events in the sequence in which they were registered. However, system wont guarantee the execution in that sequence. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you have, code like this it would execute in the sequence it was registered.&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;set handler obj_abc-&amp;gt;m3 for obj_abc.
set handler obj_abc-&amp;gt;m2 for obj_abc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm" title="http://help.sap.com/saphelp_nw70/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm"&gt;Triggering and Handling Events (SAP Library - ABAP Programming (BC-ABA))&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;Handler methods are executed in the order in which they were registered. Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 15:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191485#M1714345</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2013-01-08T15:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Event Handling Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191486#M1714346</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raghunadh.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 11:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/event-handling-problem/m-p/9191486#M1714346</guid>
      <dc:creator>former_member226225</dc:creator>
      <dc:date>2013-01-15T11:13:30Z</dc:date>
    </item>
  </channel>
</rss>

