96:
97: if p_state_code = 'TX' or p_state_code = 'OR'
98: or p_state_code = 'MD' then
99: l_business_group_id := P_BUSINESS_GROUP_ID;
100: l_report_date := fnd_date.canonical_to_date(P_REPORT_DATE);
101:
102: l_salary := hr_us_reports.get_salary(l_business_group_id,
103: assignment_id,
104: l_report_date
760: ,hr_organization_units hou
761: Where
762: pps.person_id = ppf.person_id
763:
764: And fnd_date.canonical_to_date(P_REPORT_DATE)
765: between pps.date_start and NVL(pps.actual_termination_date,C_END_OF_TIME)
766: And fnd_date.canonical_to_date(P_REPORT_DATE)
767: between ppf.effective_start_date and ppf.effective_end_date
768: And ppf.person_id = paf.person_id
762: pps.person_id = ppf.person_id
763:
764: And fnd_date.canonical_to_date(P_REPORT_DATE)
765: between pps.date_start and NVL(pps.actual_termination_date,C_END_OF_TIME)
766: And fnd_date.canonical_to_date(P_REPORT_DATE)
767: between ppf.effective_start_date and ppf.effective_end_date
768: And ppf.person_id = paf.person_id
769: And fnd_date.canonical_to_date(P_REPORT_DATE)
770: between paf.effective_start_date and paf.effective_end_date
765: between pps.date_start and NVL(pps.actual_termination_date,C_END_OF_TIME)
766: And fnd_date.canonical_to_date(P_REPORT_DATE)
767: between ppf.effective_start_date and ppf.effective_end_date
768: And ppf.person_id = paf.person_id
769: And fnd_date.canonical_to_date(P_REPORT_DATE)
770: between paf.effective_start_date and paf.effective_end_date
771:
772: and hscf.segment1 = to_char(hou.organization_id)
773: and hou.business_group_id = p_business_group_id
780:
781:
782: And ppf.business_group_id +0 = P_BUSINESS_GROUP_ID
783: And ppf.per_information_category = 'US'
784: And pps.date_start <= fnd_date.canonical_to_date(P_REPORT_DATE)
785: And ppf.per_information7 = 'INCL'
786: and hou.business_group_id = ppf.business_group_id
787: and hoi1.organization_id = hou.organization_id
788: and hoi1.org_information_context = 'CLASS'
815: ,hr_organization_units hou
816: Where
817: pps.person_id = ppf.person_id
818:
819: And fnd_date.canonical_to_date(P_REPORT_DATE)
820: between ppf.effective_start_date and ppf.effective_end_date
821: And pps.actual_termination_date IS NOT NULL
822: And ppf.person_id = paf.person_id
823: And not exists (select 1 from per_all_assignments_f paf2
821: And pps.actual_termination_date IS NOT NULL
822: And ppf.person_id = paf.person_id
823: And not exists (select 1 from per_all_assignments_f paf2
824: where ppf.person_id = paf2.person_id
825: and fnd_date.canonical_to_date(P_REPORT_DATE)
826: between paf2.effective_start_date and paf2.effective_end_date
827: )
828: And pps.date_start = paf.effective_start_date
829:
838:
839:
840: And ppf.business_group_id +0 = P_BUSINESS_GROUP_ID
841: And ppf.per_information_category = 'US'
842: And pps.date_start <= fnd_date.canonical_to_date(P_REPORT_DATE)
843: And ppf.per_information7 = 'INCL'
844: and hou.business_group_id = ppf.business_group_id
845: and hoi1.organization_id = hou.organization_id
846: and hoi1.org_information_context = 'CLASS'
970:
971: begin
972:
973: l_person_id := new_hire_contact_id;
974: l_report_date := fnd_date.canonical_to_date(P_REPORT_DATE);
975: l_business_group_id := P_BUSINESS_GROUP_ID;
976:
977: per_new_hire_pkg.get_new_hire_contact
978: (l_person_id,
1014:
1015: begin
1016:
1017: l_person_id := new_hire_contact_id;
1018: l_report_date := fnd_date.canonical_to_date(P_REPORT_DATE);
1019: l_business_group_id := P_BUSINESS_GROUP_ID;
1020:
1021: per_new_hire_pkg.get_new_hire_contact
1022: (l_person_id,
1057:
1058: begin
1059:
1060: l_person_id := new_hire_contact_id;
1061: l_report_date := fnd_date.canonical_to_date(P_REPORT_DATE);
1062: l_business_group_id := P_BUSINESS_GROUP_ID;
1063:
1064: per_new_hire_pkg.get_new_hire_contact
1065: (l_person_id,
1190: ,hr_organization_units hou
1191:
1192: Where
1193: pps.person_id = ppf.person_id
1194: And fnd_date.canonical_to_date(P_REPORT_DATE)
1195: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1196: And fnd_date.canonical_to_date(P_REPORT_DATE)
1197: between ppf.effective_start_date and ppf.effective_end_date
1198: And ppf.person_id = paf.person_id
1192: Where
1193: pps.person_id = ppf.person_id
1194: And fnd_date.canonical_to_date(P_REPORT_DATE)
1195: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1196: And fnd_date.canonical_to_date(P_REPORT_DATE)
1197: between ppf.effective_start_date and ppf.effective_end_date
1198: And ppf.person_id = paf.person_id
1199: And fnd_date.canonical_to_date(P_REPORT_DATE)
1200: between paf.effective_start_date and paf.effective_end_date
1195: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1196: And fnd_date.canonical_to_date(P_REPORT_DATE)
1197: between ppf.effective_start_date and ppf.effective_end_date
1198: And ppf.person_id = paf.person_id
1199: And fnd_date.canonical_to_date(P_REPORT_DATE)
1200: between paf.effective_start_date and paf.effective_end_date
1201:
1202: And hscf.segment1 = to_char(hou.organization_id)
1203: and hou.business_group_id = P_BUSINESS_GROUP_ID
1207: And paf.assignment_type = 'E'
1208: And paf.primary_flag = 'Y'
1209: And paf.location_id = hl.location_id
1210: And paf.job_id = job.job_id(+)
1211: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1212: and nvl(job.date_to, C_END_OF_TIME)
1213: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1214: And ppf.per_information_category = 'US'
1215: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1211: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1212: and nvl(job.date_to, C_END_OF_TIME)
1213: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1214: And ppf.per_information_category = 'US'
1215: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1216: And ppf.per_information7 = 'INCL' And hou.business_group_id = ppf.business_group_id
1217: AND hoi1.organization_id = hou.organization_id
1218: AND hoi1.org_information_context = 'CLASS'
1219: AND hoi1.org_information1 = 'HR_LEGAL'
1245:
1246: Where
1247: pps.person_id = ppf.person_id
1248:
1249: And fnd_date.canonical_to_date(P_REPORT_DATE)
1250: between ppf.effective_start_date and ppf.effective_end_date
1251: And ppf.person_id = paf.person_id
1252: And not exists (select 1 from per_all_assignments_f paf2
1253: where ppf.person_id = paf2.person_id
1250: between ppf.effective_start_date and ppf.effective_end_date
1251: And ppf.person_id = paf.person_id
1252: And not exists (select 1 from per_all_assignments_f paf2
1253: where ppf.person_id = paf2.person_id
1254: and fnd_date.canonical_to_date(P_REPORT_DATE)
1255: between paf2.effective_start_date and paf2.effective_end_date
1256: )
1257: And pps.date_start = paf.effective_start_date
1258:
1264: And paf.assignment_type = 'E'
1265: And paf.primary_flag = 'Y'
1266: And paf.location_id = hl.location_id
1267: And paf.job_id = job.job_id(+)
1268: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1269: and nvl(job.date_to, C_END_OF_TIME)
1270: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1271: And ppf.per_information_category = 'US'
1272: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1268: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1269: and nvl(job.date_to, C_END_OF_TIME)
1270: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1271: And ppf.per_information_category = 'US'
1272: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1273: And ppf.per_information7 = 'INCL' And hou.business_group_id = ppf.business_group_id
1274: AND hoi1.organization_id = hou.organization_id
1275: AND hoi1.org_information_context = 'CLASS'
1276: AND hoi1.org_information1 = 'HR_LEGAL'
1548: ,per_periods_of_service pps
1549:
1550: Where
1551: pps.person_id = ppf.person_id
1552: And fnd_date.canonical_to_date(P_REPORT_DATE)
1553: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1554: And fnd_date.canonical_to_date(P_REPORT_DATE)
1555: between ppf.effective_start_date and ppf.effective_end_date
1556: And ppf.person_id = paf.person_id
1550: Where
1551: pps.person_id = ppf.person_id
1552: And fnd_date.canonical_to_date(P_REPORT_DATE)
1553: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1554: And fnd_date.canonical_to_date(P_REPORT_DATE)
1555: between ppf.effective_start_date and ppf.effective_end_date
1556: And ppf.person_id = paf.person_id
1557: And fnd_date.canonical_to_date(P_REPORT_DATE)
1558: between paf.effective_start_date and paf.effective_end_date
1553: between pps.date_start and NVL(pps.actual_termination_date, C_END_OF_TIME)
1554: And fnd_date.canonical_to_date(P_REPORT_DATE)
1555: between ppf.effective_start_date and ppf.effective_end_date
1556: And ppf.person_id = paf.person_id
1557: And fnd_date.canonical_to_date(P_REPORT_DATE)
1558: between paf.effective_start_date and paf.effective_end_date
1559: And hscf.segment1 in
1560: (SELECT to_char(hou.organization_id )
1561: FROM hr_organization_units hou
1569: or (P_STATE_CODE = 'FL' and P_MULTI_STATE_1 = 'Y')
1570: or (P_STATE_CODE <> 'FL')
1571: )
1572: And paf.job_id = job.job_id(+)
1573: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1574: and nvl(job.date_to, C_END_OF_TIME)
1575: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1576: And ppf.per_information_category = 'US'
1577: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1573: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1574: and nvl(job.date_to, C_END_OF_TIME)
1575: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1576: And ppf.per_information_category = 'US'
1577: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1578: And ppf.per_information7 is NULL
1579: UNION
1580: select
1581: ppf.person_id
1596:
1597: Where
1598: pps.person_id = ppf.person_id
1599:
1600: And fnd_date.canonical_to_date(P_REPORT_DATE)
1601: between ppf.effective_start_date and ppf.effective_end_date
1602: And ppf.person_id = paf.person_id
1603: And not exists (select 1 from per_all_assignments_f paf2
1604: where ppf.person_id = paf2.person_id
1601: between ppf.effective_start_date and ppf.effective_end_date
1602: And ppf.person_id = paf.person_id
1603: And not exists (select 1 from per_all_assignments_f paf2
1604: where ppf.person_id = paf2.person_id
1605: and fnd_date.canonical_to_date(P_REPORT_DATE)
1606: between paf2.effective_start_date and paf2.effective_end_date
1607: )
1608: And pps.date_start = paf.effective_start_date
1609: And hscf.segment1 in
1619: or (P_STATE_CODE = 'FL' and P_MULTI_STATE_1 = 'Y')
1620: or (P_STATE_CODE <> 'FL')
1621: )
1622: And paf.job_id = job.job_id(+)
1623: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1624: and nvl(job.date_to, C_END_OF_TIME)
1625: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1626: And ppf.per_information_category = 'US'
1627: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1623: And fnd_date.canonical_to_date(P_REPORT_DATE) between job.date_from(+)
1624: and nvl(job.date_to, C_END_OF_TIME)
1625: And ppf.business_group_id = P_BUSINESS_GROUP_ID
1626: And ppf.per_information_category = 'US'
1627: And ppf.start_date <= fnd_date.canonical_to_date(P_REPORT_DATE)
1628: And ppf.per_information7 is NULL
1629: Order by 2,3;
1630:
1631: