How to Generate Employee Number through Programming in Oracle HRMS

There are following steps need to follow to generate employee number through programming:

Step #1:

Create the FUNCTION “Get_Next_Employee_Number”:

CREATE OR REPLACE Function APPS.Dafz_Get_Next_Employee_Number(p_Business_Group_Id In Number,

p_Emp_Type In Varchar2)

Return Varchar2 Is

v_Emp_No Varchar2(100) := ‘0000’;

Begin

If (p_Emp_Type = ‘EMP’) Then

Begin

Select ‘0’ || Max(To_Number(Papf.Employee_Number) + 1)

Into v_Emp_No

From Per_All_People_f Papf

Where Papf.Employee_Number Is Not Null

And Papf.Employee_Number Not Like ‘XX%’

And Papf.Employee_Number Like ‘0%’

And Papf.Business_Group_Id = p_Business_Group_Id;

Exception

When Others Then

v_Emp_No := ‘NULL’;

End;

End If;

Return v_Emp_No;

End;

/

STEP # 2

Change the “HR:Business Group” & “HR: Security Profile” profile setting to “Setup Business Group“

HR Business Group Profile Setting

STEP # 3

Define Function in Oracle HRMS Responsibility, switch to “UAE HRMS Responsibility” and open “DEFINE FUNCTION”

Create New Function and calling the above function in it:

Define Function
 

 Step # 4

Switch to Responsibility “UAE HRMS Manager”  then Total Compensation –> Basic –> Write Formulas, Search for “EMP_NUMBER_GENERATION“

EMP NUM GEN

Edit this and update with below Fast Formula code:

/* ——————————————————————————————————-*/
/* NAME: EMP_NUMBER_GENERATION */
/* Returns the Next Employee Number.
/* Developed By: M Muzzammil Khan
/* Dated: 01-May-2013 */
/*——————————————————————————————————-*/
DEFAULT FOR Person_number IS ‘0000’
DEFAULT FOR Party_ID IS 0
DEFAULT FOR Person_ID IS 0
DEFAULT FOR National_ID IS ‘0000’
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)

INPUTS 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 = ‘0000’
IF person_type = ‘EMP’ then
(
Next_Number = DAFZ_Get_Next_Employee_Number(81,Person_Type)
)
RETURN Next_number

 

 STEP # 5

Save and compile the Fast formula and then try to create new staff from HRMS responsibility, you will see it will generate the new staff # through programming.

Feel free to contact me if further details required.

Thanks, Muzzammil Khan

 

 

 

IMPORTANT BASE TABLES FOR ORACLE HRMS R12

 Important Base tables for ORACLE HRMS r12

 Some of the very important base tables in HRMS are as follows:
1. per_all_people_f
This table will provide us the very basic information about the employee. The very data from the first screen we see when we open the ‘People -> Enter and Maintain’ form goes into this table. 

2. per_all_assignments_f
This table will store all the information which is been entered in the employee assignment form. 

3. per_addresses
This table will store all the information which is been entered in the employee address form. 

4. per_pay_proposals
This table will store all the information which is been entered in the employee salary form. 

5. per_person_types_tl
This table is used to find the type of the employee. This table is linked with the per_all_people_f with the person_type_id to find out the type of person.

6. per_jobs_tl
This table will contain the various types of JOBS in oracle. This table is been linked with the per_all_assignments_f table to retrieve the correct job name from the employee.

7. per_grades_tl
This table will contain the various types of GRADES in oracle. This table is been linked with the per_all_assignments_f table to retrieve the correct grade name from the employee.

8. hr_locations_all
This table will contain the various LOCATIONS in oracle. This table is been linked with the per_all_assignments_f table to retrieve the correct location name from the employee.

9. pay_all_payrolls_f
This table will contain the various types of PAYROLLS in oracle. This table is been linked with the per_all_assignments_f table to retrieve the correct payroll name from the employee.

10. per_pay_bases
This table will contain the various types of PAY BASES in oracle. This table is been linked with the per_all_assignments_f table to retrieve the correct pay basis name from the employee.

11. per_assignment_status_types_tl
This table will contain the various types of assignment types in oracle. The assignment types generally would be ‘Active Assignment’ etc.. This table is been linked with the per_all_assignments_f table to retrieve the correct job name from the employee.

12. per_person_type_usages_f
This table will store the correct person type of the particluar employee. We should never depend on the person type present in the per_all_people_f table. Instead we need to link the person_id with this table and get the correct person type.

Regards, Muzzamil Khan

Sr. Oracle HCM Consultant

Shortcut Keys in Oracle EBS Forms

