<?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: Events with Class Builder in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879086#M369322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's assume your event handler method is an instance method then the coding should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA:
    go_myclass   TYPE REF TO zcl_abc.

* Create instance
  CREATE OBJECT go_myclass.

* Register event handler
  SET HANDLER: go_myclass-&amp;gt;handle_event FOR EVENT abc OF zcl_abc.


* Raise the event
   go_myclass-&amp;gt;raise_event( ).

* When the event is raise the runtime environment should go to go_myclass-&amp;gt;handle_event&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jan 2007 12:46:25 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-01-17T12:46:25Z</dc:date>
    <item>
      <title>Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879082#M369318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a simple question (I hope).&lt;/P&gt;&lt;P&gt;Target:&lt;/P&gt;&lt;P&gt;raise an event from a class method&lt;/P&gt;&lt;P&gt;0. create a class &amp;lt;i&amp;gt;abc&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;1. Create a method &amp;lt;i&amp;gt;raise_event&amp;lt;/i&amp;gt; for class abc in Classbuilder with only one coding row (raise event &amp;lt;i&amp;gt;xyz&amp;lt;/i&amp;gt;).&lt;/P&gt;&lt;P&gt;2. I created a event &amp;lt;i&amp;gt;xyz&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;3. i create a method (via Class builder) in class &amp;lt;i&amp;gt;abc&amp;lt;/i&amp;gt; and  set the radio button is eventhandler for and choose the class abc and the event &amp;lt;i&amp;gt;xyz&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;4. Now i call the method &amp;lt;i&amp;gt;raise_event&amp;lt;/i&amp;gt; from a report - the raise will be executed, but the method for the eventhandling will not start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 09:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879082#M369318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T09:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879083#M369319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like that you have not &amp;lt;b&amp;gt;registered&amp;lt;/b&amp;gt; the event handler method. Somewhere in your coding you should have the following statement assuming that you are using a static method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET HANDLER  lcl_event_handler=&amp;gt;handle_event_abc FOR EVENT abc OF abc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 09:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879083#M369319</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-01-17T09:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879084#M369320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Made a mistake. It should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET HANDLER  lcl_event_handler=&amp;gt;handle_event FOR EVENT event OF abc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 09:46:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879084#M369320</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-01-17T09:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879085#M369321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer - but i'm not sure were i have to paste the code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for this question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried  it into the constructor and in the method abc - but I get this error Message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"." or ACTIVATION... expected after "EVENT".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help?&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 11:11:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879085#M369321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T11:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879086#M369322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's assume your event handler method is an instance method then the coding should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA:
    go_myclass   TYPE REF TO zcl_abc.

* Create instance
  CREATE OBJECT go_myclass.

* Register event handler
  SET HANDLER: go_myclass-&amp;gt;handle_event FOR EVENT abc OF zcl_abc.


* Raise the event
   go_myclass-&amp;gt;raise_event( ).

* When the event is raise the runtime environment should go to go_myclass-&amp;gt;handle_event&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 12:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879086#M369322</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-01-17T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879087#M369323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ups, i solved the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but now I have a  new one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I raise the event from a report but it starts the handler synchron - is it possible to start the handler asynchron?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 13:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879087#M369323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-17T13:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879088#M369324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am (almost) sure the event handler will always be called synchronously. Thus, the only way you could start an asynchronous task is within your (synchronously called) event handler, e.g. CALL FUNCTION '...'  STARTING NEW TASK &amp;lt;taskname&amp;gt; or CALL TRANSACTION with OPTION-upmode = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 13:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879088#M369324</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-01-17T13:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Events with Class Builder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879089#M369325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;Event Handlers get called synchronous. Beside Uwe´s suggestions there are at least 2 more options:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;build your own stack, put the event data on it and execute it later. If you need to handle it assynchronous but simulestanely assynchronous RFC as Uwe already mentioned is the best choice.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;another assynchronous technique is batch scheduling. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;
call function 'JOB_OPEN' ....
submit handler_Report    ....
call function 'JOB_CLOSE'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Klaus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2007 20:25:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/events-with-class-builder/m-p/1879089#M369325</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2007-01-17T20:25:48Z</dc:date>
    </item>
  </channel>
</rss>

