SAP SALR_MTE_GET_TREE Function Module for









SALR_MTE_GET_TREE is a standard salr mte get 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 salr mte get tree FM, simply by entering the name SALR_MTE_GET_TREE into the relevant SAP transaction such as SE37 or SE38.

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



Function SALR_MTE_GET_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 'SALR_MTE_GET_TREE'"
EXPORTING
TID = "
* MAX_LEVEL = 0 "Level of MTE in Tree
* VIS_ON_USER_LEVEL = 3 "

TABLES
SUB_TREE = "

EXCEPTIONS
TID_INVALID = 1 C_CALL_FAILED = 2 COMMUNICATION_ERROR = 3 INTERNAL_ERROR = 4 DB_ERROR = 5 UNKNOWN_ERROR = 6
.



IMPORTING Parameters details for SALR_MTE_GET_TREE

TID -

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

MAX_LEVEL - Level of MTE in Tree

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

VIS_ON_USER_LEVEL -

Data type: SALRPARAMS-VISUSRLEV
Default: 3
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SALR_MTE_GET_TREE

SUB_TREE -

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

EXCEPTIONS details

TID_INVALID -

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

C_CALL_FAILED -

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

COMMUNICATION_ERROR -

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

INTERNAL_ERROR -

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

DB_ERROR -

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

UNKNOWN_ERROR -

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

Copy and paste ABAP code example for SALR_MTE_GET_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_tid  TYPE ALGLOBTID, "   
lt_sub_tree  TYPE STANDARD TABLE OF ALMTTRE40B, "   
lv_tid_invalid  TYPE ALMTTRE40B, "   
lv_max_level  TYPE SALRPARAMS-MAXLEVEL, "   0
lv_c_call_failed  TYPE SALRPARAMS, "   
lv_vis_on_user_level  TYPE SALRPARAMS-VISUSRLEV, "   3
lv_communication_error  TYPE SALRPARAMS, "   
lv_internal_error  TYPE SALRPARAMS, "   
lv_db_error  TYPE SALRPARAMS, "   
lv_unknown_error  TYPE SALRPARAMS. "   

  CALL FUNCTION 'SALR_MTE_GET_TREE'  "
    EXPORTING
         TID = lv_tid
         MAX_LEVEL = lv_max_level
         VIS_ON_USER_LEVEL = lv_vis_on_user_level
    TABLES
         SUB_TREE = lt_sub_tree
    EXCEPTIONS
        TID_INVALID = 1
        C_CALL_FAILED = 2
        COMMUNICATION_ERROR = 3
        INTERNAL_ERROR = 4
        DB_ERROR = 5
        UNKNOWN_ERROR = 6
. " SALR_MTE_GET_TREE




ABAP code using 7.40 inline data declarations to call FM SALR_MTE_GET_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 MAXLEVEL FROM SALRPARAMS INTO @DATA(ld_max_level).
 
 
"SELECT single VISUSRLEV FROM SALRPARAMS INTO @DATA(ld_vis_on_user_level).
DATA(ld_vis_on_user_level) = 3.
 
 
 
 
 


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!