Type-pools : fibs,stree.
data : t_node type snodetext.
data : node_tab like t_node occurs 0 with header line.
clear : node_tab, node_tab[].
node_tab-type = 'T'.
node_tab-name = 'Earth'.
node_tab-tlevel = '01'.
node_tab-nlength = '5'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Europe'.
node_tab-tlevel = '02'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Germany'.
node_tab-tlevel = '03'.
node_tab-nlength = '7'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 4.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Berlin'.
node_tab-tlevel = '04'.
node_tab-nlength = '6'.
node_tab-color = '4'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Asia'.
node_tab-tlevel = '02'.
node_tab-nlength = '4'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'India'.
node_tab-tlevel = '03-'.
node_tab-nlength = '5'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
node_tab-type = 'P'.
node_tab-name = 'Bombay'.
node_tab-tlevel = '04-'.
node_tab-nlength = '6'.
node_tab-color = '1'.
node_tab-text = 'Hello'.
node_tab-tlength ='5'.
node_tab-tcolor = 3.
append node_tab.
clear node_tab.
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
NODETAB = node_tab .
DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
DATA: wa_type TYPE stree_ctl_type_mapping.
CLEAR: type_mapping[].
wa_type-type = 'A'.
wa_type-icon = '@BL@'.
APPEND wa_type TO type_mapping.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
USE_CONTROL = 'L'.
ALSO READ:
- Simple ALV Grid/List With Save Layout.
- Checkbox In ALV Program.
- ALV Header With Logo.
- Including Line After Subtotal In ALV Display.
..... Back To Index On ALV List/ Grid Display.
..... Back To MAIN INDEX.
Text interactive tree :) but nice
ReplyDeletethanks...
ReplyDeleteNice program