01-18-2008 5:25 AM
Hi All,
I am displaying the data in ALV tree. When the user click on the node i want to capture some event and method in which i have to do some coding. Can you tell me which method and event i should use to achieve this functionality. its bit urgent.
Immediate response will be apprecited.
Regards,
Ranjan
01-18-2008 6:28 AM
01-18-2008 9:20 AM
Hi ,
I have gone through the link. I have done the below part in my coding even though when i double click on the node, the event node_double_click is not getting triggered. Kindly suggest me what i have missed.
1) Register event with tree instance:
Register event for NODE_DOUBLE_CLICK
l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
APPEND l_event TO lt_events.
(2) Set handler for event:
SET HANDLER l_event_receiver->handle_node_double_click FOR tree1
(3) Define and implement event handler method:
METHODS handle_node_double_click
FOR EVENT node_double_click OF cl_gui_alv_tree
IMPORTING node_key.
ENDCLASS. "lcl_tree_event_receiver DEFINITION
-
CLASS lcl_tree_event_receiver IMPLEMENTATION
-
*
-
CLASS lcl_tree_event_receiver IMPLEMENTATION.
METHOD handle_node_double_click.
break-point.
ENDMETHOD. "handle_node_double_click
Regards,
Ranjan
01-18-2008 12:57 PM
Hi,
Try to use this method call after you create the event table in step 1.
CALL METHOD g_tree->set_registered_events
EXPORTING
events = events.
g_tree is ref to the tree class.
01-18-2008 1:23 PM
Hi,
Refer to the sample program SAPSIMPLE_TREE_CONTROL_DEMO.
Regards,
Renjith Michael.