Get Employee EID_ID value#
Functionality:#
This function retrieves the ID for P2K_HR_IDENTITIESParameters:#
PERSON_CODE | Optional. The PERSON_CODE for the employee. |
GOVERNMENT_CODE | Optional. The GOVERNMENT_CODE for the employee. If you prefix the government code with the letter "E", then the EXTERNAL_RETIREMENT_ID field (without the "E") is used to retrieve the EID_ID |
Returns: #
NumericErrors: #
- If no data is found (the employee cannot be found using either code), zero 0 is returned
- If any error occurs during data retrieval, -1 is returned
- If neither parameter is passed, then NULL is returned
Example: #
P2K_PU.GET_EID(~)
will get the EID_ID value for the passed PERSON_CODE.
P2K_PU.GET_EID(0,~)#
will get the EID_ID value for the passed GOVERNMENT_CODE. Note that the first parameter is optional, but must still contain a value.
P2K_PU.GET_EID(0,'E'||~)#
will get the EID_ID value for the passed EXTERNAL_RETIREMENT_ID. Note that the first parameter is optional, but must still contain a value.
Notes#
- If you pass both GOVERNMENT_CODE and PERSON_CODE (as non-ZERO values), Government Code will be used first.
- GOVERNMENT_CODE will be filled with leading zeroes, to make it nine digits long, and any hyphen separators provided, will be stripped out.