Monday, December 29, 2025

Oracle EBS SQL Script for data extracts

 SQL Script to display thEmployee and Supervisor hierarchy details:-

Below Query to fetch the specific person's supervisor details upto higher position level wise

SELECT
        LEVEL seq        ,
        e.person_id      ,
        e.grade_id       ,
        e.job_id         ,
        e.supervisor_id  ,
        e.employee_number,
        e.full_name
FROM
        (
                SELECT DISTINCT
                        paf.person_id      ,
                        paf.grade_id       ,
                        paf.job_id         ,
                        paf.supervisor_id  ,
                        ppf.employee_number,
                        ppf.full_name
                FROM
                        per_all_people_f ppf
                LEFT JOIN
                        per_all_assignments_f paf
                ON        ppf.person_id = paf.person_id
                AND     paf.person_id IS NOT NULL
                AND     (
                                                    SYSDATE BETWEEN ppf.effective_start_date AND ppf.effective_end_date )

                AND     (
                                                    SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date ) 

  ) e
CONNECT BY person_id = PRIOR supervisor_id

START WITH person_id = :P_PERSON_ID ORDER BY LEVEL

No comments:

Post a Comment

Oracle EBS SQL Script for List Of Cross-Validation Rules

  SQL Query to display the list of Cross-Validation Rules   :-   Cross-Validation Rules (CVR) are used to restrict the combinations of segme...