0% found this document useful (0 votes)
72 views

Oracle Applications - PAYROLL

This document contains two blog posts about querying Oracle payroll data. The first post provides a SQL query to find payroll run result values for an employee including their name, payroll, and element results. The second post provides a longer SQL query to generate a salary slip detail report for an employee showing earnings and deductions by element for a given time period. Both queries join several Oracle payroll tables to retrieve the relevant data for reporting and analysis.

Uploaded by

UbaidUrRehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Oracle Applications - PAYROLL

This document contains two blog posts about querying Oracle payroll data. The first post provides a SQL query to find payroll run result values for an employee including their name, payroll, and element results. The second post provides a longer SQL query to generate a salary slip detail report for an employee showing earnings and deductions by element for a given time period. Both queries join several Oracle payroll tables to retrieve the relevant data for reporting and analysis.

Uploaded by

UbaidUrRehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

6/1/2017 OracleApplications:PAYROLL

18 More NextBlog urehman@gmail.

Home AP AR GL INV PO OM HR PA FAQS SCRIPTS PLSQL TECH OAF CLOUD

ShowingpostswithlabelPAYROLL. Showallposts

MONDAY,JANUARY25,2016

QuerytoFindPayrunResultValuesinOraclePayroll

SELECTpapf.employee_number,
papf.full_name,
ppa.effective_date,
pp.payroll_name,
pet.element_name,
piv.nameinput_value,
prrv.result_value
FROMpay_payroll_actionsppa,
pay_assignment_actionspaa,
pay_payrolls_fpp,
pay_run_resultsprr,
pay_run_result_valuesprrv,
pay_input_values_fpiv,
pay_element_types_fpet,
per_all_assignments_fpaaf,
per_all_people_fpapf
WHEREppa.payroll_action_id=:payroll_action_id
ANDppa.payroll_action_id=paa.payroll_action_id
ANDppa.payroll_id=pp.payroll_id
ANDpaa.assignment_action_id=prr.assignment_action_id
ANDprr.run_result_id=prrv.run_result_id
ANDprrv.input_value_id=piv.input_value_id
ANDpiv.element_type_id=pet.element_type_id
ANDpaaf.assignment_id=paa.assignment_id
ANDpaaf.person_id=papf.person_id
ANDtrunc(sysdate)BETWEENpp.effective_start_dateANDpp.effective_end_date
ANDtrunc(sysdate)BETWEENpet.effective_start_dateANDpet.effective_end_date
ANDtrunc(sysdate)BETWEENpiv.effective_start_dateANDpiv.effective_end_date
ANDtrunc(sysdate)BETWEENpaaf.effective_start_dateANDpaaf.effective_end_date
ANDtrunc(sysdate)BETWEENpapf.effective_start_dateANDpapf.effective_end_date

ORDERBYemployee_number

PostedbyRajuChinthapatlaat10:20:00PM 0comments Recommend this on Google

Labels:PAYROLL,SCRIPTS

FRIDAY,NOVEMBER29,2013

QueryforOraclePayrollSalarySlipSalarySlipDetailReportQueryHowtofindoutdetailofsalaryslipElementwiseLandscape
SalarySlipatPayrollRunLevleorquickpaylevel

SELECT
ppf.employee_number,
ppf.person_id,
ppf.full_name,
ppa.TIME_PERIOD_ID,
ppa.EFFECTIVE_DATE,
TP.PERIOD_NAME,

http://oracleapps88.blogspot.com/search/label/PAYROLL?updatedmax=20160214T20:59:00%2B05:30&maxresults=20&start=1&bydate=false 1/3
6/1/2017 OracleApplications:PAYROLL

sum(decode(ety.element_name,BasicSalary,TO_NUMBER(rrv.result_value),
BasicSickLeavePayment,TO_NUMBER(rrv.result_value),
BasicOutWorkIncidentLeavePayment,TO_NUMBER(rrv.result_value),
0))Earned_salary,

sum(decode(ety.element_name,TransportationAllowance,TO_NUMBER(rrv.result_value),
TransportationSickLeavePayment,TO_NUMBER(rrv.result_value),
TransportationOutWorkIncidentLeavePayment,TO_NUMBER(rrv.result_value),
0))Transportation_allowance,

sum(decode(ety.element_name,WorkTypeAllowance,TO_NUMBER(rrv.result_value),
WorkTypeSickLeavePayment,TO_NUMBER(rrv.result_value),
WorkTypeOutWorkIncidentLeavePayment,TO_NUMBER(rrv.result_value),
0))worktype_allowance,