Function Shortcut Key
Show Shortcut Keys Ctrl + K
Enter Query F11
Execute Query Ctrl + F11
Count Query F12
Clear Block F7
Clear Field F5
Clear Form F8
Clear Record F6
Edit Ctrl + E
Update Record Ctrl + U
Insert Record Ctrl + Down
Delete Record Ctrl + Up
Commit Ctrl + S
Duplicate Field Shift + F5
Duplicate Record Shift + F6
List of values Ctrl + L
List Tab Pages F2
Next Field Tab
Next Record Down Arrow Key
Next Primary Key Shift + F7
Next Set of Records Shift + F8
Previous Field Shift + Tab
Previous Record Up Arrow Key
Previous Block Shift+PageUp
Scroll Down PageDown
Scroll Up PageUp
Up Up Arrow Key
Down Down Arrow Key
Print Ctrl + P
Exit F4
Help Ctrl + H
Block Menu Ctrl + B
Display Error Shift + Ctrl + E

Proration formula Calculation | Oracle HRMS Payroll | Step by Step

Purpose:

When trying to add new salary for an employee in the middle of the month, the basic salary element is not prorated according to the element effective dates for the basic salary. only one element is calculated with one salary amount.

Following are the steps to configure the Prorate calculation of basic Salary

  • Create an Earning element (Recurring)
  • Create Element Links
  • Create an Event Group
    1. include the ‘INSERT’ event with either ‘DATE_PROCESSED’ or ‘DATE_EARNED’ change_type in the Table event updates form for the ‘PER_PAY_PROPOSALS’ table
    2. enable the dynamic trigger for ‘Insert’ and add it to the functional area ‘INCIDENT_REGISTER’ for their business_group & legislation
  • Create a formula of type ‘Payroll Run Proration’
  • Attach Event group and Proration formula to element
  • Salary Change

Oracle HRMS Techno Functional Training New Batch Starting From Aug, 2015

HRMS_300by300

 

Feel free to Mr. Farhan @ +971.529276492 for further details about this training.

Regards, Muzzamil Khan

Oracle HRMS Online Training Available

Dear All,

Online Oracle HRMS Training available for the following modules

  1. Core HR
  2. Payroll
  3. SSHR
  4. iRecruitment
  5. Oracle Learning Management
All Real time implementation, documents, Oracle paid materials, Oracle Vision Instance Access 24×7 will be share.
contact me for further details.
Regards,  Muzzamil Khan

How to Delete assignments and person in HRMS

Hi

The following code will help us out t delete an applicant/employee form the system.But if u are deleting the employee then make sure that
he/she must not attached to active payroll

CREATE OR REPLACE PROCEDURE xx_delete_person (p_person_id NUMBER)
IS
l_person_org_manager_warning VARCHAR2 (200);
l_message VARCHAR2 (4000);
BEGIN
fnd_file.put_line (fnd_file.output,
‘<—————–Purge Person—————->’
);
fnd_file.put_line (fnd_file.output,
‘On Date: ‘ || TO_CHAR (SYSDATE, ‘DD/MON/YY’)
);
fnd_file.put_line (fnd_file.output, ‘Person Id:’ || p_person_id);
hr_person_api.delete_person
(p_validate => FALSE,
p_effective_date => SYSDATE,
p_person_id => p_person_id,
p_perform_predel_validation => FALSE,
p_person_org_manager_warning => l_person_org_manager_warning
);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
l_message := SUBSTR (SQLERRM, 1, 4000);
fnd_file.put_line
(fnd_file.output,
‘<—————– Purge Person On Error —————->’
);
fnd_file.put_line (fnd_file.output,
‘On Date: ‘ || TO_CHAR (SYSDATE, ‘DD/MON/YY’)
);
fnd_file.put_line (fnd_file.output, ‘Person Id:’ || p_person_id);
fnd_file.put_line (fnd_file.output, ‘Error Rreason :’ || l_message);
END xx_delete_person;

I hope this will may help you.

Thank You, Muzzamil Khan

muzzamil.khan@gmail.com

iRecruitment – Interview Important Questions and Answers

Q1. External Candidate Cannot Insert Address while registering
ANSWER
======
Did you follow note 145837.1 to install the legislative data?
Else
1. Please check if you have a structure called PK_GLB. If you do, please add your segments to this structure and use it for your test.
2. If you don’t have a structure called PK_GLB, then please create this and add your
segments to the structure.
3. You then need to add the PK_GLB structure to your personalization in following format:

PK_GLB|Address Line 1|Address Line 2|Postal Code|City|Region

Add the Country at the end in the following format:

PK_GLB|Country

Q2. How to place iRecruitment External site visitor.jsp page to company website?
ANSWER
======
In the company’s website, the link(say career) must be pointing to IrcVisitor.jsp. it just
like any other link.
You can just place a Link, its just as palcing a simple HTML Link which will be redirected to access IrcVisitor.jsp.

Internal candidates can anyways login to the aplication and apply for jobs. They only need to access IrcEmpVisitor.jsp if they need to access from outside application.

Yes, the two links are supposed to be created because their purpose and jsp page is different.

Q3. Vacancies Approved are not searched at Employee/External Site Visitor.
ANSWER
======
1. Go into the responsibility: iRecruitment HRMS Manager

2. Navigate to Processes and Reports – Submit Processes and Reports

3. Schedule the iRecruitment Index Synchronization process to run as follows:

