This BI Publisher (BIP) query lists the payroll assignments included in a static payroll relationship group.
select pog.base_object_group_name object_group_name,
pogl.description,
pobg.object_id payroll_assignment_id,
decode(pobg.include_or_exclude,'I','Include','E','Exclude',pobg.include_or_exclude) include_or_exclude,
asg.assignment_number,
papf.person_number
from
pay_object_groups pog,
pay_object_groups_tl pogl,
pay_object_group_levels pobl,
pay_object_group_amends pobg,
PAY_PAYROLL_ASSIGNMENTS ppa,
PER_ALL_ASSIGNMENTS_M asg,
per_all_people_f papf
where 1=1
and trunc(sysdate) between pog.start_date and pog.end_date
and pog.base_object_group_name in (select base_object_group_name from pay_object_groups_vl where object_group_name = nvl(:P_OBJGRP,object_group_name))
and pogl.object_group_id = pog.object_group_id
and pogl.language = 'US'
and pobl.object_group_type_id = pog.object_group_type_id
and pobl.name_code = 'PAY_ASG'
and pobg.object_group_level_id = pobl.object_group_level_id
and pobg.object_group_id = pog.object_group_id
and ppa.payroll_assignment_id = pobg.object_id
and ppa.person_id = papf.person_id
and asg.assignment_type = 'E'
and asg.effective_latest_change = 'Y'
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and trunc(sysdate) between asg.effective_start_date and asg.effective_end_date
and papf.person_id = asg.person_id(+)
order by person_number;
Parameters
| Parameter | Description |
|---|---|
P_OBJGRP | Base name of the payroll relationship group. Leave it NULL to fetch all groups. |