SAP RH_STRUCTURE_SHOW Function Module for
RH_STRUCTURE_SHOW is a standard rh structure show 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 structure show FM, simply by entering the name RH_STRUCTURE_SHOW into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHWH
Program Name: SAPLRHWH
Main Program: SAPLRHWH
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RH_STRUCTURE_SHOW 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_STRUCTURE_SHOW'".
EXPORTING
ORG_OTYPE = "
* ACT_TDEPTH = 2 "
ORG_OBJID = "
ACT_WEGID = "
* ACT_PLVAR = "
* ACT_BEGDA = SY-DATUM "
* ACT_ENDDA = SY-DATUM "
* SELECT_OBJECT = "
* SET_MODE = "
* ACT_TITLE = "
IMPORTING
SELECTED_PLVAR = "
SELECTED_OTYPE = "
SELECTED_OBJID = "
TABLES
* SELECTED_OBJECTS = "
* ROOT_OBJECTS = "
EXCEPTIONS
NO_ACTIVE_PLVAR = 1 NO_OBJECT_SELECTED = 2
IMPORTING Parameters details for RH_STRUCTURE_SHOW
ORG_OTYPE -
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
ACT_TDEPTH -
Data type: HRRHAS-TDEPTHDefault: 2
Optional: Yes
Call by Reference: No ( called with pass by value option)
ORG_OBJID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACT_WEGID -
Data type: GDSTR-WEGIDOptional: No
Call by Reference: No ( called with pass by value option)
ACT_PLVAR -
Data type: OBJEC-PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_BEGDA -
Data type: OBJEC-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_ENDDA -
Data type: OBJEC-ENDDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_OBJECT -
Data type: OBJEC-HISTOOptional: Yes
Call by Reference: No ( called with pass by value option)
SET_MODE -
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_TITLE -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_STRUCTURE_SHOW
SELECTED_PLVAR -
Data type: OBJEC-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
SELECTED_OTYPE -
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
SELECTED_OBJID -
Data type: OBJEC-REALOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_STRUCTURE_SHOW
SELECTED_OBJECTS -
Data type: HRSOBIDOptional: Yes
Call by Reference: No ( called with pass by value option)
ROOT_OBJECTS -
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ACTIVE_PLVAR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_OBJECT_SELECTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_STRUCTURE_SHOW 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_org_otype | TYPE OBJEC-OTYPE, " | |||
| lv_selected_plvar | TYPE OBJEC-PLVAR, " | |||
| lv_no_active_plvar | TYPE OBJEC, " | |||
| lt_selected_objects | TYPE STANDARD TABLE OF HRSOBID, " | |||
| lv_act_tdepth | TYPE HRRHAS-TDEPTH, " 2 | |||
| lv_org_objid | TYPE HRRHAS, " | |||
| lt_root_objects | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_selected_otype | TYPE OBJEC-OTYPE, " | |||
| lv_no_object_selected | TYPE OBJEC, " | |||
| lv_act_wegid | TYPE GDSTR-WEGID, " | |||
| lv_selected_objid | TYPE OBJEC-REALO, " | |||
| lv_act_plvar | TYPE OBJEC-PLVAR, " | |||
| lv_act_begda | TYPE OBJEC-BEGDA, " SY-DATUM | |||
| lv_act_endda | TYPE OBJEC-ENDDA, " SY-DATUM | |||
| lv_select_object | TYPE OBJEC-HISTO, " | |||
| lv_set_mode | TYPE HRPP0C-TEST, " | |||
| lv_act_title | TYPE HRPP0C. " |
|   CALL FUNCTION 'RH_STRUCTURE_SHOW' " |
| EXPORTING | ||
| ORG_OTYPE | = lv_org_otype | |
| ACT_TDEPTH | = lv_act_tdepth | |
| ORG_OBJID | = lv_org_objid | |
| ACT_WEGID | = lv_act_wegid | |
| ACT_PLVAR | = lv_act_plvar | |
| ACT_BEGDA | = lv_act_begda | |
| ACT_ENDDA | = lv_act_endda | |
| SELECT_OBJECT | = lv_select_object | |
| SET_MODE | = lv_set_mode | |
| ACT_TITLE | = lv_act_title | |
| IMPORTING | ||
| SELECTED_PLVAR | = lv_selected_plvar | |
| SELECTED_OTYPE | = lv_selected_otype | |
| SELECTED_OBJID | = lv_selected_objid | |
| TABLES | ||
| SELECTED_OBJECTS | = lt_selected_objects | |
| ROOT_OBJECTS | = lt_root_objects | |
| EXCEPTIONS | ||
| NO_ACTIVE_PLVAR = 1 | ||
| NO_OBJECT_SELECTED = 2 | ||
| . " RH_STRUCTURE_SHOW | ||
ABAP code using 7.40 inline data declarations to call FM RH_STRUCTURE_SHOW
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 OTYPE FROM OBJEC INTO @DATA(ld_org_otype). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_selected_plvar). | ||||
| "SELECT single TDEPTH FROM HRRHAS INTO @DATA(ld_act_tdepth). | ||||
| DATA(ld_act_tdepth) | = 2. | |||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_selected_otype). | ||||
| "SELECT single WEGID FROM GDSTR INTO @DATA(ld_act_wegid). | ||||
| "SELECT single REALO FROM OBJEC INTO @DATA(ld_selected_objid). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar). | ||||
| "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 HISTO FROM OBJEC INTO @DATA(ld_select_object). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_set_mode). | ||||
Search for further information about these or an SAP related objects