Documents

Object Oriented ABAP

Categories
Published
of 42
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Description
SAP ABAP OOPS
Transcript
  Event Handler Technique in Object oriented ABAP By Satya Mahanandia,HCL Technologies 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:-     Create an event in a class.     Create a triggering method in the same class which will raise the event.   Create an event handler method for the event in same/other class.   Register the event handler method in the program. 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.   Events with Handler Method in the same class.   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.   Now select the method.    And also copy the parameters of the event method.   By pressing this copy event parameter we can get the parameters. Save and go back to the earlier screen..   Then double click on the method name.   Then provide the following logic for triggering the event. METHOD METHOD_EVENT .   *check the condition   IF S_LIFNR_LOW < 1000 AND S_LIFNR_HIGH > 2000.   MESSAGE I000(0) WITH 'enter the values between 1000 and 2000'.   RAISE EVENT ZEVENT_METHOD.   ENDIF.   *provide select statement   SELECT *   FROM LFA1  
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks