SAP RSTH_HIERARCHY_INIT Function Module for NOTRANSL: BRST allg. Baustein zur Verwaltung der Hierarchieselektion in de









RSTH_HIERARCHY_INIT is a standard rsth hierarchy init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: BRST allg. Baustein zur Verwaltung der Hierarchieselektion in de 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 rsth hierarchy init FM, simply by entering the name RSTH_HIERARCHY_INIT into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSTH
Program Name: SAPLRSTH
Main Program: SAPLRSTH
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSTH_HIERARCHY_INIT 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 'RSTH_HIERARCHY_INIT'"NOTRANSL: BRST allg. Baustein zur Verwaltung der Hierarchieselektion in de
EXPORTING
* FBNAM = ' ' "Name of function module to be called
I_RSTHVKEY = "Field string for selection (all applications)
* I_SEL = ' ' "Field string for selection (appl.-spec. part)
* OP_MODE = '0' "Mode (new selection, addition etc.)
* REQUESTER = ' ' "Name of requester of hierarchy
* SELLEVEL = ' ' "Selection level
* SELMODE = ' ' "Selection mode
* COMPOUND = ' ' "Flag for whether rsthie name is expected in brackets
* WITH_TEXTS = ' ' "Flag for whether rsttxt is expected filled

TABLES
* I_RSTHIE = "Internal hierarchy table
* I_RSTINT = "Internal table for value intervals for RSTHIE
* I_RSTTYP = "Internal table for assignment of type in RSTHIE
* I_RSTTXT = "Internal text table for nodes
* I_RSTADD = "Internal table with additional fields for RSTHIE

EXCEPTIONS
FM_NOT_EXIST = 1
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLRSTH_001 Deliver Hierarchy Information
EXIT_SAPLRSTH_002 User-defined Hierarchies

IMPORTING Parameters details for RSTH_HIERARCHY_INIT

FBNAM - Name of function module to be called

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

I_RSTHVKEY - Field string for selection (all applications)

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

I_SEL - Field string for selection (appl.-spec. part)

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

OP_MODE - Mode (new selection, addition etc.)

Data type: RSTHDIVERS-OP_MODE
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

REQUESTER - Name of requester of hierarchy

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

SELLEVEL - Selection level

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

SELMODE - Selection mode

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

COMPOUND - Flag for whether rsthie name is expected in brackets

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

WITH_TEXTS - Flag for whether rsttxt is expected filled

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

TABLES Parameters details for RSTH_HIERARCHY_INIT

I_RSTHIE - Internal hierarchy table

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

I_RSTINT - Internal table for value intervals for RSTHIE

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

I_RSTTYP - Internal table for assignment of type in RSTHIE

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

I_RSTTXT - Internal text table for nodes

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

I_RSTADD - Internal table with additional fields for RSTHIE

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

EXCEPTIONS details

FM_NOT_EXIST -

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

Copy and paste ABAP code example for RSTH_HIERARCHY_INIT 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_fbnam  TYPE RS38L-NAME, "   SPACE
lt_i_rsthie  TYPE STANDARD TABLE OF RSTHIE, "   
lv_fm_not_exist  TYPE RSTHIE, "   
lt_i_rstint  TYPE STANDARD TABLE OF RSTINT, "   
lv_i_rsthvkey  TYPE RSTHVKEY, "   
lv_i_sel  TYPE RSTHVKEY, "   SPACE
lt_i_rsttyp  TYPE STANDARD TABLE OF RSTTYP, "   
lv_op_mode  TYPE RSTHDIVERS-OP_MODE, "   '0'
lt_i_rsttxt  TYPE STANDARD TABLE OF RSTTXT, "   
lt_i_rstadd  TYPE STANDARD TABLE OF RSTADD, "   
lv_requester  TYPE RSTHDIVERS-REQUESTER, "   SPACE
lv_sellevel  TYPE CLIKE, "   SPACE
lv_selmode  TYPE RSTHDIVERS-SELMODE, "   SPACE
lv_compound  TYPE RSTHDIVERS-COMPOUND, "   SPACE
lv_with_texts  TYPE FLAG. "   SPACE

  CALL FUNCTION 'RSTH_HIERARCHY_INIT'  "NOTRANSL: BRST allg. Baustein zur Verwaltung der Hierarchieselektion in de
    EXPORTING
         FBNAM = lv_fbnam
         I_RSTHVKEY = lv_i_rsthvkey
         I_SEL = lv_i_sel
         OP_MODE = lv_op_mode
         REQUESTER = lv_requester
         SELLEVEL = lv_sellevel
         SELMODE = lv_selmode
         COMPOUND = lv_compound
         WITH_TEXTS = lv_with_texts
    TABLES
         I_RSTHIE = lt_i_rsthie
         I_RSTINT = lt_i_rstint
         I_RSTTYP = lt_i_rsttyp
         I_RSTTXT = lt_i_rsttxt
         I_RSTADD = lt_i_rstadd
    EXCEPTIONS
        FM_NOT_EXIST = 1
. " RSTH_HIERARCHY_INIT




ABAP code using 7.40 inline data declarations to call FM RSTH_HIERARCHY_INIT

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 NAME FROM RS38L INTO @DATA(ld_fbnam).
DATA(ld_fbnam) = ' '.
 
 
 
 
 
DATA(ld_i_sel) = ' '.
 
 
"SELECT single OP_MODE FROM RSTHDIVERS INTO @DATA(ld_op_mode).
DATA(ld_op_mode) = '0'.
 
 
 
"SELECT single REQUESTER FROM RSTHDIVERS INTO @DATA(ld_requester).
DATA(ld_requester) = ' '.
 
DATA(ld_sellevel) = ' '.
 
"SELECT single SELMODE FROM RSTHDIVERS INTO @DATA(ld_selmode).
DATA(ld_selmode) = ' '.
 
"SELECT single COMPOUND FROM RSTHDIVERS INTO @DATA(ld_compound).
DATA(ld_compound) = ' '.
 
DATA(ld_with_texts) = ' '.
 


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!