• Online index rebuild – to run every 5 minutes

Note: If the online synchronization process starts before the
previous one has completed, then the process will display
an error. Ensure that you set it to run 5 minutes after
completion, and not the start.

• Full index rebuild – to run each night

Q4. Wants to set time limit to purge
ANSWER
======
Oracle iRecruitment provides the iRecruitment Purge Old Data process to remove the candidate and applicant data
from the database. This process helps you meet any Data Protection statutory
requirements in your country. You can select any deletion method from the
various options and identify time criteria for deleting the inactive
data.

Please note that the purge options and activity criteria except Application Date, will consider data of users whose person record is shown as iRecruitment Registered User in the Person Type Usage window. The Application Date criterion limits the purge only to ex-applicants associated with iRecruitment Registered User person type and who have not applied for any job within the specific period. The purge process does not delete any data if the person record is associated with any other person types.Candidate Records
EXPLAINATION IN DETAILS:

1.Please note that the purge options and activity criteria except Application Date, will
consider data of users whose person record is shown as iRecruitment Registered
User in the Person Type Usage window. (what you mean it, its not clear)
ANSWER
======
iRecruitment registered user is an external candidate who has registered to irecruitment site. Person type usage screen is available in People > Enter and
Maintain > Others > Person tpye usage.

This statement means it will consider register candidates of irecruitment.

2. The Application Date criterion limits the purge only to ex-applicants associated with iRecruitment Registered User
person type and who have not applied for any job within the specific period.
(what you mean it, its not clear)
There are various activity criteria options. This determines the records on which the application will perform the defined
purge type.
• Application Date: You select this option to remove data of ex-applicants who have not applied for any job in the specified period.
• Login Date: You select this option to remove data of users who have not logged into
the application in the specified period.
• Update Date: You select this option to remove data of users who have not updated their account in the specified
period.

All this information you can find in implementation guide.

3. The purge process does not delete any data if the person record is associated with
any other person types. ( that means applicant if hired than his person type
will change from employee.excandidate or employee.exapplicant. These data will
definitely be maintained in the system. What about applicants application
terminated changes to exapplicant. I think these data will be maintained
regardless of the iRecruitment purge process. Please acknowledge).
If the person is hired then this process will not consider it. I believe ex-applicants
data will be considered.
Q5. In iRecruitment, LOV required for Applicant Rating
ANSWER
======
According to Metalink ‘Note 734465.1 – Is it Possible to Configure the LOV for ‘Rating?”, it is not possible to do this.

The valid values for the field are 1 to 100 and this has been hard coded in the
system.
Q6. How does one get PK_GLB address type installed for use in iRecruitment?
ANSWER
======
HRGLOBAL and data install are used to install legislative data. Follow note 145837.1 to install the legislative data. Note: 145837.1 – Latest HRMS (HR Global) Legislative Data Patch available. Installed the legislative seed data. The seeded address types are delivered in hrglobal, the Legislative Data Patch.

Q7. What is the functionality of Qualify in the iRecruitment? When we choose the parameter of
Qualify either ‘No’ or ‘Yes’, it doesnot display any result
ANSWER
======
This field is used to mark an applicant qualified or not. It is just a field like
applicant rating/ranking present in the page.
It just provides additional info for the recruiter/managers to manage applicant record. apart from that it
doesn’t have any other implication.
This field will appear on candidate page only whn applicant tracking is enabled for a
BG.

About Oracle Fast Formula

Oracle FastFormula is a simple way to write formulas using English words & basic mathematical functions. You can use information from your database in formulas without learning the database structure or a programming language.

Common tables
SELECT *
FROM all_objects
WHERE object_type = ‘TABLE’ AND object_name LIKE ‘FF%’

FF_FUNCTIONS
FF_FUNCTION_PARAMETERS
FF_FORMULAS_F
FF_FORMULA_TYPES
FF_DATABASE_ITEMS
FF_GLOBALS_F

Uses of Oracle FastFormula
In HRMS, Oracle FastFormula is used for validation, to perform calculations, and to specify rules. Here are some examples.

In Payroll, you use formulas to:
• Validate element inputs
• Calculate element pay values and run results during payroll processing
• Specify the rules for skipping an element during payroll processing
• Perform legislative checks during a payroll run

In Compensation and Benefits Management, you use formulas to:
• Specify the rules for Paid Time Off accrual plans, such as how much time is accrued and over what period, when new starters are eligible to begin accruing time, and how much time can be carried over to the next accrual term.
• Define custom calculations for benefits administration.
• Calculate the duration of an absence given the start and end dates and times.
• Create rules for benefits administration such as eligibility determination.

In People Management, fast formulas are used to:
• Check that element entry values are valid for an assignment
• Specify the criteria for including an assignment in an assignment set and to edit assignment sets
• Configure the people management templates in a number of ways such as supplying additional information to be available from fields on the template and validating field entries.
• Define collective agreements
• Generate custom global person number sequences for employees, applicants, and contingent workers.

