SAP STREE_CONVERT_TREE_FORMAT Function Module for Puts texts and icons in the structure table









STREE_CONVERT_TREE_FORMAT is a standard stree convert tree format SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Puts texts and icons in the structure table processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for stree convert tree format FM, simply by entering the name STREE_CONVERT_TREE_FORMAT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SHI01
Program Name: SAPLSHI01
Main Program: SAPLSHI01
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function STREE_CONVERT_TREE_FORMAT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'STREE_CONVERT_TREE_FORMAT'"Puts texts and icons in the structure table
EXPORTING
* BROWSER_FUNCTION = ' ' "
* SAVE_FILTER = ' ' "
* DISPLAY_MODE = 'D' "Single-Character Flag
* ASSIGNMENT_DISPLAY_MODE = 'D' "
* LANGUAGE = SY-LANGU "SAP R/3 System, Current Language
* RFC_DESTINATION = 'NONE' "
* REUSE_NODE_IDS = ' ' "
* PARENT_NODE_KEY = ' ' "
* BROTHER_NODE_KEY = ' ' "
* COMMAND = ' ' "Screens, Function Code Triggered by PAI

IMPORTING
MESSAGE = "

TABLES
LIST_OF_NODES = "
LIST_OF_TEXTS = "
LIST_OF_REFERENCES = "
NODES = "
ITEMS = "
* OLD_NEW_NODE_KEY = "Hierarchy Tool: Link between new and old node_key
.



IMPORTING Parameters details for STREE_CONVERT_TREE_FORMAT

BROWSER_FUNCTION -

Data type: HIER_TYPES-CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SAVE_FILTER -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY_MODE - Single-Character Flag

Data type: HIER_TYPES-CHAR1
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ASSIGNMENT_DISPLAY_MODE -

Data type: HIER_TYPES-CHAR1
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - SAP R/3 System, Current Language

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

RFC_DESTINATION -

Data type: RFCDES-RFCDEST
Default: 'NONE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

REUSE_NODE_IDS -

Data type: HIER_TYPES-CHAR1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARENT_NODE_KEY -

Data type: TV_NODEKEY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

BROTHER_NODE_KEY -

Data type: TV_NODEKEY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMAND - Screens, Function Code Triggered by PAI

Data type: SY-UCOMM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for STREE_CONVERT_TREE_FORMAT

MESSAGE -

Data type: HIER_MESS
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for STREE_CONVERT_TREE_FORMAT

LIST_OF_NODES -

Data type: HIER_IFACE
Optional: No
Call by Reference: No ( called with pass by value option)

LIST_OF_TEXTS -

Data type: HIER_TEXTS
Optional: No
Call by Reference: No ( called with pass by value option)

LIST_OF_REFERENCES -

Data type: HIER_REF
Optional: No
Call by Reference: No ( called with pass by value option)

NODES -

Data type: TREEV_NODE
Optional: No
Call by Reference: No ( called with pass by value option)

ITEMS -

Data type: STREEITM
Optional: No
Call by Reference: No ( called with pass by value option)

OLD_NEW_NODE_KEY - Hierarchy Tool: Link between new and old node_key

Data type: HIER_LINK
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for STREE_CONVERT_TREE_FORMAT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_message  TYPE HIER_MESS, "   
lt_list_of_nodes  TYPE STANDARD TABLE OF HIER_IFACE, "   
lv_browser_function  TYPE HIER_TYPES-CHAR1, "   SPACE
lv_save_filter  TYPE C, "   SPACE
lv_display_mode  TYPE HIER_TYPES-CHAR1, "   'D'
lt_list_of_texts  TYPE STANDARD TABLE OF HIER_TEXTS, "   
lt_list_of_references  TYPE STANDARD TABLE OF HIER_REF, "   
lv_assignment_display_mode  TYPE HIER_TYPES-CHAR1, "   'D'
lt_nodes  TYPE STANDARD TABLE OF TREEV_NODE, "   
lv_language  TYPE SY-LANGU, "   SY-LANGU
lt_items  TYPE STANDARD TABLE OF STREEITM, "   
lv_rfc_destination  TYPE RFCDES-RFCDEST, "   'NONE'
lv_reuse_node_ids  TYPE HIER_TYPES-CHAR1, "   SPACE
lt_old_new_node_key  TYPE STANDARD TABLE OF HIER_LINK, "   
lv_parent_node_key  TYPE TV_NODEKEY, "   SPACE
lv_brother_node_key  TYPE TV_NODEKEY, "   SPACE
lv_command  TYPE SY-UCOMM. "   SPACE

  CALL FUNCTION 'STREE_CONVERT_TREE_FORMAT'  "Puts texts and icons in the structure table
    EXPORTING
         BROWSER_FUNCTION = lv_browser_function
         SAVE_FILTER = lv_save_filter
         DISPLAY_MODE = lv_display_mode
         ASSIGNMENT_DISPLAY_MODE = lv_assignment_display_mode
         LANGUAGE = lv_language
         RFC_DESTINATION = lv_rfc_destination
         REUSE_NODE_IDS = lv_reuse_node_ids
         PARENT_NODE_KEY = lv_parent_node_key
         BROTHER_NODE_KEY = lv_brother_node_key
         COMMAND = lv_command
    IMPORTING
         MESSAGE = lv_message
    TABLES
         LIST_OF_NODES = lt_list_of_nodes
         LIST_OF_TEXTS = lt_list_of_texts
         LIST_OF_REFERENCES = lt_list_of_references
         NODES = lt_nodes
         ITEMS = lt_items
         OLD_NEW_NODE_KEY = lt_old_new_node_key
. " STREE_CONVERT_TREE_FORMAT




ABAP code using 7.40 inline data declarations to call FM STREE_CONVERT_TREE_FORMAT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single CHAR1 FROM HIER_TYPES INTO @DATA(ld_browser_function).
DATA(ld_browser_function) = ' '.
 
DATA(ld_save_filter) = ' '.
 
"SELECT single CHAR1 FROM HIER_TYPES INTO @DATA(ld_display_mode).
DATA(ld_display_mode) = 'D'.
 
 
 
"SELECT single CHAR1 FROM HIER_TYPES INTO @DATA(ld_assignment_display_mode).
DATA(ld_assignment_display_mode) = 'D'.
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfc_destination).
DATA(ld_rfc_destination) = 'NONE'.
 
"SELECT single CHAR1 FROM HIER_TYPES INTO @DATA(ld_reuse_node_ids).
DATA(ld_reuse_node_ids) = ' '.
 
 
DATA(ld_parent_node_key) = ' '.
 
DATA(ld_brother_node_key) = ' '.
 
"SELECT single UCOMM FROM SY INTO @DATA(ld_command).
DATA(ld_command) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!