Skip To Content
Skip To Content
Accessibility Preferences
PowerView is
Off
Switch to Cloud Support Ahmed (Available) (0) Contact UsHelp
Dashboard
Knowledge
Service Requests
Patches & Updates
Community
Certifications
Systems
Collector
Advanced Customer Services
Settings
Global Search
Doc ID 74315.1
Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential.
Details
Document References
Oracle Payroll - Version
The Secret Life of Initial Balance
11.5.10.2 and later Upload with Screenshots Example
Information in this [60057.1]
document applies to any
platform. Using User Defined Functions (UDFs)
In FastFormula [73452.1]
ABSTRACT
Recently Viewed
Oracle Payroll - Understanding Balances and Balance Retrieval
To give a technical [74315.1]
understanding of Oracle
Payroll balances and how to How to Convert an Implementation User Into a Normal Fusion
retrieve balance values. Application User [2089250.1]
It is possible in, UK
legislation, to create your
own balance dimensions in
Release 11 using the Create
Balance Dimension process
(via the Submit Processes
and Reports screen
[Processes & Reports-
>Submit Processes &
Reports]). You enter a
balance suffix, a balance
level (eg Assignment), a
balance time period start
date and a reset frequency.
This dimension will then be
available to use with any
predefined or user defined
balance.
2. RETRIEVING
BALANCE
INFORMATION
select category_name,
legislation_code,
save_run_balance_enabled
From
pay_balance_categories_f;
Below is a current list of GB
legislation categories. A
User Defined Balance can be
calculated from it's run
balance if the Balance
Category for the balance
allows this.
CATEGORY_NAME
LEGIS
SAVE_RUN_BALANCE_ENABLED
Vehicle Related
GB N
OMP
Balances
GB N
OSP
Balances
GB N
Miscellaneous
GB N
NI and PAYE
Deductions GB Y
Statutory
Payments GB
Y
Earnings
GB Y
Direct Payments
GB Y
Other
Deductions
GB Y
2.3 Expiry
2.4 Routes
select
nvl(sum(TARGET.result_val
ue * FEED.scale),0)
,pay_run_result_values
TARGET
,pay_run_results RR
,pay_payroll_actions PACT
,pay_assignment_actions
ASSACT
,pay_payroll_actions BACT
,pay_assignment_actions
BAL_ASSACT
where
BAL_ASSACT.assignment_act
ion_id = &B1
and
BAL_ASSACT.payroll_action
_id =
BACT.payroll_action_id
and FEED.balance_type_id
= &U1
and FEED.input_value_id =
TARGET.input_value_id
and TARGET.run_result_id
= RR.run_result_id
and
RR.assignment_action_id =
ASSACT.assignment_action_
id
and
ASSACT.payroll_action_id
= PACT.payroll_action_id
and PACT.effective_date
between
FEED.effective_start_date
and
FEED.effective_end_date
and RR.status in
('P','PA')
and PACT.time_period_id =
BACT.time_period_id
and
ASSACT.action_sequence <=
BAL_ASSACT.action_sequenc
e
and ASSACT.assignment_id
=
BAL_ASSACT.assignment_id
The BAL_ASSACT
table looks at the
'current' action for
this assignment;
The ASSACT table
picks up the actions
for the same
assignment with run
results which feed
the balance;
The PACT table
picks up the payroll
actions which own
the ASSACT actions;
The FEED table
picks up all the input
values which feed the
balance;
The RR (run results)
table picks up only
results that are
processed ('P' or
'PA');
The PACT table only
picks up payroll
actions in the same
time period as the
'current' action (as
this is a PTD
dimension);
The ASSACT table
only picks up actions
previous to and
including the current
action.
Function get_value
(p_define_balance_id in
number,
p_assignment_action_id in
number,
p_always_get_db_item in
boolean default false)
return number;
p_defined_ba
lance_id -
combination
of
balance_type
_id and
dimension_id
from
PAY_DEFIN
ED_BALAN
CES.DEFINE
D_BALANC
E_ID
p_assignment
_action_id -
ID of the
assignment
action which
updated the
balance to the
value you
want to
retrieve
p_always_get
_db_item -
This can be
ignored as it
is used for
testing
purposes to
ensure the
function
always
derives the
balance from
the database
item and not
the latest
balance.
Date mode retrieves the
balance value for a specified
assignment on a specified
date.
Function get_value
(p_define_balance_id in
number,
p_assignment_id in
number,
p_virtual_date in date,
p_always_get_db_item in
boolean default false)
return number;
p_defined_ba
lance_id -
combination
of
balance_type
_id and
dimension_id
from
PAY_DEFIN
ED_BALAN
CES.DEFINE
D_BALANC
E_ID
P-
assignment_i
d - the
assignment_i
d from
PER_ASSIG
NMENTS_F
p_virtual_dat
e - The date
for which you
want to get
the balance
value
p_always_get
_db_item -
This can be
ignored as it
is used for
testing
purposes to
ensure the
function
always
derives the
balance from
the database
item and not
the latest
balance.
When the
PAY_BALANCE_PKG.GE
T_VALUE function is run in
date mode, a temporary row
is inserted into
PAY_ASSIGNMENT_ACT
IONS. This then allows the
two modes to use the same
method to derive the balance
value. At the end of the
function, the temporary row
is removed. In both modes,
to derive the balance value,
the pl/sql first checks if the
balance is of a
dimension_type that saves
latest balance values (see
section 1.2 Balance
Dimensions). If it is then it
will look in the relevant
latest
balance table (person or
assignment) for a latest
balance for the appropriate
assignment_action_id. If it
finds a latest balance then it
will then check whether the
balance has expired (see
section 2.1 Expiry) and if so
it will return 0; if not it will
return the latest balance
value. If there is no latest
balance available then the
function builds pl/sql code
from FF_ROUTES based on
the balance dimension,
defined balance_id and
assignment_action_id (see
section 2.4 Routes). This
code runs and produces the
balance value.
It is necessary to set up
contexts before accessing
parameterized balances. In
the UK the only
parameterized balances are
the Court Order balances.
You set up the contexts
using the
PAY_BALANCE_PKG.SE
T_CONTEXT(p_context_na
me, p_context_value)
procedure.
PAY_BALANCE_PKG.SET_CONTE
XT(ORIGINAL_ENTRY_ID,
1201);
1. select
latest_balance_id
from
pay_assignment_latest_bal
ances
where assignment_id =
and defined_balance_id =
/
2. select context_id,
value
from
pay_balance_context_value
s
where latest_balance_id =
/
3. select context_name
from ff_contexts
where context_id =
/
p_context_na
me is
'context_nam
e' from query
3;
p_context_val
ue is 'value'
from query 2.
SQL> select
pay_balance_pkg.get_value
(179, 1121) from dual;
or using the following
example which uses the
get_value function in
assignment action mode:
In my example (run on
SN153) the
defined_balance_id (113) is
the defined balance for
NI_A_EMPLOYEE_ASG_P
TD and the
assignment_action (1121) is
a quickpay for
assignent_id=44 with an
effective date of 30-SEP-
1999.
2.5.4 UK Legislation
SELECT ITEM_NAME
, RESULT_VALUE
FROM PAY_GB_BALANCES_V
WHERE ASSIGNMENT_ID = 44
AND EFFECTIVE_DATE = '30-
SEP-XX'
/
SUMMARY
Additional
References:
Document 60057.1
The Secret Life of
Initial Balance
Upload
Note Document
73452.1 Using User
Defined Functions
(UDFs) In
FastFormula: Oracle
Payroll UK Users'
Guide ch13
Controlling Balance
Information
(A58383-01)
REFERENCES
Related
Product
s
Oracle E-Business Suite > Human Capital Management > Payroll > Oracle Payroll > Balances and
Balance Uploads > Balance Retrieval (get_value) -
Keywords
ADJUSTMENT; BALANCE ADJUSTMENT; BALANCE DIMENSION; BALANCE TYPE; BALANCE UPLOAD; BALANCE
VALUES; CREATE BALANCE; DIMENSION; FASTFORMULA; ICPY_BALANCES; ICPY_BALINIT; ICPY_GENRUNBAL;
INITIAL BALANCE UPLOAD; PAYROLL; PAY_DEFINED_BALANCES; RUN BALANCE; RUN RESULTS
Error
s
ORA-6571
Back to Top
Copyright (c) 2019, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement