on 10-07-2007 5:39 PM
Can anybody explain in detail about the importance of the keyword 'Set Handler' with the SYNTAX OF SETHANDLER keyword particularly in case of 'STATIC EVENT' and in caes of an 'INSTANCE EVENT'.
Hello Sandeep
Irrespective of the level of the event (static vs. instance) the meaning of the statement
SET HANDLER is as following:
If you want to react on an event raised by a class you <b>must </b>to define an event handler. For example, if you want to react on the event DOUBLE_CLICK in an ALV list (instance: go_grid) you need to define an event handler method (e.g. static method handle_double_click of event handler class lcl_eventhandler) and register it:
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid.
Alternatively, if the event handler method should handle the event for all grid instances you can use:
SET HANDLER lcl_eventhandler=>handle_double_click FOR ALL INSTANCES.
By default, the event handler is set active:
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid.
" ... is identical to:
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid ACTIVATION 'X'.
If you want to inactivate an event handler then code:
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid ACTIVATION ' '.
Regards
Uwe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.