SAP RH_STRUC_GET_MULTIPLE_ROOTS Function Module for









RH_STRUC_GET_MULTIPLE_ROOTS is a standard rh struc get multiple roots 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 rh struc get multiple roots FM, simply by entering the name RH_STRUC_GET_MULTIPLE_ROOTS into the relevant SAP transaction such as SE37 or SE38.

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



Function RH_STRUC_GET_MULTIPLE_ROOTS 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 'RH_STRUC_GET_MULTIPLE_ROOTS'"
EXPORTING
ACT_WEGID = "Evaluation Path
* ACT_SFLAG = 'X' "
* ACT_RECURS = 'X' "
* ACT_TEXT_BUFFER_FILL = 'X' "
* AUTHORITY_CHECK = 'X' "
* BUFFER_MODE = ' ' "
* KEEP_ORDER = "
* ACT_INT_FLAG = "
* ACT_PLVAR = ' ' "Plan Version
* ACT_SVECT = '1' "Status Vector
* ACT_BEGDA = SY-DATUM "Start Date
* ACT_ENDDA = SY-DATUM "End Date
* ACT_TDEPTH = 0 "Technical depth of structure
* ACT_TFLAG = 'X' "
* ACT_VFLAG = 'X' "

IMPORTING
ACT_PLVAR = "Plan Version
ROOT_COPY = "General Structure Description

TABLES
ROOT_OBJECTS = "
* RESULT_OBJEC = "
* RESULT_STRUC = "

EXCEPTIONS
NO_PLVAR_FOUND = 1 NO_ENTRY_FOUND = 2 PATH_NOT_FOUND = 3 ROOT_NOT_FOUND = 4
.



IMPORTING Parameters details for RH_STRUC_GET_MULTIPLE_ROOTS

ACT_WEGID - Evaluation Path

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

ACT_SFLAG -

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

ACT_RECURS -

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

ACT_TEXT_BUFFER_FILL -

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

AUTHORITY_CHECK -

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

BUFFER_MODE -

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

KEEP_ORDER -

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

ACT_INT_FLAG -

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

ACT_PLVAR - Plan Version

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

ACT_SVECT - Status Vector

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

ACT_BEGDA - Start Date

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

ACT_ENDDA - End Date

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

ACT_TDEPTH - Technical depth of structure

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

ACT_TFLAG -

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

ACT_VFLAG -

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

EXPORTING Parameters details for RH_STRUC_GET_MULTIPLE_ROOTS

ACT_PLVAR - Plan Version

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

ROOT_COPY - General Structure Description

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

TABLES Parameters details for RH_STRUC_GET_MULTIPLE_ROOTS

ROOT_OBJECTS -

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

RESULT_OBJEC -

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

RESULT_STRUC -

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

EXCEPTIONS details

NO_PLVAR_FOUND - No active plan version exists

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

NO_ENTRY_FOUND - No agent found

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

PATH_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