Components of Formulas
Formulas are made up of a number of different components. These can include assignment statements, different types of input including database items, functions, nested expressions, and conditions.

1) Assignment and Return Statements.
To start with a simple example, suppose you wanted to calculate the pay value for the element Wage by multiplying the number of hours an employee works each week by hourly rate. You could write this formula:
wage = hours_worked * hourly_rate
RETURN wage
The first line is an Assignment statement that simply assigns a value to the element Wage. The second line is a Return statement that passes back the Wage value to the payroll run.

2) Constants and Variables.
In this example, the Wage value is calculated, but it could be a constant value, such as: wage = 200. To calculate the Wage value, Oracle FastFormula needs to get values for the variables hours_worked and hourly_rate.

3) Data Types.
Both variables and constants can be one of three data types:
• Numeric
• Text
• Date

4) Types of Input.
Values for the variables hours_worked and hourly_rate can be populated using three ways:
• Receiving them as input when the formula is called.
• Finding the values in the database from database items.
• Using global values, which you enter in the Globals window.

To use a database item or global value in your formula, you simply refer to it by name. You can browse through lists of database items in the Formulas window. To use a value passed to the formula at run time, you must write an Inputs statement.

 

Input Statements
In our Wage example, suppose that hours_worked is an input value to the element Wage. To pass the element input values to the formula during a payroll run, you define
an Inputs statement, as follows:
INPUTS ARE hours_worked
wage = hours_worked * hourly_rate
RETURN wage
The name you use in the Inputs statement must be the same as the name of the element input value, and multiple words must be joined by underscores. In this example, the input value hours_worked is numeric. If the input value is not numeric, you must tell Oracle FastFormula whether it is text or date. For example:
INPUTS ARE start_date (date)

 

Database Items
Suppose that hourly_rate is a standard rate taken from the Grade Rates table. This is an example of a database item. A database item has a label, or special piece of code, telling Oracle FastFormula the path to take to access the data. These items include both information unique to your enterprise, which you hold in flexfield segments & standard information such as assignment numbers and grades etc. In the Formulas window, you pick database items from a list. There are two types of DB Items: Static and Dynamic.

 

 

Static database items are shipped with the system and you cannot modify them.
Dynamic database items are created by Oracle HRMS processes whenever you define new elements or other related entities.

Element Database Items:
When you define a new element, Oracle HRMS runs a process to create a number of related database items for it. To ensure easy recognition of these items, the process adds the element name to each one. It also creates further database items for each pay and input value you use .

Global Variables
Use global values to store information that does not change often, but you refer to frequently, such as Company Name, or company-wide percentages used to calculate certain types of bonus. You define the global value and change its value using the Globals window.

Local Variables
Local variables exist in one formula only. You can change the value of a local variable by assigning it a value in an Assignment statement. In the Wage example, the variable wage itself is a local variable. It receives a value within the formula by the Assignment statement:
wage = hours_worked * hourly_rate

Functions
Oracle FastFormula provides functions that manipulate data in different ways.
GREATEST,INITCAP,LEAST LENTH,INSTR,LOWER,RTRIM,LTRIM,ABS,REPLACE SUBSTRING,TRANSLATE, CALCULATE_HOURS_WORKED,FLOOR,ROUND,TRUNC, ETC( For full list refer the Fast Formula Guide).
There are special functions that convert variables from:
• numbers to text (TO_TEXT)
• dates to text (TO_TEXT)
• text to date (TO_DATE)
• text to number (TO_NUM)

Nested Expressions
Each function or calculation is one expression, and you can nest expressions to create more complex calculations. You must use brackets to make clear to Oracle FastFormula the order in which the calculations are performed. For example:
ANNUAL_BONUS = trunc(((((salary_amount/100)*
bonus_percentage)/183)*(days_between(end_period_date,
start_date) + 1)), 2)
Oracle FastFormula begins calculating inside the brackets and from left to right, in the
following steps:

1. salary_amount/100
2. 1. * bonus_percentage
3. 2. / 183
4. days_between (end_period_date, start_date)
5. 4. + 1
6. 3. * 5.
7. TRUNC(6.,2)

Incorporating Conditions
In Wage element example, only one value is returned, and it is calculated in the same way for every assignment. However you may need to perform different calculations depending on the particular group of employee assignments, or the time of the year, or some other factors. You can do this by incorporating conditions in your formula.

Simple Conditions
For example:
IF age < training_allowance =” 30″ training_allowance =” 0″>

 

IF (DAYS_BETWEEN(end_period_date, start_date)+1) >= threshold_value WAS DEFAULTED
There is a special type of condition called WAS DEFAULTED. Use this to test whether a default value has been placed in an input value or database item. Default values are placed using the Default statement. For example:
DEFAULT FOR hourly_rate IS 3.00
X = hours_worked * hourly_rate
IF hourly_rate WAS DEFAULTED
THEN
MESG = ‘Warning: hourly rate defaulted’
In this example, if the database item hourly_rate is empty (NULL), the formula uses the default value of 3.00 and issues a warning message.

