Event Handler Technique in Object Oriented ABAP: 1. Events With Handler Method in The Same Class
Event Handler Technique in Object Oriented ABAP: 1. Events With Handler Method in The Same Class
Event is a mechanism by which method of one class can raise method of another class, without
the hazard of instantiating that class. It provides to raise the method (event handler method) of
one class with help of another method in the same or different class (triggering method).
The below steps is required to have the event handler in the class:
Now, the above settings are complete for event handler in class. Create an object from the class
containing the event and call the triggering method to raise the event.
By taking the above steps, the following sample examples will demonstrate the event handler
technique in Class.
1.
This example tells that how to raise method, if the triggering method and event handler method
presents in the same class.
Sample code and Output.
Next->
Output.
= IT_LFA1.
WA_LFA1-NAME1,
WA_LFA1-ORT01.
ENDLOOP.
Save it, check it, activate it and execute it.
Then the output is like this.