Professional Documents
Culture Documents
How To Implement Custom Person Numbering Using FastFormula
How To Implement Custom Person Numbering Using FastFormula
Using FastFormula
Doc ID:Note:279458.1 Type:HOWTO
Last Revision Status:
05-MAY-2006 PUBLISHED
Date:
In this Document
Goal
Solution
References
Applies to:
Goal
2) Can you supply information on how to implement this for when it is released?
Solution
2) Please review the Readme for Patch 3583096 or the What New for Family
Pack H documents on MetaLink for some information.
Please Review the Readme for Patch 3583096 or the "What's New in Family
Pack H",
both available from MetaLink.
Functional Description:
------------------------------------------------------------------------------
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.
The formula names for the Person Number Generation type are:
You can define only one formula for each person type.
You must define person number generation formulas in the setup business
group, and they must have the names shown here.
They have no effect if you define them in any other business group or if you do
not use the specified names.
3) Here is some sample information that should help get you going:
href="./ImplementingCustomPersonNumbering_files/filelist.xml">
Implementing
CUSTOM PERSON NUMBER GENERATION USING FAST FORMULAS
First, we should visit person numbering in general as used within the Oracle
HRMS suite.
Historically in the 10.x and 11.0.x Oracle HRMS suite, Applicant and Employee
were controlled through the Business Group under the navigation:
Work Structures > Organization > Classifications section > *Business Group
Information selection > Others button.
Now In 11.5.x Contingent worker number as also been added.
These choices controlled numbering ONLY within that specific Business Group.
Example: Your organization has Business Groups In the US, UK, and Japan.
A Person entered into the US could have employee number 1201; a person
entered into the UK could ALSO have Employee number1201, and the same for
the Japanese business group.
← Manual – When a person is entered into the HRMS suite, the number for
the person, Applicant, Contingent Worker, or Employee, had to be entered
by the User entering the person. This could cause minor errors if the
number being entered was already use.
← Automatic – Again, when a person is entered into the system, a number is
generated.This time by the system itself, no user intervention is required.
The system would check for the next number in the sequence being used
within that specific business group.
Now in 11.5.x, with the application of HR Family Pack F, Global Person was
introduced. A new pair of concurrent processes were created to alter the
numbering scheme of your Organization.
Now with the release of Family Pack H, Oracle has added Custom person
numbering. One piece of information not mentioned up to the point is that these
“numbers” are not stored in the database as a number. They are a text field.A
person could be Employee number 1, A1, XYZ-123-2213, or ABCDEFG.
However, only Manual Numbering allowed
to use anything other then numbers. Custom Person numbering now allows the
creation of a function and fast
formula that will control how the number looks and the next value making the
person numbering scheme much more flexible.
The following pages will provide an example of the function needed and a fast
formula as well as examples of the information created.
DISCLAIMER: These examples are Untested and may contain errors or other
mistakes. They are meant simply as an example to aid you in the creation of the
Fast Formula and associated Functions.
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.
Step 1:
You might need to grant access to other users. Contact your DBA to perform the
necessary steps.
Step 2:
Create a package Header and body to do the work of finding the next value to be
used:
REM
REM This example will use a DB Sequence to get the next value and it
returns an existing
REM person number every time it finds a match in the system using the
PARTY_ID parameter.
REM
SET VERIFY OFF
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
CREATE OR REPLACE PACKAGE PER_FF_CUSTOM_NUMBER_GENERATION AS
/* $Header */
--
Function Get_Customd IN number
,p_legislation_code IN varchar2
,p_person_type IN varchar2
,p_person_number IN varchar2
,p_party_id IN number
,p_person_id IN number
,p_national_id IN varchar2
,p_date_of_birth IN date
)
return varchar2;
END PER_FF_CUSTOM_NUMBER_GENERATION;
/
commit;
exit;
Step 3:
Create the package body
The package Header and Body must now be generated into the system. One
way is from sqlplus
This is a must – Using any other business group to implement and custom
numbering WILL NOT WORK!
Alter the Session date to reflect the earliest date you would want the custom
numbering to start (01-JAN-1900 for example).
Name = Get_Custom_Number
Data Type = Text
Class = External Funtion
Alias Name = NULL or what you want the alias to be
Description = Returns the next custom number value
Definition = PER_FF_CUSTOM_NUMBER_GENERATION.Get_Custom_Number
Name = EMP_NUMBER_GENERATION
Type = Person Number Generation
Description = Returns next Employee number
/*
------------------------------------------------------------------------
-------------------------------*/
/* NAME: EMP_NUMBER_GENRATION
*/
/* Returns the Next Employee Number.
*/
/
*-----------------------------------------------------------------------
--------------------------------*/
DEFAULT FOR Person_number IS ‘ ‘
DEFAULT FOR Party_ID IS 0
DEFAULT FOR Person_ID IS 0
DEFAULT FOR National_ID IS ‘ ‘
DEFAULT FOR Date_Of_Birth IS ‘1900/01/01 00:00:00’ (date)
DEFAULT FOR Hire_Date IS ‘1900/01/01 00:00:00’ (date)
INPUT ARE
Legislation_Code (text),
Person_Type (text),
Person_number (text),
Party_id,
Person_id,
Date_of_birth (date),
Hire_date (date),
National_ID (text)
Next_number = ‘0’
Invalid_msg = ‘ ‘
/
*-----------------------------------------------------------------------
--------------------------------*/
/* Next test is to insure we are processing an EMPLOYEE and
*/
/* not an Applicant or Contingent Worker
*/
/
*-----------------------------------------------------------------------
--------------------------------*/
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 Ne