14: -- If the status is changed to 'END' then if there are any future
15: -- changes then disallow the update.
16: ---
17: begin
18: hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F3_PKG.process_end_status', 5);
19: if p_eff_end_date < p_eot then
20: fnd_message.set_name('PAY', 'HR_6071_APP_ASS_INVALID_END');
21: fnd_message.raise_error;
22: end if;
25: -- effective delete.
26: --
27: hr_assignment.del_ref_int_check(p_ass_id, 'END', p_sess_date);
28: --
29: hr_utility.set_location('Leaving: '|| 'PER_ASSIGNMENTS_F3_PKG.process_end_status', 5);
30: end process_end_status;
31: ---------------------------------------------------------------------------
32: procedure process_term_status(
33: p_ass_id number,
47: where s.assignment_status_type_id =
48: a.assignment_status_type_id
49: and s.per_system_status <> 'TERM_ASSIGN');
50: begin
51: hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F3_PKG.process_term_status' , 5);
52: open term_assign;
53: fetch term_assign into l_dummy;
54: if term_assign%found then
55: fnd_message.set_name('PAY', 'HR_6387_EMP_ASS_INVALID_TERM');
72: -- HR_ASSIGNMENT.CHECK_ASS_FOR_PRIMARY performs these checks on an
73: -- assignment that has had its PRIMARY FLAG set to 'Yes'
74: --
75: begin
76: hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F3_PKG.validate_primary_flag.' , 5);
77: hr_assignment.check_ass_for_primary(
78: p_pd_os_id,
79: p_ass_id,
80: p_val_st_date);
98: -- "leading TERM_ASSIGN" to be implicitly created (i.e. a row in the
99: -- future becomes the "leading TERM_ASSIGN").
100: --
101: begin
102: hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F3_PKG.test_for_cancel_term' , 5);
103: hr_assignment.test_for_cancel_reterm(
104: p_ass_id,
105: p_val_start_date,
106: p_val_end_date,
161: -- shown on the client to select from a list of primary candidate
162: -- assignments.
163: --
164: begin
165: hr_utility.set_location('per_assignments_f3_pkg.check_future_primary',1);
166: p_show_cand_prim_assgts := null;
167: if p_dt_mode = 'UPDATE_OVERRIDE' then
168: l_start_date := p_val_start_date;
169: l_prim_flag := p_prim_flag;
175: -- Note last 3 parameters return values from server-side procedure.
176: -- The last is OUT only so no need to get p_prim_date_from, we will
177: -- only write to the item.
178: --
179: hr_utility.set_location('per_assignments_f3_pkg.check_future_primary',2);
180: hr_assignment.check_future_primary(
181: p_ass_id,
182: l_start_date,
183: p_eff_end_date,
186: p_prim_change_flag,
187: p_new_prim_flag,
188: p_prim_date_from);
189: --
190: hr_utility.trace('Primary Effective From '||
191: to_char(p_prim_date_from,'DD-MON-YYYY'));
192: --
193: if p_prim_change_flag = 'N' or p_new_prim_flag = 'Y' then
194: return;
196: --
197: -- As above, last parameter is OUT only - it's actually a varchar2
198: -- returning a number value!
199: --
200: hr_utility.set_location('per_assignments_f3_pkg.check_future_primary',3);
201: hr_assignment.get_new_primary_assignment(
202: p_ass_id,
203: p_pd_os_id,
204: l_start_date,
203: p_pd_os_id,
204: l_start_date,
205: p_new_prim_ass_id);
206: --
207: hr_utility.trace('New Primary is '||p_new_prim_ass_id);
208: --
209: if hr_utility.check_warning then
210: p_show_cand_prim_assgts := 'Y';
211: end if;
205: p_new_prim_ass_id);
206: --
207: hr_utility.trace('New Primary is '||p_new_prim_ass_id);
208: --
209: if hr_utility.check_warning then
210: p_show_cand_prim_assgts := 'Y';
211: end if;
212: --
213: end check_future_primary;
253: l_warning varchar2(80);
254: l_new_end_date date;
255: l_show_cand_prim_assgts varchar2(1);
256: begin
257: hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F3_PKG.pre_update_bundle2' , 5);
258: --
259: -- NB RE_ENTRY_POINT_1 is no longer used but kept in so that
260: -- RE_ENTRY_POINT_2 will behave in the same way.
261: --
308: end if;
309: --
310: <
311: --
312: hr_utility.set_location('PER_ASSIGNMENTS_F3_PKG.pre_update_bundle2' , 10);
313: if p_per_sys_st = 'END' then
314: process_end_status(
315: p_ass_id,
316: p_sess_date,
328: -- of other primary flags is necessary.
329: --
330: p_copy_y_to_prim_ch := null;
331: --
332: hr_utility.set_location('PER_ASSIGNMENTS_F3_PKG.pre_update_bundle2' , 20);
333: if p_s_prim_flag = p_prim_flag then
334: if p_upd_mode = 'UPDATE_OVERRIDE' then
335: check_future_primary(
336: p_upd_mode,
372: --
373: -- Now check the changing of term_assign's with relation to it's
374: -- impact on element entries (G255).
375: --
376: hr_utility.set_location('PER_ASSIGNMENTS_F3_PKG.pre_update_bundle2' , 30);
377: test_for_cancel_term(
378: p_ass_id,
379: p_val_st_date,
380: p_val_end_date,
400: end if;
401: --
402: p_re_entry_point := 0;
403: --
404: hr_utility.set_location('Leaving: '|| 'PER_ASSIGNMENTS_F3_PKG.pre_update_bundle2' , 40);
405: end pre_update_bundle2;
406: -----------------------------------------------------------------------------
407: --
408: -- UPDATE_AND_DELETE_BUNDLE: procedure to bundle procedure calls which follow
561: and effective_end_date >= p_eff_st_date);
562:
563: begin
564: p_returned_warning := null;
565: hr_utility.clear_warning;
566: --
567: hr_utility.set_location('per_assignments_f3_pkg.update_and_delete_bundle',1);
568: hr_utility.trace('RE_ENTRY_POINT is '||to_char(p_re_entry_point));
569:
563: begin
564: p_returned_warning := null;
565: hr_utility.clear_warning;
566: --
567: hr_utility.set_location('per_assignments_f3_pkg.update_and_delete_bundle',1);
568: hr_utility.trace('RE_ENTRY_POINT is '||to_char(p_re_entry_point));
569:
570: --Bug# 5758747
571: OPEN get_leg_code;
564: p_returned_warning := null;
565: hr_utility.clear_warning;
566: --
567: hr_utility.set_location('per_assignments_f3_pkg.update_and_delete_bundle',1);
568: hr_utility.trace('RE_ENTRY_POINT is '||to_char(p_re_entry_point));
569:
570: --Bug# 5758747
571: OPEN get_leg_code;
572: FETCH get_leg_code INTO l_leg_code;
611: hr_assignment.check_for_cobra(
612: p_ass_id,
613: p_val_st_date,
614: p_val_end_date);
615: if hr_utility.check_warning then
616: p_returned_warning := 'HR_ASS_TERM_COBRA_EXISTS';
617: p_re_entry_point := 1;
618: return;
619: end if;
623: return;
624: end if;
625: --
626: <
627: hr_utility.trace('RE_ENTRY_POINT1');
628: --
629: -- WARN_TERM_BY_POS:
630: --
631: -- Warn user if the operation will remove an assignment with
652: l_dt_mode,
653: l_start_date,
654: p_eff_end_date);
655: --
656: if hr_utility.check_warning then
657: p_returned_warning := 'HR_EMP_ASS_TERM_FOUND';
658: p_re_entry_point := 2;
659: return;
660: end if;
663: return;
664: end if;
665: --
666: <
667: hr_utility.trace('RE_ENTRY_POINT2');
668:
669: --
670: -- Bug# 1321860
671: -- Description : Removed the future payroll action check condition.
713: --
714: -- End date the proposal. This should end date the element entry as well.
715: --
716: If l_del_proposal_change_dt < l_val_start_date then
717: hr_utility.set_location('End date proposal',25);
718: hr_maintain_proposal_api.update_salary_proposal(
719: p_validate => false,
720: p_pay_proposal_id => l_Del_proposal_Id,
721: p_date_to => l_val_start_date - 1,
727:
728: -- Zap the proposal and the element entry.
729:
730: Elsif l_del_proposal_change_dt = l_val_start_date then
731: hr_utility.set_location('Zap proposal',25);
732:
733: Hr_Maintain_Proposal_Api.DELETE_SALARY_PROPOSAL
734: (P_PAY_PROPOSAL_ID => l_Del_proposal_Id
735: ,P_BUSINESS_GROUP_ID => l_del_bg_id
735: ,P_BUSINESS_GROUP_ID => l_del_bg_id
736: ,P_OBJECT_VERSION_NUMBER => l_Del_Proposal_Ovn
737: ,P_SALARY_WARNING => l_Del_Warn);
738: Else
739: hr_utility.set_location('Should never come here',25);
740: null;
741: End if;
742:
743: /***
801: return;
802: end if;
803: --
804: <
805: hr_utility.trace('CHECK_TERM_COBRA');
806: --
807: -- CHECK_TERM_COBRA:
808: --
809: --Bug# 5758747
812: p_ass_id,
813: p_val_st_date,
814: p_val_end_date);
815: --
816: if hr_utility.check_warning then
817: p_returned_warning := 'HR_ASS_TERM_COBRA_EXISTS';
818: p_re_entry_point := 3;
819: return;
820: end if;
820: end if;
821: END IF;
822: --
823: <
824: hr_utility.trace('RE_ENTRY_POINT3');
825: --
826: -- CHECK_SPP_AND_CEIL:
827: --
828: -- Check to see if there are any placements for the assignment that
831: -- linked to a grade spine record whose grade id is the same as
832: -- ASS.GRADE_ID.
833: --
834: if p_grd_id is not null and p_sp_ceil_st_id is not null then
835: hr_utility.set_location ('RE_ENTRY_POINT3 ' ||p_dt_mode,10 );
836: hr_utility.set_location ('p_eff_st_date ' ||p_eff_st_date,10 );
837:
838: open sp_point;
839: fetch sp_point into l_null;
832: -- ASS.GRADE_ID.
833: --
834: if p_grd_id is not null and p_sp_ceil_st_id is not null then
835: hr_utility.set_location ('RE_ENTRY_POINT3 ' ||p_dt_mode,10 );
836: hr_utility.set_location ('p_eff_st_date ' ||p_eff_st_date,10 );
837:
838: open sp_point;
839: fetch sp_point into l_null;
840: if sp_point%found then
866: -- end of fix for the bug 4612843
867: --
868: p_re_entry_point := 0;
869: --
870: hr_utility.set_location('per_assignments_f3_pkg.update_and_delete_bundle',2);
871: --
872: end update_and_delete_bundle;
873: -----------------------------------------------------------------------------
874: END PER_ASSIGNMENTS_F3_PKG;