Sunday, April 5, 2020

Events in ABAP

There are events that are available for OOABAP it is for object oriented approach.

EVENTS : Basically events is use to raise the method of the same or another class. By the using of events we can raise the methods.
Only those method can only be raise which are already declared as event handler method. We can set n number of event handler method for a specific event.

Lets assume that there is an event EV1 and there are three methods M1, M2, M3 in these methods M2 and M3 are events handler method and M1 method RAISE EVENT EV1. afterwards method M2 and M3 will trigger.

After declaring M2 and M3 as event handler method we need to create a program in transaction SE38 here we need to create a object of that class where these all methods are available and we also need to set M2 and M3 method as a SET HANDLER method.

SET HANDLER OBJ->M2 FOR OBJ.
SET HANDLER OBJ->M3 FOR OBJ.

CALL METHOD OBJ->M1.

After doing this our all event handler method will going to trigger.
Thanks..Share this


No comments:

Post a Comment

Events in Classical reports

There are some events in classical report. 1. Load-of-program 2. Initialization 3. At Selection-screen Outpu 4. At Selection-screen on field...