SAP RHPH_STRUCTURE_READ Function Module for Organizational structure of an organizational unit
RHPH_STRUCTURE_READ is a standard rhph structure 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 Organizational structure of an organizational unit 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 rhph structure read FM, simply by entering the name RHPH_STRUCTURE_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHPH
Program Name: SAPLRHPH
Main Program: SAPLRHPH
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RHPH_STRUCTURE_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 'RHPH_STRUCTURE_READ'"Organizational structure of an organizational unit.
EXPORTING
PLVAR = "Plan Version
OTYPE = "
OBJID = "Object ID
WEGID = "
* BEGDA = SY-DATUM "From selection date
* ENDDA = SY-DATUM "Selection date 'to'
* PUP_INFO = 'X' "
* WITH_STEXT = 'X' "
* TDEPTH = 0 "
TABLES
STRU_TAB = "
EXCEPTIONS
CATALOGUE_PROBLEM = 1 ROOT_NOT_FOUND = 2 WEGID_NOT_FOUND = 3
IMPORTING Parameters details for RHPH_STRUCTURE_READ
PLVAR - Plan Version
Data type: HRP1000-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE -
Data type: HRP1000-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID - Object ID
Data type: HRP1000-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
WEGID -
Data type: HRRHAS-WEGIDOptional: No
Call by Reference: No ( called with pass by value option)
BEGDA - From selection date
Data type: HRP1000-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - Selection date 'to'
Data type: HRP1000-ENDDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
PUP_INFO -
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_STEXT -
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TDEPTH -
Data type: HRRHAS-TDEPTHOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RHPH_STRUCTURE_READ
STRU_TAB -
Data type: QCAT_STRUOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CATALOGUE_PROBLEM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ROOT_NOT_FOUND - Root object not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WEGID_NOT_FOUND - Evaluation path not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RHPH_STRUCTURE_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_plvar | TYPE HRP1000-PLVAR, " | |||
| lt_stru_tab | TYPE STANDARD TABLE OF QCAT_STRU, " | |||
| lv_catalogue_problem | TYPE QCAT_STRU, " | |||
| lv_otype | TYPE HRP1000-OTYPE, " | |||
| lv_root_not_found | TYPE HRP1000, " | |||
| lv_objid | TYPE HRP1000-OBJID, " | |||
| lv_wegid_not_found | TYPE HRP1000, " | |||
| lv_wegid | TYPE HRRHAS-WEGID, " | |||
| lv_begda | TYPE HRP1000-BEGDA, " SY-DATUM | |||
| lv_endda | TYPE HRP1000-ENDDA, " SY-DATUM | |||
| lv_pup_info | TYPE SY-INPUT, " 'X' | |||
| lv_with_stext | TYPE SY-INPUT, " 'X' | |||
| lv_tdepth | TYPE HRRHAS-TDEPTH. " 0 |
|   CALL FUNCTION 'RHPH_STRUCTURE_READ' "Organizational structure of an organizational unit |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| WEGID | = lv_wegid | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| PUP_INFO | = lv_pup_info | |
| WITH_STEXT | = lv_with_stext | |
| TDEPTH | = lv_tdepth | |
| TABLES | ||
| STRU_TAB | = lt_stru_tab | |
| EXCEPTIONS | ||
| CATALOGUE_PROBLEM = 1 | ||
| ROOT_NOT_FOUND = 2 | ||
| WEGID_NOT_FOUND = 3 | ||
| . " RHPH_STRUCTURE_READ | ||
ABAP code using 7.40 inline data declarations to call FM RHPH_STRUCTURE_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.| "SELECT single PLVAR FROM HRP1000 INTO @DATA(ld_plvar). | ||||
| "SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_otype). | ||||
| "SELECT single OBJID FROM HRP1000 INTO @DATA(ld_objid). | ||||
| "SELECT single WEGID FROM HRRHAS INTO @DATA(ld_wegid). | ||||
| "SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM HRP1000 INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = SY-DATUM. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_pup_info). | ||||
| DATA(ld_pup_info) | = 'X'. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_stext). | ||||
| DATA(ld_with_stext) | = 'X'. | |||
| "SELECT single TDEPTH FROM HRRHAS INTO @DATA(ld_tdepth). | ||||
Search for further information about these or an SAP related objects