Tuesday, 11 February 2020

Hrms Technical Queries - (Payroll Result values After ran the Payroll)

***This query will return the amount values to be paid to the employee (Element wise) after ran the payroll.

SELECT papf.employee_number,paa.PAYROLL_ACTION_ID,ppa.REQUEST_ID,
       papf.full_name,
       paaf.assignment_number,
       paaf.normal_hours,
       petf.element_name,petf.REPORTING_NAME,
       piv.name,
       prrv.result_value
FROM   pay_run_result_values prrv,
       pay_input_values_f piv,
       pay_run_results prr,
       pay_assignment_actions paa,
       per_all_assignments_f paaf,
       per_all_people_f papf,
       pay_element_types_f petf,
       pay_payrolls_f ppf,
       pay_payroll_actions ppa
WHERE  1 = 1       
 AND prrv.input_value_id = piv.input_value_id
 AND prr.run_result_id = prrv.run_result_id
 AND prr.assignment_action_id = paa.assignment_action_id
 AND paa.assignment_id = paaf.assignment_id
 AND paaf.person_id = papf.person_id
 AND prr.element_type_id = petf.element_type_id
 AND paaf.payroll_id = ppf.payroll_id
 AND papf.employee_number ='1000033_X'
 and sysdate between papf.effective_start_date and  papf.effective_end_date
 and sysdate between paaf.effective_start_date and  paaf.effective_end_date
 and paa.PAYROLL_ACTION_ID =  ppa.PAYROLL_ACTION_ID
 and ppa.EFFECTIVE_DATE ='30-Nov-2019'
 and piv.name = 'Pay Value'
 and ppa.PAYROLL_ACTION_ID in ( select max(pa1.PAYROLL_ACTION_ID)
                                  from pay_assignment_actions pa1,
                                       pay_payroll_actions  pp1
                                 where 1=1
                                   and  assignment_id = paaf.assignment_id
                                   and pa1.PAYROLL_ACTION_ID = pp1.PAYROLL_ACTION_ID
                                   and pp1.EFFECTIVE_DATE ='30-Nov-2019'
                                   )

No comments:

Post a Comment

API to Delete Assignment Set

*** Before going to Delete Assignment Set first we have to delete the Assignment Amendments after that only we have to delete the Assignmen...