SAP OM_OOT_CREATE_TREE Function Module for









OM_OOT_CREATE_TREE is a standard om oot create tree SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 om oot create tree FM, simply by entering the name OM_OOT_CREATE_TREE into the relevant SAP transaction such as SE37 or SE38.

Function Group: OM_TREE
Program Name: SAPLOM_TREE
Main Program: SAPLOM_TREE
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function OM_OOT_CREATE_TREE 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 'OM_OOT_CREATE_TREE'"
EXPORTING
* VIRTUAL_ROOT = "
* BEGDA = SY-DATUM "
* ENDDA = '99991231' "
* KEY_DATE = "
* ALIGNMENT = 15 "
* PARENT = "
* ITEM_SELECTION = 'X' "
NODE_SELECTION_MODE = "
* HIDE_SELECTION = "
* TREE_TYPE = 'ORGS' "
* BUFFER_MODE = "
* PLVAR = "
* USE_STANDARD_DBL_CLICK = "
* USE_HEADER_CONTEXT_MENU = 'X' "
* ITEM_DOUBLE_CLICK = "
* CB_NODE_DOUBLE_CLICK = "
* CB_SET_DD_BEHAVIOUR = "
* CB_SET_NODE_STYLE = "Function Module Name
* HIERARCHY_OFFSET = 10 "
* DO_NOT_EXPAND = "General Flag
* USE_STANDARD_EXPAND_HANDLER = 'X' "
* ROOT_OTYPE = "
* ROOT_OBJID = "
* PATHID = "
* INT_PATH_FLAG = "
* TECH_DEPTH = 2 "
* MAX_DEPTH = 99999 "
* SVECT = '1' "

IMPORTING
HANDLE = "

CHANGING
* REGISTERED_EVENTS = "

TABLES
* ROOT_TAB = "
* COLUMN_HEADERS = "

EXCEPTIONS
ROOT_NOT_FOUND = 1 PATH_NOT_FOUND = 2
.



IMPORTING Parameters details for OM_OOT_CREATE_TREE

VIRTUAL_ROOT -

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

BEGDA -

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

ENDDA -

Data type: OBJEC-ENDDA
Default: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)

KEY_DATE -

Data type: OBJEC-BEGDA
Optional: Yes
Call by Reference: No ( called with pass by value option)

ALIGNMENT -

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

PARENT -

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

ITEM_SELECTION -

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

NODE_SELECTION_MODE -

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

HIDE_SELECTION -

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

TREE_TYPE -

Data type: HRARRAYTYP
Default: 'ORGS'
Optional: Yes
Call by Reference: No ( called with pass by value option)

BUFFER_MODE -

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

PLVAR -

Data type: OBJEC-PLVAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_STANDARD_DBL_CLICK -

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

USE_HEADER_CONTEXT_MENU -

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

ITEM_DOUBLE_CLICK -

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

CB_NODE_DOUBLE_CLICK -

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

CB_SET_DD_BEHAVIOUR -

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

CB_SET_NODE_STYLE - Function Module Name

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

HIERARCHY_OFFSET -

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

DO_NOT_EXPAND - General Flag

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

USE_STANDARD_EXPAND_HANDLER -

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

ROOT_OTYPE -

Data type: OBJEC-OTYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ROOT_OBJID -

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

PATHID -

Data type: GDSTR-WEGID
Optional: Yes
Call by Reference: No ( called with pass by value option)

INT_PATH_FLAG -

Data type: HRRHAS-77AW_INT
Optional: Yes
Call by Reference: No ( called with pass by value option)

TECH_DEPTH -

Data type: GDSTR-TDEPTH
Default: 2
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAX_DEPTH -

Data type: GDSTR-TDEPTH
Default: 99999
Optional: Yes
Call by Reference: No ( called with pass by value option)

SVECT -

Data type: GDSTR-SVECT
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for OM_OOT_CREATE_TREE

HANDLE -

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

CHANGING Parameters details for OM_OOT_CREATE_TREE

REGISTERED_EVENTS -

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

TABLES Parameters details for OM_OOT_CREATE_TREE

ROOT_TAB -

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

COLUMN_HEADERS -

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

EXCEPTIONS details

ROOT_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

