09-10-2008 1:15 PM
Hi,
i need to understand the concept of Event in OO i read about it in this forum search but i little bit confused ,
maybe some one can explain me that with sample,where it good to use it and where not?
Best Regards
09-10-2008 2:31 PM
Hello Tal,
From ECC 5.0 every thing is object oriented. Events are used in workflows, ALV's and so on.
For example in Workflow. You want to trigger some workflow when ever a sales order created or material got created. In this scenario one method will be created to catch that event. like this..
In alv or interactive reports when you double click on interactive report its a event, double click event when it got triggered you have to call some method..when ever this happens.
Regards,
Naresh.
Edited by: naresh durki on Sep 10, 2008 3:33 PM
09-10-2008 2:02 PM
Hi,
Please check this link...
/message/4447073#4447073 [original link is broken]
Please check this SAP Help regarding EVENTS
http://help.sap.com/saphelp_47x200/helpdata/en/71/a8a77955bc11d194aa0000e8353423/content.htm
Check this to know the events in CL_GUI_ALV_GRID class and what does they do..
http://help.sap.com/saphelp_bw30b/helpdata/en/22/a3f5f5d2fe11d2b467006094192fe3/content.htm
Hope this would help you.
Good luck
Narin
09-10-2008 2:11 PM
Hi Narin ,
thanks but maybe u can explain me what is the benefit of using events in abap oo?
Regards
09-10-2008 2:30 PM
Events allow a loose coupling of objects. The object raising the event does not need to which objects implement the event, it will just raise it and everyone interested will be notified.
09-10-2008 2:35 PM
Hi,
When Ever an action is done related to that specific class then we need to do some task.. in short an Event
occurs and to handle those event we define the EVENT HANDLERS.
So do a task upon the Action we need Events to trigger and Handlers to Handle the events...
Please check these threads....
Hope this would make you clear and helpful
Good luck
Narin
09-10-2008 3:06 PM
>
> Hi Narin ,
>
> thanks but maybe u can explain me what is the benefit of using events in abap oo?
>
> Regards
There is no "benefit". You use events when it's appropriate to use them. It's a bit like asking "what's the benefit of a hammer".
09-10-2008 2:31 PM
Hello Tal,
From ECC 5.0 every thing is object oriented. Events are used in workflows, ALV's and so on.
For example in Workflow. You want to trigger some workflow when ever a sales order created or material got created. In this scenario one method will be created to catch that event. like this..
In alv or interactive reports when you double click on interactive report its a event, double click event when it got triggered you have to call some method..when ever this happens.
Regards,
Naresh.
Edited by: naresh durki on Sep 10, 2008 3:33 PM
09-11-2008 5:38 AM
hi,
In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods - the handlers - react. This means that the handler methods are executed when the event occurs.
regards,
preet