Total Pageviews

August 21, 2021

8/21/2021 04:20:00 PM

 I will explain how to create fast formulas

Important Components of Fast Formula are 

1)      Formula types
2)      Context
3)      Database items (DBI)
4)      Input values
5)      Return Variables/Values.
 
 
what  is formula type?How to know which formula type we have to use ?
If we take absence Carry over .We can get it from the absence plan Page as below
 
if you take formula from the drop down list whatever you created for this will come from the drop down list,
in my example I created EBIZ_CARRYOVER as shown in the figure
Oracle fusion carry over fast formula
2)Context :
The context behaves like a value to the bind variable of a SQL.
For example, let us take the SQL statement,
“Select Full_name from PERSON_TABLE where person_id =  :P_ID”

we have following contexts  are available to formulas of this type:
ACCRUAL_PLAN_ID
EFFECTIVE_DATE
ENTERPRISE_ID
HR_ASSIGNMENT_ID
HR_RELATIONSHIP_ID
HR_TERM_ID
JOB_ID
LEGAL_EMPLOYER_ID
LEGISLATIVE_DATA_GROUP_ID
ORGANIZATION_ID
PAYROLL_ASSIGNMENT_ID
PAYROLL_RELATIONSHIP_ID
PAYROLL_TERM_ID
PERSON_ID


Related methods for the context are:

·         GET_CONTEXT : To find the value from the context
·         CONTEXT_IS_SET: To find whether a context is set
·         CHANGE_CONTEXTS: to set one or more contexts
   
Database items (DBI):
DBI provides values from the database tables. The source of the DBI is called Route
 Route is similar to a “from and where” clause of a SQL statement.
 
following Sql statement give what are the DBI are available 
DBI          = Select clause                                  =   Select person_id, full_name, date_of_birth
Route       = From clause and Where clause      =   FROM per_people_f  TABLE where                                                                    person_id==:P_ID                                                                         
Context    = Value for binding variables           =   PERSON_ID     = 00000
 

There are two types of DBIs:

  • Static
  • Dynamic

 

Using Database Items

  • To use a Database item in a formula, simply refer to it by name.
  • To find the Database items you need, click Show Items on the Formula window and run a query, or use the Search for Database Item Name feature available with the fast formula Assistant
  • Do not refer to Database items until you need them to avoid unnecessary database calls
  • Formulas cannot be used to update Database items
  • Where you have a choice use an Inputs statement instead of Database items — this is more efficient

In our example DBI items are 

DEFAULT FOR PER_PER_SEX IS 'X' 

DEFAULT FOR PER_PER_PERSON_AGE IS  -1

DEFAULT FOR PER_PERSON_ENTERPRISE_HIRE_DATE IS '1900/01/01' (date)

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.
 
Return Value: 

Return Variable
Use predefined names for return variables. The following return variables are available
to formulas of this type.

Return Value Data Type
carryOver Number

 

 /************************************************
Name :EBIZ CARRY OVER  formula demo
Type :Global Absence Carry over
Date :20th Aug 2021
Dev  :xxxxx
Requirement :select the person who are Female and
             and having experience
             More than 3  year
**********************************************/

default for PER_PER_SEX is 'X'
DEFAULT FOR PER_PER_PERSON_AGE IS  -1
DEFAULT for PER_ASG_PER_EFFECTIVE_START_DATE is '1900/01/01' (date)
DEFAULT FOR
PER_PERSON_ENTERPRISE_HIRE_DATE IS '1900/01/01' (date)

l_date   =get_context(EFFECTIVE_DATE,'1900/01/01' (date) )

l_carry_over =0

l_hire_date=
PER_PERSON_ENTERPRISE_HIRE_DATE
l_exp_months= MONTHS_BETWEEN(l_date,l_hire_date)
l_gender =  PER_PER_SEX

 if l_gender ='F' THEN (
     
       if l_exp_months>=36 then (
            l_carry_over=10
            
             )
         )

 
Related Posts Plugin for WordPress, Blogger...