Oracle R12 HR Payroll “Using Oracle FastFormual For Payroll Calculatins
Using Oracle FastFormula for Payroll Calculations
You use Oracle FastFormula to define and maintain the formulas you need for pay and pay-related calculations.
When you receive Oracle Payroll, some formulas are predefined in your system. You cannot make any changes to these formulas, but you can copy them and modify the copies.
To write formulas for elements you define:
1. Design your element and how it will be calculated.
2.Write any formulas required to validate input values (formula type = Element Input Validation).
3.Write a formula, if required, to define the rules for skipping the element during payroll processing (formula type = Element Skip).
4. Define the element, referencing any formulas written in steps 2 and 3
5.Write the formula or formulas for calculating the run results (formula type = Oracle Payroll).
6.Associate each Oracle Payroll type formula with the element in the Formula Result Rules window, and specify what happens to the formula results for this element.
Note: You can associate several formulas with a single element, each one for use with a different employee assignment status. You can also use the same formula for more than one element. In this
case, if the formula references pay or input values (through the Inputs statement), each element must have pay and input values with the same names.
Writing Formulas for Element Skip Rules
If your payroll policies require periodic or conditional processing of an element, you can write a formula to define when the run should process the element and when it should skip it. For example, your formula could specify:
o process the Union Fees element every three periods, or
o process the Union Fees element every run unless the Union_Fees_Paid balance is greater than 10 000.
You can associate only one element skip rule formula with each element. You must write and validate the formula before you define the element so that you can select the formula from a list on the Element window.
To write a formula defining a skip rule:
1. Select formula type Element Skip in the Formulas window.
2. Use as many input values as you require. The formula must set and return a local variable of type text, and this variable must be called skip_flag. If the returned value of this variable begins with the letter y (such as ‘Yes’), all processing for the element is skipped. Otherwise the element processes as normal. The following example of a skip rule formula defines that the Union Fees element is not processed if the Union_Fees_Paid balance is greater than 10 000:
IF Union_Fees_Paid > 10000
THEN
skip_flag = ‘yes’
ELSE
skip_flag = ‘no’
RETURN skip_flag
Accessing Input Values in Payroll Formulas
In many formulas for calculating pay, some or all of the information you need comes from the input values of the element.
As a simple example, suppose you pay some salaried employees using a recurring element called Salary. The Salary element has an input value called annual_salary. You need a formula that divides the input value into
twelve parts:
INPUTS ARE annual_salary
Salary = annual_salary/12
RETURN Salary
Attention:
When you use an Inputs statement, you need to make sure that none of the input values can have a value of null because this causes the formula to fail. You can avoid this problem by using the Default
statement.
Using an Inputs statement is the most efficient way to access the input values of the element with which the formula is associated. However, if the formula uses the input values of other elements, it must access the
database items for them. For example, if you want to use the input value annual_salary in the formula to calculate the element Bonus, you use the database item as follows:
IF Salary_annual_salary > 20000
THEN
Bonus = bonus_rate * (sales_achieved – sales_threshold)
Notice that the database item name is in two parts: the input value (annual_salary) name prefixed by the element name (Salary). This is the naming convention for the database items of element input values.
Multiple Entries of Element Input Values
When you define an element, you can enable multiple entries of the element within a payroll period. As a simple example, suppose you use the element Wages to pay some weekly-paid employees. The Wages element has the input value hours_worked. Each week, you regularly make five entries for the input value hours_worked.
To calculate Wages, you can multiply the hours worked each day by the employee’s standard rate from the grade rates table, so that your formula looks like this:
INPUTS ARE hours_worked
Wages = hours_worked * standard_rate
RETURN Wages
During the payroll run, the formula fires five times, creating five separate pay values, one for each entry.
Now consider using the database item Wages_hours_worked instead of an Inputs statement. The database item for an entry value sums up all the entries made in the payroll period.
This is a great convenience when referring to input value totals for a payroll period. However, you must be sure that it is the totals that you want to use. In this example, using the database item produces the wrong
result.
Wages_hours_worked gives a single value that is the sum of the five entries in each weekly payroll period. When the payroll runs, the formula fires five times, each time calculating wages using the total hours worked in the week.
Attention: If multiple entries are enabled for an element, be careful when using database items for the element’s entry values. These database items hold the sum of all the entries. This includes entries made as indirect formula results during the payroll run.
Database Items for Numeric Values Only
Entry value database items are not created for input values with units of character, date, or time when multiple entries are enabled for the element. This is because entry values of these types cannot be summed over the payroll period. Only numeric values can be summed. Numeric input values are those with units of:
o Hours
o Integer
o Money
o Number
Notice that other database items, such as default, minimum, or maximum, may be created for non-numeric input values.
Writing Efficient Payroll Calculation Formulas
The following statements are true as general guidelines for typical payroll runs:
o The longer an element’s formula, the longer its processing time.
o The more elements entered for an assignment, the longer its processing time.
o One element associated with a lengthy formula usually processes faster than two related elements each associated with a short formula.
o The overall number of elements and formulas in the system has little effect on processing efficiency. It is the number of elements per assignment that affects processing time.
Formula Format
Use comments and white space freely when entering formulas. This makes the formulas easier to read and understand, and has no effect on performance or memory usage. Use indentation for the same reason, especially when you are using brackets to control the order of processing. It is good practice to include the following information in a comment at the beginning of a formula:
o formula title and short statement of its purpose
o description of formula inputs
o list of variables and constants that may require updating
o description of the input values of the element that receives the formula’s direct result
o explanation of the formula’s calculations
o administrative information such as the name, address and telephone number of an office administering the earnings, deduction, or charge the formula affects
o the dates of formula modifications, the names of those entering the edits, and possibly the reasons for change
Variable Names and Aliases
Use names that are brief yet meaningful to improve readability. Name length has no effect on performance or memory usage. Use Aliases if the names of database items or global values are long.
Input Statements
Use Input statements rather than database items whenever possible. This improves formula processing by as much as a factor of ten. It speeds up the running of your payroll by eliminating the need to access the database for the input values.
Inefficient:
Salary = Salary_annual_salary / 12
RETURN Salary
Efficient:
INPUTS ARE Annual_salary
Salary = Annual_salary / 12
RETURN Salary
Date Literals
Use the TO_DATE function only when the operand is a variable.
Inefficient:
Start_date = TO_DATE ( ’12-JAN-1992′ )
Efficient:
Start_date = ’12-JAN-1992′ (date)
Single Expressions
Use a single expression in straightforward formulas where this does not lead to confusion.
Inefficient:
Temp = Salary / Annualizing_factor
Tax = Temp * 3
Efficient:
Tax = (Salary / Annualizing_factor) * 3
Database Items
Do not refer to database items until you need them. People sometimes list at the top of a formula all the database items the formula might need, thinking this helps Oracle FastFormula process more quickly.
However, this in fact slows processing by causing unnecessary database calls.
Inefficient:
S = Salary
A = Age
IF S < 20000 THEN
IF A < 20 THEN
Training_allowance = 30
ELSE
Training_allowance = 0
Efficient:
IF Salary < 20000 THEN
IF Age < 20 THEN
Training_allowance = 30
ELSE
Training_allowance = 0
The first example always causes a database fetch for Age whereas the second only fetches Age if Salary is less than 20000.
Defining and Linking a Salary Element
You define a salary element in the Element window.
To define a salary element:
1. Set your effective date to a day on or before the start of the first payroll period for which you want to enter salaries.
2. Enter a name for the element, and select the classification Earnings.
3. Select the Type Recurring.
4. Do not check the Standard check box.
5. Save the element, then choose the Input Values button.
6. In the Input Values window, create one input value to hold the salary value. This is normally the
Pay Value. If you want to associate this element with more than one salary basis, create one input
value for each salary basis.
Suggestion:
If the salary basis is different from the payroll periods of the employees who will receive this element, make this clear in the input value name. For example, if the salary basis is Annual, you could name the input value Annual Salary.
7. You can enter validation criteria for the input value, such as a Minimum and Maximum value, or a formula to perform the validation. Select Error in the Warning or Error field.
Note: If you select Warning, users do not see the warning in the Salary Administration window
8. Save your work.
To link the salary element:
1. Set your effective date to a day on or before the start of the first payroll period for which you want to enter salaries.
2. In the Element Link window, select your new salary element.
3. Do not check the Standard check box.
4. Select eligibility criteria for this element. If you want to make the element available to all employees, do not select any criteria.
5. Save the link.
6. If you want to enter different validation criteria for different eligibility groups, you can change the Min and Max valid values in the Link Input Values window.
To define salary basis for the salary element only:
1. Set your effective date to a day on or before the start of the first payroll period for which you want to enter salary basis
2. In the salary basis window, select your new salary basis.
7. Define salary basis for salary element
I was visiting your website and it is very informative in terms of basics but do you have any setup documents to share as we will be implementing R12 very soon in our Organization.
Thanks
Rizwan
+1 647 272 8591
Hello Rizwan,
Did you get my reply via email?
Faisal
Same with Rizwan, do you plan documentation(including Training Plan, what ,when and how) and any setup document to share as we will be implement R12, and one more again what organization’s awareness that should be prepared in this regard?
I need ASAP
thanks & Regards
Sabaruddin de AB
Hi. Sabaruddin,
First sorry for delay response.
Yes, I have Setup documents and I can plan Online training as well.
Regards,
Faisal
Dear faisal,
can u please provide me the setup documents of R12. I already implemented in test server but i need to clarify the things that i have done it correctly or no. do u have any idea about self service. i need the setup documents for it also. if u have can u just send me to this email
mohsinsm29@yahoo.co.in
I need ASAP
thanks & Regards
Mohsin
Hi Mohsin,
Yes I have documents but I can’t share with you because of copyrights by Oracle.
Let me know what help you required in Self Service.
Thanks and Regard,
Faisal
Hi
Your website is pretty practical and informative for me. I am new to business analyst field. I choose oracle R 12 HRMS and Finance as my domain.
Do you know where I can get free setup link I can practice ? or any ducuments I should focus on?
Thanks,
Vivian
Hi Vivian, thanks for visiting Oracleport. Do google for setup documents or send me any specific requirement , I will try update in oracleport or send you document by email.
Regards,
Faisal
Dear Faisal,
I need one help regarding payroll formula. my client has requirements likewise– they are using payroll cut off date on 20th of every month. so that any entries after 20th will be restricted and these entries will take effect on next payroll period… for example: a employee is absent on 25th of july 2012.. but his deduction will be in next payroll period. ie; in august..
please can help regarding this ..
Thank you.
Hi Faisal,plz send me payroll setup documents if u have.
thanks,
mahesh
Hi Mohsin,
Best option is, Use RetroPay Process in this situation. Or create Element manually in next month to get effected.
Sorry for late response, I was on vacation.
Regards,
Faisal.
Hi Man
I Appreciate your work & documents sharing
kindly, could you do it for Selfservice and workflow exercise for HR (Ex. add new child).
i realy appreciate it.
Rgards
deya Mashhour
Hi Man
I Appreciate your work & documents sharing
kindly, could you do it for Selfservice and workflow exercise for HR (Ex. add new child).
I realy appreciate it.
good work man
Rgards
deya Mashhour
Hi all can anyone provide me the basic complete of US payroll with SSHR, i’m a beginner and facing difficulty to crack the job.
Hi all can anyone provide me the basic complete setup of US payroll with SSHR, i’m a beginner and facing difficulty to crack the job.
I have been using oracle HR and Payroll as functional support for a number of years, but what I find it difficult is the tables schema and quering the tables, I have bought an sql oracle books, learn how to use sql, but when it comes to Oracle tables I find it difficult to learn which parts and there is no specific course for this purpose just concentrating on Oracle HRMS tables rather than general SQL.
I am interested on your comment on above.
Many thanks
Safia
in r12 hr detail report the age calculation is not correct here hijri calender is used
which showing two years less than actual age
Dear faisal,
can u please provide me the setup documents of R12. I Appreciate your work & documents sharing if u have can u just send me to this email gorantlasrao44@gmail.com
I need ASAP
Thanks & Regards
Gorantla Srinivas
Dear faisal,
Please provide me the setup documents of R12. I Appreciate your work & documents sharing if u have can u just send me to this email gorantlasrao44@gmail.com
I need ASAP
Thanks & Regards
Gorantla Srinivas
Fast Formula; Basic Salary(Salary Basis & Grade Rate)
Hello,
Please, i need a working Fast Formula for a Basic Salary that have Salary Basis and Grade Rate on Annual Basis set up. check below what i have that is not working. Thanks.
/******************************************************************/
/* ECOBANK Basic Salary for ETI Employees USD *******/
/* Authored by. ‘Yomi KOLADE ****/
/***************************************************************/
default for PAY_PROC_PERIOD_END_DATE is ’31-dec-2199′ (Date)
Default For PAY_PROC_PERIOD_START_DATE is ‘0001/01/01 00:00:00′(date)
Default For PAY_PROC_PERIOD_END_DATE is ‘0001/01/01 00:00:00′(date)
Default For EMP_HIRE_DATE is ‘0001/01/01 00:00:00′(date)
Default For EMP_Term_DATE is ‘0001/01/01 00:00:00′(date)
default for asg_grade is ‘0’
X1=to_number (Salary_Basis (‘ETI_Salary_Basis_USD’,’ETI_Grade_Rate_USD’,asg_grade))
if (EMP_Term_DATE >= PAY_PROC_PERIOD_START_DATE) AND (EMP_Term_DATE <= PAY_PROC_PERIOD_END_DATE) THEN
(
FRACTION=(DAYS_BETWEEN(EMP_Term_DATE,PAY_PROC_PERIOD_START_DATE)+1)/(DAYS_BETWEEN(PAY_PROC_PERIOD_END_DATE,PAY_PROC_PERIOD_START_DATE)+1)
X= X1 * FRACTION
)
ELSE if (EMP_Hire_DATE = PAY_PROC_PERIOD_START_DATE) THEN
(
FRACTION=(DAYS_BETWEEN(PAY_PROC_PERIOD_END_DATE,EMP_Hire_DATE)+1)/(DAYS_BETWEEN(PAY_PROC_PERIOD_END_DATE,PAY_PROC_PERIOD_START_DATE)+1)
X= X1 * FRACTION
)
ELSE
X=X1
r_taxable= X*12
return X, r_taxable
Please, assist. kollyabayomi@yahoo.com
Hi,
My question how I can use the payroll element values from a previous month ,
For example :
in payroll in December, I would use payroll element values of October.