Approval group's members list [message #571794] |
Fri, 30 November 2012 09:50 |
|
vids
Messages: 1 Registered: November 2012
|
Junior Member |
|
|
All,
Im very new to Oracle so please kindly bear with me if this is a irrevalant forum for my post.
I need to know how to get the list of members for a PO approval group.
Many thanks,
Vidhya
|
|
|
|
Re: Approval group's members list [message #572693 is a reply to message #572144] |
Sun, 16 December 2012 05:32 |
|
Find below the script to get the Approval Group Members based on Position Hierarchy.
SELECT b.pos_structure_version_id,
b.date_from,
(SELECT name
FROM hr.hr_all_positions_f
WHERE 1 = 1
AND position_id = c.parent_position_id
AND Trunc(SYSDATE) BETWEEN effective_start_date AND
effective_end_date)
parent_position_name,
(SELECT papf.full_name
FROM per_all_people_f papf,
per_all_assignments_f paaf
WHERE 1 = 1
AND papf.person_id = paaf.person_id
AND Trunc(SYSDATE) BETWEEN paaf.effective_start_date AND
paaf.effective_end_date
AND Trunc(SYSDATE) BETWEEN papf.effective_start_date AND
papf.effective_end_date
AND paaf.primary_flag = 'Y'
AND paaf.position_id = c.parent_position_id)
parent_position_holder,
(SELECT name
FROM hr.hr_all_positions_f
WHERE 1 = 1
AND position_id = c.subordinate_position_id
AND Trunc(SYSDATE) BETWEEN effective_start_date AND
effective_end_date)
subordinate_position_name,
(SELECT papf.full_name
FROM per_all_people_f papf,
per_all_assignments_f paaf
WHERE 1 = 1
AND papf.person_id = paaf.person_id
AND Trunc(SYSDATE) BETWEEN paaf.effective_start_date AND
paaf.effective_end_date
AND Trunc(SYSDATE) BETWEEN papf.effective_start_date AND
papf.effective_end_date
AND paaf.primary_flag = 'Y'
AND paaf.position_id = c.subordinate_position_id)
parent_position_holder
FROM per_position_structures a,
per_pos_structure_versions b,
per_pos_structure_elements c
WHERE 1 = 1
AND a.name = '&position_hiersrchy_name'
/* Pass the Position hierarch name*/
AND a.position_structure_id = b.position_structure_id
AND b.pos_structure_version_id = c.pos_structure_version_id
ORDER BY 1,
5,
6
Thanks
Gopi GT
[EDITED by LF: removed useless color formatting; formatted code and applied [code] tags]
[Updated on: Sun, 16 December 2012 15:06] by Moderator Report message to a moderator
|
|
|
|