495: )
496: IS
497:
498: SELECT /*+ ORDERED
499: INDEX(paf PER_ASSIGNMENTS_F_N12)
500: INDEX(past PER_ASSIGNMENT_STATUS_TYPE_PK) */
501: /* Hints supplied to always force the correct execution plan */
502: paf.assignment_id
503: FROM
500: INDEX(past PER_ASSIGNMENT_STATUS_TYPE_PK) */
501: /* Hints supplied to always force the correct execution plan */
502: paf.assignment_id
503: FROM
504: per_assignments_f paf,
505: per_assignment_status_types past
506: WHERE
507: paf.person_id = p_person_id AND
508: p_effective_date BETWEEN
846: p_effective_date DATE
847: )
848: IS
849: SELECT paf.business_group_id
850: FROM per_assignments_f paf
851: WHERE paf.assignment_id = p_asg_id
852: AND p_effective_date BETWEEN paf.effective_start_date
853: AND paf.effective_end_date;
854:
851: WHERE paf.assignment_id = p_asg_id
852: AND p_effective_date BETWEEN paf.effective_start_date
853: AND paf.effective_end_date;
854:
855: l_business_group_id per_assignments_f.business_group_id%TYPE;
856: l_legislation_code per_business_groups.legislation_code%TYPE;
857: BEGIN
858: g_debug :=hr_utility.debug_enabled;
859: if g_debug then
888: p_effective_date DATE
889: )
890: IS
891: SELECT /*+ ORDERED
892: INDEX(paf PER_ASSIGNMENTS_F_PK)
893: INDEX(past PER_ASSIGNMENT_STATUS_TYPE_PK) */
894: /* Hints supplied to always force the correct execution plan */
895: 1
896: FROM
893: INDEX(past PER_ASSIGNMENT_STATUS_TYPE_PK) */
894: /* Hints supplied to always force the correct execution plan */
895: 1
896: FROM
897: per_assignments_f paf,
898: per_assignment_status_types past
899: WHERE
900: paf.assignment_id = p_asg_id AND
901: p_effective_date BETWEEN
1227: end if;
1228: BEGIN
1229: SELECT el.element_link_id
1230: INTO l_element_link_id
1231: FROM per_assignments_f asg, pay_element_links_f el
1232: WHERE asg.assignment_id = p_assignment_id
1233: AND el.business_group_id
1234: + 0 = asg.business_group_id
1235: + 0