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: 

Handle a Pushbutton in ALV TREE

Former Member
0 Kudos

Hi,

In my current program , i have add a pushbutton in each line of the tree,

Can Anyone help me how to handle this pushbutton in alv tree to call a transaction with the appropriate parameters.

Thanks a lot .

Regards,

Tarak

1 REPLY 1

uwe_schieferstein
Active Contributor
0 Kudos

Hello Tarak

Three steps are required to handle this event:

(1) Define event handler method for BUTTON_CLICK of CL_GUI_ALV_TREE
(2) Register event at ALV tree (method SET_REGISTERED_EVENTS): use CL_GUI_COLUMN_TREE=>EVENTID_BUTTON_CLICK
(3) Set handler for event, e.g.: SET HANDLER lcl_eventhandler=>handle_button_click FOR go_tree

All details of these steps are well documented in sample report BCALV_TREE_DEMO.

Sample report ZUS_SDN_ALV_TREE_DEMO (thread ) shows you a simple trick how to link the node key with the record in the output itab.

Regards

Uwe