Query to find the List of Jobs without Purchasing Approval Groups and Assignments Setup for Requisition
SELECT DISTINCT pj.NAME "Job Name",
hou.NAME "Operating Unit Name",
pj.creation_date "Job Creation Date"
FROM per_jobs_tl pj,
per_all_assignments_f paaf,
per_all_people_f papf,
hr_operating_units hou
WHERE paaf.person_id = papf.person_id
AND pj.job_id = paaf.job_id
AND papf. current_employee_flag = 'Y'
AND papf.effective_end_date > sysdate
AND paaf.effective_end_date > sysdate
AND paaf.assignment_type = 'E'
AND NOT EXISTS (SELECT 1
FROM po_control_rules PCR,
po_position_controls_all PPC,
po_control_functions PCF
WHERE PCF.document_type_code LIKE 'REQUISITION'
AND PCF.document_subtype LIKE 'PURCHASE'
AND PCF.control_function_id =
PPC.control_function_id
AND PPC.control_group_id = PCR.control_group_id
AND PCR.object_code = 'DOCUMENT_TOTAL'
AND hou.organization_id = PPC.org_id
AND pj.job_id = PPC.job_id)
Comments
Post a Comment