Skip to Content
avatar image
Former Member

Explicitly call the Event Handler method

Hello Friends,

Is it possible to explicitly call the eventhandler method `? or dynamically fire/invoke the event so that particular eventhandler method should be called ?

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 12, 2009 at 08:13 AM

    It is possible to dynamically fire the event if it is an user defined event. The event can be defined in the component controller in the events tab. The events can be fired dynamically using the Raise event option from code wizard.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 12, 2009 at 08:22 AM

    hi,

    that is very easy.

    if u want to fire the event handler in a view...

    do this

    WD_THIS->event handler method name .

    for ex : for a button ...if the event handler method name SEARCH..

    THEN........WD_THIS-> SEARCH( ).

    .

    HOPE IT HELPS

    Regards

    Arjun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You should call eventhandler as follows

      DATA lr_event TYPE REF TO cl_wd_custom_event.
      
      **Create event object
        CREATE OBJECT lr_event
          EXPORTING
            name = 'ON_SELECT'. " give your event name which appears in wdevent in your handler method
      
      * Call eventhandler
        wd_this->onactionsel_rdb(
        wdevent = lr_event                          " ref to cl_wd_custom_event
      ).

  • avatar image
    Former Member
    May 12, 2009 at 11:11 AM

    Thanks guys, it works,

    bye 😊

    Add comment
    10|10000 characters needed characters exceeded