cancel
Showing results for 
Search instead for 
Did you mean: 

Explicitly call the Event Handler method

Former Member
0 Kudos

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,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks guys, it works,

bye

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Arjun,

Ok thing is that I have Tab Strip UI element... it has an even onselet ( OnTabSelect) and handler ONACTIONON_TABSELECT

I want to fire the event to handel the stuff in oncation_tabselect ?

when i do wd_this->onaction_tabselct (). i got error or missing event parameter ?

Regards,

arjun_thakur
Active Contributor
0 Kudos

Hi,

Refer this thread:

Regards

Arjun

Former Member
0 Kudos

You can fire the event handler for standard events. You can create a new method and write your code there. Now you can call this method from the event handler and whereever required.

Former Member
0 Kudos

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
).

Former Member
0 Kudos

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.