Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV-Tree Node click not working

Former Member
0 Kudos

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

4 REPLIES 4

Kanagaraja_L
Active Contributor
0 Kudos

Check the Forum

Kanagaraja L

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

Hi,

Refer to the sample program SAPSIMPLE_TREE_CONTROL_DEMO.

Regards,

Renjith Michael.