Combined Conditions
You can combine conditions using the logical operators AND, OR, NOT.

Commenting Formula
You must include comments in your formulas to make them easier to read and understand what the formula does. For example, you can name the formula as:

/* Formula: Calculates Duration of Absence */
Caution: Do not put a comment within a comment. This causes Oracle FastFormula to return a syntax error.

 

Alias Statements
Sometimes DB Item names are too long to conveniently use in a formula. Set up an alternative shorter name to use within the formula. For example: ALIAS as_qualifying_length_of_service AS as_los In the rest of the formula, you can use the alias (in this example, as_los) as if it were
the actual variable (as_qualifying_length_of_service).

Default Statements
It is used to set a default value for an input value or a database item. The formula uses the default value if the database item is empty or no input value is provided when you run the formula. For example:
DEFAULT FOR hourly_rate IS 3.00
X = hours_worked * hourly_rate
IF hourly_rate WAS DEFAULTED
THEN
MESG = ’Warning: hourly rate defaulted’
This example sets a default of 3.00 for the database item hourly_rate. If hourly_rate is empty (NULL) in the database, the formula uses the default value of 3.00. The formula uses the ’WAS DEFAULTED’ test to detect when a default value is used, in which case it issues a warning message.

Important: You must use the Default statement for database items that can be empty. The Database Items window includes a check box labeled Default Required. This check box is checked for database items that can be empty. The Database Items window appears when you choose the Show Items button on the Formulas window.

How to Compile FastFormula?
After creating or editing a formula in the Formula window, choose the Verify button to compile it.
If you need to compile many formulas at the same time, you can run the concurrent program “Bulk Compile Formulas process” in the Submit Requests window.

Formula Errors
There are two types of error that can occur when using Oracle FastFormula:
• Verify-time errors occur in the Formulas window when you run the formula verification. An error message explains the nature of the error. Common verify-time errors are syntax errors resulting from typing mistakes.

• Run-time errors occur when a problem arises while a formula is running. The usual cause is a data problem, either in the formula or in the application database. The basic Oracle FastFormula errors that can occur at run-time are:

• Uninitialized Variables: An uninitialized local variable is one that has no value when the formula runs. The term ’uninitialized’ means you have not assigned any value to the variable before you try to use it. This causes an error in all statements except the Return statement. For example:
IF (tax_band < tax =” salary”> 2000)
THEN tax = salary / 10
IF tax > 1000
THEN…
This formula fails with an ’Uninitialized variable’ message (for the variable tax) if the
tax band is set to 2000.

• Divide by Zero: Dividing a number by zero is an operation that provides no logical result. If this situation ever arises, Oracle FastFormula passes a code back to the application indicating an error (the application then takes the appropriate action).Always check for the possibility of a divide by zero error if there is any chance it could occur. For example, the formula:
x = salary/contribution_proportion
produces an error if the contribution proportion is set to zero. In this formula, check
for the divide by zero condition as follows:
IF contribution_proportion = 0
THEN

 

(

 

message = ‘The contribution proportion is not valid.’

 

RETURN message

 

)
ELSE x = salary/contribution_proportion

• No Data Found: A database item supposed to be in the database was not found. This
represents an error in the application data.

• Too Many Rows: The database item definition within the application caused more than one value to be fetched from the database.

• Value Exceeded Allowable Range: This can occur for a variety of reasons such as:

• exceeding the maximum allowable length of a string (which is 240 characters)
• rounding up a number to an excessive number of places, for example, round (1,100)
• using an invalid date, for example, 39-DEC-1990.

• Invalid Number: This occurs only when a database item contains an item that does
not make sense as a number.

• Null Data Found: A database item was found to have a null value when it should have had a non-null value. Use the Default statement for database items marked as Default Required in the Database Items window.

How to write simple Fast Formulas in Oracle HRMS

Assignment
Write a formula to calculate the travel payment Pay Value by multiplying Distance by the company travel rate, which is stored as a global value. How to define Global valuehas been already covered before.

Writing Simple Formulas
Assume that a company has defined an element called ‘Travel Payment’ with an input value called ‘Distance’. Write a formula to calculate the travel payment Pay Value by multiplying Distance by the company travel rate, which is stored as a global value.

Name the formula XX_TRAVEL_PAYMENT, where xx is your group identifier.

Steps to write a Simple Formulas
1. Navigate to the Formula window using your local Super HRMS Manager responsibility.
Total Compensation > Basic > Write Formulas
2. Set your effective date to 1 January 2000.
3. Enter the name XX_TRAVEL_PAYMENT, where xx is your group identifier.


4. Select Oracle Payroll in the Type field.
5. Select the Edit button.

6. Write your formula in the Edit Formula window, then select the Verify button.
7. When the formula verifies successfully, close the Edit Formula window.
8. Save your work.

Your formula should be similar to the following-

DEFAULT FOR distance IS 0
INPUTS ARE distance