sum(decode(ety.element_name,DamagesAllowance,TO_NUMBER(rrv.result_value),
DamagesSickLeavePayment,TO_NUMBER(rrv.result_value),
DamagesOutWorkIncidentLeavePayment,TO_NUMBER(rrv.result_value),
0))Damage_allowance,

sum(decode(ety.element_name,DangerAllowance,TO_NUMBER(rrv.result_value),
DangerSickLeavePayment,TO_NUMBER(rrv.result_value),
DangerOutWorkIncidentLeavePayment,TO_NUMBER(rrv.result_value),
0))Danger_allowance,

sum(decode(ety.element_name,InflationAllowance,TO_NUMBER(rrv.result_value),0))Inflation_Allowance,

>Deductions
sum(decode(ety.element_name,LoanRecovery,TO_NUMBER(rrv.result_value),0))Loan_recovery,
sum(decode(ety.element_name,LoanRecoveryHousing,TO_NUMBER(rrv.result_value),0))Loan_Recovery_Housing,
sum(decode(ety.element_name,LoanRecoveryOthers,TO_NUMBER(rrv.result_value),0))Loan_Recovery_Others,
sum(decode(ety.element_name,HousingDeduction,TO_NUMBER(rrv.result_value),0))Housing_Deduction,
sum(decode(ety.element_name,Penalty,TO_NUMBER(rrv.result_value),0))Penalty,

sum(decode(ety.element_name,CivilPension,TO_NUMBER(rrv.result_value),SocialInsurance,TO_NUMBER(rrv.result_value),0))
Civil_pension,

sum(decode(ety.element_name,InOutLeaveDeduction,TO_NUMBER(rrv.result_value),0))In_Out_Leave_Deduction,
sum(decode(ety.element_name,UnpaidLeaveDeduction,TO_NUMBER(rrv.result_value),0))Unpaid_Leave_Deduction,
sum(decode(ety.element_name,RetrieveMonyRecovery,TO_NUMBER(rrv.result_value),0))Retrieve_Mony_Recovery

FROM
per_people_xppf,
per_assignments_xpaf,
pay_assignment_actionspas,
pay_payroll_actionsppa,
pay_run_resultsrr,
pay_run_result_valuesrrv,
pay_element_types_fety,
pay_input_values_FI,
PER_TIME_PERIODSTP
PER_POSITION_DEFINITIONSPD
PAY_INPUT_VALUES_F

WHEREppf.person_id=paf.person_id
ANDpaf.assignment_id=pas.assignment_id
ANDpas.assignment_action_id=rr.assignment_action_id
ANDppa.payroll_action_id=pas.payroll_action_id
ANDrr.element_type_id=ety.element_type_id
ANDi.element_type_id=ety.element_type_id
ANDrrv.run_result_id=rr.run_result_id
ANDrrv.input_value_id=i.input_value_id
andTP.TIME_PERIOD_ID=PPA.TIME_PERIOD_ID
ANDi.name=PayValue
ANDHR_GENERAL.DECODE_LATEST_POSITION_DEF_ID(PAF.POSITION_ID)=PD.POSITION_DEFINITION_ID
andppa.EFFECTIVE_DATEBETWEEN:P_FROM_DATEAND:P_TO_DATE
andppf.employee_number=:P_Employee_number

groupby
ppf.employee_number,
ppf.person_id,
ppf.full_name,
ppa.TIME_PERIOD_ID,
ppa.EFFECTIVE_DATE,
TP.PERIOD_NAME,

orderbyppa.EFFECTIVE_DATE

PostedbyRajuChinthapatlaat9:08:00AM 0comments +1 Recommend this on Google

Labels:PAYROLL,SCRIPTS

http://oracleapps88.blogspot.com/search/label/PAYROLL?updatedmax=20160214T20:59:00%2B05:30&maxresults=20&start=1&bydate=false 2/3
6/1/2017 OracleApplications:PAYROLL

NewerPosts Home OlderPosts

Subscribeto:Posts(Atom)

Email:OracleApps88@Yahoo.Com.PictureWindowtheme.Themeimagesbykonradlew.PoweredbyBlogger.

GetFlowerEffect

http://oracleapps88.blogspot.com/search/label/PAYROLL?updatedmax=20160214T20:59:00%2B05:30&maxresults=20&start=1&bydate=false 3/3

You might also like