1. Why Do We Need Global Absence Target Plan Formula?
In this article we have already learned how to transfer accrual balance automatically from one accrual plan to another using plan category. But there is a limitation with this approach, this doesn’t work when more than one accrual plan is associated with same plan category in target plan.
Lets understand with an example, an employee who is enrolled to Plan A, loses eligibility due to transfer. He becomes eligible for two new plans Plan B and Plan C. Both these plans have same plan category. Now system will not know where to transfer balance from Plan A. System cannot intelligently choose new plan to transfer balance (between Plan B and Plan C). So Global Absence Target Plan formula comes here to rescue us. We can have our logic inside the fast formula to determine where to transfer balance from old plan.
Lets see how to write this formula.
2. Write Global Absence Target Plan Fast Formula
Navigation : Setup and Maintenance » Task Panel » Search » Search for the task Fast Formulas
When you are on the Fast Formulas page, click on the Create button from the search result section. On the Create Fast Formula window, enter details as follows
Formula Name | XXAP_TARGET_PLAN_FF |
Type | Global Absence Target Plan |
Description | Target plan fast formula for plan category Vacation |
Legislative Data Group | Leave it blank or select your legislation |
Effective Date | 1/1/1951 |
Once you enter all these details, click on Continue button. You will be on Create Fast Formula: XXAP_TARGET_PLAN_FF page. On this screen, inside the Formula Text window enter following code.
/****************************************************************************** FORMULA NAME: XXAP_TARGET_PLAN_FF FORMULA TYPE: Global Absence Target Plan DESCRIPTION: Target plan fast formula for plan category Vacation Change History: Name Date Comments -------------------------------------------------------------------------------- Avinash Patel 28-02-2020 Initial Version -------------------------------------------------------------------------------- ********************************************************************************/ DEFAULT FOR PER_ASG_JOB_NAME IS ' ' TARGET_PLAN_NAME = 'Vacation' l_job = PER_ASG_JOB_NAME l_log = ESS_LOG_WRITE('Employee job is : '|| l_job) l_log = ESS_LOG_WRITE('Target plan name is : '||TARGET_PLAN_NAME) IF (upper(l_job) = 'AP CONSULTANT') THEN ( TARGET_PLAN_NAME = 'Annual Leave' l_log = ESS_LOG_WRITE('Target plan name is changed : '||TARGET_PLAN_NAME) ) RETURN TARGET_PLAN_NAME
Now click on Submit button. Now click on Compile button. Click on the refresh button after a while to recheck the Compilation Status. There should be a green check as shown in the image below
Click on the Done button. Now your formula is ready to use.
3. Explanation About The Fast Formula
This is a very simple example/demonstration of Global Absence Target Plan fast formula. This formula identifies the job name of the worker. If the job name is AP CONSULTANT, the it will choose Annual Leave as the target plan, otherwise target plan would be Vacation.
4. How to Link Formula With Accrual Plan
Now we will see how to link the formula we have created with an accrual plan to make it work. In this article, we have already created our accrual plan » Learn to Transfer Accrual Balance Automatically Using Transfer Rules we will update the same plan to link our fast formula.
Navigation : My Client Group » Absences » Absence Plans » Search for Annual Vacation
From the search result click on the Plan Name and you will be on page View Plan Annual Vacation. Click on the Participation tab. Click on the Edit button and select Correct option.
Scroll below to Transfer Rule section. Click on the Target Plan Formula filed and select value XXAP_TARGET_PLAN_FF.
Note : Option to select fast formula will only be available if Transfer Positive Balance checkbox is selected from the Balance Disposition Rule section
Click on Save and Close button.
5. Test Our Fast Formula
NOTE : Please read this article (Learn to Transfer Accrual Balance Automatically Using Transfer Rules ) first to understand the steps we are going to follow to test the fast formula. We will update the same plan mentioned in this article to link our fast formula.
To test the formula transfer employee (Pam Gardner) from Sales to HR department. Once transfer is successful, run the process Update Accrual Plan Enrollments. White running the process select the checkbox Include trace statements in audit log. After successful completion of the process, click on the View Log icon from the Supplemental Details section.
If you need more details on how to check view log or debug fast formula, please read this article » How to Debug Oracle Absence Management Fast Formulas?
After verifying the log that our fast formula is picking right target plan, you can run next process Calculate Accruals and Balances to transfer the balance and this will transfer balance to the right target plan.
6. Know More About Global Absence Target Plan Formula
Global Absence Target Plan Formula supports following Contexts
Context Name | Data Type |
ABSENCE_ENTRY_ID | Number |
ABSENCE_TYPE_ID | Number |
ACCRUAL_PLAN_ID | Number |
DATE_EARNED | Date |
EFFECTIVE_DATE | Date |
END_DATE | Date |
ENTERPRISE_ID | Number |
HR_ASSIGNMENT_ID | Number |
HR_RELATIONSHIP_ID | Number |
HR_TERM_ID | Number |
JOB_ID | Number |
LEGAL_EMPLOYER_ID | Number |
LEGISLATIVE_DATA_GROUP_ID | Number |
ORGANIZATION_ID | Number |
PAYROLL_ASSIGNMENT_ID | Number |
PAYROLL_ID | Number |
PAYROLL_RELATIONSHIP_ID | Number |
PAYROLL_TERM_ID | Number |
PERSON_ID | Number |
START_DATE | Date |
Global Absence Target Plan Formula supports following Input Values
Variable Name | Data Type | Description |
IV_ACCRUAL | Number | Accrual value received from the accrual matrix |
IV_CARRYOVER | Number | Carryover limit received from accrual matrix |
IV_CEILING | Number | Ceiling limit received from the accrual matrix |
IV_ACCRUAL_CEILING | Number | Annual accrual limit received from the accrual matrix |
IV_ACCRUALPERIODSTARTDATE | Date | Start date of accrual period |
IV_ACCRUALPERIODENDDATE | Date | End date of accrual period |
IV_CALEDARSTARTDATE | Date | Start date of accrual calendar year |
IV_CALEDARENDDATE | Date | End date of accrual calendar year |
IV_PLANENROLLMENTSTARTDATE | Date | Start date of enrollment |
IV_PLANENROLLMENTENDDATE | Date | End date of enrollment |
Global Absence Target Plan Formula needs to have below Return Variable
Variable Name | Data Type | Description |
TARGET_PLAN_NAME | Text | Target plan name which a worker can transfer to when loss of plan eligibility happens |