Skip to Content
0
Dec 18, 2005 at 02:11 PM

ALV tree get selected checkbox

2106 Views

Hi

I have an ALV report which uses cl_gui_alv_tree as display control.

In this report some items in hierarchy are marked as checkboxes with following code:

ls_item_layout-fieldname = '&Hierarchy'.

ls_item_layout-class = cl_gui_column_tree=>item_class_checkbox.

ls_item_layout-editable = 'X'.

APPEND ls_item_layout TO lt_item_layout.

CALL METHOD g_alv_tree->add_node

EXPORTING

i_relat_node_key = p_node_key2

i_relationship = cl_gui_column_tree=>relat_last_child

i_node_text = lv_node_text

is_outtab_line = ls_data

it_item_layout = lt_item_layout.

They apear in report as checkboxes but I cannot get their values in PAI module.

I need this to perform some operations after user clicks a button on application toolbar.

When I call method

CALL METHOD g_alv_tree->GET_CHECKED_ITEMS

IMPORTING ET_CHECKED_ITEMS = lt_nodes.

it returns an empty table even if some of items were checked.