PATH_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for OM_OOT_CREATE_TREE 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_handle  TYPE CL_GUI_COLUMN_TREE, "   
lt_root_tab  TYPE STANDARD TABLE OF HRROOTOB, "   
lv_virtual_root  TYPE OBJEC, "   
lv_root_not_found  TYPE OBJEC, "   
lv_registered_events  TYPE CNTL_SIMPLE_EVENTS, "   
lv_begda  TYPE OBJEC-BEGDA, "   SY-DATUM
lv_endda  TYPE OBJEC-ENDDA, "   '99991231'
lv_key_date  TYPE OBJEC-BEGDA, "   
lv_alignment  TYPE I, "   15
lv_parent  TYPE CL_GUI_CONTAINER, "   
lv_item_selection  TYPE C, "   'X'
lv_node_selection_mode  TYPE I, "   
lv_hide_selection  TYPE C, "   
lv_tree_type  TYPE HRARRAYTYP, "   'ORGS'
lv_buffer_mode  TYPE C, "   
lv_plvar  TYPE OBJEC-PLVAR, "   
lt_column_headers  TYPE STANDARD TABLE OF OMCOLHEAD, "   
lv_path_not_found  TYPE OMCOLHEAD, "   
lv_use_standard_dbl_click  TYPE C, "   
lv_use_header_context_menu  TYPE C, "   'X'
lv_item_double_click  TYPE FLAG, "   
lv_cb_node_double_click  TYPE RS38L_FNAM, "   
lv_cb_set_dd_behaviour  TYPE RS38L_FNAM, "   
lv_cb_set_node_style  TYPE RS38L_FNAM, "   
lv_hierarchy_offset  TYPE I, "   10
lv_do_not_expand  TYPE FLAG, "   
lv_use_standard_expand_handler  TYPE C, "   'X'
lv_root_otype  TYPE OBJEC-OTYPE, "   
lv_root_objid  TYPE OBJEC, "   
lv_pathid  TYPE GDSTR-WEGID, "   
lv_int_path_flag  TYPE HRRHAS-77AW_INT, "   
lv_tech_depth  TYPE GDSTR-TDEPTH, "   2
lv_max_depth  TYPE GDSTR-TDEPTH, "   99999
lv_svect  TYPE GDSTR-SVECT. "   '1'

  CALL FUNCTION 'OM_OOT_CREATE_TREE'  "
    EXPORTING
         VIRTUAL_ROOT = lv_virtual_root
         BEGDA = lv_begda
         ENDDA = lv_endda
         KEY_DATE = lv_key_date
         ALIGNMENT = lv_alignment
         PARENT = lv_parent
         ITEM_SELECTION = lv_item_selection
         NODE_SELECTION_MODE = lv_node_selection_mode
         HIDE_SELECTION = lv_hide_selection
         TREE_TYPE = lv_tree_type
         BUFFER_MODE = lv_buffer_mode
         PLVAR = lv_plvar
         USE_STANDARD_DBL_CLICK = lv_use_standard_dbl_click
         USE_HEADER_CONTEXT_MENU = lv_use_header_context_menu
         ITEM_DOUBLE_CLICK = lv_item_double_click
         CB_NODE_DOUBLE_CLICK = lv_cb_node_double_click
         CB_SET_DD_BEHAVIOUR = lv_cb_set_dd_behaviour
         CB_SET_NODE_STYLE = lv_cb_set_node_style
         HIERARCHY_OFFSET = lv_hierarchy_offset
         DO_NOT_EXPAND = lv_do_not_expand
         USE_STANDARD_EXPAND_HANDLER = lv_use_standard_expand_handler
         ROOT_OTYPE = lv_root_otype
         ROOT_OBJID = lv_root_objid
         PATHID = lv_pathid
         INT_PATH_FLAG = lv_int_path_flag
         TECH_DEPTH = lv_tech_depth
         MAX_DEPTH = lv_max_depth
         SVECT = lv_svect
    IMPORTING
         HANDLE = lv_handle
    CHANGING
         REGISTERED_EVENTS = lv_registered_events
    TABLES
         ROOT_TAB = lt_root_tab
         COLUMN_HEADERS = lt_column_headers
    EXCEPTIONS
        ROOT_NOT_FOUND = 1
        PATH_NOT_FOUND = 2
. " OM_OOT_CREATE_TREE




ABAP code using 7.40 inline data declarations to call FM OM_OOT_CREATE_TREE

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 BEGDA FROM OBJEC INTO @DATA(ld_begda).
DATA(ld_begda) = SY-DATUM.
 
"SELECT single ENDDA FROM OBJEC INTO @DATA(ld_endda).
DATA(ld_endda) = '99991231'.
 
"SELECT single BEGDA FROM OBJEC INTO @DATA(ld_key_date).
 
DATA(ld_alignment) = 15.
 
 
DATA(ld_item_selection) = 'X'.
 
 
 
DATA(ld_tree_type) = 'ORGS'.
 
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_plvar).
 
 
 
 
DATA(ld_use_header_context_menu) = 'X'.
 
 
 
 
 
DATA(ld_hierarchy_offset) = 10.
 
 
DATA(ld_use_standard_expand_handler) = 'X'.
 
"SELECT single OTYPE FROM OBJEC INTO @DATA(ld_root_otype).
 
 
"SELECT single WEGID FROM GDSTR INTO @DATA(ld_pathid).
 
"SELECT single 77AW_INT FROM HRRHAS INTO @DATA(ld_int_path_flag).
 
"SELECT single TDEPTH FROM GDSTR INTO @DATA(ld_tech_depth).
DATA(ld_tech_depth) = 2.
 
"SELECT single TDEPTH FROM GDSTR INTO @DATA(ld_max_depth).
DATA(ld_max_depth) = 99999.
 
"SELECT single SVECT FROM GDSTR INTO @DATA(ld_svect).
DATA(ld_svect) = '1'.
 


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!