Code: Alles auswählen.
FORM display_tree.
DATA: lt_nodes TYPE TABLE OF snodetext,
ls_node TYPE snodetext,
l_cprog LIKE sy-cprog,
ls_ag TYPE gy_ag,
ls_obj TYPE gy_object.
* Ebene 01 ist die Überschrift
CLEAR: ls_node.
ls_node-name = 'Massenpflege'.
ls_node-text = text-003.
ls_node-tlength = '12'.
ls_node-tcolor = '4'.
ls_node-tlevel = '01'.
APPEND ls_node TO lt_nodes.
BREAK-POINT.
* Ebene 02 ist der Name der Rolle
LOOP AT gt_agr INTO ls_ag.
CLEAR: ls_node.
ls_node-name = ls_ag-ag.
ls_node-text = ls_ag-ag.
ls_node-tlength = '30'.
ls_node-tcolor = '1'.
ls_node-tlevel = '02'.
LOOP AT gt_obj INTO ls_obj.
CLEAR: ls_node.
ls_node-name = ls_obj-object.
ls_node-tlevel = '03'.
ls_node-text = '@18@'.
ls_node-tlength = '4'.
ls_node-hotspot = 'X'.
ls_node-text1 = ls_obj-object.
ls_node-tlength1 = '10'.
ls_node-tcolor1 = '5'.
ls_node-tintensiv1 = ''.
APPEND ls_node TO lt_nodes.
ENDLOOP. " gt_obj.
APPEND ls_node TO lt_nodes.
ENDLOOP. " gt_agr
CALL FUNCTION 'RS_TREE_CONSTRUCT'
* EXPORTING
* INSERT_ID = '000000'
* RELATIONSHIP = ' '
* LOG =
TABLES
nodetab = lt_nodes
EXCEPTIONS
tree_failure = 1
id_not_found = 2
wrong_relationship = 3
OTHERS = 4.
SET PF-STATUS 'LD_TREE'.
l_cprog = sy-cprog.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
callback_program = l_cprog
callback_user_command = 'ON_UCOMM_TREE'.
* CALLBACK_TEXT_DISPLAY =
* CALLBACK_MOREINFO_DISPLAY =
* CALLBACK_COLOR_DISPLAY =
* CALLBACK_TOP_OF_PAGE =
* CALLBACK_GUI_STATUS =
* CALLBACK_CONTEXT_MENU =
* STATUS = 'IMPLICIT'
* CHECK_DUPLICATE_NAME = '1'
* COLOR_OF_NODE = '4'
* COLOR_OF_MARK = '3'
* COLOR_OF_LINK = '1'
* COLOR_OF_MATCH = '5'
* LOWER_CASE_SENSITIVE = ' '
* MODIFICATION_LOG = ' '
* NODE_LENGTH = 30
* TEXT_LENGTH = 75
* TEXT_LENGTH1 = 0
* TEXT_LENGTH2 = 0
* RETURN_MARKED_SUBTREE = ' '
* SCREEN_START_COLUMN = 0
* SCREEN_START_LINE = 0
* SCREEN_END_COLUMN = 0
* SCREEN_END_LINE = 0
* SUPPRESS_NODE_OUTPUT = ' '
* LAYOUT_MODE = ' '
* USE_CONTROL = STREE_USE_LIST
* IMPORTING
* F15 =
ENDFORM. " display_tree
Code: Alles auswählen.
DATA:
* Tabelle mit allen selektierten Daten
gt_agr TYPE gyt_ag,
gt_obj TYPE gyt_object,
gt_fld TYPE gyt_field,
gt_val TYPE gyt_value.