alv tree checbox problem when attempt to get the selected checjboxes
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:
gs_fieldcat-col_pos = 10.
gs_fieldcat-reptext = 'Bo.Ejecutivo'.
gs_fieldcat-scrtext_s = 'Bo.Ejecutivo'.
gs_fieldcat-fieldname = 'CHECK'.
gs_fieldcat-tabname = 'IT_FINAL'.
gs_fieldcat-checkbox = 'X'.
gs_fieldcat-edit = 'X'.
gS_FIELDCAT-COL_OPT = 'X'.
gs_fieldcat-outputlen = '5'.
APPEND gs_fieldcat TO gt_fieldcat_tree.
When I call method
CALL METHOD g_alv_tree->get_selected_nodes
ct_selected_nodes = lt_selected_node.
CALL METHOD g_alv_tree->get_outtab_line
i_node_key = l_selected_node
e_outtab_line = wa_finalop.
APPEND wa_finalop TO it_finalop.
it returns an empty checkboxfield even if some of the checkbox were checked.
i have read an example and i add the following code but still not works.
DATA: tree_event_receiver TYPE REF TO lcl_eventhandler,
lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event.
CREATE OBJECT tree_event_receiver.
l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
APPEND l_event TO lt_events.
CALL METHOD g_alv_tree->set_registered_events
events = lt_events
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
tree_event_receiver->handle_checkbox_change for g_alv_tree.
what should i do?