SAP RHPH_PICK_UP_ORG_UNITS Function Module for Read Organizational Unit of Person, Position,...
RHPH_PICK_UP_ORG_UNITS is a standard rhph pick up org units SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Organizational Unit of Person, Position,... 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 pick up org units FM, simply by entering the name RHPH_PICK_UP_ORG_UNITS into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHPH
Program Name: SAPLRHPH
Main Program:
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RHPH_PICK_UP_ORG_UNITS 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_PICK_UP_ORG_UNITS'"Read Organizational Unit of Person, Position,....
EXPORTING
* BEGDA = SY-DATUM "Start Date
* ENDDA = SY-DATUM "End Date
* STATUS = '1' "Status
* WITH_STEXT = 'X' "
TABLES
OBJECTS = "
ORGUNIT = "
EXCEPTIONS
UNDEFINED = 1
IMPORTING Parameters details for RHPH_PICK_UP_ORG_UNITS
BEGDA - Start Date
Data type: P1000-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - End Date
Data type: P1000-ENDDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS - Status
Data type: P1000-ISTATDefault: '1'
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)
TABLES Parameters details for RHPH_PICK_UP_ORG_UNITS
OBJECTS -
Data type: HRSOBIDOptional: No
Call by Reference: No ( called with pass by value option)
ORGUNIT -
Data type: HRPE_PROFLOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
UNDEFINED - Other Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RHPH_PICK_UP_ORG_UNITS 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_begda | TYPE P1000-BEGDA, " SY-DATUM | |||
| lt_objects | TYPE STANDARD TABLE OF HRSOBID, " | |||
| lv_undefined | TYPE HRSOBID, " | |||
| lv_endda | TYPE P1000-ENDDA, " SY-DATUM | |||
| lt_orgunit | TYPE STANDARD TABLE OF HRPE_PROFL, " | |||
| lv_status | TYPE P1000-ISTAT, " '1' | |||
| lv_with_stext | TYPE SY-INPUT. " 'X' |
|   CALL FUNCTION 'RHPH_PICK_UP_ORG_UNITS' "Read Organizational Unit of Person, Position,... |
| EXPORTING | ||
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| STATUS | = lv_status | |
| WITH_STEXT | = lv_with_stext | |
| TABLES | ||
| OBJECTS | = lt_objects | |
| ORGUNIT | = lt_orgunit | |
| EXCEPTIONS | ||
| UNDEFINED = 1 | ||
| . " RHPH_PICK_UP_ORG_UNITS | ||
ABAP code using 7.40 inline data declarations to call FM RHPH_PICK_UP_ORG_UNITS
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 BEGDA FROM P1000 INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM P1000 INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = SY-DATUM. | |||
| "SELECT single ISTAT FROM P1000 INTO @DATA(ld_status). | ||||
| DATA(ld_status) | = '1'. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_with_stext). | ||||
| DATA(ld_with_stext) | = 'X'. | |||
Search for further information about these or an SAP related objects