SAP RP_CHECK_PERNR Function Module for Check Personnel Number against HR Master Record
RP_CHECK_PERNR is a standard rp check pernr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Personnel Number against HR Master Record 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 rp check pernr FM, simply by entering the name RP_CHECK_PERNR into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPIN
Program Name: SAPLRPIN
Main Program:
Appliation area: P
Release date: 09-Aug-1996
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RP_CHECK_PERNR 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 'RP_CHECK_PERNR'"Check Personnel Number against HR Master Record.
EXPORTING
BEG = "Date
PNR = "Personnel number
IMPORTING
NAME = "Employee name
PERSA = "Personnel area
BUKRS = "Company code
KOSTL = "Cost center
MOLGA = "Country grouping
PERSONNEL_SUBAREA = "Personnel subarea
EXCEPTIONS
DATA_FAULT = 1 PERSON_NOT_ACTIVE = 2 PERSON_UNKNOWN = 3 EXIT_FAULT = 4 PERNR_MISSING = 5 DATE_MISSING = 6
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_SAPLRPIN_001 User Exit for HR Master Data
IMPORTING Parameters details for RP_CHECK_PERNR
BEG - Date
Data type: BAS_CHECK_PERNR-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
PNR - Personnel number
Data type: BAS_CHECK_PERNR-PERNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RP_CHECK_PERNR
NAME - Employee name
Data type: BAS_CHECK_PERNR-NAMEOptional: No
Call by Reference: Yes
PERSA - Personnel area
Data type: BAS_CHECK_PERNR-PERSAOptional: No
Call by Reference: Yes
BUKRS - Company code
Data type: BAS_CHECK_PERNR-BUKRSOptional: No
Call by Reference: Yes
KOSTL - Cost center
Data type: BAS_CHECK_PERNR-KOSTLOptional: No
Call by Reference: Yes
MOLGA - Country grouping
Data type: BAS_CHECK_PERNR-MOLGAOptional: No
Call by Reference: Yes
PERSONNEL_SUBAREA - Personnel subarea
Data type: ESS_EMP-PERSSUBAREAOptional: No
Call by Reference: Yes
EXCEPTIONS details
DATA_FAULT - Data inconsistency
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERSON_NOT_ACTIVE - Employee is inactive
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERSON_UNKNOWN - Personnel number is unknown
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXIT_FAULT - Invalid return code for user exit
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERNR_MISSING - Personnel no. missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATE_MISSING - Date missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RP_CHECK_PERNR 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_beg | TYPE BAS_CHECK_PERNR-BEGDA, " | |||
| lv_name | TYPE BAS_CHECK_PERNR-NAME, " | |||
| lv_data_fault | TYPE BAS_CHECK_PERNR, " | |||
| lv_pnr | TYPE BAS_CHECK_PERNR-PERNR, " | |||
| lv_persa | TYPE BAS_CHECK_PERNR-PERSA, " | |||
| lv_person_not_active | TYPE BAS_CHECK_PERNR, " | |||
| lv_bukrs | TYPE BAS_CHECK_PERNR-BUKRS, " | |||
| lv_person_unknown | TYPE BAS_CHECK_PERNR, " | |||
| lv_kostl | TYPE BAS_CHECK_PERNR-KOSTL, " | |||
| lv_exit_fault | TYPE BAS_CHECK_PERNR, " | |||
| lv_molga | TYPE BAS_CHECK_PERNR-MOLGA, " | |||
| lv_pernr_missing | TYPE BAS_CHECK_PERNR, " | |||
| lv_date_missing | TYPE BAS_CHECK_PERNR, " | |||
| lv_personnel_subarea | TYPE ESS_EMP-PERSSUBAREA. " |
|   CALL FUNCTION 'RP_CHECK_PERNR' "Check Personnel Number against HR Master Record |
| EXPORTING | ||
| BEG | = lv_beg | |
| PNR | = lv_pnr | |
| IMPORTING | ||
| NAME | = lv_name | |
| PERSA | = lv_persa | |
| BUKRS | = lv_bukrs | |
| KOSTL | = lv_kostl | |
| MOLGA | = lv_molga | |
| PERSONNEL_SUBAREA | = lv_personnel_subarea | |
| EXCEPTIONS | ||
| DATA_FAULT = 1 | ||
| PERSON_NOT_ACTIVE = 2 | ||
| PERSON_UNKNOWN = 3 | ||
| EXIT_FAULT = 4 | ||
| PERNR_MISSING = 5 | ||
| DATE_MISSING = 6 | ||
| . " RP_CHECK_PERNR | ||
ABAP code using 7.40 inline data declarations to call FM RP_CHECK_PERNR
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 BAS_CHECK_PERNR INTO @DATA(ld_beg). | ||||
| "SELECT single NAME FROM BAS_CHECK_PERNR INTO @DATA(ld_name). | ||||
| "SELECT single PERNR FROM BAS_CHECK_PERNR INTO @DATA(ld_pnr). | ||||
| "SELECT single PERSA FROM BAS_CHECK_PERNR INTO @DATA(ld_persa). | ||||
| "SELECT single BUKRS FROM BAS_CHECK_PERNR INTO @DATA(ld_bukrs). | ||||
| "SELECT single KOSTL FROM BAS_CHECK_PERNR INTO @DATA(ld_kostl). | ||||
| "SELECT single MOLGA FROM BAS_CHECK_PERNR INTO @DATA(ld_molga). | ||||
| "SELECT single PERSSUBAREA FROM ESS_EMP INTO @DATA(ld_personnel_subarea). | ||||
Search for further information about these or an SAP related objects