Sei sulla pagina 1di 21

OraclePort.

com | Oracle HR and Payroll Related Queries

1 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

ORACLE TECHNO FUNCTIONAL PORTAL, TECHNICAL AND FUNCTIONAL RESOURCE

HOME (HTTP://WWW.ORACLEPORT.COM/)

BOOKS (HTTP://WWW.ORACLEPORT.COM/RECOMMENDED-BOOKS/)

ORACLE HR AND PAYROLL RELATED QUERIES


Posted O ctober 26th, 2010 by faisal (http://www.oracleport.com/author/faisal/) & filed under HR / Payroll Related
Queries (http://www.oracleport.com/category/impratant-queries/hr-payroll-related-queries/).

Oracle EBS/Apps R12. ( Oracle HR / Payroll ) Important Queries


(http://www.oracleport.com/online-training-details/)
Note: All following queries are customized and may not fit in
your setup but can give you some idea to get appropriate
results. Thanks

Costing Detail Query:


select
paf.ASSIGNMENT_NUMBER, ppf.FULL_NAME ,pet.element_name,pca.CONCATENATED_SEGMENTS,
decode(pc.DEBIT_OR_CREDIT,D,pc.COSTED_VALUE) Debit,
decode(pc.DEBIT_OR_CREDIT,C,pc.COSTED_VALUE) Credit
from
per_people_f ppf,
per_assignments_f paf,
pay_assignment_actions pav,
pay_payroll_actions ppa,
pay_costs pc,
PAY_COST_ALLOCATION_KEYFLEX pca,
pay_element_types_f pet,
pay_run_results prr,
pay_run_result_values prrv
where ppf.PERSON_ID=paf.PERSON_ID
and paf.ASSIGNMENT_ID=pav.ASSIGNMENT_ID
and paf.PRIMARY_FLAG=Y
and ppf.EMPLOYEE_NUMBER=:p_emp_no
and pav.PAYROLL_ACTION_ID=ppa.PAYROLL_ACTION_ID
and trunc(ppa.EFFECTIVE_DATE) between :p_start_date and :p_end_date
and pav.ASSIGNMENT_ACTION_ID=pc.ASSIGNMENT_ACTION_ID
and pc.COST_ALLOCATION_KEYFLEX_ID=pca.COST_ALLOCATION_KEYFLEX_ID
and pet.ELEMENT_TYPE_ID=prr.ELEMENT_TYPE_ID
and prr.RUN_RESULT_ID=prrv.RUN_RESULT_ID
and pc.RUN_RESULT_ID=prrv.RUN_RESULT_ID
and pc.INPUT_VALUE_ID=prrv.INPUT_VALUE_ID
and :p_end_date between pet.EFFECTIVE_START_DATE and pet.EFFECTIVE_END_DATE
and ppf.EFFECTIVE_END_DATE = (select max(effective_end_date) from per_people_f where
person_id=ppf.PERSON_ID)
and paf.EFFECTIVE_END_DATE = (select max(effective_end_date) from per_assignments_f where
assignment_id=paf.ASSIGNMENT_ID)

Query to Find of Number of Working Days in Months.


SELECT themonth, count(theday) cnt
FROM ( SELECT TO_CHAR(TRUNC(SYSDATE,YY)+LEVEL-1,Month) themonth
, TO_CHAR(TRUNC(SYSDATE,YY)+LEVEL-1,DY) theday
FROM dual
CONNECT BY LEVEL <= ADD_MONTHS(TRUNC(SYSDATE,YY),12)-TRUNC(SYSDATE,YY)
)
WHERE theday NOT IN (SAT,SUN)
GROUP BY themonth
ORDER BY TO_DATE(themonth,MM)

Simple
Payroll
Software
Easy to Use. Loved
by 1300 Clients. Rs.
740/ Month. 30-Day
Free Trial!

RECOMMENDED BOOKS

Simple Payroll
Software
Easy to Use. Loved by 1300
Clients. Rs. 740/ Month.
30-Day Free Trial!

POPULAR DOWLOADS
Online

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

2 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

Query to to find the Employee Supervisor name


SELECT papf1.full_name supervisor_nameFrom apps.per_all_people_f
papf,apps.per_all_assignments_f paaf,apps.per_all_people_f papf1WHERE papf.person_id =
paaf.person_idAND paaf.primary_flag = YAND paaf.assignment_type = EAND paaf.supervisor_id =
papf1.person_idAND papf1.current_employee_flag = YAND papf.business_group_id =
paaf.business_group_idAND SYSDATE BETWEEN papf.effective_start_date and
papf.effective_end_dateAND SYSDATE BETWEEN paaf.effective_start_date AND
paaf.effective_end_dateAND SYSDATE BETWEEN papf1.effective_start_date AND
papf1.effective_end_dateAND papf.employee_number = :p_emp_number;

Query to find out payroll Costing Detail / How to find out payroll costed
accounts / Query to find out Payroll Charged Accounts.

Using Fast Formula


(http://www.oracleport.com
/wp-content/uploads/2015/11/FastFormula-Guide.pdf)

Comments or questions are welcome.


*(denotes required field)
Name: *

E-Mail Address: *

Subject: *
SELECT distinct d.EMPLOYEE_NUMBER,d.FULL_NAME,a.CONCATENATED_SEGMENTS,
a.element_name,decode(a.debit_or_credit,Debit,COSTED_VALUE,) Debit ,
decode(debit_or_credit,Credit,COSTED_VALUE,) Credit
FROM pay_costs_v a, pay_assignment_actions_v b,per_assignments_x c,per_people_x d
where
d.EMPLOYEE_NUMBER= nvl(:p_emp_no,d.EMPLOYEE_NUMBER)
and trunc (b.EFFECTIVE_DATE) between :p_from_date and :p_to_date
and a.ASSIGNMENT_ACTION_ID=b.ASSIGNMENT_ACTION_ID
and b.ASSIGNMENT_ID=c.ASSIGNMENT_ID
and c.PERSON_ID=d.PERSON_ID

Message: *

(#)
Query to Find All Active Employees and Current Salary.
select EMPLOYEE_NUMBER,a.FULL_NAME,x.USER_PERSON_TYPE, c.PROPOSED_SALARY_n
Basi_Salary,c.CHANGE_DATE,c.*
from per_people_f A,per_assignments_f b,pER_PAY_pROposals c
,per_person_types x
, per_person_type_usages_f e
where a.PERSON_ID=b.PERSON_ID
and b.ASSIGNMENT_ID=C.ASSIGNMENT_ID
and a.EMPLOYEE_NUMBER is not null
and a.EMPLOYEE_NUMBER=:emp_num
and c.CHANGE_DATE = (select max(d.CHANGE_DATE) from pER_PAY_pROposals d where
d.ASSIGNMENT_ID=b.ASSIGNMENT_ID and d.approved = Y)
and c.CHANGE_DATE>=:change_date
and b.PAYROLL_ID=62
and :p_effective_date between a.EFFECTIVE_START_DATE and a.EFFECTIVE_END_DATE
and :p_effective_date between b.EFFECTIVE_START_DATE and b.EFFECTIVE_END_DATE
and a.PERSOn_id = e.PERSON_ID
and a.EFFECTIVE_START_DATE between e.EFFECTIVE_START_DATE and e.EFFECTIVE_END_DATE
and e.PERSON_TYPE_ID = x.PERSON_TYPE_ID
and x.SYSTEM_PERSON_TYPE = EMP

CAPTCHA Code: *

Submit

RECENT COMMENTS
Jaime on Framework Personalization

(http://www.oracleport.com/frameworkpersonalization/comment-page-1
/#comment-4296)
BAHHIDE on Oracle R12 HR Payroll Using

Oracle FastFormual For Payroll Calculatins


(http://www.oracleport.com/oracle-r12-hrpayroll-%e2%80%9cusing-oracle-fast-forpayroll-calculatins/comment-page-1
/#comment-4286)
rajesh on Configuring / Creating Descriptive

Flexfield (http://www.oracleport.com
/configuring-creating-descriptive-flexfield
/comment-page-1/#comment-4280)
ALI Ahmed on Extra Person Information (EIT)

Query fo Find out all Earning and Deduction Elements and values after Payroll
Run
SELECT
ppf.employee_number,ppf.person_id,ppf.full_name,ppa.TIME_PERIOD_ID,ppa.EFFECTIVE_DATE,TP.P
ERIOD_NAME,paf.ORGANIZATION_ID,
sum(decode(pec.CLASSIFICATION_NAME,Earnings,to_number(rrv.result_value),
0)
) Earnings,
sum(decode(pec.CLASSIFICATION_NAME,Voluntary Deductions,to_number(rrv.result_value),
Involuntary Deductions,to_number(rrv.result_value),
Employer Charges,to_number(rrv.result_value),
0)
) Deductions
ety.element_name,ety.CLASSIFICATION_ID
PD.SEGMENT5 POSITION_NO,PD.SEGMENT6 POSITION_NAME,
FROM per_people_x ppf,
per_assignments_x paf,
pay_assignment_actions pas,
pay_payroll_actions ppa,
pay_run_results rr,
pay_run_result_values rrv,
pay_element_types_f ety,
pay_input_values_F I,
PER_TIME_PERIODS TP,

Upload API Procedure


(http://www.oracleport.com/extra-personinformation-eit-upload-api-procedure/commentpage-1/#comment-4261)
khalfan on 1.1.2 Chart of Account and Segments

Lists (http://www.oracleport.com/1-1-2-chartof-account-segments-lists/comment-page-1
/#comment-4260)

Simple Payroll
Software
Easy to Use. Loved by 1300
Clients. Rs. 740/ Month.
30-Day Free Trial!

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

3 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

PAY_ELEMENT_CLASSIFICATIONS_VL pec
WHERE ppf.person_id = paf.person_id
AND paf.assignment_id = pas.assignment_id
AND pas.assignment_action_id = rr.assignment_action_id
AND ppa.payroll_action_id = pas.payroll_action_id
AND rr.element_type_id = ety.element_type_id
AND i.element_type_id = ety.element_type_id
AND rrv.run_result_id = rr.run_result_id
AND rrv.input_value_id = i.input_value_id
and TP.TIME_PERIOD_ID = PPA.TIME_PERIOD_ID
and ety.CLASSIFICATION_ID=pec.CLASSIFICATION_ID
AND i.name = Pay Value
AND HR_GENERAL.DECODE_LATEST_POSITION_DEF_ID(PAF.POSITION_ID) =
PD.POSITION_DEFINITION_ID
and ppa.EFFECTIVE_DATE BETWEEN :p_st_effect_date AND :p_end_effect_date
and ppf.employee_number = nvl(:p_emp_number,ppf.employee_number)
group by ppf.full_name,ppa.TIME_PERIOD_ID,effective_date,
To_Number(Wassa_HR_PACKAGE.Nid_Salary_By_Date(paf.assignment_id,ppa.EFFECTIVE_DATE,N)),
ppf.employee_number,ppf.person_id ,PD.SEGMENT5 ,PD.SEGMENT6,
TP.period_name,paf.ORGANIZATION_ID

Query for Oracle Payroll Salary Slip / Salary Slip Detail Report Query / How to
find out detail of salary slip/ Element wise Landscape Salary Slip at Payroll Run
Levle or quick pay level
Note: I have hardcoded element names. You can also hardcode your elements to get Landscaped
salary slip.
SELECT
ppf.employee_number,ppf.person_id,ppf.full_name,ppa.TIME_PERIOD_ID,ppa.EFFECTIVE_DATE
,TP.PERIOD_NAME,
sum(decode(ety.element_name,Basic Salary
,TO_NUMBER(rrv.result_value),
Basic Sick Leave Payment
,TO_NUMBER(rrv.result_value),
Basic Out Work Incident Leave Payment,TO_NUMBER(rrv.result_value),
0)) Earned_salary,
/**************************************************************************************
******************/
sum(decode(ety.element_name,Transportation Allowance
,TO_NUMBER(rrv.result_value),
Transportation Sick Leave Payment
,TO_NUMBER(rrv.result_value),
Transportation Out Work Incident Leave Payment,TO_NUMBER(rrv.result_value),
0)) Transportation_allowance,
/**************************************************************************************
***********************/
sum(decode(ety.element_name,Work Type Allowance
,TO_NUMBER(rrv.result_value),
Work Type Sick Leave Payment
,TO_NUMBER(rrv.result_value),
Work Type Out Work Incident Leave Payment,TO_NUMBER(rrv.result_value),
0)) worktype_allowance,
/**************************************************************************************
*************************/
sum(decode(ety.element_name,Damages Allowance
,TO_NUMBER(rrv.result_value),
Damages Sick Leave Payment
,TO_NUMBER(rrv.result_value),
Damages Out Work Incident Leave Payment,TO_NUMBER(rrv.result_value),
0)) Damage_allowance,
/**************************************************************************************
***************************/
sum(decode(ety.element_name,Danger Allowance
,TO_NUMBER(rrv.result_value),
Danger Sick Leave Payment
,TO_NUMBER(rrv.result_value),
Danger Out Work Incident Leave Payment,TO_NUMBER(rrv.result_value),
0)) Danger_allowance,
/**************************************************************************************
***********************/
sum(decode(ety.element_name,Inflation Allowance ,TO_NUMBER(rrv.result_value),0))
Inflation_Allowance,
/********************************************************* Deductions
************************************************/
sum(decode(ety.element_name,Loan Recovery
,TO_NUMBER(rrv.result_value),0))
Loan_recovery,
sum(decode(ety.element_name,Loan Recovery Housing ,TO_NUMBER(rrv.result_value),0))
Loan_Recovery_Housing,
sum(decode(ety.element_name,Loan Recovery Others ,TO_NUMBER(rrv.result_value),0))
Loan_Recovery_Others,
sum(decode(ety.element_name,Housing Deduction
,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,Civil Pension
,TO_NUMBER(rrv.result_value),

CATEGORIES
1- Accounting Concepts
(http://www.oracleport.com/category
/accounting/1-accounting-concepts/)
1- Oracle R12 Financial Setup
(http://www.oracleport.com/category/1-oracler12-financial-setup/)
1.1 General Ledger Setup
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledger-setup/)
1.1.1 User Creation and Assign Responsibility
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-1-user-creation-and-assignresponsibility/)
1.1.2 Chart of Account and Segments Lists
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-2-chart-of-account-and-segmentslists/)
1.1.3 Accounting Flexfield
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-3-accounting-flexfield/)
1.1.4 Accounting Calendar
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-4-accounting-calendar/)
1.1.4 Define/Enable Currency
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-4-defineenable-currency/)
1.1.5 Accounting Flex Field Value Set
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-1-general-ledgersetup/1-1-5-accounting-flex-field-value-set/)
1.2 Payable Setup (http://www.oracleport.com
/category/1-oracle-r12-financial-setup/1-2payable-setup/)
1.2.1 Business Group/Calendar/Inv Org Creation
(http://www.oracleport.com/category/1-oracler12-financial-setup/1-2-payable-setup/1-2-1business-groupcalendarinv-org-creation/)
Administrator n Concurrent
(http://www.oracleport.com/category
/impratant-queries/administrator-n-concurrent/)
Alerts and WorkFlows in Oracle Apps
(http://www.oracleport.com/category/alertsand-workflows-in-oracle-apps/)
Concurrent Programs Related
(http://www.oracleport.com/category
/concurrent-programs-related/)
Defining HR Responsibility
(http://www.oracleport.com/category/oraclehrms-payroll-setup/defining-hr-responsibility/)
Enable Arabic for Reports
(http://www.oracleport.com/category/enablearabic-for-reports/)
Encumbrance : Accounting Concept Oracle
(http://www.oracleport.com/category
/accounting/encumbrance-accounting-conceptoracle/)
FlexFields (http://www.oracleport.com/category
/flexfields/)
Forms Personalizations
(http://www.oracleport.com/category/formspersonalizations/)
Grade Key Flexfield Definition
(http://www.oracleport.com/category/oraclehrms-payroll-setup/grade-key-flexfielddefinition/)
HR / Payroll Important Tables

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

4 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

Social Insurance
,TO_NUMBER(rrv.result_value),
0)) Civil_pension,
/**************************************************************************************
**********************************************/
sum(decode(ety.element_name,In Out Leave Deduction ,TO_NUMBER(rrv.result_value),0))
In_Out_Leave_Deduction,
sum(decode(ety.element_name,Unpaid Leave Deduction ,TO_NUMBER(rrv.result_value),0))
Unpaid_Leave_Deduction,
sum(decode(ety.element_name,Retrieve Mony Recovery ,TO_NUMBER(rrv.result_value),0))
Retrieve_Mony_Recovery
FROM per_people_x ppf,
per_assignments_x paf,
pay_assignment_actions pas ,
pay_payroll_actions ppa,
pay_run_results rr,
pay_run_result_values rrv,
pay_element_types_f ety,
pay_input_values_F I ,
PER_TIME_PERIODS TP

PER_POSITION_DEFINITIONS PD
PAY_INPUT_VALUES_F
WHERE ppf.person_id = paf.person_id
AND paf.assignment_id = pas.assignment_id
AND pas.assignment_action_id = rr.assignment_action_id
AND ppa.payroll_action_id = pas.payroll_action_id
AND rr.element_type_id = ety.element_type_id
AND i.element_type_id = ety.element_type_id
AND rrv.run_result_id = rr.run_result_id
AND rrv.input_value_id = i.input_value_id
and TP.TIME_PERIOD_ID = PPA.TIME_PERIOD_ID
AND i.name = Pay Value
AND HR_GENERAL.DECODE_LATEST_POSITION_DEF_ID(PAF.POSITION_ID) =
PD.POSITION_DEFINITION_ID
and ppa.EFFECTIVE_DATE BETWEEN :P_FROM_DATE
AND :P_TO_DATE
and ppf.employee_number = :P_Employee_number
in(34000/*1546014859,14666,35343,15201,15202*/)
group by ppf.full_name,ppa.TIME_PERIOD_ID,effective_date,
ppf.employee_number,ppf.person_id ,PD.SEGMENT5 ,PD.SEGMENT6,
TP.period_name
order by ppa.EFFECTIVE_DATE

PREVIOUS POST (HTTP://WWW.ORACLEPORT.COM/DIFFERENCE-BETWEEN-DISCRETEPROCESS-MANUFACTURING/)


NEXT POST (HTTP://WWW.ORACLEPORT.COM/340/)

17 RESPONSES TO ORACLE HR AND PAYROLL RELATED QUERIES

Najeeullah
I May 24, 2011 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commentvi
page-1/#comment-651)
si
t
e
d
y
o
u
r
w
e
b
si
t
e
,
y
o
u
d
i
d
a

(http://www.oracleport.com/category
/important-tables/hr-payroll-important-tables/)
HR / Payroll Related Queries
(http://www.oracleport.com/category
/impratant-queries/hr-payroll-related-queries/)
Impratant Queries (http://www.oracleport.com
/category/impratant-queries/)
Installing GNU Make For EBS
(http://www.oracleport.com/category/installinggnu-make-for-ebs/)
Jobs (http://www.oracleport.com/category
/jobs/)
Manufacturing (http://www.oracleport.com
/category/manufacturing/)
MO_Global.Set_Policy_Context
(http://www.oracleport.com/category
/mo_global-set_policy_context/)
News and Articals (http://www.oracleport.com
/category/news-and-articals/)
OAFramework R12X Customization
(http://www.oracleport.com/category
/oaframework-r12x-customization/)
OPM Related Queries
(http://www.oracleport.com/category
/impratant-queries/opm-related-queries/)
Oracle AME Setup (http://www.oracleport.com
/category/oracle-ame-setup/)
Oracle Apps Basics (http://www.oracleport.com
/category/oracle-apps-basics/)
Oracle EBS Documentation Library
(http://www.oracleport.com/category/oracleebs-documentation-library/)
Oracle EBS Shut Down Script for Windows
(http://www.oracleport.com/category/oracleebs-shut-down-script-for-windows/)
Oracle EBS Standard APIs
(http://www.oracleport.com/category/oracleebs-standard-apis/)
Oracle Framework Personalization
(http://www.oracleport.com/category/oracleframework-personalization/)
Oracle HR Fast Formual
(http://www.oracleport.com/category/oraclehr-fast-formual/)
Oracle HRMS / Payroll
(http://www.oracleport.com/category/oraclehrms-payroll/)
Oracle HRMS / Payroll Setup
(http://www.oracleport.com/category/oraclehrms-payroll-setup/)
Oracle HRMS Technical
(http://www.oracleport.com/category/oraclehrms-technical/)
Oracle OPM Accounting Cycle
(http://www.oracleport.com/category
/accounting/oracle-opm-accounting-cycle/)
Oracle R12 Form Customiztion
(http://www.oracleport.com/category/oracler12-form-customiztion/)
Oracle R12 Installation on Windows
(http://www.oracleport.com/category/oracler12-installation-on-windows/)
Oracle Self-Service Human Resources
(http://www.oracleport.com/category/oracleself-service-human-resources/)
Oracle Trainings (http://www.oracleport.com
/category/oracle-trainings/)
Oracle XML / BI Publisher
(http://www.oracleport.com/category/oraclexml-bi-publisher/)
Others (http://www.oracleport.com/category

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

5 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

real y great a great job the queries & other material regarding oracle is very helpful.

/others/)

Regards,

Report Customization Oracle EBS


(http://www.oracleport.com/category/reportcustomization-oracle-ebs/)

Najeebullah

bharath (http://www.oracleport.com)
H April 16, 2012 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commentI
page-1/#comment-1153)
I
vi
si
t
e
d
y
o
u
r
w
e
b
si
t
e
a
n
d
t
h
e
q
u
e
ri
e
s
w
h
a
t
a
r
e
p
o
s
t
e
d
a
r
e
r
e
a
ll
y
e
x
c
e
ll
e
n
t
a
n
d
v
e
r
y
h
e
l
p

SCM Related Queries


(http://www.oracleport.com/category
/impratant-queries/scm-related-queries/)
Self Service (http://www.oracleport.com
/category/impratant-queries/self-service/)
Setting Item Mandatory
(http://www.oracleport.com/category/formspersonalizations/setting-item-mandatory/)
System Administration
(http://www.oracleport.com/category/systemadministration/)
Toad Tricks and Tips
(http://www.oracleport.com/category/toadtricks-and-tips/)
Uncategorized (http://www.oracleport.com
/category/uncategorized/)
Understanding and Using API User Hooks
(http://www.oracleport.com/category
/understanding-and-using-api-user-hooks/)
What are RICE Components
(http://www.oracleport.com/category/whatare-rice-components/)

PAGES
Books (http://www.oracleport.com
/recommended-books/)
Contact Us (http://www.oracleport.com
/contact/)
Functional Resource
(http://www.oracleport.com/functionalresource/)
Register for Training.
(http://www.oracleport.com/registerfor-training/)
Subscribe For Demo Session
(http://www.oracleport.com/subscribe/)
Technical Resource (http://www.oracleport.com
/books/)
Trainings (http://www.oracleport.com/onlinetraining-details/)
Introduction to Oracle SQL and PL/SQL for
end users and beginners (Syllabus)
(http://www.oracleport.com/online-trainingdetails/introduction-to-oracle-sql-and-plsqlfor-end-users-and-beginners-syllabus/)
Oracle Forms Developer 10g: Build Internet
Applications Content Details
(http://www.oracleport.com/online-trainingdetails/oracle-forms-developer-10g-buildinternet-applications-content-details/)
Oracle HRMS/Payroll Techno Functional
Training (http://www.oracleport.com
/online-training-details/oracle-hrms-technofunctional-training/)
Oracle Reports Developer 10g: Build
Reports Self-Study Content Details
(http://www.oracleport.com/online-trainingdetails/oracle-reports-developer-10g-buildreports-self-study-content-details/)
R12 Oracle E-Business Suite Essentials for
Implementers. (http://www.oracleport.com
/online-training-details/r12-oraclee-business-suite-essentialsfor-implementers/)
R12.x Oracle HRMS Compensation
Workbench and Salary Configuration

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

6 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

ful to me
thank you very much

Ram Komma
E February 13, 2013 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
x
/comment-page-1/#comment-1583)
c
e
ll
e
n
t
w
o
r
k
D
u
d
e
.
T
h
a
n
k
y
o
u
.

venkat
H July 16, 2013 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commenti,
page-1/#comment-2253)
W
h
e
n
P
a
y
r
o
ll
R
o
ll
b
a
c
k
r
u
n
s,
t
h
e
n
w
h
a
t
c
h
a
n
g
e
s
r
e
q
u
ir

Content Details (http://www.oracleport.com


/online-training-details/r12-x-oraclehrms-compensation-workbench-and-salaryconfiguration-content-details/)
R12.x Oracle HRMS Learning Management
Fundamentals Content Details
(http://www.oracleport.com/online-trainingdetails/r12-x-oracle-hrms-learningmanagement-fundamentals-contentdetails/)
R12.x Oracle HRMS People Management
Fundamentals Content Details
(http://www.oracleport.com/online-trainingdetails/r12-x-oracle-hrms-peoplemanagement-fundamentals-contentdetails/)
R12.x Oracle HRMS Self Service
Fundamentals Content Details
(http://www.oracleport.com/online-trainingdetails/r12-x-oracle-hrms-self-servicefundamentals-content-details/)
R12.x Oracle Payroll Fundamentals:
Administration (Global) Content Details
(http://www.oracleport.com/online-trainingdetails/r12-x-oracle-payroll-fundamentalsadministration-global-content-details/)
R12.x Oracle Payroll Fundamentals:
Configuration (US) Content Details
(http://www.oracleport.com/online-trainingdetails/r12-x-oracle-payroll-fundamentalsconfiguration-us-content-details/)
R12.x Oracle Payroll Fundamentals:
Earnings and Deductions (US) Content
Details (http://www.oracleport.com/onlinetraining-details/r12-x-oracle-payrollfundamentals-earnings-and-deductionsus-content-details/)
Oracle Application Framework (OAF)
Training (http://www.oracleport.com
/online-training-details/1747-2/)

ARCHIVES
June 2016 (http://www.oracleport.com
/2016/06/)
May 2016 (http://www.oracleport.com
/2016/05/)
April 2016 (http://www.oracleport.com
/2016/04/)
March 2016 (http://www.oracleport.com
/2016/03/)
December 2015 (http://www.oracleport.com
/2015/12/)
November 2015 (http://www.oracleport.com
/2015/11/)
October 2015 (http://www.oracleport.com
/2015/10/)
May 2015 (http://www.oracleport.com
/2015/05/)
March 2015 (http://www.oracleport.com
/2015/03/)
February 2015 (http://www.oracleport.com
/2015/02/)
November 2014 (http://www.oracleport.com
/2014/11/)
October 2014 (http://www.oracleport.com
/2014/10/)
June 2014 (http://www.oracleport.com
/2014/06/)
April 2014 (http://www.oracleport.com
/2014/04/)

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

7 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

ed to above queries? Is it like, when I run payroll again then, one more record will get inserted
for same element in the same period. But we have one more record with same data. How to
handle this scenario?

faisal
R July 16, 2013 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commento
page-1/#comment-2256)
ll
b
a
c
k
si
m
p
ly
d
e
l
e
t
e
r
e
c
o
r
d
s
fr
o
m
d
a
t
a
b
a
s
e
.
N
o
N
e
e
d
t
o
c
h
a
n
g
e
a
n
y
t
h
i
n
g
.
J
u
s
t
R
e
r
u
n
P
a
y
r

January 2014 (http://www.oracleport.com


/2014/01/)
November 2013 (http://www.oracleport.com
/2013/11/)
August 2013 (http://www.oracleport.com
/2013/08/)
April 2013 (http://www.oracleport.com
/2013/04/)
March 2013 (http://www.oracleport.com
/2013/03/)
January 2013 (http://www.oracleport.com
/2013/01/)
September 2012 (http://www.oracleport.com
/2012/09/)
January 2012 (http://www.oracleport.com
/2012/01/)
December 2011 (http://www.oracleport.com
/2011/12/)
November 2011 (http://www.oracleport.com
/2011/11/)
September 2011 (http://www.oracleport.com
/2011/09/)
April 2011 (http://www.oracleport.com
/2011/04/)
March 2011 (http://www.oracleport.com
/2011/03/)
January 2011 (http://www.oracleport.com
/2011/01/)
November 2010 (http://www.oracleport.com
/2010/11/)
October 2010 (http://www.oracleport.com
/2010/10/)
September 2010 (http://www.oracleport.com
/2010/09/)
August 2010 (http://www.oracleport.com
/2010/08/)
July 2010 (http://www.oracleport.com
/2010/07/)
June 2010 (http://www.oracleport.com
/2010/06/)
May 2010 (http://www.oracleport.com
/2010/05/)

TAGS
API to Create EIT Extra Information (http://www.oracleport.com
/tag/api-to-create-eit-extra-information/) API with Example to
Update Basic Salary. (http://www.oracleport.com/tag/apiwith-example-to-update-basic-salary/) Defining HR Responsibility
(http://www.oracleport.com/tag/defining-hr-responsibility/) Oracle
API (http://www.oracleport.com/tag/oracle-api/) Oracle EIT upload
Data (http://www.oracleport.com/tag/oracle-eit-upload-data/) Oracle
Framework Personalization (http://www.oracleport.com/tag/oracleframework-personalization/)

FAVOURIT LINKS
ORACLE BLOGS (http://www.oracle.com/blogs
/index.html)
ORACLE DISCUSSION FORUMS
(http://forums.oracle.com/forums
/main.jspa;jsessionid=8d92079f30d6075a113ff28
d4ad9be5a8aa8df9cae8c.e3mSaNmQc3j0ax4Nch
mOaxiRby0?categoryID=84)
ORACLE TECHNOLOGY NETWORK
(http://www.oracle.com/technetwork

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

8 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

oll/prepayment etc and execute query.

/index.html)
ORACLE USER GROUPS (http://www.oracle.com
/technetwork/community/index.html)

syed zubair
y May 22, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commento
page-1/#comment-3692)
u
r
b
l
o
g
g
iv
e
s
m
e
a
l
o
t
o
f
i
n
f
o
r
m
a
ti
o
n
a
n
d
h
e
l
p
e
d
a
l
o
t.
si
r
i
h
a
v
e
a
p
r
o
b
l
e
m
o
f
d
u
p
li
c
a
ti
o
n
i
n
m
y
r

ORACLE USER GROUPS (http://www.oracle.com


/technetwork/community/index.html)
ORACLE WIKI (http://wiki.oracle.com/)

Sign In (http://www.oracleport.com/wp-admin)

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

9 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

eport the query of the report as follows


/*query*/
select DISTINCT
ppx.employee_number,
ppx.person_id,
nvl(UPDATED_BY(ppx.person_id,PAAF.last_updated_by,EMP_STATUS(ppx.person_id,NVL(ppos.a
ctual_termination_date,paaf.EFFECTIVE_END_DATE)),paaf.EFFECTIVE_END_DATE),)
UPDATED_BY_NAME,
PHON_NUM(ppx.person_id) PHON_NUM,
ppx.NATIONAL_IDENTIFIER,
ppx.full_name,
DECODE(ppx.SEX,M,,) sex,
ppd.segment1 pos_name,
ppd.segment2 pos_nu,
paaou.name pos_org_name,
DECODE(person_type_id,1120,??? ??? ????,??E???) employed ,

TO_CHAR(paaf.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)


ASS_CREATE_DATE,
TO_CHAR(ppx.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)
PER_CREATE_DATE,
TO_CHAR(pp.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)
ADD_CREATE_DATE,
trunc(months_between(sysdate,ppx.date_of_birth)/12) year,
trunc(mod(months_between(sysdate,ppx.date_of_birth),12)) month,
trunc(sysdateAdd_Months(ppx.date_of_birth,Trunc(months_between(sysdate,ppx.date_of_birth)/12)*12
+TRUNC(MOD(months_between(sysdate,ppx.date_of_birth),12)))) DAY,
trunc(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE)/12) ASS_year,
trunc(mod(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712
,MM/DD/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE),12))
ASS_month,
trunc(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE)Add_Months(paaf.EFFECTIVE_START_DATE,Trunc(months_between(DECODE(paaf.EFFECTIVE_
END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE)/12)*12
+TRUNC(MOD(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712
,MM/DD/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE),12))))
ASS_DAY,
TO_CHAR(paaf.EFFECTIVE_START_DATE,RRRR-MM-DD,nls_calendar=Arabic Hijrah)
ASS_START_DATE,
TO_CHAR(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),RRRR-MM-DD,nls_calendar=Arabic Hijrah)
ASS_END_DATE,
ca.NAME Actual_ass,
pg.name Grade_name, hr_general.decode_STEP (paaf.special_ceiling_step_id ,SYSDATE)
grade_STEP,
TO_CHAR(ppx.START_DATE ,RRRR-MM-DD,nls_calendar=Arabic Hijrah) START_DATE,
TO_CHAR(ppx.date_of_birth ,RRRR-MM-DD,nls_calendar=Arabic Hijrah) birth_date,
substr(ppg.group_name,1,instr(ppg.group_name,.)-1) p_group,
fcl.MEANING NATIONALITY,
ppx.EMAIL_ADDRESS,
pca.name emoloyee_curr_org,
pqtv.name degree,
pq.title,
pq.grade_attained,
pq.awarding_body,
ppx.TOWN_OF_BIRTH,
DECODE(ppx.MARITAL_STATUS,M,,S,) Mat_status,
rg.MEANING hired_as,
TO_CHAR(pp.phone_number) phone_number,
pq.comments grad_date,
uni_pos.MEANING uni_position,
TO_CHAR(ppos.actual_termination_date ,RRRR-MM-DD,nls_calendar=Arabic Hijrah)
leave_date,
leave_reas.MEANING leave_reason,
ppp.proposed_salary_n
from per_all_assignments_f paaf,
per_people_x ppx,

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

10 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

PAY_PEOPLE_GROUPS ppg,
per_grades pg,
per_position_definitions ppd,
HR_ALL_POSITIONS_F hapf,
per_all_organization_units paaou,
PER_QUALIFICATIONS_V pq,
fnd_common_lookups fcl,
PER_QUALIFICATION_TYPES_V pqtv,
per_collective_agreements pca ,
per_phones pp ,
fnd_common_lookups rg,
fnd_common_lookups uni_pos,
Per_Periods_Of_Service ppos,
fnd_common_lookups leave_reas,
per_pay_proposals ppp,
OMAR
FOR ACCTUAL ORGANIZATION
PER_COLLECTIVE_AGREEMENTS CA
where ppx.person_id = paaf.person_id
and ppos.person_id = ppx.PERSON_ID
and rg.LOOKUP_TYPE (+) = REGISTERED_DISABLED
and rg.LOOKUP_CODE (+) = ppx.REGISTERED_DISABLED_FLAG
and uni_pos.LOOKUP_TYPE (+) = EMP_CAT
and uni_pos.LOOKUP_code (+) = paaf.employment_category
and leave_reas.LOOKUP_TYPE (+) = LEAV_REAS
AND leave_reas.LOOKUP_CODE (+) = ppos.leaving_reason
and pp.parent_id(+) = ppx.PERSON_ID
and pq.person_id(+) = ppx.person_id
and pqtv.qualification_type_id(+) = pq.qualification_type_id
and ppg.people_group_id = paaf.people_group_id
and paaf.organization_id = paaou.organization_id
and paaf.position_id = hapf.position_id (+)
and hapf.position_definition_id = ppd.position_definition_id (+)
and pg.grade_id(+) = paaf.grade_id
and fcl.LOOKUP_TYPE = NATIONALITY
AND fcl.LOOKUP_CODE(+) = ppx.NATIONALITY
and pca.collective_agreement_id(+) = paaf.collective_agreement_id
and to_number(to_char(paaf.effective_end_date,yyyy)) > 4000
and ppp.assignment_id = paaf.assignment_id
and ppp.change_date = (select max(ppp1.change_date)
from per_pay_proposals ppp1
where ppp1.assignment_id = ppp.assignment_id)
and ppx.person_type_id = 1120
AND sysdate between paaf.EFFECTIVE_START_DATE and paaf.EFFECTIVE_END_DATE
AND sysdate between ppx.EFFECTIVE_START_DATE and ppx.EFFECTIVE_END_DATE
FOR ACCTUAL ORGANIZATION
AND CA.COLLECTIVE_AGREEMENT_ID(+) = PAAF.COLLECTIVE_AGREEMENT_ID
union
select distinct
ppx.employee_number,
ppx.person_id,
nvl(UPDATED_BY(ppx.person_id,PAAF.last_updated_by,EMP_STATUS(ppx.person_id,NVL(ppos.a
ctual_termination_date,paaf.EFFECTIVE_END_DATE)),paaf.EFFECTIVE_END_DATE),)
UPDATED_BY_NAME,
PHON_NUM(ppx.person_id) PHON_NUM,
ppx.NATIONAL_IDENTIFIER , ppx.full_name,decode(ppx.SEX,M,,) sex,
ppd.segment1 pos_name, ppd.segment2 pos_nu,paaou.name pos_org_name,
decode(person_type_id,1120,??? ??? ????,??E???) employed ,
TO_CHAR(paaf.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)
ASS_CREATE_DATE,
TO_CHAR(ppx.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)
PER_CREATE_DATE,
TO_CHAR(pp.LAST_UPDATE_DATE,RRRR-MM-DD HH:MM:SS,nls_calendar=Arabic Hijrah)
ADD_CREATE_DATE,
trunc(months_between(sysdate,ppx.date_of_birth)/12) B_year,
trunc(mod(months_between(sysdate,ppx.date_of_birth),12)) B_month,
trunc(sysdateAdd_Months(ppx.date_of_birth,Trunc(months_between(sysdate,ppx.date_of_birth)/12)*12
+TRUNC(MOD(months_between(sysdate,ppx.date_of_birth),12)))) B_DAY,
trunc(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

11 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE)/12) ASS_year,
trunc(mod(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712
,MM/DD/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE),12))
ASS_month,
trunc(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE)Add_Months(paaf.EFFECTIVE_START_DATE,Trunc(months_between(DECODE(paaf.EFFECTIVE_
END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE)/12)*12
+TRUNC(MOD(months_between(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712
,MM/DD/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),paaf.EFFECTIVE_START_DATE),12))))
ASS_DAY,
TO_CHAR(paaf.EFFECTIVE_START_DATE,RRRR-MM-DD,nls_calendar=Arabic Hijrah)
ASS_START_DATE,
TO_CHAR(DECODE(paaf.EFFECTIVE_END_DATE,to_date(12/31/4712,MM/DD
/YYYY),sysdate,paaf.EFFECTIVE_END_DATE),RRRR-MM-DD,nls_calendar=Arabic Hijrah)
ASS_END_DATE,
CA.name Actual_ass,
pg.name Grade_name, hr_general.decode_STEP (paaf.special_ceiling_step_id ,SYSDATE)
grade_STEP,
TO_CHAR(ppx.START_DATE ,RRRR-MM-DD,nls_calendar=Arabic Hijrah) START_DATE,
TO_CHAR(ppx.date_of_birth ,RRRR-MM-DD,nls_calendar=Arabic Hijrah) birth_date,
substr(ppg.group_name,1,instr(ppg.group_name,.)-1) p_group,
fcl.MEANING NATIONALITY, ppx.EMAIL_ADDRESS, pca.name emoloyee_curr_org,
pqtv.name degree, pq.title, pq.grade_attained, pq.awarding_body, ppx.TOWN_OF_BIRTH,
decode(ppx.MARITAL_STATUS,M,,S,) Mat_status,
rg.MEANING hired_as,
pp.phone_number,
pq.comments grad_date,
uni_pos.MEANING uni_position,
TO_CHAR(ppos.actual_termination_date ,RRRR-MM-DD,nls_calendar=Arabic Hijrah)
leave_date,
leave_reas.MEANING leave_reason,
ppp.proposed_salary_n
from per_all_assignments_f paaf,
per_people_x ppx,
PAY_PEOPLE_GROUPS ppg,
per_grades pg,
per_position_definitions ppd,
HR_ALL_POSITIONS_F hapf,
per_all_organization_units paaou,
PER_QUALIFICATIONS_V pq,
fnd_common_lookups fcl,
PER_QUALIFICATION_TYPES_V pqtv,
per_collective_agreements pca ,
per_phones pp ,
fnd_common_lookups rg,
fnd_common_lookups uni_pos,
Per_Periods_Of_Service ppos,
fnd_common_lookups leave_reas,
per_pay_proposals ppp,
OMAR
FOR ACCTUAL ORGANIZATION
PER_COLLECTIVE_AGREEMENTS CA
where ppx.person_id = paaf.person_id
and ppos.person_id = ppx.PERSON_ID
and rg.LOOKUP_TYPE (+) = REGISTERED_DISABLED
and rg.LOOKUP_CODE (+) = ppx.REGISTERED_DISABLED_FLAG
and uni_pos.LOOKUP_TYPE (+) = EMP_CAT
and uni_pos.LOOKUP_code (+) = paaf.employment_category
and leave_reas.LOOKUP_TYPE (+) = LEAV_REAS
AND leave_reas.LOOKUP_CODE (+) = ppos.leaving_reason
and pp.parent_id(+) = ppx.PERSON_ID
and pq.person_id(+) = ppx.person_id
and pqtv.qualification_type_id(+) = pq.qualification_type_id
and ppg.people_group_id = paaf.people_group_id
and paaf.organization_id = paaou.organization_id
and paaf.position_id = hapf.position_id (+)
and hapf.position_definition_id = ppd.position_definition_id (+)

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

12 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

and pg.grade_id(+) = paaf.grade_id


and fcl.LOOKUP_TYPE = NATIONALITY
AND fcl.LOOKUP_CODE(+) = ppx.NATIONALITY
and pca.collective_agreement_id(+) = paaf.collective_agreement_id
- and to_number(to_char(paaf.effective_end_date,yyyy)) > 4000
and ppp.assignment_id = paaf.assignment_id
and ppp.change_date = (select max(ppp1.change_date)
from per_pay_proposals ppp1
where ppp1.assignment_id = ppp.assignment_id)
FOR ACCTUAL ORGANIZATION
AND CA.COLLECTIVE_AGREEMENT_ID(+) = PAAF.COLLECTIVE_AGREEMENT_ID
and ppx.person_type_id = 1123
AND sysdate between paaf.EFFECTIVE_START_DATE and paaf.EFFECTIVE_END_DATE
AND sysdate between ppx.EFFECTIVE_START_DATE and ppx.EFFECTIVE_END_DATE
order by full_name
please help me where exactly a mistake is

faisal
I June 1, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/comments
page-1/#comment-3704)
y
o
u
r
is
s
u
e
r
e
s
o
lv
e
d
?

syed zubair
n June 3, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commento
page-1/#comment-3708)
it
s
s
h
o
w
i
n
g
d
u
p
li
c
a
t
e
r
o
w
s
f
o
r
e
x
e
m
p
l
o

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

13 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

yee information

faisal
s June 3, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commente
page-1/#comment-3709)
n
d
m
e
r
e
s
u
lt
o
f
f
o
ll
o
w
i
n
g
q
u
e
r
y
s
e
l
e
c
t
*
fr
o
m
p
e
r
_
a
ll
_
a
s
si
g
n
m
e
n
t
s
_
f
p
a
a
f,
p
e
r
_
p
e
o
p
l
e
_
x
p
p

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

14 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

x,
PAY_PEOPLE_GROUPS ppg,
per_grades pg,
per_position_definitions ppd,
HR_ALL_POSITIONS_F hapf,
per_all_organization_units paaou,
PER_QUALIFICATIONS_V pq,
fnd_common_lookups fcl,
PER_QUALIFICATION_TYPES_V pqtv,
per_collective_agreements pca ,
per_phones pp ,
fnd_common_lookups rg,
fnd_common_lookups uni_pos,
Per_Periods_Of_Service ppos,
fnd_common_lookups leave_reas,
per_pay_proposals ppp,
OMAR
FOR ACCTUAL ORGANIZATION
PER_COLLECTIVE_AGREEMENTS CA
where ppx.person_id = paaf.person_id
and ppos.person_id = ppx.PERSON_ID
and rg.LOOKUP_TYPE (+) = REGISTERED_DISABLED
and rg.LOOKUP_CODE (+) = ppx.REGISTERED_DISABLED_FLAG
and uni_pos.LOOKUP_TYPE (+) = EMP_CAT
and uni_pos.LOOKUP_code (+) = paaf.employment_category
and leave_reas.LOOKUP_TYPE (+) = LEAV_REAS
AND leave_reas.LOOKUP_CODE (+) = ppos.leaving_reason
and pp.parent_id(+) = ppx.PERSON_ID
and pq.person_id(+) = ppx.person_id
and pqtv.qualification_type_id(+) = pq.qualification_type_id
and ppg.people_group_id = paaf.people_group_id
and paaf.organization_id = paaou.organization_id
and paaf.position_id = hapf.position_id (+)
and hapf.position_definition_id = ppd.position_definition_id (+)
and pg.grade_id(+) = paaf.grade_id
and fcl.LOOKUP_TYPE = NATIONALITY
AND fcl.LOOKUP_CODE(+) = ppx.NATIONALITY
and pca.collective_agreement_id(+) = paaf.collective_agreement_id
- and to_number(to_char(paaf.effective_end_date,yyyy)) > 4000
and ppp.assignment_id = paaf.assignment_id
and ppp.change_date = (select max(ppp1.change_date)
from per_pay_proposals ppp1
where ppp1.assignment_id = ppp.assignment_id)
FOR ACCTUAL ORGANIZATION
AND CA.COLLECTIVE_AGREEMENT_ID(+) = PAAF.COLLECTIVE_AGREEMENT_ID
and ppx.person_type_id = 1123
AND sysdate between paaf.EFFECTIVE_START_DATE and paaf.EFFECTIVE_END_DATE
AND sysdate between ppx.EFFECTIVE_START_DATE and ppx.EFFECTIVE_END_DATE

syed zubair
it June 3, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/comments
page-1/#comment-3710)
g
iv
i
n
g
n
o
n
d
u
p
li
c
a
t
e
d
a
t
a
fr
o
si

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

15 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

ngle employee for giving employee parameter

syed zubair
b June 3, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries/commentu
page-1/#comment-3711)
t
w
h
e
n
i
a
m
r
e
m
o
vi
n
g
t
h
e
p
a
r
a
m
e
t
e
r
t
h
e
n
it
s
d
is
p
l
a
y
s
o
n
ly
1
6
r
o
w
s
i
n
s
t
e
a
d
o
f
1
8
0
0
+
r
o
w
s
s
h
o
u
l

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

16 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

d be displayed

syed zubair
si September 9, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
r
/comment-page-1/#comment-3927)
i
w
a
n
t
t
o
c
r
e
a
t
e
a
d
is
c
f
o
r
m
o
n
t
h
ly
s
a
l
a
r
y
r
e
p
o
rt
b
y
u
si
n
g
p
a
y
r
o
ll
g
r
o
u
p
.
c
o
u
l
d
y
o
u
p
l
e
a
s
e
p
r
o

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

17 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

vide information about how to create it .


best regards
syed zubair

syed zubair
t September 9, 2014 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
h
/comment-page-1/#comment-3928)
is
is
t
h
e
r
e
p
o
rt
f
o
r
w
h
ic
h
t
h
e
d
is
c
t
o
b
e
p
r
e
p
a
r
e
d
S
E
L
E
C
T
A
L
L
b
.
S
E
S
S
I
O
N
_
I
D
,
b
.
P
E
R
S
O
N
_
I
D

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

18 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

, b.EMPLOYEE_NUMBER, b.FULL_NAME,
b.GRADE, b.GRADE_STEP, b.GRADE_SEQ, b.JOB, b.POSITION, b.PAYROLL_ID,
b.PAYROLL_NAME,
b.PAID_PERIOD, b.PAYROLL_ACTION_ID, b.ELEMENT_TYPE_ID, b.ELEMENT_NAME,
b.ELEMENT_VAL1, b.ELEMENT_VAL2, b.ELEMENT_VAL3, b.ELEMENT_VAL4,
b.ELEMENT_VAL5, b.ELEMENT_VAL6, b.ELEMENT_VAL7, b.ELEMENT_VAL8, b.ELEMENT_VAL9,
b.ELEMENT_VAL10, b.ELEMENT_VAL11, b.ELEMENT_VAL12, b.ELEMENT_VAL13,
b.ELEMENT_VAL14,
b.ELEMENT_VAL15, b.ELEMENT_VAL16, b.ELEMENT_VAL17, b.ELEMENT_VAL18,
b.ELEMENT_VAL19, b.ELEMENT_VAL20, b.ELEMENT_VAL21, b.ELEMENT_VAL22,
b.GROUP_SEG1, b.GROUP_SEG2,
nprv.ELEMENT_VAL1 el1, nprv.ELEMENT_VAL2 el2, nprv.ELEMENT_VAL3 el3,
nprv.ELEMENT_VAL4 el4,
nprv.ELEMENT_VAL5 el5, nprv.ELEMENT_VAL6 el6, nprv.ELEMENT_VAL7 el7,
nprv.ELEMENT_VAL8 el8, nprv.ELEMENT_VAL9 el9,
nprv.ELEMENT_VAL10 el10, nprv.ELEMENT_VAL11 el11, nprv.ELEMENT_VAL12 el12,
nprv.ELEMENT_VAL13 el13, nprv.ELEMENT_VAL14 el14,
nprv.ELEMENT_VAL15 el15, nprv.ELEMENT_VAL16 el16, nprv.ELEMENT_VAL17 el17,
nprv.ELEMENT_VAL18 el18,
nprv.ELEMENT_VAL19 el19, nprv.ELEMENT_VAL20 el20, nprv.ELEMENT_VAL21 el21,
nprv.ELEMENT_VAL22 el21
FROM XX_PAYROLL_GROUP b,
XX_PAYROLL_GROUP_nprv nprv
WHERE b.SESSION_ID = USERENV(SESSIONID)
and nprv.person_id = b.person_id
and nprv.payroll_action_id = b.payroll_action_id
order by b.full_name

syed hassan khalique


t September 14, 2015 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
h
/comment-page-1/#comment-4191)
is
is
t
h
e
g
r
e
a
t
a
n
d
i
n
f
o
r
m
a
ti
v
e
si
t
e
f
o
r
a
p
p
s
d
b
a
,
n
ic
e
w
o
r
k

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

19 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

. kindly post query to find the employees department name.


thanks
BR
Syed Hassan Khalique

faisal
u September 14, 2015 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
s
/comment-page-1/#comment-4192)
e
f
o
ll
o
w
i
n
g

S
e
l
e
c
t
n
a
m
e
fr
o
m
H
R
_
O
R
G
A
N
I
Z
A
T
I
O
N
_
U
N
I
T
S
a
w
h
e
r
e
a
.
O
R
G
A
N
I
Z
A
T
I
O
N
_
I
D

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

20 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

=:p_org_id.
Regards,
Faisal

syed hassan khalique


h September 17, 2015 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
i,
/comment-page-1/#comment-4194)
f
a
is
a
l
y
o
u
r
q
u
e
r
y
is
n
o
t
w
o
r
ki
n
g
.

syed hassan khalique


h September 17, 2015 (http://www.oracleport.com/oracle-hr-and-payroll-related-queries
i,
/comment-page-1/#comment-4195)
i
n
e
e
d
t
o
fi
n
d
t
h
e
f
u
ll
n
a
m
e
o
f
t
h
e
o
r
a
cl
e
e
b
s
u
s
e
r

6/13/2016 10:12 AM

OraclePort.com | Oracle HR and Payroll Related Queries

21 of 21

http://www.oracleport.com/oracle-hr-and-payroll-related-queries/

s, from where i find it, please help.


thanks
BR
SYED HASSAN

LEAVE A REPLY
Your email address will not be published. Required fields are marked *

NAME *
EMAIL *
WEBSITE
COMMENT

You may use these HTML (HyperText Markup Language) tags and attributes:

<a

href="" title=""> <abbr title=""> <acronym title=""> <b>


<blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q
cite=""> <strike> <strong>
Post Comment

Oracleport.com Copy Rights: All rights reserved. (http://oracleport.com)

6/13/2016 10:12 AM