Skip to Content
Former Member
Dec 06, 2004 at 04:00 PM

ALV TREE-Checkbox


Hello folks,

After having built the tree, I am trying to set the checkbox to 'X' (i.e. marked) via the ABAP-program (not from screen), unfortunately to no avail.

The used technique is the checkbox-functionality, which is controlled by structure LVC_S_LACI and not by the field catalogue.

For example:

data: ls_layout_item type lvc_s_laci,

  • fill checkbox data

clear ls_layout_item.

ls_layout_item-fieldname = 'CHECKBOX'.

ls_layout_item-class = cl_gui_column_tree=>item_class_checkbox.

ls_layout_item-editable = 'X'.

ls_layout_item-u_class = 'X'.

ls_layout_item-u_editable = 'X'.

append ls_layout_item to lt_layout_item.

  • add node with checkbox

call method p_tree->add_node


i_relat_node_key = l_connid_key

i_relationship = cl_gui_column_tree=>relat_last_child

is_outtab_line = ls_outtab

i_node_text = l_node_text

is_node_layout = l_layout_leaf

it_item_layout = lt_layout_item.

When adding a node I can set the checkbox to marked by setting field 'CHOSEN' of structure 'LVC_S_LACI' to 'X'. But I have not yet succeeded to set the checkbox of an existing node to 'X'.

  • First try:

I set the checkbox to X and called method 'UPDATE_NODE' . As a result I got an X right to the checkbox, which inself remained unmarked.

  • Second try:

I filled the interface table ' IT_ITEM_LAYOUT' with data, set field 'CHOOSEN' to 'X' and called method 'CHANGE_ITEM'. But this does not work either.

I would be very happy if someone could help me in this matter.

Fouad Sebbane