Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Event Question

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

narin_nandivada3
Active Contributor
0 Kudos

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

0 Kudos

Hi Narin ,

thanks but maybe u can explain me what is the benefit of using events in abap oo?

Regards

0 Kudos

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.

0 Kudos

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

0 Kudos

>

> 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".

Former Member
0 Kudos

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

Former Member
0 Kudos

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