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.
Showing results for 
Search instead for 
Did you mean: 

Problem in calling event ITEM_DOUBLE_CLICK in CL_GUI_ALV TREE Programming

Former Member
0 Kudos

Hello All,

Please help me in solving this problem.

I have created a ALV Tree Reporting with 3 hierarchy levels. Now in hierarchy level 2 and 3 i have few icons and when i click that icon i need to call SAP Transactions. For this i used event ITEM_DOUBLE_CLICK. This item is not getting triggered when i double click on this icons. Instead if i call Event NODE_DOUBLE_CLICK the event gets triggered. I am not sure why event ITEM_DOUBLE_CLICK is not getting triggered. Nothing wrong in calling the events because NODE_DOUBLE_CLICK is working fine. Please give me solution how to call ITEM_DOUBLE_CLICK.

DO we have any specific way of adding this node to tree? because i guess its considering all the lines as node so Node_double_click is getting trigered. I need to use ITEM_DOUBLE_CLICK because only in this event i can capture the field name so that i can check the field name and call the transaction for that particular field alone.

Please give me some solution for this.

Right solution will be rewarded with points.

Thanks & Regards



0 Kudos

Hello Satty,

I'm using event ITEM_DOUBLE_CLICK in some of my programs ,

I activate this event with this code :


lt_event TYPE cntl_simple_events,

lw_event TYPE cntl_simple_event.

lw_event-eventid =


APPEND lw_event TO lt_event.

CALL METHOD g_tree->set_registered_events


events = lt_event


cntl_error = 1

cntl_system_error = 2

illegal_event_combination = 3.

IF sy-subrc <> 0.



SET HANDLER me->event_item_double_click FOR g_tree.

This event being triggered when I double click any of fields but only on the bottom level lines ,

I mean it will work only level 3 lines of your tree.

Could you make it work up to this point?

As far as I concerned you want to use this event for level 2 too,

than I've debugged internal codes of class CL_GUI_ALV_TREE a little for you,

it could be triggered on upper lines if you add a field catalog line with field name '&Hierarchy',

but it works only if user clicks on hierarchy column on a level 2 line. Just try..

Maybe it will solve your problem.

Let me know if you encounter any of problems.


Edited by: Bulent Balci on Jul 25, 2010 10:55 PM

Former Member
0 Kudos

Hello Balci,

Thank you very much for your inputs. I have done the same way that you have mentioned. The only mistake i made is i didnt activate item_selection export parameter in the method of Tree. I have checked it to X and now the item double click is working fine.

Once again thanks for spending time on this.

Thanks & Regards