[Home] [Help]
205:
206:
207: cursor c1 is
208: select date_end ,date_received, application_id
209: from per_applications papp
210: where application_id =
211: ( select distinct (application_id)
212: from per_all_assignments_f
213: where assignment_id = p_assignment_id and
275:
276: -- end of declaration
277:
278: cursor future_apl(p_date_received date) is
279: select rowid, application_id,date_received from per_applications
280: where date_received > p_date_received
281: and person_id = p_person_id;
282:
283: l_apl_person_type_id number;
460:
461: -- Person is currently an Ex-Applicant with any falvour of Person Type
462: -- Check if the person is currently hired as Emp with that Assignment if so raise an error
463:
464: PER_APPLICATIONS_PKG .cancel_chk_current_emp(p_person_id => p_person_id ,
465: p_business_group_id => p_business_group_id ,
466: p_date_end => l_date_end );
467:
468: hr_utility.set_location('Entering:'|| l_proc, 100);
541:
542: hr_utility.set_location('Entering:'|| l_proc, 160);
543: hr_utility.set_location('At reverse_term_apln_fut',160);
544:
545: -- Make a call to the IRC packages to maintain the IRC Assignment Statuses hr_utility.set_location('PER_APPLICATIONS_PKG.maintain_irc_ass_status', 30);
546:
547: irc_asg_status_api.create_irc_asg_status
548: (p_validate => FALSE,
549: p_assignment_id => p_assignment_id,
571:
572: per_app_asg_pkg.cleanup_letters
573: (p_assignment_id => p_assignment_id);
574:
575: UPDATE PER_APPLICATIONS
576: SET date_end =null
577: where APPLICATION_ID =l_application_id
578: and person_id= p_person_id ;
579:
591: and assignment_type = 'A';
592:
593: hr_utility.set_location('AT REV TERM APL FUTURE',185);
594:
595: per_applications_pkg.delete_row(apl.rowid);
596:
597: end loop;
598:
599: hr_utility.set_location('At reverse_term_apln_fut',188);
686:
687:
688: cursor c1 is
689: select date_end ,date_received, application_id
690: from per_applications papp
691: where application_id =
692: ( select distinct (application_id)
693: from per_all_assignments_f
694: where assignment_id = p_assignment_id and
924:
925: -- Person is currently an Ex-Applicant with any falvour of Person Type
926: -- Check if the person is currently hired as Emp with that Assignment if so raise an error
927:
928: PER_APPLICATIONS_PKG .cancel_chk_current_emp(p_person_id => p_person_id ,
929: p_business_group_id => p_business_group_id ,
930: p_date_end => l_date_end );
931:
932: hr_utility.set_location('Entering:'|| l_proc, 100);
995: );
996:
997: hr_utility.set_location('Entering:'|| l_proc, 160);
998:
999: -- Make a call to the IRC packages to maintain the IRC Assignment Statuses hr_utility.set_location('PER_APPLICATIONS_PKG.maintain_irc_ass_status', 30);
1000:
1001: irc_asg_status_api.create_irc_asg_status
1002: (p_validate => FALSE,
1003: p_assignment_id => p_assignment_id,
1024:
1025: per_app_asg_pkg.cleanup_letters
1026: (p_assignment_id => p_assignment_id);
1027:
1028: UPDATE PER_APPLICATIONS
1029: SET date_end =null
1030: where APPLICATION_ID =l_application_id
1031: and person_id= p_person_id ;
1032:
19957: l_comment_id per_all_assignments_f.comment_id%TYPE;
19958: l_group_name pay_people_groups.group_name%TYPE;
19959: l_old_group_name pay_people_groups.group_name%TYPE;
19960: --
19961: l_application_id per_applications.application_id%TYPE;
19962: l_business_group_id per_business_groups.business_group_id%TYPE;
19963: l_legislation_code per_business_groups.legislation_code%TYPE;
19964: l_period_of_service_id per_all_assignments_f.period_of_service_id%TYPE;
19965: l_proc varchar2(72) := g_package||'create_secondary_apl_asg';
19971: l_flex_num fnd_id_flex_segments.id_flex_num%TYPE;
19972: l_session_id number;
19973: l_cagr_grade_def_id per_cagr_grades_def.cagr_grade_def_id%TYPE := p_cagr_grade_def_id;
19974: l_cagr_concatenated_segments varchar2(2000);
19975: l_appl_date_end per_applications.date_end%TYPE;
19976: --
19977: -- bug 2230915 new variables to indicate whether key flex id parameters
19978: -- enter the program with a value.
19979: --
20074: l_per_object_version_number per_all_people_f.object_version_number%TYPE;
20075: l_appl_override_warning boolean;
20076: l_per_effective_start_date per_all_people_f.effective_start_date%TYPE;
20077: l_per_effective_end_date per_all_people_f.effective_end_date%TYPE;
20078: l_apl_object_version_number per_applications.object_version_number%TYPE;
20079: --
20080:
20081: cursor csr_get_derived_details is
20082: select bus.business_group_id
20091: --
20092: -- 3652025 >>
20093: cursor csr_get_application is
20094: select apl.application_id, apl.date_end
20095: from per_applications apl
20096: where apl.person_id = p_person_id
20097: and l_effective_date between apl.date_received
20098: and nvl(apl.date_end,hr_api.g_eot);
20099: -- <<
21672: l_assignment_sequence per_all_assignments_f.assignment_sequence%TYPE;
21673: l_comment_id per_all_assignments_f.comment_id%TYPE;
21674: l_group_name pay_people_groups.group_name%TYPE;
21675: l_flex_num fnd_id_flex_segments.id_flex_num%TYPE;
21676: l_application_id per_applications.application_id%TYPE;
21677: l_business_group_id per_business_groups.business_group_id%TYPE;
21678: l_legislation_code per_business_groups.legislation_code%TYPE;
21679: l_period_of_service_id per_all_assignments_f.period_of_service_id%TYPE;
21680: l_proc varchar2(72);
22366: --
22367: l_assignment_status_id irc_assignment_statuses.assignment_status_id%type;
22368: l_asg_status_ovn irc_assignment_statuses.object_version_number%type;
22369: -- 3652025 >>
22370: l_new_application_id per_applications.application_id%TYPE;
22371: l_fut_asg_start_date date;
22372: l_fut_asg_end_date date;
22373: l_comment_id number;
22374: l_payroll_id_updated boolean;
22452: ORDER BY as2.effective_start_date, as2.assignment_id ASC;
22453: --
22454: CURSOR csr_appl_details(cp_application_id number) IS
22455: select *
22456: from per_applications
22457: where application_id = cp_application_id;
22458:
22459: -- Start changes for bug 9875744
22460: CURSOR chk_ae_assignment(lp_application_id number, lp_person_id number, lp_effective_start_date date) is
22478: and apl.application_id = cp_appl_id
22479: and apl.assignment_id <> cp_asg_id
22480: and (apl.effective_end_date = hr_general.end_of_time
22481: or exists
22482: (select 'Y' from per_applications apa
22483: where apa.application_id = cp_appl_id
22484: and apa.date_end is not null
22485: and apa.date_end >= apl.effective_end_date));
22486:
22787: -- terminate current application
22788: --
22789: hr_utility.trace(' terminate current application on '||to_char(l_effective_date));
22790: --
22791: UPDATE per_applications
22792: SET date_end = l_effective_date
22793: where application_id = l_fut_asg.application_id;
22794: --
22795: open csr_appl_details(l_fut_asg.application_id);
22936: ,p_per_effective_start_date => l_per_effective_start_date
22937: ,p_per_effective_end_date => l_per_effective_end_date);
22938: hr_utility.set_location('Converted Ex-Applicant',70);
22939: --
22940: UPDATE per_applications
22941: SET date_end = l_emp_min_start_date - 1
22942: where application_id = l_new_application_id;
22943:
22944: hr_utility.set_location('Terminated new application on '||l_emp_min_start_date - 1,71);
23013: -- terminate current application
23014: --
23015: hr_utility.trace(' terminate current application on '||to_char(l_mx_end_dated));
23016: --
23017: UPDATE per_applications
23018: SET date_end = l_mx_end_dated
23019: where application_id = l_assignment.application_id;
23020: --
23021: open csr_appl_details(l_assignment.application_id);