70523-Implement Custom Person Numbering Using FastFormula
70523-Implement Custom Person Numbering Using FastFormula
70523-Implement Custom Person Numbering Using FastFormula
When the person numbering method is automatic, Oracle HRMS allocates numbers for a
person type (employees, contingent workers, or applicants) from a single local or global
sequence.
You can write a formula of type Person Number Generation to generate a custom
number sequence in place of the default sequence. Once you have defined and validated a
formula, Oracle HRMS executes the formula whenever automatic person numbering is active
and a person number is required.
Note: Custom Person Number Generation Fast Formula will ONLY be called if the
Organization / Business Group numbering is set to Automatic. If the numbering is set to
Manual, the fast formula will not be called.
CONDITIONS
1. Formulas must be defined in Setup Business Group
2. Formula Type must be Person Number Generation
3. The formula names for the Person Number Generation type SHOULD be:
a. EMP_NUMBER_GENERATION (for employee numbers)
b. APL_NUMBER_GENERATION (for applicant numbers)
c. CWK_NUMBER_GENERATION (for contingent worker numbers)
FORMULA CONTEXT
The formula has only one context value Business Group ID
FORMULA INPUTS
1. Legislation Code
2. Person Type
3. Person Number(*)
4. Party ID
5. Person ID(*)
6. Date of Birth
7. Start Date
8. National Identifier.
Note: (*) Value is null when creating person records.
FORMULA OUTPUTS
1. Next Person Number
2. Message
Steps 3: Create package/function to return toe number; this function will include all your
business requirements
/**************************************
BEGIN GET_CUSTOM_NUMBER
**************************************/
/********************************************************************
Create By : APPSLINK
Creation Date : 14-FEB-2012
Purpose : Returns Custom Employee
Used From : Person Number Generation Formula
Modified By :
Modify Date :
*********************************************************************/
ELSE
-- a match was found, therefore return existing person number
IF p_person_type = 'EMP'
THEN
l_next := l_emp_num;
ELSIF p_person_type = 'APL'
THEN
l_next := l_apl_num;
ELSIF p_person_type = 'CWK'
THEN
l_next := l_npw_num;
END IF;
END IF;
CLOSE person_exists;
RETURN l_next;
--
END get_custom_number;
/**************************************
BEGIN GET_CUSTOM_NUMBER
**************************************/
Step 4: Register external function in Setup Business Group
(Login to Setup Business Group -> Other Definitions -> Formula Functions)
Name = GET_CUSTOM_NUMBER
Data Type = TEXT
Class = EXTERNAL FUNCTION
Alias Name = NULL
Description = Returns the next custom number value
Definition = APPSLINK_HR_PACKAGE.GET_CUSTOM_NUMBER
NEXT_NUMBER = '0'
INVALID_MSG = ' '
IF PERSON_TYPE = 'EMP'
THEN
(
NEXT_NUMBER = GET_CUSTOM_NUMBER(LEGISLATION_CODE
,PERSON_TYPE
,PERSON_NUMBER
,PARTY_ID
,PERSON_ID
,NATIONAL_ID
,DATE_OF_BIRTH)
)
ELSE
INVALID_MSG = 'This is not an person_type of Employee!'
RETURN NEXT_NUMBER,INVALID_MSG