11-17-2009 12:55 AM
how to achieve this requierment: build and drag and drop tree in witch each children have a different structure?
i mean:
node1
child1 (with struct 1)
child2 (with struct 2)
child3 (with struct 3)
node2
child1 (with struct 1)
child2 (with struct 2)
child3 (with struct 3)
...
on double clik you have the alv.
i tried by studing from bcalv_* report but none is matching with children with different structure...any idea?
11-17-2009 11:48 PM
i have almost solve the isssue by using this perform:
FORM display_proc USING p_node_key TYPE lvc_nkey.
DATA:lt_children TYPE lvc_t_nkey WITH HEADER LINE,
ls_ztrace TYPE tb_processo1,
ls_ztrace2 TYPE tb_processo2,
ls_ztrace3 TYPE tb_processo3.
FIELD-SYMBOLS <f> TYPE ANY.
...
READ TABLE itb_nodes WITH KEY node = p_node_key.
IF itb_nodes-proc = 1.
ASSIGN ls_ztrace TO <f>.
ELSEIF itb_nodes-proc = 2.
...
CALL METHOD tree1->get_outtab_line
EXPORTING i_node_key = p_node_key
IMPORTING e_outtab_line = <f>.
and i manage the method on double click on the node (the output)
MODULE alv_display OUTPUT.
IF g_custom_container IS INITIAL.
* create container for ALV grid
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'RASN_CONTAINER'.
ENDIF.
and
CALL METHOD grid->set_frontend_layout
EXPORTING is_layout = gs_layout_alv.
* CALL METHOD grid->refresh_table_display.
IF v_proc1 = '2'.
CALL METHOD grid->set_table_for_first_display
EXPORTING
i_structure_name = 'TB_PROCESSO1'
is_layout = gs_layout_alv
CHANGING it_sort = gt_sort_grid[]
it_outtab = itb_proc2[]
it_fieldcatalog = gt_fieldcat_lvc2[].
CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid.
CALL METHOD cl_gui_cfw=>flush.
ELSEIF v_proc1 = '3'.
1)i think there is an easier way to manage the the v_proc1 values (and fieldcat), but witch one?
2) how to use the CALL METHOD grid->refresh_table_display?
thanks for your help...
12-02-2009 1:18 AM