0% found this document useful (0 votes)
0 views4 pages

FF fundamentals

Fast Formula Fundamentals

Uploaded by

sunilc7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views4 pages

FF fundamentals

Fast Formula Fundamentals

Uploaded by

sunilc7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. Why do we have FFs in the Cloud HCM world?

What are the uses of FF?


Fast formulas are used to build business logic which can’t be handled through Functional configuration like calculation, setting eligibility, etc.
We have about 100+ FF types catering to different modules.
For ex : Post Election edit is for Benefits module
We can create Formula, but not formula types.
Oracle Payroll is for Payroll module and so on

2. FF has 3 building blocks:


Input values :Not mandatory
Processing logic : The DBI’s and default statements for DBI’s are used in processing logic section
Return values : Can return values and/or messages

3. What is a DBI and what is context?


DBI holds the value of a column from the database table
There is a query running behind each DBI, with parameter values to be passed
For example, we have a DBI PER_PER_LATEST_TERMINATION_DATE

select per_extract_utility.get_latest_termination_date(&B1,EFFECTIVE_DATE)
from

per_all_people_f papf,
per_person_names_f_v ppnf,
per_people_legislative_f pplf,
per_persons pp
WHERE papf.person_id = &B1
AND papf.person_id = ppnf.person_id
AND ppnf.person_id = pplf.person_id(+)
AND ppnf.legislation_code = pplf.legislation_code(+)
AND papf.person_id = pp.person_id
AND TRUNC(EFFECTIVE_DATE) BETWEEN papf.effective_start_date AND papf.effective_end_date
AND TRUNC(EFFECTIVE_DATE) BETWEEN ppnf.effective_start_date AND ppnf.effective_end_date
AND TRUNC(EFFECTIVE_DATE) BETWEEN pplf.effective_start_date(+) AND pplf.effective_end_date(+)Here the parameters or bind variables are PERSON_ID and EFFECTIVE_DATE
These are called Contexts
4. Is it always required to explicitly set the context value?
No. There are certain context values such as Person_id, assignment_id, Effective_date, payroll_id which are ready available for the Formula type
Based on these contexts we can use DBI’s which use these contexts.
These contexts are ready available, so no need to explicitly set the value for these.
For example, if we want to get a person name,then we have to use such a DBI that uses the contexts person_id and effective_date

When should we explicitly set context values?


We need to explicitly set the context value when we want to use a DBI whose context value is not ready available.
For ex : we have an Participation and Rate eligibility formula where based on the Job of a person, we set eligibility
To fetch job of a person, we need his Job Id

This can be achieved in 2 ways :


1. Use a value set that uses the readily available context Person_id to return his Job name
2. Set the context value for Job_id and use the DBI for Job_name
If we don’t set the context for Job_id before using we will get syntax error

5. Using Change Context


/********************************************
FORMULA NAME: XYZ_F003_BEN_TOB_USER_DEP_CHECK_ELIG_FF
FORMULA TYPE: Participation and Rate Eligibility
DESCRIPTION: Validating Tobacco Usage details for Person/dependent

*****************************************************/

/************DBI DEFAULT BEGIN*************/

DEFAULT for BEN_PHB_TOBACCO_TYPE_USAGE is 'xyz'


DEFAULT_DATA_VALUE for PER_EXT_CONT_PER_PERSON_ID is 0

/************DBI DEFAULT END*************/

/************FORMULA SECTION BEGIN*************/


ELIGIBLE= 'N'
i=1
l_Person_Habit = BEN_PHB_TOBACCO_TYPE_USAGE

/*Checking for the TOBACCO_USER lookup code as 'Y' corresponding to the meaning as 'ANY'*/
If BEN_PHB_TOBACCO_TYPE_USAGE = 'Y' THEN
(ELIGIBLE = 'Y'
)

while PER_EXT_CONT_PER_PERSON_ID.exists(i) loop


(
CHANGE_CONTEXTS(PERSON_ID = PER_EXT_CONT_PER_PERSON_ID[i])
(
If BEN_PHB_TOBACCO_TYPE_USAGE = 'Y' THEN
(ELIGIBLE = 'Y'
)
i=i+1
)
)
Return ELIGIBLE

6. Using WSA:
WSA_SET
/*
** Before setting each array in the Working Storage Area
** We need to first check if each one already exists, and if so, retrieve it to add the new values.
*/
IF (WSA_EXISTS('calculated_rate','NUMBER_NUMBER')) THEN
(
log = PAY_INTERNAL_LOG_WRITE('(GLBEARN) - Array found for calculated_rate')
wsa_calculated_rate = WSA_GET('CALCULATED_RATE',EMPTY_NUMBER_NUMBER)
)
wsa_calculated_rate[ee_Id] = l_actual_amount
WSA_SET('calculated_rate',wsa_calculated_rate)
IF (WSA_EXISTS('multiple','NUMBER_NUMBER')) THEN
(
log = PAY_INTERNAL_LOG_WRITE('(GLBEARN) - Array found for multiple')
wsa_multiple = WSA_GET('multiple',EMPTY_NUMBER_NUMBER)
)
wsa_multiple[ee_Id] = multiple
WSA_SET('multiple',wsa_multiple)
WSA_GET
IF (WSA_EXISTS('unit_type','TEXT_NUMBER')) THEN
(
log = PAY_INTERNAL_LOG_WRITE('(GLBEARN) - Array found for unit_type')
wsa_unit_type = WSA_GET('unit_type', EMPTY_TEXT_NUMBER)
)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy