SAP RSAR_HIERARCHY_GET_BY_NAME Function Module for Provides information about a hierarchy InfoSource









RSAR_HIERARCHY_GET_BY_NAME is a standard rsar hierarchy get by name 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 by name FM, simply by entering the name RSAR_HIERARCHY_GET_BY_NAME 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_BY_NAME 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_BY_NAME'"Provides information about a hierarchy InfoSource
EXPORTING
* I_LANGU = SY-LANGU "
I_OSOURCE = "
I_LOGSYS = "
I_OBJVERS = "
I_HIENM = "
I_HIEVERS = "
I_HIEDATETO = "
* I_HIECLASS = "
* I_WITHOUT_AUTHORITY = "Without authorization check

IMPORTING
E_S_HIERARCHY = "
E_S_OSOLTP = "Texts, information about InfoSource
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_BY_NAME

I_LANGU -

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

I_OSOURCE -

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

I_LOGSYS -

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

I_OBJVERS -

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

I_HIENM -

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

I_HIEVERS -

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

I_HIEDATETO -

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

I_HIECLASS -

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

I_WITHOUT_AUTHORITY - Without authorization check

Data type: RS_BOOL
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for RSAR_HIERARCHY_GET_BY_NAME

E_S_HIERARCHY -

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

E_S_OSOLTP - Texts, information about InfoSource

Data type: RSARC_S_RSOSOLTP
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 - InfoSource for hierarchy does not exist

Data type:
Optional: No
Call by Reference: Yes

TRANSTRUCTURE_HIER_FILL - Failed to determine the transfer structure for hierarchy

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSAR_HIERARCHY_GET_BY_NAME 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_osource  TYPE RSOSOHIE-OSOURCE, "   
lv_e_s_osoltp  TYPE RSARC_S_RSOSOLTP, "   
lv_unauthorized  TYPE RSARC_S_RSOSOLTP, "   
lv_i_logsys  TYPE RSOSOHIE-LOGSYS, "   
lv_e_t_tsfield  TYPE RSARC_T_RSFIELD, "   
lv_unknown_isource  TYPE RSARC_T_RSFIELD, "   
lv_i_objvers  TYPE RSOSOHIE-OBJVERS, "   
lv_e_t_tsfieldtxt  TYPE RSARC_T_RSFIELDTXT, "   
lv_transtructure_hier_fill  TYPE RSARC_T_RSFIELDTXT, "   
lv_i_hienm  TYPE RSOSOHIE-HIENM, "   
lv_i_hievers  TYPE RSOSOHIE-HIEVERS, "   
lv_i_hiedateto  TYPE RSOSOHIE-HIEDATETO, "   
lv_i_hieclass  TYPE RSOSOHIE-HIECLASS, "   
lv_i_without_authority  TYPE RS_BOOL. "   

  CALL FUNCTION 'RSAR_HIERARCHY_GET_BY_NAME'  "Provides information about a hierarchy InfoSource
    EXPORTING
         I_LANGU = lv_i_langu
         I_OSOURCE = lv_i_osource
         I_LOGSYS = lv_i_logsys
         I_OBJVERS = lv_i_objvers
         I_HIENM = lv_i_hienm
         I_HIEVERS = lv_i_hievers
         I_HIEDATETO = lv_i_hiedateto
         I_HIECLASS = lv_i_hieclass
         I_WITHOUT_AUTHORITY = lv_i_without_authority
    IMPORTING
         E_S_HIERARCHY = lv_e_s_hierarchy
         E_S_OSOLTP = lv_e_s_osoltp
         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_BY_NAME




ABAP code using 7.40 inline data declarations to call FM RSAR_HIERARCHY_GET_BY_NAME

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 OSOURCE FROM RSOSOHIE INTO @DATA(ld_i_osource).
 
 
 
"SELECT single LOGSYS FROM RSOSOHIE INTO @DATA(ld_i_logsys).
 
 
 
"SELECT single OBJVERS FROM RSOSOHIE INTO @DATA(ld_i_objvers).
 
 
 
"SELECT single HIENM FROM RSOSOHIE INTO @DATA(ld_i_hienm).
 
"SELECT single HIEVERS FROM RSOSOHIE INTO @DATA(ld_i_hievers).
 
"SELECT single HIEDATETO FROM RSOSOHIE INTO @DATA(ld_i_hiedateto).
 
"SELECT single HIECLASS FROM RSOSOHIE INTO @DATA(ld_i_hieclass).
 
 


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!