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

Function RH_GET_CONTROLLING_INFO 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_GET_CONTROLLING_INFO'".
EXPORTING
PLVAR = "
OTYPE = "
OBJID = "
* SEL_DATE = SY-DATUM "
* STATUS = '1' "
* READ_NOT_T77S0 = ' ' "
IMPORTING
KOKRS = "
BUKRS = "
GSBER = "
PERSA = "
BTRTL = "
RET_OTYPE = "
RET_OBJID = "
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for RH_GET_CONTROLLING_INFO
PLVAR -
Data type: WPLOG-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE -
Data type: WPLOG-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID -
Data type: WPLOG-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
SEL_DATE -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: WPLOG-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_NOT_T77S0 -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_GET_CONTROLLING_INFO
KOKRS -
Data type: PKEYK-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
BUKRS -
Data type: P1008-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
GSBER -
Data type: P1008-GSBEROptional: No
Call by Reference: No ( called with pass by value option)
PERSA -
Data type: P1008-PERSAOptional: No
Call by Reference: No ( called with pass by value option)
BTRTL -
Data type: P1008-BTRTLOptional: No
Call by Reference: No ( called with pass by value option)
RET_OTYPE -
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
RET_OBJID -
Data type: OBJEC-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_GET_CONTROLLING_INFO 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_kokrs | TYPE PKEYK-KOKRS, " | |||
| lv_plvar | TYPE WPLOG-PLVAR, " | |||
| lv_not_found | TYPE WPLOG, " | |||
| lv_bukrs | TYPE P1008-BUKRS, " | |||
| lv_otype | TYPE WPLOG-OTYPE, " | |||
| lv_gsber | TYPE P1008-GSBER, " | |||
| lv_objid | TYPE WPLOG-OBJID, " | |||
| lv_persa | TYPE P1008-PERSA, " | |||
| lv_sel_date | TYPE SY-DATUM, " SY-DATUM | |||
| lv_btrtl | TYPE P1008-BTRTL, " | |||
| lv_status | TYPE WPLOG-ISTAT, " '1' | |||
| lv_ret_otype | TYPE OBJEC-OTYPE, " | |||
| lv_read_not_t77s0 | TYPE OBJEC, " ' ' | |||
| lv_ret_objid | TYPE OBJEC-OBJID. " |
|   CALL FUNCTION 'RH_GET_CONTROLLING_INFO' " |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| SEL_DATE | = lv_sel_date | |
| STATUS | = lv_status | |
| READ_NOT_T77S0 | = lv_read_not_t77s0 | |
| IMPORTING | ||
| KOKRS | = lv_kokrs | |
| BUKRS | = lv_bukrs | |
| GSBER | = lv_gsber | |
| PERSA | = lv_persa | |
| BTRTL | = lv_btrtl | |
| RET_OTYPE | = lv_ret_otype | |
| RET_OBJID | = lv_ret_objid | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " RH_GET_CONTROLLING_INFO | ||
ABAP code using 7.40 inline data declarations to call FM RH_GET_CONTROLLING_INFO
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 KOKRS FROM PKEYK INTO @DATA(ld_kokrs). | ||||
| "SELECT single PLVAR FROM WPLOG INTO @DATA(ld_plvar). | ||||
| "SELECT single BUKRS FROM P1008 INTO @DATA(ld_bukrs). | ||||
| "SELECT single OTYPE FROM WPLOG INTO @DATA(ld_otype). | ||||
| "SELECT single GSBER FROM P1008 INTO @DATA(ld_gsber). | ||||
| "SELECT single OBJID FROM WPLOG INTO @DATA(ld_objid). | ||||
| "SELECT single PERSA FROM P1008 INTO @DATA(ld_persa). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_sel_date). | ||||
| DATA(ld_sel_date) | = SY-DATUM. | |||
| "SELECT single BTRTL FROM P1008 INTO @DATA(ld_btrtl). | ||||
| "SELECT single ISTAT FROM WPLOG INTO @DATA(ld_status). | ||||
| DATA(ld_status) | = '1'. | |||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_ret_otype). | ||||
| DATA(ld_read_not_t77s0) | = ' '. | |||
| "SELECT single OBJID FROM OBJEC INTO @DATA(ld_ret_objid). | ||||
Search for further information about these or an SAP related objects