travel_payment = distance * XX _TRAVEL_RATE

RETURN travel_payment

Note: To complete the setup for the travel payment, you would:
• Define a formula processing rule to associate the formula with the Travel Payment element.
• Define a formula result rule to return the travel_payment formula result to the element’s Pay Value.

 

Writing Conditional Logic in Fast Formulas

Writing Conditional Logic
Let us assume that the company has updated the Travel Payment element so that it now has a Pay Value and two input values: distance and override travel rate. Most employees receive the travel rate stored in the global value, but there is the discretion to override it with a special rate using the override travel rate input value.

1. Update your Travel Payment formula to use the override travel rate, if it has been entered, and otherwise to use the global value.

Hint: Use the WAS DEFAULTED condition.

Writing Conditional Logic
1. Navigate to the Formula window using your local Super HRMS Manager responsibility.
Total Compensation > Basic > Write Formulas
2. Set your effective date to 1 January 2000.
3. Query: XX_TRAVEL_PAYMENT, where xx is your group identifier.
4. Select the Edit button.
5. Add the conditional logic to your formula, and verify it.
6. When the formula verifies successfully, close the Edit Formula window.
7. Save your work.
8. Select Correction.

Your fast formula should be similar to the following:

DEFAULT FOR distance IS 0
DEFAULT FOR override_travel_rate IS 0
INPUTS ARE distance, override_travel_rate
IF override_travel_rate WAS DEFAULTED
THEN
travel_payment = distance * XX_COMPANY_TRAVEL_RATE
ELSE
travel_payment = distance * override_travel_rate
RETURN travel_payment

 

 

How to add Functions to Fast Formulas

 

 

Assignment
Edit your Travel Payment formula to ensure that the result is always rounded to two decimal places.
Using the Round Function Edit your Travel Payment formula to ensure that the result is always rounded to two decimal places. It can be done by using functions in Fast Formulas.

Using the Round Function
1. Navigate to the Formula window using your local Super HRMS Manager responsibility. Total Compensation > Basic > Write Formulas
2. Set your effective date to 1 January 2000.
3. Query XX_TRAVEL_PAYMENT, where xx is your group identifier.
4. Select the Edit button.
5. Add the Round function to your formula, and verify it.
6. When the formula verifies successfully, close the Edit Formula window.
7. Save your work.
8. Select Correction.

Your formula should be similar to the following:
DEFAULT FOR distance IS 0
DEFAULT FOR override_travel_rate IS 0
INPUTS ARE distance, override_travel_rate
IF override_travel_rate WAS DEFAULTED
THEN
travel_payment = ROUND((distance * XX_COMPANY_TRAVEL_RATE),2)
ELSE
travel_payment = ROUND((distance * override_travel_rate),2)
RETURN travel_payment

 

 

 

 

 

Fast Formula to Validate User Tables in Oracle HRMS

 

In this practice you will learn how to write a fast formula that validates the user table. For this you need to first write a validation formula and then select the formula in the Columns window and test it by entering values outside the valid range in the Table Values window.

Writing Formulas to Validate User Tables
Write a validation formula that returns an error and a message if a user enters a value less than 10 or greater than 50 in the Dues column of your Union Dues user table. Name the formula XX_CHECK_UNION_DUES, where XX is your group identifier.

Select the formula in the Columns window, and test it by entering values outside the valid range in the Table Values window.

Writing Formulas to Validate User Tables
1. Navigate to the Formula window using your local Super HRMS Manager responsibility.
(N) Total Compensation > Basic > Write Formulas
2. Set your effective date to 1 January 2000.
3. Enter XX_CHECK_UNION_DUES in the Name field.
4. Select User Table Validation in the Type field.
5. Select the Edit button.
6. Write your formula, and verify it.
7. When the formula verifies successfully, close the Edit Formula window.
8. Save your work.

Formula
Your formula should be similar to the following:

INPUTS ARE entry_value(text)
IF TO_NUM(entry_value) <> 50
THEN
(formula_status = ‘e’
formula_message = ‘Union Dues must be between 10 and 50. Please re-enter.’)
ELSE
formula_status = ‘s’
RETURN formula_status, formula_message

Selecting the Validation Formula in the Columns Window
9. Navigate to the Table Structure window using your local Super HRMS Manager responsibility.
(N) Other Definitions > Table Structure
10. Set your effective date to 1 January 2000.
11. Query: xx Union Dues in the Name field, where xx is your group identifier.
12. Select the Columns button.
13. Select your validation formula in the Formula field.
14. Save your work.

Testing Your Validation Formula
15. Navigate to the Table Values window using your local Super HRMS Manager responsibility.
(N) Other Definitions > Table Values
16. Set your effective date to 1 January 2000.
17. Query: xx Union Dues, where xx is your group identifier.
18. Select Query By Example – Run from the View menu.
19. In the Union A row of the Values region, enter 5 in the Value field. Tab to the next field. Your error message should be displayed.
20. Re-enter 30 and tab to the next row.
21. Select Correction.
22. Enter 60 in the Value field and tab to the next field. Again, your error message should be displayed.
23. Re-enter 32.
24. Select Correction.
25. Save your work.

 

 

