443: function get_termination_reason
444: (
445: p_business_group_id in per_all_assignments_f.business_group_id%type,
446: p_report_date in per_all_assignments_f.effective_end_date%type,
447: p_reason_code in per_periods_of_service.leaving_reason%type
448: ) return varchar2 is
449:
450: l_termination_reason pay_user_column_instances_f.value%type;
451:
1156: p_period_of_service_id in per_all_assignments_f.period_of_service_id%type
1157: ) return varchar2 is
1158:
1159: l_ee_employment_type_name varchar2(13);
1160: l_date_start per_periods_of_service.date_start%type;
1161: l_date_end date;
1162: l_actual_termination_date per_periods_of_service.actual_termination_date%type;
1163: l_projected_termination_date per_periods_of_service.projected_termination_date%type;
1164:
1158:
1159: l_ee_employment_type_name varchar2(13);
1160: l_date_start per_periods_of_service.date_start%type;
1161: l_date_end date;
1162: l_actual_termination_date per_periods_of_service.actual_termination_date%type;
1163: l_projected_termination_date per_periods_of_service.projected_termination_date%type;
1164:
1165: begin
1166:
1159: l_ee_employment_type_name varchar2(13);
1160: l_date_start per_periods_of_service.date_start%type;
1161: l_date_end date;
1162: l_actual_termination_date per_periods_of_service.actual_termination_date%type;
1163: l_projected_termination_date per_periods_of_service.projected_termination_date%type;
1164:
1165: begin
1166:
1167: select date_start,
1169: projected_termination_date
1170: into l_date_start,
1171: l_actual_termination_date,
1172: l_projected_termination_date
1173: from per_periods_of_service
1174: where period_of_service_id = p_period_of_service_id;
1175:
1176: if l_actual_termination_date is null then
1177:
2768: hr_lookups hl2,
2769: hr_all_organization_units haou,
2770: per_assignment_extra_info paei,
2771: per_all_assignments_f paaf,
2772: per_periods_of_service ppos,
2773: per_all_people_f papf
2774: where papf.business_group_id = p_business_group_id
2775: and papf.current_employee_flag = 'Y'
2776: and ppos.person_id = papf.person_id
2998: hr_lookups hl2,
2999: hr_all_organization_units haou,
3000: per_assignment_extra_info paei,
3001: per_all_assignments_f paaf,
3002: per_periods_of_service ppos,
3003: per_all_people_f papf
3004: where papf.business_group_id = p_business_group_id
3005: and papf.current_employee_flag = 'Y'
3006: and ppos.person_id = papf.person_id
3253: hr_lookups hl2,
3254: hr_all_organization_units haou,
3255: per_assignment_extra_info paei,
3256: per_all_assignments_f paaf,
3257: per_periods_of_service ppos,
3258: per_all_people_f papf
3259: where papf.business_group_id = p_business_group_id
3260: and papf.current_employee_flag = 'Y'
3261: and ppos.person_id = papf.person_id
3519: hr_lookups hl2,
3520: hr_all_organization_units haou,
3521: per_assignment_extra_info paei,
3522: per_all_assignments_f paaf,
3523: per_periods_of_service ppos,
3524: per_all_people_f papf
3525: where papf.business_group_id = p_business_group_id
3526: and papf.current_employee_flag = 'Y'
3527: and ppos.person_id = papf.person_id