SAP RSAR_HIERARCHY_GET Function Module for Provides information about a hierarchy InfoSource









RSAR_HIERARCHY_GET is a standard rsar hierarchy get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Provides information about a hierarchy InfoSource 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 rsar hierarchy get FM, simply by entering the name RSAR_HIERARCHY_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSAC
Program Name: SAPLRSAC
Main Program: SAPLRSAC
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSAR_HIERARCHY_GET 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 'RSAR_HIERARCHY_GET'"Provides information about a hierarchy InfoSource
EXPORTING
* I_LANGU = SY-LANGU "
I_HIEID = "ID of the Hierarchy
* I_NO_AUTHORITY = ' ' "Boolean

IMPORTING
E_S_HIERARCHY = "
E_T_TSFIELD = "Fields of the transfer structure
E_T_TSFIELDTXT = "fields in transfer structure with texts

EXCEPTIONS
NOT_FOUND = 1 UNAUTHORIZED = 2 UNKNOWN_ISOURCE = 3 TRANSTRUCTURE_HIER_FILL = 4
.



IMPORTING Parameters details for RSAR_HIERARCHY_GET

I_LANGU -

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

I_HIEID - ID of the Hierarchy

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

I_NO_AUTHORITY - Boolean

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

EXPORTING Parameters details for RSAR_HIERARCHY_GET

E_S_HIERARCHY -

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

E_T_TSFIELD - Fields of the transfer structure

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

E_T_TSFIELDTXT - fields in transfer structure with texts

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

EXCEPTIONS details

NOT_FOUND - No transfer structure available

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

UNAUTHORIZED - No Authorization

Data type:
Optional: No
Call by Reference: Yes

UNKNOWN_ISOURCE - Master data InfoSource does not exist

Data type:
Optional: No
Call by Reference: Yes

TRANSTRUCTURE_HIER_FILL - Failed to populate the hierarchy

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSAR_HIERARCHY_GET 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_i_langu  TYPE SY-LANGU, "   SY-LANGU
lv_not_found  TYPE SY, "   
lv_e_s_hierarchy  TYPE RSARC_S_RSOSOHIE, "   
lv_i_hieid  TYPE RSOSOHIE-HIEID, "   
lv_e_t_tsfield  TYPE RSARC_T_RSFIELD, "   
lv_unauthorized  TYPE RSARC_T_RSFIELD, "   
lv_e_t_tsfieldtxt  TYPE RSARC_T_RSFIELDTXT, "   
lv_i_no_authority  TYPE RS_BOOL, "   SPACE
lv_unknown_isource  TYPE RS_BOOL, "   
lv_transtructure_hier_fill  TYPE RS_BOOL. "   

  CALL FUNCTION 'RSAR_HIERARCHY_GET'  "Provides information about a hierarchy InfoSource
    EXPORTING
         I_LANGU = lv_i_langu
         I_HIEID = lv_i_hieid
         I_NO_AUTHORITY = lv_i_no_authority
    IMPORTING
         E_S_HIERARCHY = lv_e_s_hierarchy
         E_T_TSFIELD = lv_e_t_tsfield
         E_T_TSFIELDTXT = lv_e_t_tsfieldtxt
    EXCEPTIONS
        NOT_FOUND = 1
        UNAUTHORIZED = 2
        UNKNOWN_ISOURCE = 3
        TRANSTRUCTURE_HIER_FILL = 4
. " RSAR_HIERARCHY_GET




ABAP code using 7.40 inline data declarations to call FM RSAR_HIERARCHY_GET

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 LANGU FROM SY INTO @DATA(ld_i_langu).
DATA(ld_i_langu) = SY-LANGU.
 
 
 
"SELECT single HIEID FROM RSOSOHIE INTO @DATA(ld_i_hieid).
 
 
 
 
DATA(ld_i_no_authority) = ' '.
 
 
 


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!