Supervisor Hierarchy and Approval Limits in Oracle EBS R12

Supervisor Hierarchy and Approval Limits in Oracle EBS R12

Supervisor Hierarchy query in Oracle apps R12

Approval Limits query in Oracle apps R12

--Supervisor Hierarchy of the employee
SELECT LEVEL,
       e.*
FROM
  (SELECT DISTINCT papf.person_id,
                   papf.employee_number,
                   papf.full_name "EMPLOYEE_FULL_NAME",
                   paaf.supervisor_id,
                   papf1.employee_number "SUPERVISOR_EMP_NUMBER",
                   papf1.full_name "SUPERVISOR_FULL_NAME",
                   pj.name job_name
   FROM apps.per_all_people_f papf,
        apps.per_all_assignments_f paaf,
        apps.per_jobs pj,
        apps.per_all_people_f papf1,
        apps.per_person_types ppt
   WHERE papf.person_id = paaf.person_id
     AND papf1.person_id = paaf.supervisor_id
     AND papf.business_group_id = 0
     AND papf.business_group_id = paaf.business_group_id
     AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date
     AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date AND paaf.effective_end_date
     AND ppt.person_type_id = papf.person_type_id
     AND paaf.job_id=pj.job_id(+)
     AND ppt.user_person_type 'Ex-employee') e CONNECT BY
PRIOR supervisor_id=person_id
START WITH person_id = 123456;

--Approval Limits
SELECT d.full_name,
       e.job_id,
       g.control_group_name,
       h.object_code,
       h.amount_limit,
       h.*
FROM per_all_people_f d,
     per_all_assignments_f e,
     po_position_controls_all f,
     po_control_groups_all g,
     po_control_rules h,
     apps.po_control_functions pcf
WHERE 1=1
  AND d.effective_end_date > SYSDATE
  AND d.person_id = e.person_id
  AND e.effective_end_date > SYSDATE
  AND e.job_id = f.job_id
  AND f.control_group_id = g.control_group_id
  AND g.control_group_id = h.control_group_id
  AND pcf.control_function_name = 'Approve Purchase Requisitions'
  AND f.control_function_id = pcf.control_function_id
  AND g.org_id = 100
  AND d.person_id=123456;
Related posts: Upload your own post and refer it anywhere anytime:

Leave a Reply