01 Oracle HCM Fusion Fast Formula - Introduction
01 Oracle HCM Fusion Fast Formula - Introduction
Introduction
Recently, I have been doing a lot of work with Oracle Fusion Fast Formula for HCM Compensation. So, I thought why
don’t I create a blog to share the knowledge I have gained?!
Well, in short, Fast formula is an Oracle HCM payroll engine and other products like Compensation (COMP), Benefit
(BEN), Talents (OTL), Absences (ABS) and Payroll (PAY) use the engine. These products have provided places to attach
formula, whenever there is a need of a complex/custom logic. The consultants add their own logic via a set of statements
and subprograms which is the Fast Formula.
Language of Fast Formula
The Fast Formula uses its own language similar to C and PL/SQL. If you are familiar with either one of these languages,
you will not find it difficult to understand the syntax of the fast formula.
Basic Components of Fast Formula
Before start writing any fast formula, you need to understand the following.
1) Formula types
2) Context
3) Database items (DBI)
4) Input values
5) Return Variables/Values.
Formula types:
The Formula types are created by products like Benefit (BEN), Compensation (COMP), and Payroll (PAY). This is giving a
name to a group of formulas. The name will help in identifying which product the formula is being used and where it is
used.
Some examples are given below:
Compensation Person Selection: This formula type is from Compensation (COMP) and is used to validate the
person selection in Compensation and Total Compensation (TCS) process.
Participation and Rate Eligibility: This formula type is from Benefit (BEN) and is used in COMP, BEN, TCS and
ABS to determine the eligibility of a person.
Total Compensation Item: This formula type is from Total Compensation (TCS) and is used to create or
calculate a value for total compensation items.
Context:
Context is a very important part of Fast Formula. This is defined for a Formula Type. Different Formula Types support
different set of Context. You can find the contexts that are supported by a formula type from the documentation of
individual products like COMP, BEN etc.
The value to the context is set by the application when the fast formula is executed.
For example, the Compensation (COMP) sets the value to context like PERSON_ID, ASSIGNMENT_ID etc while
executing the Fast Formula.
In this SQL, P_ID is a bind variable and the value for the bind variable is provided by the Context, PERSON_ID. The
value to the context PERSON_ID is set by the application while executing the Fast Formula. In Fusion, Fast Formula
developer can also set the value using method SET_CONTEXTS provided the Fast Formula type supports the Context.
Related methods for the context are:
The number of DBI (Database items) supported by a Formula type depends on the context provided by the Formula type.
For example, if a Formula type supports context PERSON_ID and EFFECTIVE_DATE, the formula type can use all the
DBI from person level. If it also supports ASSIGNMENT_ID and EFFECTIVE_DATE, it can use the DBI from Employment
(Assignment) too.
Input Values:
Input values are additional values/information that are passed by the individual applications to the Fast Formula to assist
the Formula developers while executing the Fast Formula. This information can be collected from individual application’s
documentation.
For example,
Plan Start Date and Plan End Date are input values of Compensation Plan Setup.
Period Start Date and End Date are input values of Total Compensation Statement.
Return Variables/Values:
Most of the Formula types do not care about the return variables. There are some exceptions where some Fast Formulas
expect to return more than one value. Therefore, the variable has to be set as per the documentation. In these cases, the
formula will not work as expected if the return variables are not correct. In some other cases, even if there is one return
value, it needs to be a specific return variable.
For example,
Total Compensation Item Fast Formula expects the return variable, “COMPENSATION_DATES,VALUES,
ASSIGNMENTS,LEGALEMPLOYERS.”
Benefit Eligible fast formula expects the return variable, ELIGIBLE.
In some cases, the formula type expects certain values. For example, Benefit Eligible and Compensation Person
Selection Fast Formula types expect either a ‘Y’ or ‘N’.
Mostly, the dates are returned in “YYYY/MM/DD” format.
We will get into more details in the next blog. If you have any questions or suggestions please feel free to comment.