01-27-2014 3:34 AM
Hi,
I have a class for handling ALV event. Within one method of event handler, another method of the event handler is called. The two methods are created by METHODS ... FOR EVENT ... OF CL_GUI_ALV_GRID. How can I raise the double click in the other method of the same event handling class?
Best regards,
ts
01-27-2014 4:22 AM
Hi,
Each time you double click on the cell of your ALV the method handle_double_click of class
lcl_gui_alv_event_receiver will be called and will respond to your action.
01-27-2014 5:46 AM
Hi TS,
check out the code below.
class <user_defined_class>
Method m1 for event <event_name> of <standard_class>
Method m2 for event <event_name> of <standard_class>.
endclass.
START-OF-SELECTION.
DATA : event_ref TYPE REF TO <standard_class>
cust_ref type REF TO <user_defined_class>
CREATE OBJECT : event_ref, cust_ref..
*** Registering event
SET HANDLER cust_ref->m1 FOR <event_name>.
event_ref->trigger_method( ).
trigger_method contains the statement Raise event <event_name>.
So,when event is raised, m1 method of the user defined class will be called because, we have registered, method m1 only . To call m2, first you have deregister an existing event, for that
set handler cust_ref->m1 for <event_name> activation space.
Register m2 ,
set handler cust_ref->m2 for <event_name>.
Regards,
Ravikiran.K