SAP HR_GB_PERID_CHECK Function Module for HR-GB: Personnel ID Number checks
HR_GB_PERID_CHECK is a standard hr gb perid check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for HR-GB: Personnel ID Number checks 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 hr gb perid check FM, simply by entering the name HR_GB_PERID_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: 0PGC
Program Name: SAPL0PGC
Main Program: SAPL0PGC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_GB_PERID_CHECK 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 'HR_GB_PERID_CHECK'"HR-GB: Personnel ID Number checks.
EXPORTING
FLT_VAL = "Country Grouping
IN_PERID = "Personnel ID Number
PERNR = "Personnel Number
BEGDA = "Start Date
ENDDA = "End Date
IMPORTING
PERID = "Personnel ID Number
CHANGING
GBDAT = "Date of Birth
GESCH = "Gender Key
EXCEPTIONS
POSITIONS1_2 = 1 POSITIONS1_2_PREFIX = 10 GENDER_DOB_MISSING = 11 PREFIX_NOT_IN_TABLE = 12 PREFIX_NOT_IN_VALIDITY_PERIOD = 13 POSITIONS3_8 = 2 POSITION9_FOR_TEMPORARY_NI = 3 POSITION9 = 4 GENDER_UNKNOWN = 5 DIFFERENT_GENDER = 6 DIFFERENT_BIRTHDAY = 7 DEFAULT_GENDER = 8 TN_NOT_ALLOWED = 9
IMPORTING Parameters details for HR_GB_PERID_CHECK
FLT_VAL - Country Grouping
Data type: T001P-MOLGAOptional: No
Call by Reference: Yes
IN_PERID - Personnel ID Number
Data type: Q0002-PERIDOptional: No
Call by Reference: Yes
PERNR - Personnel Number
Data type: P0002-PERNROptional: No
Call by Reference: Yes
BEGDA - Start Date
Data type: P0002-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
ENDDA - End Date
Data type: P0002-ENDDAOptional: No
Call by Reference: Yes
EXPORTING Parameters details for HR_GB_PERID_CHECK
PERID - Personnel ID Number
Data type: P0002-PERIDOptional: No
Call by Reference: Yes
CHANGING Parameters details for HR_GB_PERID_CHECK
GBDAT - Date of Birth
Data type: P0002-GBDATOptional: No
Call by Reference: Yes
GESCH - Gender Key
Data type: P0002-GESCHOptional: No
Call by Reference: Yes
EXCEPTIONS details
POSITIONS1_2 - National Insurance number must begin with two letters
Data type:Optional: No
Call by Reference: Yes
POSITIONS1_2_PREFIX - The prefix is not valid.Check the first two characters of the NINO
Data type:Optional: No
Call by Reference: Yes
GENDER_DOB_MISSING - Gender and DOB needed if NINO is blank
Data type:Optional: No
Call by Reference: Yes
PREFIX_NOT_IN_TABLE - The prefix cannot be found in the Table
Data type:Optional: No
Call by Reference: Yes
PREFIX_NOT_IN_VALIDITY_PERIOD - Prefix is not valid between this begda and endda
Data type:Optional: No
Call by Reference: Yes
POSITIONS3_8 - National Insurance number must contain only numbers in positions 3 to 8
Data type:Optional: No
Call by Reference: Yes
POSITION9_FOR_TEMPORARY_NI - Temporary NI number must end with 'M' or 'F'
Data type:Optional: No
Call by Reference: Yes
POSITION9 - Last character of the NINO must be A, B, C, D, F, M, P or a space
Data type:Optional: No
Call by Reference: Yes
GENDER_UNKNOWN - Gender must be chosen
Data type:Optional: No
Call by Reference: Yes
DIFFERENT_GENDER - Gender is different
Data type:Optional: No
Call by Reference: Yes
DIFFERENT_BIRTHDAY - Birthday is different
Data type:Optional: No
Call by Reference: Yes
DEFAULT_GENDER - Gender is not chosen
Data type:Optional: No
Call by Reference: Yes
TN_NOT_ALLOWED - Temporary NIs are not allowed
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_GB_PERID_CHECK 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_gbdat | TYPE P0002-GBDAT, " | |||
| lv_perid | TYPE P0002-PERID, " | |||
| lv_flt_val | TYPE T001P-MOLGA, " | |||
| lv_positions1_2 | TYPE T001P, " | |||
| lv_positions1_2_prefix | TYPE T001P, " | |||
| lv_gender_dob_missing | TYPE T001P, " | |||
| lv_prefix_not_in_table | TYPE T001P, " | |||
| lv_prefix_not_in_validity_period | TYPE T001P, " | |||
| lv_gesch | TYPE P0002-GESCH, " | |||
| lv_in_perid | TYPE Q0002-PERID, " | |||
| lv_positions3_8 | TYPE Q0002, " | |||
| lv_pernr | TYPE P0002-PERNR, " | |||
| lv_position9_for_temporary_ni | TYPE P0002, " | |||
| lv_begda | TYPE P0002-BEGDA, " | |||
| lv_position9 | TYPE P0002, " | |||
| lv_endda | TYPE P0002-ENDDA, " | |||
| lv_gender_unknown | TYPE P0002, " | |||
| lv_different_gender | TYPE P0002, " | |||
| lv_different_birthday | TYPE P0002, " | |||
| lv_default_gender | TYPE P0002, " | |||
| lv_tn_not_allowed | TYPE P0002. " |
|   CALL FUNCTION 'HR_GB_PERID_CHECK' "HR-GB: Personnel ID Number checks |
| EXPORTING | ||
| FLT_VAL | = lv_flt_val | |
| IN_PERID | = lv_in_perid | |
| PERNR | = lv_pernr | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| IMPORTING | ||
| PERID | = lv_perid | |
| CHANGING | ||
| GBDAT | = lv_gbdat | |
| GESCH | = lv_gesch | |
| EXCEPTIONS | ||
| POSITIONS1_2 = 1 | ||
| POSITIONS1_2_PREFIX = 10 | ||
| GENDER_DOB_MISSING = 11 | ||
| PREFIX_NOT_IN_TABLE = 12 | ||
| PREFIX_NOT_IN_VALIDITY_PERIOD = 13 | ||
| POSITIONS3_8 = 2 | ||
| POSITION9_FOR_TEMPORARY_NI = 3 | ||
| POSITION9 = 4 | ||
| GENDER_UNKNOWN = 5 | ||
| DIFFERENT_GENDER = 6 | ||
| DIFFERENT_BIRTHDAY = 7 | ||
| DEFAULT_GENDER = 8 | ||
| TN_NOT_ALLOWED = 9 | ||
| . " HR_GB_PERID_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM HR_GB_PERID_CHECK
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 GBDAT FROM P0002 INTO @DATA(ld_gbdat). | ||||
| "SELECT single PERID FROM P0002 INTO @DATA(ld_perid). | ||||
| "SELECT single MOLGA FROM T001P INTO @DATA(ld_flt_val). | ||||
| "SELECT single GESCH FROM P0002 INTO @DATA(ld_gesch). | ||||
| "SELECT single PERID FROM Q0002 INTO @DATA(ld_in_perid). | ||||
| "SELECT single PERNR FROM P0002 INTO @DATA(ld_pernr). | ||||
| "SELECT single BEGDA FROM P0002 INTO @DATA(ld_begda). | ||||
| "SELECT single ENDDA FROM P0002 INTO @DATA(ld_endda). | ||||
Search for further information about these or an SAP related objects