ich habe mir einen ALV-Tree (Klasse CL_GUI_ALV_TREE) gebaut. Dieser zeigt mir aber nur den Root-Knoten an. Die Kinder des Knoten werden nicht angezeigt.
Die Kinder-Knoten bekommen auch als relat_node_key den new_node_key des Root-Knoten.
- Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
- *--- Root-Knoten
- CALL METHOD gr_tree->add_node
- EXPORTING
- i_relat_node_key = lv_node_key
- i_relationship = cl_gui_column_tree=>relat_last_child
- is_outtab_line = ls_line
- is_node_layout = ls_node_layout
- * it_item_layout =
- i_node_text = lv_node_text
- IMPORTING
- e_new_node_key = lv_root_key
- EXCEPTIONS
- relat_node_not_found = 1
- node_not_found = 2
- OTHERS = 3
- .
- * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
- * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
- CLEAR ls_node_layout.
- CLEAR lv_node_text.
- *--- Angezeigter Text
- <ls_sel>-key2 gc_nodekey_separator
- <ls_sel>-key3
- INTO lv_node_text
- SEPARATED BY space.
- ls_node_layout-n_image = '@EQ@'.
- ls_node_layout-exp_image = '@EQ@'.
- CALL METHOD gr_tree->add_node
- EXPORTING
- i_relat_node_key = lv_root_key
- i_relationship = cl_gui_column_tree=>relat_last_child
- is_outtab_line = <ls_sel>
- is_node_layout = ls_node_layout
- * it_item_layout =
- i_node_text = lv_node_text
- * IMPORTING
- * e_new_node_key =
- EXCEPTIONS
- relat_node_not_found = 1
- node_not_found = 2
- others = 3
- .
- * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
- * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
- *--- Frontend aktualisieren.
- CALL METHOD gr_tree->frontend_update.
- GeSHi ©