Sunday, February 24, 2013

Method as event handler

You can create an event handler method by right clicking on the event handler method. Or by adding a method in the IMPL class and add the below attributes as its parameters.
HTMLB_EVENT is type ref to CL_HTMLB_EVENT and this class uses the interface IF_HTMLB_DATA (input data from HTMLB ).
The parameters of this class are  -
event_class = CL_HTMLB_EVENT_SELECTION
event_server_name = is the event that is clicked on
event_name = dropdownlistbox
event_type= select
Once you add this,  go to DO_HANDLE_EVENT method and check if the below code has been addedd in this method.
  *     Added by wizard
      WHEN 'event_name'.                                    "#EC NOTEXT
        EH_ONeventhtmlb_event    htmlb_event
                    htmlb_event_ex htmlb_event_ex ).
If this is added, whatever code you write in the method EH_ONevent will successfully be triggered.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.