Oracle Fast Formula Tutorial-Defining User Tables and Accessing Table Values

You should now be familiar with Oracle Fast Formulas. In the following tutorial you will learn how to define user tables and access table values in Fast Formulas.

Assignment
Create a user table called xx Union Dues (where xx is your group identifier), using the following information.Enter 30 and 32 as Value against column dues.

Row1-Union A 30
Row2-Union B 32

Then write a formula called XX_UNION_DUES to get the appropriate deduction from the table, using the input Union.

Tasks to be carried out
Defining User Tables and Accessing Table Values

Imagine a company has defined a deduction for union dues. The deduction element has one input value (Union) for entering the name of the union to which the employee subscribes: Union A or Union B.

1.Create a user table called xx Union Dues (where xx is your group identifier), using the following information.

Union A 30
Union B 32

2.Then write a formula called XX_UNION_DUES to get the appropriate deduction from the table, using the input Union.

Solution – Defining User Tables and Accesing Table Values
Defining the Table Structure

1. Navigate to the Table Structure window using your local Super HRMS Manager responsibility.
• (N) Other Definitions > Table Structure
2. Set your effective date to 1 January 2000.
3. Enter xx Union Dues in the Name field, where xx is your group identifier.
4. Select Match in the Match Type field.
5. Select Number in the Key Units of Measure field.
6. Enter Union in the Row Title field.
7. Save your work.
8. Select the Columns button.
9. Enter Dues in the Name field of the Columns window.
10. Save your work.
11. Close the Column window.
12. Select the Rows button.
13. Enter 1 in the Sequence field and Union A in the Exact field of the Rows window.
14. Select New from the File menu.
15. Enter 2 in the Sequence field and Union B in the Exact field of the next row.
16. Save your work.
Entering Table Values
17. Navigate to the Table Values window using your local Super HRMS Manager responsibility.
• (N) Other Definitions > Table Values
18. Set your effective date to 1 January 2000.
19. Query: xx Union Dues, where xx is your group identifier.
20. In the Values region, select Union A in the Exact field and enter 30 in the Value field.
21. Tab to the next row and select Union B in the Exact field and enter 32 in the Value field.
22. Save your work.
Writing the Formula
23. Navigate to the Formula window using your localSuper HRMS Manager responsibility.
• (N) Total Compensation > Basic > Write Formulas
24. Set your effective date to 1 January 2000.
25. Enter the name XX_UNION_DUES, where xx is your group identifier.
26. Select Oracle Payroll in the Type field.
27. Select the Edit button.
28. Write your formula in the Edit Formula window, then select the Verify button.
29. When the formula verifies successfully, close the Edit Formula window.
30. Save your work.
Formula
Your formula should be similar to the following:
DEFAULT FOR union IS ‘ ‘
INPUTS ARE union(text)
deduction = 0
IF NOT union WAS DEFAULTED
THEN
deduction = TO_NUMBER(GET_TABLE_VALUE(‘xx_union_dues’,
‘dues’, union))
RETURN deduction

Note: To complete the setup for the union dues deduction, you would:

• Define a formula processing rule to associate the formula with the Union Dues Deduction element
• Define a formula result rule to return the union_dues formula result to the element’s Pay Value

 

 

How to Define or Setup Global Value in HRMS

To set-up the different rates for employee reimbursement options you define global value. Here in this example I will define a global value called XX_TRAVEL_RATE, where xx is your group identifier. Enter a value for the amount of money paid per mile or kilometer for reimbursement of business travel expenses. The screenshot is itself self explanatory.

Follow the simple steps for defining a Global Value

1. Navigate to the Globals window using your local Super HRMS Manager responsibility. Total Compensation > Basic > Global Values
2. Set the effective date to 1 January 2000.
3. Enter the name XX _TRAVEL_RATE, where XX is your group identifier.
4. Enter a description, like ‘Travel reimbursement rate per mile’ just for an easier identification.
5. Select Number in the Type field.
6. Enter a value, such as 7.5.
7. Save your work.

 

How to Register/Delete Procedure in User Hook

1)     Create API Hook Call (Register Procedure in User Hook)

  • Package Name: hr_api_hook_call_api.create_api_hook_call

declare

l_api_hook_call_id      number;

l_object_version_number number;

begin

hr_api_hook_call_api.create_api_hook_call

 (p_validate                                         => false,

  p_effective_date                             => to_date(’01-JAN-1950,’DD-MON-YYYY’),

  p_api_hook_id                                   => 63,

  p_api_hook_call_type                    => ‘PP’,

  p_sequence                                       => 3000,

  p_enabled_flag                                => ‘Y’,

  p_call_package                                => ‘SCOOP_NATIONALITY_CHECK’,

  p_call_procedure                           => ‘POLISH_NAME_CHECK’,

  p_api_hook_call_id                         => l_api_hook_call_id,

  p_object_version_number         => l_object_version_number);

