Query to get basic salary from run result in Fusion HCM

select sum(D.RESULT_VALUE)
         from FUSION.PAY_PAYROLL_ACTIONS      a,
           FUSION.PAY_PAYROLL_REL_ACTIONS  b,
           FUSION.pay_run_results          c,
           FUSION.PAY_RUN_RESULT_VALUES    D,
           FUSION.PAY_PAY_RELATIONSHIPS_Dn e,
           FUSION.PER_person_names_f       f,
           FUSION.pay_element_types_vl     g,
           FUSION.PAY_TIME_PERIODS         h
     where a.LEGISLATIVE_DATA_GROUP_ID IN
           (SELECT LEGISLATIVE_DATA_GROUP_ID
              FROM FUSION.PER_LEGISLATIVE_DATA_GROUPS_VL
             where legislation_code IN ('P_COUNTRY_NAME'))
       and a.action_type IN ('B', 'C', 'CA', 'EC', 'Q', 'R', 'S', 'V')
       and a.PAYROLL_ACTION_id = b.PAYROLL_ACTION_id
       and b.payroll_rel_action_id = c.payroll_rel_action_id
       and c.element_type_id = g.ELEMENT_TYPE_ID
       and b.retro_component_id is null
       and g.REPORTING_NAME = P_BASIC_SAL_ELEMENT_NAME
       AND D.RUN_RESULT_ID = C.RUN_RESULT_ID
       and b.payroll_relationship_id = e.payroll_relationship_id
       and e.person_id = f.person_id
       and f.person_id = P_PERSON_ID
       and f.name_type = 'GLOBAL'
       and d.formula_result_flag = 'D'
       and h.time_period_id =
           (select time_period_id
              from FUSION.PAY_TIME_PERIODS
             where trunc(sysdate) between trunc(start_date) and
                   trunc(end_date)
               and period_category = 'E')
     group by e.payroll_relationship_number,
              f.full_name,
              g.element_name,
              g.reporting_name,
              h.period_name,
              h.start_date,
              h.end_date,
              h.period_name,
              f.person_id,
              f.display_name;

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