CA_TR_DISPLAY_TREE_STRUCTURE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name CA_TR_DISPLAY_TREE_STRUCTURE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CATR
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'CA_TR_DISPLAY_TREE_STRUCTURE' "Graphical display of tree structure with variable list blocks
EXPORTING
* checkboxes_left_justified = SPACE " hierarchy-checkbox Place all checkboxes on right-hand edge
* display_obj_types = SPACE " hierarchy-checkbox Show object types
* display_root_obj_type = SPACE " hierarchy-checkbox Show ROOT object type
* ending_column = '60' " End column for dialog box
* ending_row = '20' " End line for dialog box
* list_as_popup = SPACE " hierarchy-checkbox Show tree graphic as dialog box
list_id = " klah-class List name for variable lists
list_status = " sy-pfkey PF status to be set on list
list_title = " Title bar for list
* no_checkboxes = SPACE " hierarchy-checkbox Hide all checkboxes
* position_at_selected_line = SPACE " hierarchy-checkbox Place cursor on selected line
profile = " klah-class Profile for variable lists
* root_node_checkbox = SPACE " hierarchy-checkbox Show checkbox for root node
* root_node_checkbox_input_on = SPACE " hierarchy-input_on Checkbox available for entry for root node
root_node_list_block = " hierarchy-list_block List block for root node
root_node_obj_length = " hierarchy-obj_length Output length of ROOT_NODE_OBJ_TYPE
root_node_obj_type = " hierarchy-obj_type Object type of root node
root_node_value_id = " hierarchy-value_id Pointer to values table
root_parent = " hierarchy-parent Top superior object in hierarchy
* starting_column = '20' " First line of dialog box
* starting_row = '05' " First line of dialog box
* title_var_delimiter = '?' " tcis-delim Variable string for title line
* title_var_string = SPACE " message-msgtx Separator in variable string
IMPORTING
action = " sy-ucomm Function selected on tree structure
line_number = " sy-tabix Table line selected in tree structure
TABLES
selected_entries = " hierarchy Lines selected in tree structure
tree_structure = " hierarchy Structure of tree
value_table = " hier_block Values table
EXCEPTIONS
TREE_NOT_CONSISTENT = 1 " Tree structure not consistent
. " CA_TR_DISPLAY_TREE_STRUCTURE
The ABAP code below is a full code listing to execute function module CA_TR_DISPLAY_TREE_STRUCTURE including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| ld_action | TYPE SY-UCOMM , |
| ld_line_number | TYPE SY-TABIX , |
| it_selected_entries | TYPE STANDARD TABLE OF HIERARCHY,"TABLES PARAM |
| wa_selected_entries | LIKE LINE OF it_selected_entries , |
| it_tree_structure | TYPE STANDARD TABLE OF HIERARCHY,"TABLES PARAM |
| wa_tree_structure | LIKE LINE OF it_tree_structure , |
| it_value_table | TYPE STANDARD TABLE OF HIER_BLOCK,"TABLES PARAM |
| wa_value_table | LIKE LINE OF it_value_table . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_action | TYPE SY-UCOMM , |
| ld_checkboxes_left_justified | TYPE HIERARCHY-CHECKBOX , |
| it_selected_entries | TYPE STANDARD TABLE OF HIERARCHY , |
| wa_selected_entries | LIKE LINE OF it_selected_entries, |
| ld_line_number | TYPE SY-TABIX , |
| ld_display_obj_types | TYPE HIERARCHY-CHECKBOX , |
| it_tree_structure | TYPE STANDARD TABLE OF HIERARCHY , |
| wa_tree_structure | LIKE LINE OF it_tree_structure, |
| ld_display_root_obj_type | TYPE HIERARCHY-CHECKBOX , |
| it_value_table | TYPE STANDARD TABLE OF HIER_BLOCK , |
| wa_value_table | LIKE LINE OF it_value_table, |
| ld_ending_column | TYPE STRING , |
| ld_ending_row | TYPE STRING , |
| ld_list_as_popup | TYPE HIERARCHY-CHECKBOX , |
| ld_list_id | TYPE KLAH-CLASS , |
| ld_list_status | TYPE SY-PFKEY , |
| ld_list_title | TYPE STRING , |
| ld_no_checkboxes | TYPE HIERARCHY-CHECKBOX , |
| ld_position_at_selected_line | TYPE HIERARCHY-CHECKBOX , |
| ld_profile | TYPE KLAH-CLASS , |
| ld_root_node_checkbox | TYPE HIERARCHY-CHECKBOX , |
| ld_root_node_checkbox_input_on | TYPE HIERARCHY-INPUT_ON , |
| ld_root_node_list_block | TYPE HIERARCHY-LIST_BLOCK , |
| ld_root_node_obj_length | TYPE HIERARCHY-OBJ_LENGTH , |
| ld_root_node_obj_type | TYPE HIERARCHY-OBJ_TYPE , |
| ld_root_node_value_id | TYPE HIERARCHY-VALUE_ID , |
| ld_root_parent | TYPE HIERARCHY-PARENT , |
| ld_starting_column | TYPE STRING , |
| ld_starting_row | TYPE STRING , |
| ld_title_var_delimiter | TYPE TCIS-DELIM , |
| ld_title_var_string | TYPE MESSAGE-MSGTX . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CA_TR_DISPLAY_TREE_STRUCTURE or its description.