Oracle Fast Formula can be written using formula form found in
Navigation -> Total Compensation -> Basic -> Fast Formula -> Write Formula
Once written, usually Fast formulas are attached to elements of Payroll for any computation. But FF can be of any type including payroll, accruals etc.
Different Components of Fast Formulas:
Navigation -> Total Compensation -> Basic -> Fast Formula -> Write Formula
Once written, usually Fast formulas are attached to elements of Payroll for any computation. But FF can be of any type including payroll, accruals etc.
Different Components of Fast Formulas:
- Input Statement
- Assignment Statements
- Return Statements
Data Types:
There are three types of data available in fast formula. They are text, numeric and date types. By default a variable is of numeric type. If the data type is not numeric then it must be specified like
There are three types of data available in fast formula. They are text, numeric and date types. By default a variable is of numeric type. If the data type is not numeric then it must be specified like
INPUTS are x,y (date),z (text)
Fast Formula Variables:
Fast formula variables are of three types. Local, Global and database variables.
Variables usually get their values when values are input to them during a formula call or through database objects.
Formula Structure:
A simple formula may look like this with input, assignment and return statements.
Note:
A simple formula may look like this with input, assignment and return statements.
INPUTS are x,y
x = y + 1
RETURN x
Note:
- RETURN statement is used to return the specific value to outside usually a payroll run
- There can be many RETURN statement in a formula but only one INPUTS statement is allowed in a formula
- Values of input variables can not be changed
- When the element input value is passed to the formula, the input name must be same as that of the input values of the element and the multiple words must be joined by an underscore.
Contexts are similar to environment variables. Since fast formulas are attached to elements, the contexts change for each assignment. Typical context info include
- Business group
- Element and element links
- Employee and his assignments
Calculation begins from inner most braces starting left to right.
Conditional Statements:
We can use If-else statement like we use it in any other languages.
IF THEN
(
statements )
ELSE
( statements )
Here we can use the normal conditional operators and logical operators(AND,OR,NOT). There is one more clause called 'WAS DEFAULTED' which when used in if condition, results in true condition if the particular value passed is null.
DEFAULT for x is 10
IF x WAS DEFAULTED THEN
( statements ) ELSE
( statements )
When no value/null value is passed to x then the condition evaluates to TRUE oterwise FALSE.
Comments:
The commenting is similar to that of pl/sql and C++
/* Comments */
Aliases:
The database items are often longer and referencing them in formulas becomes tedious without aliases.
ALIAS database_name
Fast Formula Functions:
FF Functions can be of following types.
- Text Functions
- Numeric Functions
- Date Functions
- Data conversion Functions
- NULL Functions
Database items are the procedures that exist in database. These items can be referenced in fast formula to arrive at the result values. There are two types of database items.
- Static DB Items: are predefined and include standard type of information. For example, date of birth of an employee.
- Dynamic DB Items: are generated by the definitions of elements, balances, absence types, flex field segments etc. For example, for each of the input value entry of an element one DB Item is created with preceding element name.
No comments:
Post a Comment