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

Function RH_SHOW_STRUCTURE_INLOOP 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_SHOW_STRUCTURE_INLOOP'".
EXPORTING
ACT_OBJID = "Object number
* INM = 1 "Counter
* ACT_INITKEY = 'LD_INIT' "F key status
* ACT_TITEL = "Title
* ACT_TDEPTH = 0 "
* IN_CALLBACK_PROGRAM = 'SAPLRHGB' "EXIT program
* IN_CALLBACK_TEXT_DISPLAY = 'GET_TEXTS' "EXIT routine for node display
* IN_CALLBACK_COLOR_DISPLAY = 'GET_COLORS' "EXIT routine for color legend
* IN_CALLBACK_USER_COMMAND = 'PROCESS_COMM' "EXIT routine for command handling
* IN_CALLBACK_TOP_OF_PAGE = 'TOP_OF_LIST_PAGE' "EXIT routine for TOP-OF-PAGE display
* EXT_PROGRAM = ' ' "EXIT program (external)
* ACT_OTYPE = "Object type
* EXT_USER_COMMAND = ' ' "EXIT routine for command handling (external)
* EXT_STATUS = ' ' "EXIT routine for status selection (external)
* EXT_TITLE = ' ' "EXIT routine for title selection (external)
* EXT_TREETABSET = ' ' "EXIT routine for title selection (external)
* SCR_START_COLUMN = 0 "Column where list dialog box begins
* SCR_START_LINE = 0 "Line where list dialog box begins
* SCR_END_COLUMN = 0 "Column where list dialog box ends
* SCR_END_LINE = 0 "Line where list dialog box ends
* DISPLAY_ONLY = ' ' "
* ACT_ISTAT = '1' "Status Vector
* ACT_SVECT = '1' "Status vector
* ACT_ENDDA = '99991231' "End date
* ACT_BEGDA = SY-DATUM "Start date
* ACT_WEGID = ' ' "Evaluation Path
* ACT_PATHID = "
* ACT_PLVAR = ' ' "Plan version
IMPORTING
CAL_OBJID = "Re: Object number
ONM = "Re: Counter
CAL_INITKEY = "Re: PF key status
CAL_TITEL = "Re: Title
CAL_OTYPE = "Re: Object type
CAL_SVECT = "Re: Status vector
CAL_ENDDA = "Re: End date
CAL_BEGDA = "Re: Start date
CAL_WEGID = "Re: Evaluation path
CAL_PATHID = "
CAL_PLVAR = "Re: Plan version
CONTFL = "'X' if function is to be called again
EXCEPTIONS
PLVAR_NOT_FOUND = 1 ROOT_NOT_FOUND = 2 WEGID_NOT_FOUND = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLRHGB_001 Additional information on / off
EXIT_SAPLRHGB_002 Text Fill Customer-Specific Field
EXIT_SAPLRHGB_003 Header Fill Customer-Specific Field
IMPORTING Parameters details for RH_SHOW_STRUCTURE_INLOOP
ACT_OBJID - Object number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INM - Counter
Data type: STREENODE-PARENTDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_INITKEY - F key status
Data type: SY-PFKEYDefault: 'LD_INIT'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_TITEL - Title
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_TDEPTH -
Data type: GDSTR-TDEPTHOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_CALLBACK_PROGRAM - EXIT program
Data type: SY-REPIDDefault: 'SAPLRHGB'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_CALLBACK_TEXT_DISPLAY - EXIT routine for node display
Data type:Default: 'GET_TEXTS'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_CALLBACK_COLOR_DISPLAY - EXIT routine for color legend
Data type:Default: 'GET_COLORS'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_CALLBACK_USER_COMMAND - EXIT routine for command handling
Data type:Default: 'PROCESS_COMM'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_CALLBACK_TOP_OF_PAGE - EXIT routine for TOP-OF-PAGE display
Data type:Default: 'TOP_OF_LIST_PAGE'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_PROGRAM - EXIT program (external)
Data type: SY-REPIDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_OTYPE - Object type
Data type: OBJEC-OTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXT_USER_COMMAND - EXIT routine for command handling (external)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_STATUS - EXIT routine for status selection (external)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_TITLE - EXIT routine for title selection (external)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXT_TREETABSET - EXIT routine for title selection (external)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SCR_START_COLUMN - Column where list dialog box begins
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCR_START_LINE - Line where list dialog box begins
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCR_END_COLUMN - Column where list dialog box ends
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
SCR_END_LINE - Line where list dialog box ends
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_ONLY -
Data type: T77FC-MAINTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_ISTAT - Status Vector
Data type: OBJEC-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_SVECT - Status vector
Data type: GDSTR-SVECTDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_ENDDA - End date
Data type: OBJEC-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_BEGDA - Start date
Data type: OBJEC-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_WEGID - Evaluation Path
Data type: GDSTR-WEGIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACT_PATHID -
Data type: HRRHAS-WEGIDOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_PLVAR - Plan version
Data type: OBJEC-PLVARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_SHOW_STRUCTURE_INLOOP
CAL_OBJID - Re: Object number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ONM - Re: Counter
Data type: STREENODE-PARENTOptional: No
Call by Reference: No ( called with pass by value option)
CAL_INITKEY - Re: PF key status
Data type: SY-PFKEYOptional: No
Call by Reference: No ( called with pass by value option)
CAL_TITEL - Re: Title
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CAL_OTYPE - Re: Object type
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
CAL_SVECT - Re: Status vector
Data type: GDSTR-SVECTOptional: No
Call by Reference: No ( called with pass by value option)
CAL_ENDDA - Re: End date
Data type: OBJEC-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
CAL_BEGDA - Re: Start date
Data type: OBJEC-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
CAL_WEGID - Re: Evaluation path
Data type: GDSTR-WEGIDOptional: No
Call by Reference: No ( called with pass by value option)
CAL_PATHID -
Data type: HRRHAS-WEGIDOptional: No
Call by Reference: No ( called with pass by value option)
CAL_PLVAR - Re: Plan version
Data type: OBJEC-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
CONTFL - 'X' if function is to be called again
Data type: OBJEC-ISTATOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PLVAR_NOT_FOUND - Plan version not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ROOT_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 RH_SHOW_STRUCTURE_INLOOP 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_act_objid | TYPE STRING, " | |||
| lv_cal_objid | TYPE STRING, " | |||
| lv_plvar_not_found | TYPE STRING, " | |||
| lv_inm | TYPE STREENODE-PARENT, " 1 | |||
| lv_onm | TYPE STREENODE-PARENT, " | |||
| lv_act_initkey | TYPE SY-PFKEY, " 'LD_INIT' | |||
| lv_cal_initkey | TYPE SY-PFKEY, " | |||
| lv_act_titel | TYPE SY, " | |||
| lv_cal_titel | TYPE SY, " | |||
| lv_act_tdepth | TYPE GDSTR-TDEPTH, " 0 | |||
| lv_in_callback_program | TYPE SY-REPID, " 'SAPLRHGB' | |||
| lv_in_callback_text_display | TYPE SY, " 'GET_TEXTS' | |||
| lv_in_callback_color_display | TYPE SY, " 'GET_COLORS' | |||
| lv_in_callback_user_command | TYPE SY, " 'PROCESS_COMM' | |||
| lv_in_callback_top_of_page | TYPE SY, " 'TOP_OF_LIST_PAGE' | |||
| lv_ext_program | TYPE SY-REPID, " ' ' | |||
| lv_act_otype | TYPE OBJEC-OTYPE, " | |||
| lv_cal_otype | TYPE OBJEC-OTYPE, " | |||
| lv_root_not_found | TYPE OBJEC, " | |||
| lv_ext_user_command | TYPE OBJEC, " ' ' | |||
| lv_ext_status | TYPE OBJEC, " ' ' | |||
| lv_ext_title | TYPE OBJEC, " ' ' | |||
| lv_ext_treetabset | TYPE OBJEC, " ' ' | |||
| lv_scr_start_column | TYPE OBJEC, " 0 | |||
| lv_scr_start_line | TYPE OBJEC, " 0 | |||
| lv_scr_end_column | TYPE OBJEC, " 0 | |||
| lv_scr_end_line | TYPE OBJEC, " 0 | |||
| lv_display_only | TYPE T77FC-MAINT, " ' ' | |||
| lv_act_istat | TYPE OBJEC-ISTAT, " '1' | |||
| lv_cal_svect | TYPE GDSTR-SVECT, " | |||
| lv_wegid_not_found | TYPE GDSTR, " | |||
| lv_act_svect | TYPE GDSTR-SVECT, " '1' | |||
| lv_cal_endda | TYPE OBJEC-ENDDA, " | |||
| lv_act_endda | TYPE OBJEC-ENDDA, " '99991231' | |||
| lv_cal_begda | TYPE OBJEC-BEGDA, " | |||
| lv_act_begda | TYPE OBJEC-BEGDA, " SY-DATUM | |||
| lv_cal_wegid | TYPE GDSTR-WEGID, " | |||
| lv_act_wegid | TYPE GDSTR-WEGID, " SPACE | |||
| lv_cal_pathid | TYPE HRRHAS-WEGID, " | |||
| lv_cal_plvar | TYPE OBJEC-PLVAR, " | |||
| lv_act_pathid | TYPE HRRHAS-WEGID, " | |||
| lv_contfl | TYPE OBJEC-ISTAT, " | |||
| lv_act_plvar | TYPE OBJEC-PLVAR. " SPACE |
|   CALL FUNCTION 'RH_SHOW_STRUCTURE_INLOOP' " |
| EXPORTING | ||
| ACT_OBJID | = lv_act_objid | |
| INM | = lv_inm | |
| ACT_INITKEY | = lv_act_initkey | |
| ACT_TITEL | = lv_act_titel | |
| ACT_TDEPTH | = lv_act_tdepth | |
| IN_CALLBACK_PROGRAM | = lv_in_callback_program | |
| IN_CALLBACK_TEXT_DISPLAY | = lv_in_callback_text_display | |
| IN_CALLBACK_COLOR_DISPLAY | = lv_in_callback_color_display | |
| IN_CALLBACK_USER_COMMAND | = lv_in_callback_user_command | |
| IN_CALLBACK_TOP_OF_PAGE | = lv_in_callback_top_of_page | |
| EXT_PROGRAM | = lv_ext_program | |
| ACT_OTYPE | = lv_act_otype | |
| EXT_USER_COMMAND | = lv_ext_user_command | |
| EXT_STATUS | = lv_ext_status | |
| EXT_TITLE | = lv_ext_title | |
| EXT_TREETABSET | = lv_ext_treetabset | |
| SCR_START_COLUMN | = lv_scr_start_column | |
| SCR_START_LINE | = lv_scr_start_line | |
| SCR_END_COLUMN | = lv_scr_end_column | |
| SCR_END_LINE | = lv_scr_end_line | |
| DISPLAY_ONLY | = lv_display_only | |
| ACT_ISTAT | = lv_act_istat | |
| ACT_SVECT | = lv_act_svect | |
| ACT_ENDDA | = lv_act_endda | |
| ACT_BEGDA | = lv_act_begda | |
| ACT_WEGID | = lv_act_wegid | |
| ACT_PATHID | = lv_act_pathid | |
| ACT_PLVAR | = lv_act_plvar | |
| IMPORTING | ||
| CAL_OBJID | = lv_cal_objid | |
| ONM | = lv_onm | |
| CAL_INITKEY | = lv_cal_initkey | |
| CAL_TITEL | = lv_cal_titel | |
| CAL_OTYPE | = lv_cal_otype | |
| CAL_SVECT | = lv_cal_svect | |
| CAL_ENDDA | = lv_cal_endda | |
| CAL_BEGDA | = lv_cal_begda | |
| CAL_WEGID | = lv_cal_wegid | |
| CAL_PATHID | = lv_cal_pathid | |
| CAL_PLVAR | = lv_cal_plvar | |
| CONTFL | = lv_contfl | |
| EXCEPTIONS | ||
| PLVAR_NOT_FOUND = 1 | ||
| ROOT_NOT_FOUND = 2 | ||
| WEGID_NOT_FOUND = 3 | ||
| . " RH_SHOW_STRUCTURE_INLOOP | ||
ABAP code using 7.40 inline data declarations to call FM RH_SHOW_STRUCTURE_INLOOP
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 PARENT FROM STREENODE INTO @DATA(ld_inm). | ||||
| DATA(ld_inm) | = 1. | |||
| "SELECT single PARENT FROM STREENODE INTO @DATA(ld_onm). | ||||
| "SELECT single PFKEY FROM SY INTO @DATA(ld_act_initkey). | ||||
| DATA(ld_act_initkey) | = 'LD_INIT'. | |||
| "SELECT single PFKEY FROM SY INTO @DATA(ld_cal_initkey). | ||||
| "SELECT single TDEPTH FROM GDSTR INTO @DATA(ld_act_tdepth). | ||||
| "SELECT single REPID FROM SY INTO @DATA(ld_in_callback_program). | ||||
| DATA(ld_in_callback_program) | = 'SAPLRHGB'. | |||
| DATA(ld_in_callback_text_display) | = 'GET_TEXTS'. | |||
| DATA(ld_in_callback_color_display) | = 'GET_COLORS'. | |||
| DATA(ld_in_callback_user_command) | = 'PROCESS_COMM'. | |||
| DATA(ld_in_callback_top_of_page) | = 'TOP_OF_LIST_PAGE'. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_ext_program). | ||||
| DATA(ld_ext_program) | = ' '. | |||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_act_otype). | ||||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_cal_otype). | ||||
| DATA(ld_ext_user_command) | = ' '. | |||
| DATA(ld_ext_status) | = ' '. | |||
| DATA(ld_ext_title) | = ' '. | |||
| DATA(ld_ext_treetabset) | = ' '. | |||
| "SELECT single MAINT FROM T77FC INTO @DATA(ld_display_only). | ||||
| DATA(ld_display_only) | = ' '. | |||
| "SELECT single ISTAT FROM OBJEC INTO @DATA(ld_act_istat). | ||||
| DATA(ld_act_istat) | = '1'. | |||
| "SELECT single SVECT FROM GDSTR INTO @DATA(ld_cal_svect). | ||||
| "SELECT single SVECT FROM GDSTR INTO @DATA(ld_act_svect). | ||||
| DATA(ld_act_svect) | = '1'. | |||
| "SELECT single ENDDA FROM OBJEC INTO @DATA(ld_cal_endda). | ||||
| "SELECT single ENDDA FROM OBJEC INTO @DATA(ld_act_endda). | ||||
| DATA(ld_act_endda) | = '99991231'. | |||
| "SELECT single BEGDA FROM OBJEC INTO @DATA(ld_cal_begda). | ||||
| "SELECT single BEGDA FROM OBJEC INTO @DATA(ld_act_begda). | ||||
| DATA(ld_act_begda) | = SY-DATUM. | |||
| "SELECT single WEGID FROM GDSTR INTO @DATA(ld_cal_wegid). | ||||
| "SELECT single WEGID FROM GDSTR INTO @DATA(ld_act_wegid). | ||||
| DATA(ld_act_wegid) | = ' '. | |||
| "SELECT single WEGID FROM HRRHAS INTO @DATA(ld_cal_pathid). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_cal_plvar). | ||||
| "SELECT single WEGID FROM HRRHAS INTO @DATA(ld_act_pathid). | ||||
| "SELECT single ISTAT FROM OBJEC INTO @DATA(ld_contfl). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar). | ||||
| DATA(ld_act_plvar) | = ' '. | |||
Search for further information about these or an SAP related objects