ROOT_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RH_STRUC_GET_MULTIPLE_ROOTS 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_act_plvar  TYPE OBJEC-PLVAR, "   
lv_act_wegid  TYPE GDSTR-WEGID, "   
lt_root_objects  TYPE STANDARD TABLE OF HRROOTOB, "   
lv_no_plvar_found  TYPE HRROOTOB, "   
lv_act_sflag  TYPE HRRHAS-SFLAG, "   'X'
lv_act_recurs  TYPE HRRHAS-RECURS, "   'X'
lv_act_text_buffer_fill  TYPE FLAG, "   'X'
lv_authority_check  TYPE HRRHAS-AUTHY, "   'X'
lv_buffer_mode  TYPE FLAG, "   SPACE
lv_keep_order  TYPE FLAG, "   
lv_root_copy  TYPE GDSTR, "   
lv_act_int_flag  TYPE HRRHAS-77AW_INT, "   
lt_result_objec  TYPE STANDARD TABLE OF OBJEC, "   
lv_no_entry_found  TYPE OBJEC, "   
lv_act_plvar  TYPE OBJEC-PLVAR, "   SPACE
lt_result_struc  TYPE STANDARD TABLE OF STRUC, "   
lv_path_not_found  TYPE STRUC, "   
lv_act_svect  TYPE SVECT, "   '1'
lv_root_not_found  TYPE SVECT, "   
lv_act_begda  TYPE OBJEC-BEGDA, "   SY-DATUM
lv_act_endda  TYPE OBJEC-ENDDA, "   SY-DATUM
lv_act_tdepth  TYPE HRRHAS-TDEPTH, "   0
lv_act_tflag  TYPE HRRHAS-TFLAG, "   'X'
lv_act_vflag  TYPE HRRHAS-VFLAG. "   'X'

  CALL FUNCTION 'RH_STRUC_GET_MULTIPLE_ROOTS'  "
    EXPORTING
         ACT_WEGID = lv_act_wegid
         ACT_SFLAG = lv_act_sflag
         ACT_RECURS = lv_act_recurs
         ACT_TEXT_BUFFER_FILL = lv_act_text_buffer_fill
         AUTHORITY_CHECK = lv_authority_check
         BUFFER_MODE = lv_buffer_mode
         KEEP_ORDER = lv_keep_order
         ACT_INT_FLAG = lv_act_int_flag
         ACT_PLVAR = lv_act_plvar
         ACT_SVECT = lv_act_svect
         ACT_BEGDA = lv_act_begda
         ACT_ENDDA = lv_act_endda
         ACT_TDEPTH = lv_act_tdepth
         ACT_TFLAG = lv_act_tflag
         ACT_VFLAG = lv_act_vflag
    IMPORTING
         ACT_PLVAR = lv_act_plvar
         ROOT_COPY = lv_root_copy
    TABLES
         ROOT_OBJECTS = lt_root_objects
         RESULT_OBJEC = lt_result_objec
         RESULT_STRUC = lt_result_struc
    EXCEPTIONS
        NO_PLVAR_FOUND = 1
        NO_ENTRY_FOUND = 2
        PATH_NOT_FOUND = 3
        ROOT_NOT_FOUND = 4
. " RH_STRUC_GET_MULTIPLE_ROOTS




ABAP code using 7.40 inline data declarations to call FM RH_STRUC_GET_MULTIPLE_ROOTS

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 PLVAR FROM OBJEC INTO @DATA(ld_act_plvar).
 
"SELECT single WEGID FROM GDSTR INTO @DATA(ld_act_wegid).
 
 
 
"SELECT single SFLAG FROM HRRHAS INTO @DATA(ld_act_sflag).
DATA(ld_act_sflag) = 'X'.
 
"SELECT single RECURS FROM HRRHAS INTO @DATA(ld_act_recurs).
DATA(ld_act_recurs) = 'X'.
 
DATA(ld_act_text_buffer_fill) = 'X'.
 
"SELECT single AUTHY FROM HRRHAS INTO @DATA(ld_authority_check).
DATA(ld_authority_check) = 'X'.
 
DATA(ld_buffer_mode) = ' '.
 
 
 
"SELECT single 77AW_INT FROM HRRHAS INTO @DATA(ld_act_int_flag).
 
 
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar).
DATA(ld_act_plvar) = ' '.
 
 
 
DATA(ld_act_svect) = '1'.
 
 
"SELECT single BEGDA FROM OBJEC INTO @DATA(ld_act_begda).
DATA(ld_act_begda) = SY-DATUM.
 
"SELECT single ENDDA FROM OBJEC INTO @DATA(ld_act_endda).
DATA(ld_act_endda) = SY-DATUM.
 
"SELECT single TDEPTH FROM HRRHAS INTO @DATA(ld_act_tdepth).
 
"SELECT single TFLAG FROM HRRHAS INTO @DATA(ld_act_tflag).
DATA(ld_act_tflag) = 'X'.
 
"SELECT single VFLAG FROM HRRHAS INTO @DATA(ld_act_vflag).
DATA(ld_act_vflag) = 'X'.
 


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!