Code: Alles auswählen.
FORM add_complete_line USING ps_sflight TYPE sflight
p_relat_key TYPE lvc_nkey
CHANGING p_node_key TYPE lvc_nkey.
DATA: l_node_text TYPE lvc_value.
STATICS current_color TYPE i.
WRITE ps_sflight-fldate TO l_node_text MM/DD/YYYY.
IF current_color = alv_style_color_int_group.
current_color = alv_style_color_int_heading.
ELSE.
current_color = alv_style_color_int_group.
ENDIF.
DATA(lt_items) = VALUE lvc_t_layi(
( fieldname = 'PRICE' style = current_color )
( fieldname = 'CURRENCY' style = current_color )
( fieldname = 'FLDATE' style = current_color )
( fieldname = 'PLANETYPE' style = current_color )
).
CALL METHOD g_alv_tree->add_node
EXPORTING
i_relat_node_key = p_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = ps_sflight
i_node_text = l_node_text
it_item_layout = lt_items
IMPORTING
e_new_node_key = p_node_key.
ENDFORM. " add_complete_line