This article is
broken into two sections. First an overview of PTOs and how to define and use
an accrual plan, and technical details; second a section covering the formulas
required for PTO Accruals and how to write your own formulas to implement rules
specific to your plans. If you intend to use the standard PTO processing, see
[1.2. Accrual Formulas] then you will not need to use the second part of this
article.
1. Introduction
1.1. Defining
An Accrual Plan
1.2. Accrual
Formulas
1.3. Using An
Accrual Plan
1.4. Viewing
Accrual Details
1.5. The Carry
Over Process
1.6. Technical
Details
2. Formulas
2.1 Seeded
Formulas
2.2
Ineligibility Formulas
2.3 Writing
Accrual Formulas
2.3.1 Formula
Types
2.3.2 Formula
Inputs and Returns
2.3.3 Accrual
Formula Checks
2.3.4
Implementing Your Rules
2.3.5 Accrual
Database Items
2.3.6 Accrual
Formula Functions
1.
Introduction
Many companies
allow their employees to accrue paid time off (PTO) to use for vacation, or
sick leave. For example an employee may accrue 25 days PTO each year to be
taken as vacation. The amount accrued may increase with their grade or with the
length of time the person has been employed with the company. Once the employee
has some PTO accrued, they can choose when to take the time off. They may be
able to carry over some of their accrued time off into the next year (term).
An accrual plan
is created to describe how PTO is accrued, and what type of absence is being
recorded. There are many different rules that you may want to define for an
accrual plan. For example: if there is a period of ineligibility; when a new
employee joins the plan (e.g. hire date, start of next calendar year, etc); the
amount of accrual and what it is based on, for example, grade, length of service,
etc; whether or not you can carry over PTO; if you can buy or sell PTO.
All these
different rules can be accommodated by Oracle HRMS PTO Accruals.
You may need to
create several accrual plans to deal with different absence types, or different
rules of accrual. You can define more than one plan using the same absence
type.
This is
standard in 11i. It is also available as Patch 865749 on 11.0.2 or 11.0.3. It
allows users to define plans exactly as they want because of the ability to
define their own formulas. Please note that, because the implementation makes
use of features which are new in R11, the new PTO functionality will not be
available on 10.7.
1.1.
Defining An Accrual Plan
An accrual plan
is used to define the rules for a type of PTO. It can be used to calculate how
much time has been accrued and how much has been taken by an employee. The
count of time taken is calculated by adding up all the days taken by a person
for a particular absence type. This is done by associating an element to the
absence type to hold a balance. So the first step to defining an accrual plan
is to create an absence type and associate an element to it with an increasing
balance.
You will then
need to define the accrual plan. It is assumed here that you will use seeded
accrual and carry over formulas in this plan. However, if the rules for your
plan are not the same as those in the seeded formulas, see [1.2. Accrual
Formulas] then you will need to analyze your rules and create an accrual
formula and a carry over formula of your own, see [2. Formulas].
1. Enter a plan
name
2. Enter a
category (this comes from the Quickcode US_PTO_ACCRUAL - you can add new codes
to this and it is just used for information)
3. Pick in the
Accrual and Carry Over formulas you want to use
4. Select a
Start Rule (optional - it depends on the accrual formula.
PTO_PAYROLL_CALCULATION is the only seeded accrual formula which takes it’s
start rule from the screen). The start rule is the time from which a
participant starts to accrue PTO. New start rules can be created by adding new
values to the Quickcode US_ACCRUAL_START_TYPE any new start rules will have to
be coded into the accrual formula
5. Select days
or hours as the unit of time you are recording - ensure this matches the UOM
for the input value of the absence element
6. Select the
name of the element and it’s input value which will be used to hold absences
7. Enter a
period of time for which an employee can accrue but not use PTO. This is only
entered if a start rule of Hire Date or Beginning of Year has been entered and
you require a period of ineligibility
8. Pick in an
ineligibility formula - this is only required if absence details are to be
entered via BEE (or MIX)
9. Save your
plan
10. Go to the
Accrual Bands window and enter the amount accrued for relevant lengths of
service. This is optional, but if you use the PTO_PAYROLL_CALCULATION formula
you will need to enter at least one row here
11. Go to the
Net Calculation Rules window to view or change the rules for calculating
employees’ net PTO. This works like the balances screen - you can select
element input values whose values will be added or subtracted to the PTO total.
For example you could have an element for PTO Sales and the value of the input
value would be the number of PTO days bought (or a negative amount for sold) by
the employee.
When you save
the plan, the system will generate three new elements which are named after the
plan <plan name> - this represents the plan. An entry for this recurring
element is given to each assignment in the plan; <plan name> Carried Over
- this is used to hold any PTO carried over from one term to the next; <plan
name> Residual - this is used to hold any unused PTO that cannot be carried
over.
The system
creates a link for each of these elements which match the link defined for the
absence element used in the plan.
1.2.
Accrual Formulas
Accrual
formulas are used so that the user has the ability to define how PTO is
calculated themselves. There are seeded formulas one set of which will perform
a standard calculation of PTO that many plans will use (this is the calculation
that was used in Release 10.7 for all accrual plans). This assumes a term of
one year starting on 1st Jan, with an accrual frequency of a payroll
period, and carry over effective from 31st Dec for one year. Accrual
amounts, carryover and ceilings are defined for each plan in the Accrual Bands
screen. Then other 2 sets of seeded formulas are provided as examples for the
user to use to base their own formulas on if they require to calculate PTO
using other criteria.
There are three
types of formula used by PTO Accruals.
They are (with
the standard seeded formula name):
Accruals
formula PTO_PAYROLL_CALCULATION
Carryover
formula PTO_PAYROLL_CARRYOVER
Ineligibility
formula no standard formula - although a seeded formula exists,
PTO_INELIGIBILITY_CALCULATION - because the ineligibility rules for a plan
which uses the above formulas are defined in the plan (i.e.; on the Define Plan
screen).
Each plan needs
to be associated with two formulas: an accrual formula which will calculate
gross PTO entitlement to date, and a carry over formula which will be called by
the Carry Over process and will calculate how much PTO will be carried from one
term to the next.
You should
include an Ineligibility formula if your ineligibility rules are defined in
your accruals formula (and therefore the Ineligibility zone of the Define Plan
screen is empty) and you will be entering absence amounts via Batch Element
Entry (BEE), see [2.1 Seeded Formulas]. BEE will check for ineligibility rules
entered in the Define Plan screen, and if it finds none then it will call the
ineligibility formula which will generate a batch line warning if the employee
is ineligible to take the absence. If your plan uses the seeded accruals formula
PTO_PAYROLL_CALCULATION then eligibility checking is performed using the Period
of Ineligibility zone on the Define Accrual Plan screen.
See section [2.
Formulas] for details of the seeded formulas and how to write your own
formulas.
1.3.
Using An Accrual Plan
Employees can
be enrolled with as many plans as is appropriate. Once enrolled in a plan they
will accrue PTO according to the rules associated with the plan (i.e. the rules
specified in the Define Plan screen and the formulas used by the plan).
To enroll an
employee onto a plan, you need to give them an entry for the <plan name>
element. This element is one of the 3 elements generated when you define the
plan. It is a recurring element so you will start the entry on the date the
employee joins the plan and it will not be end dated until the employee leaves
the plan. The input value Continuous Service Date should be populated only if
the plan should calculate the participant’s length of service from a date other
than the date calculated by the start rule of the plan (the Accrual Start field
in the Define Plan screen).
Each period
(the PTO_PAYROLL_CALCULATION formula uses the employee’s payroll period as a
PTO period) PTO will be accrued by the participant. At the end of the year the
PTO Carry Over Process must be run, see [1.5 Carry Over Process] to deal with
unused PTO for the participant. When viewing PTO for a participant, see [1.4.
Viewing Accrual Details] the amount of PTO accrued and the amount of absence
(for the absence type defined in the plan) are taken into account.
1.4.
Viewing Accrual Details
The Absence
Accruals Screen
This screen is
accessed via the Accruals button on the Absence Detail screen. The button is
only available if the employee is enrolled in an accrual plan that uses the
displayed absence type. For each plan the employee is enrolled in the screen
shows: Before Net Entitlement - net accrual calculated as of the day before the
current absence Afte’ net Entitlement - net accrual calculated as of the start
date of the current absence. In the absence calculations, the whole absence is
assumed to be taken on the first day so the net entitlement on the first day of
the absence will generally be the ‘Before’ amount minus the number of days of
the absence. Any other time debited or credited to the accrual on that date
will also be included. Projected Entitlement - net accrual at the end of the
current term taking into account any absences, including future dated absences.
Only absences with an Actual Start Date (not just projected start date) will be
included.
The Accruals
Window
This screen is
accessed via the Navigate View > Accruals screen, or Navigate Fastpath >
Accruals.
For each plan
the employee is enrolled in the screen shows:
Effective Start
Date - the date of the start of the term in which the session date falls
Effective End
Date - taken from session date. This can be changed using the Date Track icon
Effective Last
Accrual Date - the date that PTO was last added i.e. the end date of the last
accrual period before the effective End Date (e.g. the final day of the
previous month if PTO is accrued monthly)
Net Entitlement
- number of days accrued between the Effective Start Date and Effective End
Date
In the
Entitlement Details area, each element type which contributes to the plan is listed
with a total of days added or subtracted to PTO. The elements listed here will
be the same as those listed in the Net Calculation Rules screen for the plan
and also the accrual plan element, <plan_name>. They show how the Net
Entitlement figure has been made up.
1.5. The
Carry Over Process
This process
should be run at the end of the accrual term (e.g. the end of the year) of the
plan. It uses the maximum carry over value and the amount of unused accrued
time to calculate how much time an employee will carry over to the next term.
If the amount of unused time is greater than the carry over amount then the
remaining time is lost by the employee. The employee’s balance of unused
accrued time will be cleared down;
Any carry over
PTO will be entered in the Carried Over <plan name> element entry;
Any lost PTO
will be entered in the Residual <plan name> element entry.
The process
should be run at the end of the term when all accruals and absences have been
processed. If the process is re-run then the values previously calculated will
be replaced with the new values. So it is OK to run the process more than once
- for example if the employee books some last-minute absence at the end of the
term. The parameter Reprocess All Participants allows you to rerun the process
if you have recently added employees to the plan and it will only process those
participants that have not already been processed for this year. The Accrual
Term parameter allows you to run the Carry Over process for the term spanning
the Calculation Date parameter or for the previous year.
The Define
Accrual Plan screen and the Bands screen allow you to make changes to the plan
at any time. So you must ensure that you do not make a change to the plan or
it’s bands after you have run the carryover process. If you do, then the
changes will not be taken into account for the current term - you will need to
rerun the Carryover process which will pick up the changes and calculate
correctly.
1.6.
Technical Details
Tables Used
PAY_ACCRUAL_PLANS
holds the plan definitions.
PAY_ACCRUAL_BANDS
holds the amount of accrual for each length of service band for a plan.
PAY_NET_CALCULATION_RULES
holds the calculation rules as defined in the Net Calculation Rules screen
(from the Define Plan screen). This is a list of element input values which
contribute to the PTO for the plan.
Elements
Used
Absence element
- an element must be used to record absences. This could be associated with an
absence type (so that an entry is automatically created when an absence is
corded) or could be entered manually or via BEE.
Elements
generated when the plan is created:
<plan
name> - an entry for this element indicates that the employee is
participating in the plan;
<plan
name> Carried Over - holds any PTO carried over from one term to the next;
<plan
name> Residual - holds any unused PTO that cannot be carried over.
Calculations
- Calculating
PTO Accrued for an employee
The amount of
PTO accrued for a participant is calculated by the accrual formula and it
requires a parameter of Calculation Date. The formula is run in the following
circumstances:
1. When an
absence is entered and the Accruals button is pressed to take the user to the
Associated Accrual Plans screen. The start date of the absence is used for
Calculation Date;
2. When you view
PTO entitlement in the Accruals screen. The session date is used for
Calculation Date.
3. When the
Carry Over process is run. Calculation Date is entered as a parameter for this
concurrent process.
- Calculating
PTO taken
The Absence
Accruals screen and the Accruals screen display the amount of PTO taken. Both
screens calculate this amount by adding up the duration of the relevant type of
absence taken by the employee. The duration is calculated from the input value
entries for any entries of the element associated with the plan for that
employee.
- Calculating
Carry Over
The amount of
PTO that can be carried over from one term to the next is calculated by the
Carry Over formula which is run by the Carry Over process. It uses the amount
of unused PTO and the amount of carry over allowed to create element entries
for the Carry Over and Residual elements.
- Ineligibility
checking
Ineligibility
checking is performed based on the ineligibility rules entered on the Define
Plan screen when the plan is created. If this is left blank however, the
accrual formula can be ede
the checks relevant to your plan.
The
ineligibility formula is only run if you create absence element entries via BEE
and you have not defined ineligibility criteria for your plan but instead check
for ineligibility in your accrual formula. When you validate the batch, BEE
checks to see if ineligibility rules have been defined in PAY_ACCRUAL_PLANS. If
they have not then it will run the associated ineligibility formula for the
plan linked to the absence element.
The formula
checks to ensure that the employee is eligible to use accrued PTO on the
effective date of the absence element entry in a batch line. If the employee is
not eligible, then a warning will be generated for the batch line.
Accrual
Formulas
This section of
the article covers the Accrual-type formulas and is relevant only if you will
be writing your own formulas.
You can see
from the Calculations section [1.6.. Technical Details] that there are two
formulas which are required to calculate the PTO accrual and carryover for
participants in an accrual plan. Seeded formulas are provided which calculate
these values in a way that would be acceptable to many plans. To allow PTO
Accruals in Oracle HRMS to be flexible to the differing requirements in
processing PTO for your plans, you are able to create your own accrual and
carry over formulas to use against your plans. This will ensure each plan deals
with PTO exactly as you need it to.
This section
explains what is provided in the way of accrual-type formulas and how you can
use these to create your own formulas. It includes lists of inputs and outputs
required by each formula type; a list of checks that should always be included
to ensure the calculations are performed correctly; basic advice on
implementing rules specific to your plan; and lists of new database items and
functions developed for PTO Accruals.
2.1
Seeded Formulas
In HRMS Release
10.7 you did not have to specify an accrual and a carryover formula. The system
assumed the way that each accrual plan would work which was using a term of one
year starting on 1st Jan, with an accrual frequency of a payroll
period, and carry over effective from 31st Dec for one year. Accrual
amounts, carryover and ceilings were defined for each plan in the Accrual Bands
screen.
By picking in
the PTO_PAYROLL_CALCULATION accrual formula and PTO_PAYROLL_CARRYOVER carry
over formula, your plan will calculate accrual and carryover in the same way.
Each seeded
accrual formula has an associated carryover formula and they will both use the
same accrual plan rules.
There are three
seeded types of accrual and carryover formulas
PTO_PAYROLL_CALCULATION
/ PTO_PAYROLL_CARRYOVER
These formulas
have been created to replicate the way that Oracle HRMS calculated PTO Accruals
before users were able to define their own formulas.
They are based
on the following rules
n An accrual
term of one year starting 01-JAN;
n An accrual
frequency based on the assignment’s payroll period. The assignment MUST have a
payroll assigned to them and PTO accrues on the final day of the payroll
period, every period regardless of whether the payroll has been run;
n Accrual
amounts, maximum carry over, and ceilings are based on length of service and
are defined in the Accrual Bands screen (off the Define Accrual Plan screen);
n Carry over is
effective from 31-DEC and expires on (i.e. must be used by) 31-DEC the
following year;
PTO_SIMPLE_MULTIPLIER
/ PTO_SIMPLE_CARRYOVER
These formulas
are provided to be used as a starting point for users to write their own
formulas.
It is based on
the following rules:
n An accrual
term of one year starting 01-JUN;
n An accrual
frequency of one month (so it is not dependent on a payroll);
n Accrual
amounts and ceilings are defined within the formula (so the Accrual Bands
window is not required);
The formula
sets accrual amount at two days per month, an accrual ceiling of 20 days
n Carry over is
effective for one year from 31-MAY
PTO_ROLLING_ACCRUAL
/ PTO_ROLLING_CARRYOVER
These formulas
are also provided as a starting point for users to write their own formulas.
They demonstrate how to calculate accrual for a rolling year.
They are based
on the following rules:
n An accrual
term of one year with no fixed start date. Accruals are calculated for the
previous 12 months
n An accrual
frequency of one month (so it is not dependent on a payroll);
n Accrual
amounts and ceilings are defined within the formula (so the Accrual Bands
window is not required);
The formula
sets accrual amount at two days per month, an accrual ceiling of 20 days
n Carry over is
not relevant since the accrual term never ends, but rolls forward. PTO is lost
if it is not used within 12 months.
2.2
Ineligibility formulas
It could be a
requirement for your accrual plan that an employee may start to accrue PTO from
their hire date, but they may not actually take this time off until they have
been employed for three months. This three months would be the ineligibility
rule for the plan.
The accruals
formula that you use may pick up ineligibility rules from the Define Accrual
Plan screen or it may ignore the screen value and set an ineligibility period
within the formula code. All of the seeded formulas pick up this information
from the screen (or rather from the table PAY_ACCRUAL_PLANS), but you may
define a plan with a more complex ineligibility rule and to do that you need to
code it in the formula.
If you enter
absence information in the Absence Details screen, the procedure
PER_ABSENCES_ATTENDANCES.IS_EMPLOYEE_ENTITLED will be called to calculate
whether the employee is allowed (via the plan definition) to take the absence
being entered. If the employee is still inside the ineligibility period, or if
the absence is greater than the PTO accrued as of that date, then a warning
will be displayed and you can continue processing the absence if you choose to.
The error message says
‘This absent
duration would exceed the employee’s entitlement’.
If you use
batch element entry (BEE) to generate element entries for the absence element
used by an accrual plan then you will need to use an ineligibility formula
because the accrual formula will not be fired.
BEE validation
must decide if an assignment is eligible to use accrued PTO on the effective
date of the absence element entry in a batch line. It checks the table PAY_ACCRUAL_PLANS,
so if you have entered a period of ineligibility in the Define Accrual Plan
screen then it will be checked from there. If there is no ineligibility
information against the plan, BEE will check if there is an ineligibility
formula and will call it of there is one. This formula will return a value to
say if the assignment is eligible for the element entry or not. If the
assignment is ineligible to use PTO then the batch line will be validated with
a warning. If you use any of the seeded accrual formulas, you will not require
an ineligibility formula. This is because these formulas take the ineligibility
data from the Accrual Plan Table.
2.3
Writing Accrual Formulas
If your accrual
plan uses the rules listed under the PTO_PAYROLL_CALCULATION /
PTO_PAYROLL_CARRYOVER formulas then you can pick these in when you define the
plan. In that case you do not need to write a formula.
If you have a
plan with different rules such as the length of the accrual term, how much time
is accrued by each employee, when new employees can begin accruing and using
time, and how much time can be carried over into a new accrual term then you
will need to write your own formulas for accrual calculation and carryover.
The best idea
is to query up one of the seeded formulas which is the closest to your rules
(see the above descriptions of the rules associated with each set of formulas),
and create a new formula based on that.
The accrual
formulas are made up of a main formula (the one picked in on the Define Plan
screen) and a sub-formula that is called by the main formula. The main formula
includes the necessary checks, see[ 2.3.3 Accrual Formula Checks] and any rules
you require for the plan, see [2.3.4 Implementing Your Rules]. It then
calculates PTO accrued up to the required calculation date by calling the
sub-formula for each PTO period from the start of the term to the calculation
date. The sub-formula calculates the PTO accrued in the specified period and
adds it to a running total.
Accrual
formulas make a lot of use of ‘global variables’. They are not the sastFormula
global variables which are defined in the date tr Globals form and set a value
which will rarely if ever change. The package pefmlfnc.pkb defines PL/SQL
tables which are used to hold any global variables used in the accrual
formulas. The variable definitions are stored in the three PL/SQL tables (one
of each type - text, date and number) held within a package.
The reason for
creating this new type of variable is that the value is required to be accessible
to more than one formula, so a local variable would not work; and the value
should be updateable from within a formula which is not possible with
FastFormula globals.
Accrual global
variables are variables that can be assigned values, or accessed by all of the
accrual-type formulas. A global variable set in one formula can be access in
another.
New accrual
formula functions are provided which allow you to set a value to a global
variable within a formula. There are also new functions which take parameter
values and the contexts from the formula to assign values to global variables,
see section [2.3.6. Accrual Formula Functions].
2.3.1
Formula Types
The following
formula types are for use with PTO Accruals. If you have written your own
formula and it is not available in the list of values (LOV) on the Accruals
screen, it may be that you have not used the correct formula type.
Accrual - this
is the top level formula that calculates PTO entitlement for a plan and can be
picked in to the Accrual Formula field on the Define Accrual Plan screen.
Accrual
Subformula - this is used for any formulas called by an Accrual type formula.
They are generally used for calculating the entitlement per period.
Accrual
Carryover - this is the formula to be used by the Carry Over process and can be
picked in to the Carryover Formula field on the Define Accrual Plan screen
Accrual
Ineligibility - this is the formula called by BEE to determine if an assignment
is eligible to use accrued PTO. It can be picked into the Ineligibility Formula
field on the Define Accrual Plan screen.
2.3.2
Formula Inputs and Returns
When you write
your own formulas, you must ensure that they use the same inputs and return
statements as the seeded formulas. The following values are also available to
all accrual formula types as contexts and so they can be accessed
ASSIGNMENT_ID
DATE_EARNED
ACCRUAL_PLAN_ID
BUSINESS_GROUP_ID
PAYROLL_ID
Any other
values you require must be retrieved via either database items, see [2.3.5
Accrual Database Items] or Accrual functions, see [2.3.6 Accrual Formula
Functions].
Inputs and
Outputs for Accrual Type Formulas
INPUTS ARE
calculation_date (date)
…
<formula
body>
…
RETURN
total_accrued_pto, effective_start_date, effective_end_date, accrual_date
Calculation_date
- the date up to which accrual will be calculated
total_accrued_pto
- gross accrued PTO so far in this term
effective_start_date
- start date of the accrual term (or first date the assignment accrues, if this
is later)
effective_end_date
- calculation_date (or end of inclusion in the accrual plan, if this is
earlier)
accrual_end_date
- (optional) date of the end of the last full accrual period prior to
calculation_date (used if the formula does not take account of partial accrual
periods, like the seeded formulas)
Inputs and
Outputs for Carry Over Type Formulas
INPUTS ARE
calculation_date (date), accrual_term (text)
…
<Formula
body>
…
RETURN
max_carryover, effective_date, expiry_date
calculation_date
- any date falling within an accrual term
accrual_term -
‘PREVIOUS’ or ‘CURRENT’ to specify whether you want to calculate carryover for
the term spanning calculation_date or the previous term
max_carryover -
maximum amount the employee can carryover (maybe taken from the Bands screen)
effective_date
- the date of the final day in the accrual term being calculated
expiry_date -
(optional) the date by which the employee must use carried over PTO before it
is lost
Inputs and
Outputs for Ineligibility Type Formulas
INPUTS ARE
calculation_date (date)
…
<Formula
body>
…
RETURN assignment_eligible
calculation_date
- the effective date of the element entry for the absence
assignment_eligible
- ‘Y’ if eligible, ‘N’ if not. MIX or BEE will create a warning on the batch
line for the absence entry if the value is ‘N’
2.3.3
Accrual Formula Checks
In the seeded
formulas there are many checks made to ensure that the employee is entitled to
accrue PTO. Below is a check list that you should use if you write your own
accrual formula to ensure PTO is accrued correctly. Always find the section in
the seeded formula, upon which your formula is based, for these checks and
include them in your own.
Termination
Date
If the employee
has a termination date earlier than the calculation_date input then accrual
must be calculated as of the termination date. If your formula does not handle
partial accrual periods (like the seeded formula) then if the termination date
is before the end of the first accrual period in the term then
total_accrued_pto will be 0.
Enrollment End
Date
If the
employee’s enrollment in the plan ends earlier than the calculation_date input
then accrual must be calculated as of the enrollment end date. If your formula
does not handle partial accrual periods (like the seeded formula) then if the
enrollment end date is before the end of the first accrual period in the term
then total_accrued_pto will be 0.
Calculation
Date
If your formula
does not handle partial accrual periods (like the seeded formula) then if the
calculation date is before the end of the first accrual period in the term then
total_accrued_pto will be 0.
Hire Date
Check that the
employee’s hire date (or Continuous Service Date from the accrual plan’s
element entry if it is populated) is before the calculation date and if not
then set total_accrued_pto to 0. If your formula does not handle partial
accrual periods (like the seeded formula) then if the continuous service date
(if that’s null then use hire date) is before the end of the first accrual
period prior to the period used in the current calculation then total_accrued_pto
will be 0.
Start Date For
New Plan Participants
Check from what
date an employee is entitled to accrue PTO. The database item ACP_START should
be used to determine this date. If your formula does not handle partial accrual
periods (like the seeded formula) then you should use the date of the first
accrual period starting on or after the actual start date.
Ineligibility
Period
Check for an
ineligibility period. If there is one in force at the calculation date (or, if
your formula does not handle partial accrual periods then at the end of the
accrual period that the calculation date is within) then total_accrued_pto will
be 0.
2.3.4
Implementing Your Rules
The rules which
are appropriate for your plan must be coded into your accrual formula so that
PTO is correctly accrued. Depending on your rules, some information that is
picked up from database items in the seeded formula, may be required to be
calculated in your formula.
Below is a
checklist of several rules that may be coded differently in your formula
compared to the seeded formula upon which your own formula is based.
For more help
on how to code these rules, see Using Oracle FastFormula R11i page 1-110.
Changing The
Length Of The Accrual Periods
The accrual
period is always defined by the formula. In the seeded PTO_PAYROLL_CALCULATION
formula the payroll period is used as the accrual period and so accrual period
start and end dates are calculated from payroll period start and end dates. In
the seeded PTO_SIMPLE_MULTIPLIER formula, the variables accruing_frequence and
accruing_multiplier are used to define the accrual period. For example,
accruing_frequency = ‘W’ and accruing_multiplier = 4 would be used for an
accrual period of 4 weeks.
Changing The
Actual Term Start Date
PTO is accrued
over a term of one year and any remaining PTO may or may not be carried over to
the next term, depending on your plan’s rules. All the terms in a plan will
start on the same date - just a different year. If you use the seeded
TO_PAYROLL_CALCULATION formula then the start date of each term will be 01-JAN.
The formula PTO_SIMPLE_MULTIPLIER uses 01-JUN for it’s term start date. The
code sets the variable beginning_of_calculation_year to hold this value.
E.g..
beginning_of_calculation_year
= to_date(‘0106’ || to_char(calculation_date, ‘YYYY’), ‘DDMMYYYY’).
You may change
the date by replacing the ‘0106’ (1st June) with the date you
require.
You may want to
set the star_START_DATE
E.g..
beginning_of_calculation_year
= to_date(to_char(ACP_SERVICE_START_DATE,’DDMM’) ||
to_char(calculation_date,’YYYY’)
, ‘DDMMYYYY’)
Once you have
defined the start of the year, you will need to check if it is later than
calculation_date. If it is, then you will need to use the start date of the
previous year.
Adding Start
Rule For New Hires
A start rule
may be defined in the Define Accrual Plan screen by picking a value into the
Accrual Start field. This LOV is taken from the quickcode US_ACCRUAL_START_TYPE
and new values may be added. The value is held in the database item ACP_START.
The PTO_PAYROLL_CALCULATION formula calculates a value for the variable
first_eligible_to_accrue_date based on the value in ACP_START. If you add new
values you will also have to add new lines to your formula to calculate
first_eligible_to_accrue_date for each new start type you have defined.
Basing The
Accrual Amount On Time Or Pay Elements
You may want to
allow employees to accrue PTO based on the number of hours they work which will
be entered in an element entry. If this is the case then you would have to
create a database item for the element input value which will hold the amount
of time worked and use that in your accrual calculation (usually this will be
in your subformula which calculates PTO accrued for a single period).
Using Up Front
Accruals
Your employees
may accrue their full annual entitlement of PTO at the start of the term,
rather than accruing it periodically throughout the term. This makes the
calculation simpler. You will assign the full amount to the variable
total_accrued_pto in the accrual formula and you will then not need to call the
subformula (which calculates PTO accrued for a period) at all.
Changing The
Ceiling
The ceiling can
be set within the Accrual Bands screen or within your accrual formula. Using
the Accrual Bands screen, the global variable CEILING is set. You can use the
SET_NUMBER function to set it within the formula e.g. E = SET_NUMBER(‘CEILING’,
20).
Changing The
Date Used For Continuous Service
In the
PTO_PAYROLL_CALCULATION formula the global variable CONTINUOUS_SERVICE_DATE is
set to the value entered for the ‘Continuous Service Date’ input value on the
accrual plan element. If this is null for an employee’s element entry, then the
database item ACP_SERVICE_START_DATE is used which is the start of the
employee’s period of service.
Adding Rules
For Suspended Assignments
Your plan may
disallow employees from accruing PTO while on maternity leave, or some other
types of leave. The ASG_STATUS database item can be used in your accrual
formula to check if the assignment is currently eligible to accrue pto.
Adding Rules
For Part Time Employees
You may use the
Employment Category field on the Assignment screen to specify whether an
employee is part time or full time. Alternatively you may hold that information
on a segment of the People Group flexfield. Either way, you can access that via
a database item - ASG_EMPLOYMENT_CATEGORY, or the relevant database item for
the flexfield segment after you have run the process Generate database Items
from Key Flexfields..
You may set the
global variable ACCRUAL_RATE at a certain level for full timers and set a
different level for part timers.
Adding A Long
Service Leave Entitlement
Your company
may allow additional leave as a one off bonus for staying with the company for,
say, 10 years. This could be coded into your accrual formula by checking the
length of service and if it is 10 years and the bonus has not been given yet
then add the extra days to their PTO total and ignore the ceiling.
If you want to
see specifically how much long service leave has been awarded then you will
need to create a separate accrual plan specifically for long service leave.
Using Accrual
Bands Based on Length of Service
In the
PTO_PAYROLL_CALCULATION formula the accrual amount, carry over and ceiling are
taken from the values entered in the Accrual bands screen for the plan.
The formula
uses the function GET_ACCRUAL_BAND (years_service) which sets the global
variables ACCRUAL_RATE, UPPER_LIMIT and CEILING.
You could
instead set values for these global variables inside the formula.
Changing the
Units in the Accrual Bands Screen
You may want to
use the Accrual Bands screen but the bands you want to enter refer to 6 month
periods rather than years. In the seeded subformula PTO_PAYROLL_PERIOD_ACCRUAL
it sets a value for the variable years_service:
years_service =
floor (month_between (period_ed, continuous_service_date) /12)
It then runs
the function GET_ACCRUAL_BAND with a parameter of years_service.
To get the
formula to take each band as a 6 month period replace the ‘12’ with ‘6’ in the
statement which assigns a value to years_service.
Using Accrual
Bands Based on Other Criteria
You may not
want to base your accrual rate on length of service. Maybe you want to use
grade, or a combination of grade and length of service. You will not use the
GET_ACCRUAL_BAND in the formula as you will not enter the criteria in the
Accrual bands screen. Instead you can create user defined tables to hold the
information.
If you base
your bands on a single criteria, e.g. grade, then you will need a table with a
row for each possible grade and columns for Accrual, Ceiling and Max Carry
Over. If you use a combination of criteria, e.g. grade and length of service
you will need to set up a table for each of the three values you require with
rows for each possible grade and columns for ranges of lengths of service. The
your formula can get the value it requires from the tables using the
GET_TABLE_VALUE function.
2.3.5
Accrual Database Items<![endif]>
This is a list
of all the new database items created for use with PTO accruals.
ACP_START - The
rule for determining the start date for new hires in the plan e.g. ‘HD’ (hire
date)
ACP_INELIGIBILITY_PERIOD_TYPE
- The units (e.g. months) for measuring the length of the plan’s ineligibility
period
ACP_INELIGIBILITY_PERIOD_LENGTH
- The length of a plan’s ineligibility period (a number)
ACP_CONTINUOUS_SERVICE_DATE
- An employee’s adjusted service date
ACP_TERMINATION_DATE
- The end date of an employee’s period of service
ACP_ENROLLMENT_END_DATE
- The end date of an employee’s enrollment in the plan
ACP_ENROLLMENT_START_DATE
- The start date of an employee’s enrollment in the plan
ACP_SERVICE_START_DATE
- The start date of an employee’s period of service
ACP_CARRIED_OVER_DATE
- The effective date stored in the latest Carry Over element entry for the
assignment and accrual plan
ACP_CARRIED_OVER_PTO
- The amount of PTO stored for an assignment in the latest Carry Over element
entry
ACP_CATEGORY -
The category of an accrual plan
ACP_NAME - The
name of an accrual plan
ACP_UNIT_OF_MEASURE
- The units (hours or days) for accumulating PTO
2.3.6
Accrual Formula Functions
In addition to
the standard FastFormula functions, several new functions have been written to
be used in accrual and carryover formulas.
GET_ABSENCE
(start_date, calculation_date)
calculates the
total amount of absence contributing to an accrual plan between two dates.
Each absence
must have a start and end date and must start between start_date and
calculation_date,
e.g.
GET_ABSENCE(‘01-JAN-2000’, ‘30-JUN-2000’)
GET_CARRY_OVER
(start_date, calculation_date)
calculates the
amount of carryover (based on Carry Over element entries) with an effective
date on or between the two input dates. It also checks if the carry over has
expired and will not include it if it has.
GET_OTHER_NET_CONTRIBUTION
(start_date, calculation_date)
calculates any
PTO contributions other than absence and carryover between the two input dates.
These additional contributions are defined in the Net Calculation Rules screen
for the plan.
The following
group of functions are used in a different way.
When the
function is called it sets a number of global variables which can then be
retrieved in the formula using the GET_DATE, GET_NUMBER and GET_TEXT functions.
When a function
is called it will return a 0 if it was successful, otherwise there has been an
error.
GET_PAYROLL_PERIOD(date)
determines the
payroll period spanning the input date and sets global variables to hold the
period start and end dates and the period number. E.g. This shows how to call this
function and then use the GET_DATE and GET_NUMBER functions to retrieve the
values set in the global variables
E =
GET_PAYROLL_PERIOD(‘01-JAN-2000’)
Calculation_period_sd
= GET_DATE(‘PAYROLL_PERIOD_START_DATE’)
Calculation_period_ed
= GET_DATE(‘PAYROLL_PERIOD_END_DATE’)
Calculation_period_pnum
= GET_NUMBER(‘PAYROLL_PERIOD_NUMBER’)
GET_ACCRUAL_BAND(number)
determines the
appropriate accrual band for the input length of service.
It sets the
global variables annual_rate, upper_limit and ceiling for that band.
E =
GET_ACCRUAL_BAND(years_service)
annual_rate =
GET_NUMBER(‘ANNUAL_RATE’)
upper_limit =
GET_NUMBER(‘UPPER_LIMIT’)
ceiling =
‘GET_NUMBER(‘CEILING’)
GET_PERIOD_DATES(date1,
unit, date2, number)
sets the global
variables period_start_date and period_end_date for a period of time.
The period
duration is specified by the ‘number’ and ‘unit’ inputs (eg 1 and ‘M’ would be
one month). The period must span the ‘date1’ input and starts on a date that is
a multiple of the duration forwards or backwards from ‘date2’.
Eg
GET_PERIOD_DATES(‘10-MAR-200’, ‘M’, ‘06-JUN-2000’, 2)
would find
calculate a period_start_date of ‘06-FEB-2000’ and a period_end_date of
‘06-APR-2000’ because the duration is 2 months and ‘06-APR-200) is 2*2months
(i.e. 4 months) before ‘06-JUN-2000’ and ‘10-MAR-2000’ is between the
period_start_date and the period_end_date.
E =
GET_PERIOD_DATES(‘10-MAR-200’, ‘M’, ‘06-JUN-2000’, 2)
period_start_date
= GET_DATE(‘PERIOD_START_DATE’)
period_end_date
= ‘GET_DATE(‘PERIOD_END_DATE’)
GET_ASSIGNMENT_STATUS(date)
determines the
assignment status on the input date and populates the global variables
assignment_effective_sd (start date), assignment_effective_ed (end date) and
assignment_system_status
<SPANLASS=TIVE_SD’)
assignment_effective_ed
= GET_DATE(‘ASSIGNMENT_EFFECTIVE_ED’)
assignment_system_status
= GET_TEXT(‘ASSIGNMENT_SYSTEM_STATUS’)
PUT_MESSAGE(expr)
adds the input
‘expr’ to the stack to be output at the end of the formula by the Accruals
form. E = PUT_MESSAGE(‘HR_74013_PTO_FML_ASG_INELIG’)
Functions
To Call a Formula
These functions
allow you to call other formulas either once or in a loop. They require all the
contexts that are available to the Accruals formula type. They are used in the
accrual formula to call a sub-formula which will calculate accrual for a single
period.
CALL_FORMULA(formula_name)
calls the named
formula with no inputs and no outputs
LOOP_CONTROL(formula_name)
calls the named
formula. That sub-formula must have a return parameter called CONTINUE_LOOP. If
that is set to Y then calls the same sub-formula again. If the CONTINUE_LOOP
parameter contains N then the loop is ended and the main formula continues
processing.
Functions
To Set and Retrieve Global Variables
These functions
allow you to set and get values from global variables inside your formula.
SET_TEXT(variable_name,
value)
SET_NUMBER(variable_name,
value)
SET_DATE(variable_name,
value)
These 3
functions assign the input value to the input global variable. Use the
appropriate function depending on the data type of the variable.
E =
SET_DATE(‘PERIOD_SD’, ‘Accrual_start_period_sd’)
GET_TEXT(variable_name)
GET_NUMBER(variable_name
GET_DATE(variable_name)
These 3
functions retrieve the value of the input global variable. Use the appropriate
function depending on the data type of the variable.
E =
GET_NUMBER(‘TOTAL_ACCRUED_PTO’)
CLEAR_GLOBALS
takes all the
global variables that have been set by SET_TEXT, SET_NUMBER and SET_DATE and
resets them all to null.
REMOVE_GLOBALS
removes all
global variables.
ISNULL(variable_name)
checks to see
if the named global variable is null or not. ‘Y’ is returned if it is null and
‘N’ is returned if it’s not null.
superb
ReplyDeletesuper..!!!!!!
ReplyDelete