SAP RSSH_HIERARCHY_READ Function Module for OBSOLETE FUNCTION Read Hierarchy, Transfer Sorted by Hierarchy









RSSH_HIERARCHY_READ is a standard rssh hierarchy read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for OBSOLETE FUNCTION Read Hierarchy, Transfer Sorted by Hierarchy 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 rssh hierarchy read FM, simply by entering the name RSSH_HIERARCHY_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function RSSH_HIERARCHY_READ 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 'RSSH_HIERARCHY_READ'"OBSOLETE FUNCTION Read Hierarchy, Transfer Sorted by Hierarchy
EXPORTING
* I_RSHIEDIRKEY = "Technical Key of a Hierarchy
* I_RSHIEDIRLOG = "Logical Key Without Date
* I_DATE = SY-DATUM "Key Date

IMPORTING
E_RSHIEDIR = "Hierarchy Catalog
E_T_RSNODES = "Hierarchy Nodes, Sorted by Hierarchy
E_TH_RSINTERVAL = "Hierarchy Node Intervals
E_DUPLICATE_LEAFS = "Any duplicate leaves?
E_T_RSNODES_LNK = "Nodes Sorted with Expanded LINKS

EXCEPTIONS
INVALID_HIERARCHY = 1 NAME_ERROR = 2 IOBJ_NOT_FOUND = 3
.



IMPORTING Parameters details for RSSH_HIERARCHY_READ

I_RSHIEDIRKEY - Technical Key of a Hierarchy

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

I_RSHIEDIRLOG - Logical Key Without Date

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

I_DATE - Key Date

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

EXPORTING Parameters details for RSSH_HIERARCHY_READ

E_RSHIEDIR - Hierarchy Catalog

Data type: RSHI_S_HIEDIR
Optional: No
Call by Reference: Yes

E_T_RSNODES - Hierarchy Nodes, Sorted by Hierarchy

Data type: RSHI_T_HIENODE
Optional: No
Call by Reference: Yes

E_TH_RSINTERVAL - Hierarchy Node Intervals

Data type: RSHI_TH_INTERVAL
Optional: No
Call by Reference: Yes

E_DUPLICATE_LEAFS - Any duplicate leaves?

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

E_T_RSNODES_LNK - Nodes Sorted with Expanded LINKS

Data type: RSHI_T_HIENODE
Optional: No
Call by Reference: Yes

EXCEPTIONS details

INVALID_HIERARCHY - Invalid hierarchy

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

NAME_ERROR - Name of basic characteristic is too long or empty

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

IOBJ_NOT_FOUND - InfoObject neither internal nor in DB

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

Copy and paste ABAP code example for RSSH_HIERARCHY_READ 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_e_rshiedir  TYPE RSHI_S_HIEDIR, "   
lv_i_rshiedirkey  TYPE RSHI_S_RSHIEDIRKEY, "   
lv_invalid_hierarchy  TYPE RSHI_S_RSHIEDIRKEY, "   
lv_name_error  TYPE RSHI_S_RSHIEDIRKEY, "   
lv_e_t_rsnodes  TYPE RSHI_T_HIENODE, "   
lv_i_rshiedirlog  TYPE RSHI_S_RSHIEDIRLOG, "   
lv_i_date  TYPE RSHI_DATE, "   SY-DATUM
lv_iobj_not_found  TYPE RSHI_DATE, "   
lv_e_th_rsinterval  TYPE RSHI_TH_INTERVAL, "   
lv_e_duplicate_leafs  TYPE RS_BOOL, "   
lv_e_t_rsnodes_lnk  TYPE RSHI_T_HIENODE. "   

  CALL FUNCTION 'RSSH_HIERARCHY_READ'  "OBSOLETE FUNCTION Read Hierarchy, Transfer Sorted by Hierarchy
    EXPORTING
         I_RSHIEDIRKEY = lv_i_rshiedirkey
         I_RSHIEDIRLOG = lv_i_rshiedirlog
         I_DATE = lv_i_date
    IMPORTING
         E_RSHIEDIR = lv_e_rshiedir
         E_T_RSNODES = lv_e_t_rsnodes
         E_TH_RSINTERVAL = lv_e_th_rsinterval
         E_DUPLICATE_LEAFS = lv_e_duplicate_leafs
         E_T_RSNODES_LNK = lv_e_t_rsnodes_lnk
    EXCEPTIONS
        INVALID_HIERARCHY = 1
        NAME_ERROR = 2
        IOBJ_NOT_FOUND = 3
. " RSSH_HIERARCHY_READ




ABAP code using 7.40 inline data declarations to call FM RSSH_HIERARCHY_READ

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.

 
 
 
 
 
 
DATA(ld_i_date) = SY-DATUM.
 
 
 
 
 


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!