Query to get termination reason in Fusion HCM

SELECT parb.action_reason_code
      FROM fusion.per_all_people_f       papf,
           fusion.per_periods_of_service ppos,
           ---------------------------------------
           fusion.per_all_assignments_m paam,
           ---------------------------------------
           fusion.PER_ACTION_OCCURRENCES pao,
           fusion.PER_ACTION_REASONS_B   parb,
           fusion.per_action_reasons_tl  PART
            ---------------------------------------   
     WHERE 1 = 1
       AND TRUNC(P_DATE) BETWEEN papf.effective_start_date AND
           papf.effective_end_date
       AND papf.person_id = ppos.person_id
       AND ppos.Actual_Termination_Date IS NOT NULL
          ---------------------------------------
       AND pao.action_occurrence_id = ppos.Action_Occurrence_Id
          ---------------------------------------
       AND paam.person_id = papf.person_id
       AND paam.assignment_type = 'E'
       AND paam.primary_assignment_flag = 'Y'
      AND TRUNC(PPOS.ACTUAL_TERMINATION_DATE) BETWEEN
           paam.effective_start_date AND paam.effective_end_date
       AND parb.action_reason_id = PART.Action_Reason_Id
       AND PART.ACTION_REASON_ID = pao.Action_Reason_Id
       and PART.Language = userenv('LANG')
       AND ppos.person_id = P_PERSON_ID;

Comments

Popular posts from this blog

Query to get Salary Change details in Fusion HCM

Oracle Fusion HCM - Enhancements to Summary of Changes and History Sections in Redwood Workforce Structures Pages

๐Ÿงพ Streamlining Payroll Operations with Oracle Payroll Activity Center