end;

  1. The hook mechanism only supports calls to package procedures currently so api_hook_call_type must be PP.
  1. Sequence numbers > 2000 are recommended, as sequences < than 2000 are reserved for Oracle seeded logic which needs to be processed first. Please note that you can add any number of hooks to the same API, and order them using the sequence.

2)     Delete  API Hook Call (Delete Registered Procedure in User Hook)

  • Package Name: hr_api_hook_call_api.delete_api_hook_call

declare

l_api_hook_call_id      number := 2;

l_object_version_number number := 3;

begin

hr_api_hook_call_api.delete_api_hook_call

 (p_validate              => false,

  p_api_hook_call_id      => l_api_hook_call_id,

  p_object_version_number => l_object_version_number);

end;

 

Demo on how to register Procedure in User Hook:

 

–Step 1 

select * from hr_api_modules where module_name  =’CREATE_PERSON_ABSENCE‘

— Step 2

select ahk.api_hook_id,ahk.api_hook_type,

        ahk.hook_package,

        ahk.hook_procedure from hr_api_hooks ahk where

 api_module_id = 1731

— Step 3 — Get All registered Packages and Prcoedures

select * from hr_api_hook_calls  where api_hook_id = 3840 — After Proccess

— Step 3 – Complete Query

select ahk.api_hook_id,ahk.api_hook_type,

        ahk.hook_package,

        ahk.hook_procedure

   from hr_api_hooks ahk,

        hr_api_modules ahm

 where ahm.module_name=’CREATE_PERSON_ABSENCE’ 

  and ahk.api_module_id=ahm.api_module_id

— How to Register Procedure to user Hook

declare

l_api_hook_call_id      number;

l_object_version_number number;

begin

hr_api_hook_call_api.create_api_hook_call

 (p_validate              => false,

  p_effective_date        => to_date(’01-JAN-1950′,’DD-MON-YYYY’),

  p_api_hook_id           => 3840 ,– API HOOK ID

  p_api_hook_call_type    => ‘PP’,

  p_sequence              => 3200,– SEQ NO

  p_enabled_flag          => ‘Y’,

  p_call_package          => ‘DAFZHR_USERHOOK_PKG’, — Package Name

  p_call_procedure        => ‘Create_Person_Absence_a’, — Procedure Name

  p_api_hook_call_id      => l_api_hook_call_id,

  p_object_version_number => l_object_version_number);

   dbms_output.put_line(‘Procedure Successfully Registered’);

   exception

  when others then

    dbms_output.put_line(sqlerrm);

 end;

— Run the Pre Processor —-

DECLARE

BEGIN

    hr_api_user_hooks_utility.create_hooks_one_module(1740); — Module ID

     dbms_output.put_line(‘Pre-Preocessor Run Successfully’);

    exception

      when others then

        dbms_output.put_line(sqlerrm);

END;

 

 

Oracle HRMS Functional Knowledge

HRMS Setups

1. Changing the Employee number from ‘Manual’ to ‘Automatic’ and vice versa.

i. Employee numbering from Automatic to Manual

From Database
update hr_organization_information
set org_information2 = ‘A’
where org_information_context = ‘Business Group Information’
and org_information1 = ‘XXX’ –Business Group Short Name

From Application
Check from the application if the employee number is set to ‘Automatic correctly.

Employee numbering is setup at the Organization level. The choice of Manual/Automatic employee numbering is established when the Organization is setup

Work Structure > Organization> Description Define an Organization. Under Organization Classifications > Select classification = Business Group Then select Business Group Info.

ii. Employee numbering from Manual to Automatic

From Database
update hr_organization_information
set org_information2 = ‘M’
where org_information_context = ‘Business Group Information’
and org_information1 = ‘XXX’ –Business Group Short Name

From Application
Check from the application if the employee number is set to ‘Manual’ correctly.

Employee numbering is setup at the Organization level. The choice of Manual/Automatic employee numbering is established when the Organization is setup

Work Structure > Organization> Description Define an Organization. Under Organization Classifications > Select classification = Business Group Then select Business Group Info.

—————————————————————————–

Enable/display the Legal Disclaimer page and text in the Self Service instructor Text field in the Communication Types Usages window.

Use the following steps to enable/display the Legal Disclaimer page and text:

Responsibility: Global Benefits Manager

1. Navigation: Total Compensation : General Definitions : Additional Setup : Communication Types
2. Query for “Legal Disclaimer”
3. Select ‘To Be Sent’ Code of “Not Applicable”
4. In Usage field select ‘Self Service Instruction Text’
5. Save record.
6. Click Usages
7. Note: In the Legal Disclaimer we cannot specify any Communication Usages, such as Life Event, Program, Plan, or Rule, to limit the display of the instruction text that we write. So all these fields should be left blank.
8. Enter the disclaimer text in the ‘Self Service Instruction Text’ field.
Note: We can use the help of HTML coding to set the fonts in the Text.