[Home] [Help]
PACKAGE BODY: APPS.PER_ASSIGNMENTS_F1_PKG
Source
1 PACKAGE BODY PER_ASSIGNMENTS_F1_PKG AS
2 /* $Header: peasg01t.pkb 120.29.12010000.3 2008/09/29 05:42:27 ubhat ship $ */
3 --
4 g_package varchar2(33) := 'per_assignments_f1_pkg.'; -- Global package name
5 g_debug boolean; -- debug flag
6 --
7 -----------------------------------------------------------------------------
8 --
9 -- PROCEDURE: iud_update_primary
10 --
11 -- If there is to be a change to the Primary Flag and the current assignment
12 -- will be the primary one after the change then we must ensure that the
13 -- end date on the assignment is not going to be reset as a result of
14 -- removing future TERMINATION records (see Termination Logic). This is the
15 -- case when the P_NEW_END_DATE field is not NULL.
16 --
17 -- When there is to be a change the Primary Flag then all the assignments
18 -- affected must be updated.
19 --
20 -- HR_ASSIGNMENT.UPDATE_PRIMARY performs the following logic :-
21 --
22 -- If the P_NEW_PRIM_FLAG is 'Y' then all future rows for the current
23 -- assignment must have PRIMARY_FLAG set to 'Y' and all other assignments
24 -- that have future PRIMARY_FLAG = 'Y' must be set to non-primary.
25 --
26 -- If the P_NEW_PRIM_FLAG is 'N' then the new primary assignment
27 -- P_NEW_PRIM_ASS_ID should be made PRIMARY. This may involve performing
28 -- a date effective insert aswell as updating all future rows. In addition
29 -- all other assignments with future PRIMARY FLAG = 'Y' should be set to
30 -- non-primary.
31 --
32 procedure iud_update_primary(
33 p_mod_mode varchar2,
34 p_new_prim_flag varchar2,
35 p_prim_date_from date,
36 p_new_end_date date,
37 p_eot date,
38 p_pd_os_id number,
39 p_ass_id number,
40 p_new_prim_ass_id IN OUT NOCOPY number,
41 p_prim_change_flag IN OUT NOCOPY varchar2) is
42 --
43
44 l_fin_proc_date date;
45 l_person_id number;
46 l_assignment_type per_all_assignments_f.assignment_type%TYPE;
47 l_pdp_date_start date;
48 --
49 l_proc varchar2(18) := 'iud_update_primary';
50 --
51
52 --
53 -- Fetch the person ID and assignment type
54 -- so the period of placement can be obtained
55 -- for contingent workers.
56 --
57 CURSOR csr_get_assignment_info IS
58 SELECT paaf.person_id
59 ,paaf.assignment_type
60 ,paaf.period_of_placement_date_start
61 FROM per_all_assignments_f paaf
62 WHERE paaf.assignment_id = p_ass_id
63 AND paaf.assignment_type IN ('E', 'C');
64 --
65 -- Bug 3240313 starts here.
66 --
67 CURSOR csr_get_new_asg_info IS
68 SELECT paaf.person_id
69 ,paaf.assignment_type
70 ,paaf.period_of_placement_date_start
71 FROM per_all_assignments_f paaf
72 WHERE paaf.assignment_id = p_new_prim_ass_id
73 AND paaf.assignment_type IN ('E', 'C');
74 --
75 -- Bug 3240313 ends here.
76 --
77 -- Get the termination dates for the period of placement and
78 -- period of service.
79 --
80 CURSOR csr_get_term_dates IS
81 SELECT NVL(final_process_date, p_eot)
82 FROM per_periods_of_service
83 WHERE period_of_service_id = p_pd_os_id
84 UNION
85 SELECT NVL(pdp.final_process_date, p_eot)
86 FROM per_periods_of_placement pdp
87 WHERE pdp.person_id = l_person_id
88 AND pdp.date_start = l_pdp_date_start;
89
90 BEGIN
91 g_debug := hr_utility.debug_enabled; -- get debug status
92 IF g_debug THEN
93 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
94 END IF;
95
96 --
97 -- Fetch the desired assignment details.
98 --
99 OPEN csr_get_assignment_info;
100 FETCH csr_get_assignment_info INTO l_person_id
101 ,l_assignment_type
102 ,l_pdp_date_start;
103 --
104 -- Bug 3240313 starts here.
105 --
106 IF g_debug THEN
107 hr_utility.set_location( g_package || l_proc, 10);
108 END IF;
109
110 IF csr_get_assignment_info%notfound then
111 OPEN csr_get_new_asg_info;
112 FETCH csr_get_new_asg_info INTO l_person_id
113 ,l_assignment_type
114 ,l_pdp_date_start;
115 CLOSE csr_get_new_asg_info;
116 END IF;
117 --
118 -- Bug 3240313 ends here.
119 --
120 CLOSE csr_get_assignment_info;
121
122 IF g_debug THEN
123 hr_utility.set_location( g_package || l_proc, 20);
124 END IF;
125
126 if p_new_prim_flag = 'Y' and
127 (p_new_end_date <> p_eot and p_new_end_date is not null) then
128 --
129 -- Get final process date of the pos / pop.
130 --
131 OPEN csr_get_term_dates;
132 FETCH csr_get_term_dates into l_fin_proc_date;
133 if (csr_get_term_dates%notfound) or
134 (p_new_end_date <> l_fin_proc_date) then
135 CLOSE csr_get_term_dates;
136 fnd_message.set_name('PAY',
137 'HR_6438_EMP_ASS_NOT_CONTIN');
138 fnd_message.raise_error;
139 end if;
140 close csr_get_term_dates;
141 end if;
142 --
143 if p_new_prim_flag = 'Y' then
144 p_new_prim_ass_id := p_ass_id;
145 end if;
146 --
147 -- Comment from hr_assignment.update_primary pkg body:
148 --
149 -- For the Current Assignment, if the operation is not ZAP then updates
150 -- all the future rows to the NEW_PRIMARY_FLAG value.
151 -- For other assignments,
152 -- if the other assignment is the new primary then ensure that there
153 -- is a record starting on the correct date with Primary Flag = 'Y'
154 -- and update all other future changes to the same Primary value.
155 -- For any other assignments
156 -- if the assignment is primary on the date in question then
157 -- ensure that that there is a row on this date with primary
158 -- flag = 'N' and that all future changes are set to 'N'
159 -- otherwise
160 -- ensure that all future primary flags are set to 'N'.
161 -- NB. This uses several calls to DO_PRIMARY_UPDATE which handles the
162 -- date effective insert for an individual assignment row if one
163 -- is required.
164 --
165 -- The 0 parameters below are p_last_updated_by and p_last_update_login, not
166 -- really used at the moment.
167 --
168 IF l_assignment_type <> 'C' THEN
169 IF g_debug THEN
170 hr_utility.set_location( g_package || l_proc, 30);
171 END IF;
172
173
174 hr_assignment.update_primary(
175 p_ass_id,
176 p_pd_os_id,
177 p_new_prim_ass_id,
178 p_prim_date_from,
179 p_new_prim_flag,
180 p_mod_mode,
181 0,
182 0);
183
184 ELSIF l_assignment_type = 'C' THEN
185 IF g_debug THEN
186 hr_utility.set_location( g_package || l_proc, 40);
187 END IF;
188
189
190 hr_assignment.update_primary_cwk(
191 p_ass_id,
192 l_person_id,
193 l_pdp_date_start,
194 p_new_prim_ass_id,
195 p_prim_date_from,
196 p_new_prim_flag,
197 p_mod_mode,
198 0,
199 0);
200
201 END IF;
202
203 p_prim_change_flag := 'N';
204 --
205 IF g_debug THEN
206 hr_utility.set_location( 'Leaving ' ||g_package || l_proc, 50);
207 END IF;
208
209 end iud_update_primary;
210 -----------------------------------------------------------------------------
211 procedure update_group(
212 p_pg_id number,
213 p_group_name varchar2,
214 p_bg_id number) is
215 --
216 -- Called post-insert/update.
217 -- Start of fix 2762904
218 cursor c_flex is
219 SELECT bg.people_group_structure flex_num
220 FROM PER_BUSINESS_GROUPS BG
221 WHERE BG.BUSINESS_GROUP_ID= p_bg_id;
222
223 -- Bug fix 3648612.
224 -- Cursor modified to improve performance.
225
226 cursor c_seg(p_flexnum number) is
227 select rownum, format_type
228 from fnd_id_flex_segments_vl f, fnd_flex_value_sets v
229 where f.flex_value_set_id = v.flex_value_set_id(+)
230 and id_flex_code ='GRP'
231 and f.application_id = 801 -- bug fix 3648612.
232 and id_flex_num = p_flexnum
233 and display_flag='Y'
234 and enabled_flag='Y'
235 order by segment_num;
236
237 l_xname varchar2(240);
238 l_ch_seg FND_FLEX_EXT.SegmentArray;
239 c number;
240 l_rnum number;
241 l_format varchar2(1);
242 l_flexnum number;
243 l_delimiter varchar2(1);
244 l_dateformat varchar2(30);
245 i number := 1;
246 -- end of Fix 2762904
247 --
248 l_proc varchar2(12) := 'update_group';
249 --
250 begin
251 g_debug := hr_utility.debug_enabled; -- get debug status
252 IF g_debug THEN
253 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
254 END IF;
255
256 if p_pg_id <> -1 then
257 --
258 -- This is an existing desc flex record, update group_name held on
259 -- combinations table.
260 -- Start if fix 2762904
261 l_xname := p_group_name;
262 if l_xname is not null then
263 open c_flex;
264 fetch c_flex into l_flexnum;
265 if c_flex%notfound then
266 close c_flex;
267 end if;
268 close c_flex;
269 l_delimiter := FND_FLEX_APIS.get_segment_delimiter(
270 x_application_id => 801,
271 x_id_flex_code => 'GRP' ,
272 x_id_flex_num => l_flexnum );
273 c := fnd_flex_ext.breakup_segments(l_xname,l_delimiter,l_ch_seg);
274 fnd_profile.get('ICX_DATE_FORMAT_MASK',l_dateformat);
275
276 IF g_debug THEN
277 hr_utility.set_location( g_package || l_proc, 10);
278 END IF;
279
280 For x in c_seg(l_flexnum) loop
281
282 --fnd_message.debug('Date Format: '||l_dateformat);
283 -- fnd_message.debug('Format : '||x.format_type ||'Seg' ||l_ch_seg(i));
284 if x.format_type in ('X') then
285 l_ch_seg(i) := to_char(to_date(l_ch_seg(i), l_dateformat),'DD-MON-RRRR');
286 --fnd_message.debug('Format :' || l_ch_seg(i));
287 elsif x.format_type in ('Y') then
288 -- fnd_message.debug ('date format '||l_dateformat);
289 -- fnd_message.debug('Length '||length(l_ch_seg(i)));
290 l_ch_seg(i):= to_char(to_date(l_ch_seg(i),l_dateformat||' HH24:MI:SS'),'DD-MON-RRRR HH24:MI:SS');
291 end if;
292
293 i := i + 1;
294 end loop;
295 l_xname:= fnd_flex_ext.concatenate_segments(c,l_ch_seg,l_delimiter);
296 -- p_group_name := l_xname;
297 end if;
298 --End of Fix 2762904
299 IF g_debug THEN
300 hr_utility.set_location( g_package || l_proc, 20);
301 END IF;
302 update pay_people_groups
303 set group_name = l_xname
304 where people_group_id = P_PG_ID
305 and (group_name <> p_group_name
306 or group_name is null)
307 and l_xname is not null; -- 4103321
308 --
309 -- Commented out as not needed and causes process to hang if
310 -- called and people_group_name has not changed
311 --
312 /*
313 if sql%rowcount = 0 then
314 fnd_message.set_name('PAY',
315 'HR_6153_ALL_PROCEDURE_FAIL');
316 fnd_message.set_token('PROCEDURE',
317 'PER_ASSIGNMENTS_F1_PKG.UPDATE_GROUP');
318 fnd_message.set_token('STEP', '1');
319 fnd_message.raise_error;
320 end if;
321 */
322 end if;
323 --
324 IF g_debug THEN
325 hr_utility.set_location( 'Leaving ' || g_package || l_proc, 30);
326 END IF;
327 end update_group;
328 -----------------------------------------------------------------------------
329
330 -----------------------------------------------------------------------------
331 -- Added to test LOCK is FIXING the Issue
332 ---- changes completed for bug 5219266
333 -----------------------------------------------------------------------------
334 procedure update_scl(
335 p_scl_id number,
336 p_scl_concat varchar2) is
337 --
338 --
339
340 CURSOR csr_chk_scl is
341 SELECT null
342 FROM hr_soft_coding_keyflex
343 where soft_coding_keyflex_id = p_scl_id
344 and (concatenated_segments <> p_scl_concat
345 or concatenated_segments is null);
346 --
347 l_exists varchar2(30);
348 l_proc varchar2(72) := g_package||'update_scl ';
349 --
350 procedure update_scl_auto
351 ( p_scl_id number,
352 p_scl_concat varchar2
353 ) is
354 PRAGMA AUTONOMOUS_TRANSACTION;
355 --
356 CURSOR csr_scl_lock is
357 SELECT null
358 FROM hr_soft_coding_keyflex
359 where soft_coding_keyflex_id = p_scl_id
360 for update nowait;
361 --
362 l_exists varchar2(30);
363 l_proc varchar2(72) := g_package||'update_scl_auto ';
364
365 begin
366
367 -- if g_debug then
368 hr_utility.set_location('Entering:'|| l_proc, 10);
369 -- end if;
370 --
371 -- The outer procedure has already establish that an update is
372 -- required. This sub-procedure uses an autonomous transaction
373 -- to ensure that any commits do not impact the main transaction.
374 -- If the row is successfully locked then continue and update the
375 -- row. If the row cannot be locked then another transaction must
376 -- be performing the update. So it is acceptable for this
377 -- transaction to silently trap the error and continue.
378 --
379 -- Note: It is necessary to perform the lock test because in
380 -- a batch data upload scenario multiple sessions could be
381 -- attempting to insert or update the same Key Flexfield
382 -- combination at the same time. Just directly updating the row,
383 -- without first locking, can cause sessions to hang and reduce
384 -- batch throughput.
385 --
386 open csr_scl_lock;
387 fetch csr_scl_lock into l_exists;
388 if csr_scl_lock%found then
389 close csr_scl_lock;
390
391
392 -- if g_debug then
393 hr_utility.set_location(l_proc, 20);
394 -- end if;
395 --
396 -- Lock obtained by this transaction, updating the concatenated
397 -- segment string should be performed.
398 --
399 update hr_soft_coding_keyflex
400 set concatenated_segments = p_scl_concat
401 where soft_coding_keyflex_id = p_scl_id
402 and (concatenated_segments <> p_scl_concat
403 or concatenated_segments is null);
404 --
405 -- Commit this change so the change is immediately visible to
406 -- other transactions. Also ensuring that it is not undone if
407 -- the main transaction is rolled back. This commit is only
408 -- acceptable inside an API because it is being performed inside
409 -- an autonomous transaction and AOL code has previously
410 -- inserted the Key Flexfield combination row in another
411 -- autonomous transaction.
412 commit;
413 else
414 --changes for bug 6333879 starts here
415 Rollback;
416 --changes for bug 6333879 ends here
417 close csr_scl_lock;
418 end if;
419
420
421 -- if g_debug then
422 hr_utility.set_location('Leaving:'|| l_proc, 30);
423 -- end if;
424
425 Exception
426 When HR_Api.Object_Locked then
427 --
428 -- This autonomous transaction was unable to lock the row.
429 -- It can be assumed that another transaction has locked the
430 -- row and is performing the update. Hence the error can
431 -- be suppressed without raising it to the end user.
432 --
433 hr_utility.set_location('Leaving:'|| l_proc, 40);
434 end update_scl_auto;
435
436 begin
437 --
438
439 --if g_debug then
440 hr_utility.set_location('Entering:'|| l_proc, 10);
441 --end if;
442 --
443 -- First find out if it is necessary to update the concatenated
444 -- segment string column. This select is being done to avoid the
445 -- performance unnecessary overhead of set-up an autonomous
446 -- transaction when an update is not required. Updates are only
447 -- expected immediately after the combination row was first inserted.
448 --
449 open csr_chk_scl;
450 fetch csr_chk_scl into l_exists;
451 if csr_chk_scl%found then
452 close csr_chk_scl;
453 update_scl_auto
454 (p_scl_id => p_scl_id
455 ,p_scl_concat => p_scl_concat
456 );
457 else
458 close csr_chk_scl;
459 end if;
460 --
461
462 --if g_debug then
463 hr_utility.set_location('Leaving:'|| l_proc, 20);
464 --end if;
465
466 end update_scl;
467 -----------------------------------------------------------------------------
468
469 /* procedure update_scl(
470 p_scl_id number,
471 p_scl_concat varchar2) is
472 --
473 -- Called post-insert/update.
474 --
475 begin
476 if p_scl_id <> -1 then
477 --
478 -- This is an existing desc flex record, update concatenated_segments
479 -- field held on hr_soft_coding_keyflex table.
480 --
481 update hr_soft_coding_keyflex
482 set concatenated_segments = p_scl_concat
483 where soft_coding_keyflex_id = p_scl_id;
484 --
485 if sql%rowcount = 0 then
486 fnd_message.set_name('PAY',
487 'HR_6153_ALL_PROCEDURE_FAIL');
488 fnd_message.set_token('PROCEDURE',
489 'PER_ASSIGNMENTS_F1_PKG.UPDATE_SCL');
490 fnd_message.set_token('STEP', '1');
491 fnd_message.raise_error;
492 end if;
493 end if;
494 --
495 end update_scl; */
496 -- changes ended
497 -- changes completed for bug 5219266
498 -----------------------------------------------------------------------------
499 procedure do_cancel_reterm(
500 p_ass_id number,
501 p_bg_id number,
502 p_cancel_atd date,
503 p_cancel_lspd date,
504 p_reterm_atd date,
505 p_reterm_lspd date) is
506 --
507 -- Run the check to see whether this update operation will result
508 -- in a TERM_STATUS being removed or superceded by an earlier one.
509 -- This also checks to see whether the operation will cause a new
510 -- "leading TERM_ASSIGN" to be implicitly created (i.e. a row in the
511 -- future becomes the "leading TERM_ASSIGN").
512 --
513 -- VT 10/07/96 bug #306710
514 l_entries_chng VARCHAR2(1) := 'N';
515 --
516 l_proc varchar2(16) := 'do_cancel_reterm';
517 --
518 begin
519 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
520 hrentmnt.maintain_entries_asg(
521 p_ass_id,
522 p_bg_id,
523 'CNCL_TERM',
524 p_cancel_atd,
525 p_cancel_lspd,
526 null,
527 null,
528 null,
529 null);
530 per_saladmin_utility.adjust_pay_proposals(p_assignment_id => p_ass_id);
531 --
532 if p_reterm_atd is not null then
533 hrempter.terminate_entries_and_alus(
534 p_ass_id,
535 p_reterm_atd,
536 p_reterm_lspd,
537 null,
538 null,
539 l_entries_chng);
540 end if;
541 --
542 hr_utility.set_location('Leaving: '|| g_package || l_proc, 10);
543 end do_cancel_reterm;
544 ----------------------------------------------------------------------------
545 procedure future_del_cleanup(
546 p_ass_id number,
547 p_grd_id number,
548 p_sess_date date,
549 p_calling_proc varchar2,
550 p_val_st_date date,
551 p_val_end_date date,
552 p_datetrack_mode varchar2,
553 p_future_spp_warnings OUT NOCOPY boolean
554 ) is
555
556 l_future_spp_warning boolean;
557 --
558 l_proc varchar2(18) := 'future_del_cleanup';
559 --
560 begin
561 --
562 -- The 2 0's are last_updated_by, last_update_login.
563 --
564 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
565 hr_assignment.del_ref_int_delete(
566 p_ass_id,
567 p_grd_id,
568 'FUTURE',
569 p_sess_date,
570 0, 0,
571 p_calling_proc,
572 p_val_st_date,
573 p_val_end_date,
574 p_datetrack_mode,
575 l_future_spp_warning);
576
577 p_future_spp_warnings := l_future_spp_warning;
578 --
579 hr_utility.set_location('Leaving: '|| g_package || l_proc, 10);
580 end future_del_cleanup;
581 ----------------------------------------------------------------------------
582 procedure tidy_up_ref_int(
583 p_mode varchar2,
584 p_sess_date date,
585 p_new_end_date date,
586 p_val_end_date date,
587 p_eff_end_date date,
588 p_ass_id number,
589 p_cost_warning OUT NOCOPY boolean) is
590 l_mode varchar2(30);
591 l_new_end_date date;
592 l_old_end_date date;
593 --
594 l_proc varchar2(15) := 'tidy_up_ref_int';
595 --
596 --
597 -- Procedure to reset the end dates of rows in child tables related to the
598 -- Assignment. This procedure is called when the Assignment is ended using
599 -- 'END' and when the row is opened up using 'FUTURE_CHANGE' or
600 -- 'DELETE_NEXT_CHANGE'.
601 --
602 begin
603 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
604 l_mode := p_mode;
605 --
606 if l_mode = 'END' then
607 l_new_end_date := p_sess_date;
608 l_old_end_date := p_sess_date;
609 elsif l_mode = 'INT-END' then
610 l_new_end_date := p_new_end_date;
611 l_old_end_date := p_sess_date;
612 l_mode := 'END';
613 else
614 l_new_end_date := nvl(p_new_end_date, p_val_end_date);
615 l_old_end_date := p_eff_end_date;
616 end if;
617 --
618 -- The 2 0's are last_updated_by, last_update_login.
619 --
620 hr_assignment.tidy_up_ref_int(
621 p_ass_id,
622 l_mode,
623 l_new_end_date,
624 l_old_end_date,
625 0, 0, p_cost_warning);
626 --
627
628 hr_utility.set_location('Leaving: '|| g_package || l_proc, 10);
629 end tidy_up_ref_int;
630 ----------------------------------------------------------------------------
631 procedure terminate_entries(
632 p_per_sys_st varchar2,
633 p_ass_id number,
634 p_sess_date date,
635 p_val_st_date date) is
636 l_start_date date;
637 begin
638 hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F1_PKG.terminate_entries' , 5);
639 if p_per_sys_st = 'END' then
640 l_start_date := p_sess_date;
641 else
642 l_start_date := p_val_st_date;
643 end if;
644 --
645 hr_assignment.call_terminate_entries(
646 p_ass_id,
647 p_per_sys_st,
648 l_start_date);
649 --
650 end terminate_entries;
651 -----------------------------------------------------------------------------
652 procedure set_end_date(
653 p_new_end_date date,
654 p_ass_id number) is
655 --
656 -- Update the value of effective end date to the NEW END DATE determined by
657 -- CHECK_TERM.
658 -- This is to ensure that assignments cannot be 'opened up' past the Period
659 -- of Service End Date.
660 --
661 begin
662 hr_utility.set_location('Entering: '|| 'PER_ASSIGNMENTS_F1_PKG.set_end_date' , 5);
663
664 update per_assignments_f a
665 set a.effective_end_date = P_NEW_END_DATE
666 where a.assignment_id = P_ASS_ID
667 and a.effective_end_date = (
668 select max(a2.effective_end_date)
669 from per_assignments_f a2
670 where a2.assignment_id = a.assignment_id);
671 end set_end_date;
672 -----------------------------------------------------------------------------
673 procedure maintain_entries(
674 p_dt_upd_mode varchar2,
675 p_dt_del_mode varchar2,
676 p_per_sys_st varchar2,
677 p_sess_date date,
678 p_val_start_date date,
679 p_val_end_date date,
680 p_new_end_date date,
681 p_ass_id number,
682 p_bg_id number,
683 p_old_pay_id number,
684 p_new_pay_id number,
685 p_old_pg_id number, -- Added for bug#3924690
686 p_new_pg_id number, -- Added for bug#3924690
687 p_raise_warning IN OUT NOCOPY varchar2) is
688 l_val_start_date date;
689 l_val_end_date date;
690 l_mode varchar2(30);
691 l_entries_changed varchar2(1);
692 --
693 -- Maintain element entries for insert/update/delete
694 --
695 begin
696 --
697 hr_utility.set_location('per_assignments_f1_pkg.maintain_entries',1);
698 hr_utility.set_location('p_old_pg_id :'||to_char(p_old_pg_id),1);
699 hr_utility.set_location('p_new_pg_id :'||to_char(p_new_pg_id),1);
700
701 if p_dt_upd_mode is null then
702 if p_dt_del_mode is null then
703 l_mode := 'INSERT';
704 else
705 l_mode := p_dt_del_mode;
706 end if;
707 else
708 if p_per_sys_st = 'END' then
709 l_mode := 'DELETE';
710 else
711 l_mode := p_dt_upd_mode;
712 end if;
713 end if;
714 --
715 if l_mode = 'DELETE' then
716 l_val_start_date := p_sess_date;
717 else
718 l_val_start_date := p_val_start_date;
719 end if;
720 --
721 if p_new_end_date is null then
722 l_val_end_date := p_val_end_date;
723 else
724 l_val_end_date := p_new_end_date;
725 end if;
726 --
727 -- N.B. If the mode is 'DELETE' i.e. we are ending the assignment
728 -- then the date passed in is the end date of the Assignment.
729 -- The validation start date of a date effectively deleted row is
730 -- the day after the deletion therefore we must add one day on to the
731 -- data in this case.
732 --
733 if l_mode = 'DELETE' then
734 l_val_start_date := l_val_start_date + 1;
735 end if;
736 --
737 hr_utility.set_location('per_assignments_f1_pkg.maintain_entries',2);
738 hrentmnt.maintain_entries_asg(
739 p_ass_id,
740 p_old_pay_id,
741 p_new_pay_id,
742 p_bg_id,
743 'ASG_CRITERIA',
744 null,
745 null,
746 null,
747 l_mode,
748 l_val_start_date,
749 l_val_end_date,
750 l_entries_changed,
751 null, -- p_old_hire_date. Added for bug#3924690.
752 p_old_pg_id, -- Added for bug#3924690.
753 p_new_pg_id -- Added for bug#3924690.
754 );
755 --
756 if l_entries_changed = 'Y' then
757 per_saladmin_utility.adjust_pay_proposals(p_assignment_id => p_ass_id);
758 p_raise_warning := 'Y';
759 elsif l_entries_changed = 'S' then
760 per_saladmin_utility.adjust_pay_proposals(p_assignment_id => p_ass_id);
761 p_raise_warning := 'S';
762 else
763 p_raise_warning := 'N';
764 end if;
765 --
766 end maintain_entries;
767 -----------------------------------------------------------------------------
768 procedure post_update(
769 p_upd_mode varchar2,
770 p_new_prim_flag varchar2,
771 p_val_st_date date,
772 p_new_end_date date,
773 p_eot date,
774 p_pd_os_id number,
775 p_ass_id number,
776 p_new_prim_ass_id IN OUT NOCOPY number,
777 p_prim_change_flag IN OUT NOCOPY varchar2,
778 p_old_pg_id number, -- Bug#3924690
779 p_new_pg_id number,
780 p_grd_id number,
781 p_sess_date date,
782 p_s_grd_id number,
783 p_eff_end_date date,
784 p_per_sys_st varchar2,
785 p_old_per_sys_st varchar2, --#2404335
786 p_val_end_date date,
787 p_del_mode varchar2,
788 p_bg_id number,
789 p_old_pay_id number,
790 p_new_pay_id number,
791 p_group_name varchar2,
792 p_was_end_assign varchar2,
793 p_cancel_atd date,
794 p_cancel_lspd date,
795 p_reterm_atd date,
796 p_reterm_lspd date,
797 p_scl_id number,
798 p_scl_concat varchar2,
799 p_end_salary varchar2 ,
800 p_warning IN OUT NOCOPY varchar2,
801 p_re_entry_point IN OUT NOCOPY number,
802 p_future_spp_warning OUT NOCOPY boolean) is
803 --
804 -- Define local variables
805 --
806 l_per_sys_st varchar2(30);
807 l_raise_warning varchar2(1);
808 l_element_entry_id number;
809 l_calling_proc varchar2(30);
810 l_future_spp_warnings boolean;
811 l_cost_warning boolean;
812 l_min_start_date date;
813 l_dummy_warning boolean;
814 --
815 l_proc VARCHAR2(72) := g_package||'post_update';
816 --
817 cursor csr_get_salary is
818 select element_entry_id
819 from pay_element_entries_f
820 where assignment_id = p_ass_id
821 and creator_type = 'SP'
822 and p_val_st_date between
823 effective_start_date and effective_end_date;
824 --
825 -- Check to see if min effective_start_date for spp record is less
826 -- then the effective date of the process
827 --
828 cursor csr_min_spp_date is
829 select min(effective_start_date)
830 from per_spinal_point_placements_f
831 where assignment_id = p_ass_id;
832 --
833 --
834 -- Start of 3335915
835 -- Start of Fix for Bug 2849080
836 --
837 -- Declare Cursor.
838 /*
839 cursor csr_grade_step is
840 select spp.placement_id, spp.object_version_number ,step_id,
841 spp.effective_end_date,spp.effective_start_date
842 from per_spinal_point_placements_f spp
843 where spp.assignment_id = p_ass_id
844 and p_val_st_date between spp.effective_start_date
845 and spp.effective_end_date;
846
847 CURSOR csr_spp_id IS
848 SELECT spp.placement_id , spp.object_version_number,spp.effective_start_date
849 FROM per_spinal_point_placements_f spp
850 WHERE assignment_id = p_ass_id
851 and p_sess_date between spp.effective_start_date
852 and spp.effective_end_date;
853
854 -- Declare Local Variables
855 l_placement_id number;
856 l_object_version_number number;
857 l_step_id number ;
858 l_spp_end_date date ;
859 l_spp_st_date date;
860 l_max_spp_date date ;
861 l_datetrack_mode varchar2(30);
862 l_effective_start_date date;
863 l_effective_end_date date;
864 --
865 -- End of Fix for bug 2849080
866 --
867 */
868 -- End of 3335915
869 ---------------------------------------------------------
870 -- Payroll Object Group functionality - requires call to
871 -- pay_pog_all_assignments_pkg. This is designed to be called from a row
872 -- handler user hook, hence has many parameters that are not available here.
873 -- So a cursor is used to return the values, to pass to the pog procedure.
874 --
875 cur_asg_rec per_asg_shd.g_rec_type;
876 --
877 cursor asg_details(p_asg_id number
878 ,p_eff_date date)
879 is
880 select assignment_id
881 ,effective_start_date
882 ,effective_end_date
883 ,business_group_id
884 ,recruiter_id
885 ,grade_id
886 ,position_id
887 ,job_id
888 ,assignment_status_type_id
889 ,payroll_id
890 ,location_id
891 ,person_referred_by_id
892 ,supervisor_id
893 ,special_ceiling_step_id
894 ,person_id
895 ,recruitment_activity_id
896 ,source_organization_id
897 ,organization_id
898 ,people_group_id
899 ,soft_coding_keyflex_id
900 ,vacancy_id
901 ,pay_basis_id
902 ,assignment_sequence
903 ,assignment_type
904 ,primary_flag
905 ,application_id
906 ,assignment_number
907 ,change_reason
908 ,comment_id
909 ,null
910 ,date_probation_end
911 ,default_code_comb_id
912 ,employment_category
913 ,frequency
914 ,internal_address_line
915 ,manager_flag
916 ,normal_hours
917 ,perf_review_period
918 ,perf_review_period_frequency
919 ,period_of_service_id
920 ,probation_period
921 ,probation_unit
922 ,sal_review_period
923 ,sal_review_period_frequency
924 ,set_of_books_id
925 ,source_type
926 ,time_normal_finish
927 ,time_normal_start
928 ,bargaining_unit_code
929 ,labour_union_member_flag
930 ,hourly_salaried_code
931 ,request_id
932 ,program_application_id
933 ,program_id
934 ,program_update_date
935 ,ass_attribute_category
936 ,ass_attribute1
937 ,ass_attribute2
938 ,ass_attribute3
939 ,ass_attribute4
940 ,ass_attribute5
941 ,ass_attribute6
942 ,ass_attribute7
943 ,ass_attribute8
944 ,ass_attribute9
945 ,ass_attribute10
946 ,ass_attribute11
947 ,ass_attribute12
948 ,ass_attribute13
949 ,ass_attribute14
950 ,ass_attribute15
951 ,ass_attribute16
952 ,ass_attribute17
953 ,ass_attribute18
954 ,ass_attribute19
955 ,ass_attribute20
956 ,ass_attribute21
957 ,ass_attribute22
958 ,ass_attribute23
959 ,ass_attribute24
960 ,ass_attribute25
961 ,ass_attribute26
962 ,ass_attribute27
963 ,ass_attribute28
964 ,ass_attribute29
965 ,ass_attribute30
966 ,title
967 ,object_version_number
968 ,contract_id
969 ,establishment_id
970 ,collective_agreement_id
971 ,cagr_grade_def_id
972 ,cagr_id_flex_num
973 ,notice_period
974 ,notice_period_uom
975 ,employee_category
976 ,work_at_home
977 ,job_post_source_name
978 ,posting_content_id
979 ,period_of_placement_date_start
980 ,vendor_id
981 ,vendor_employee_number
982 ,vendor_assignment_number
983 ,assignment_category
984 ,project_title
985 ,applicant_rank
986 ,grade_ladder_pgm_id
987 ,supervisor_assignment_id
988 ,vendor_site_id
989 ,po_header_id
990 ,po_line_id
991 ,projected_assignment_end
992 from per_all_assignments_f
993 where assignment_id = p_asg_id
994 and p_eff_date between effective_start_date
995 and effective_end_date;
996 --
997 ---------------------------------------------------------
998 --
999 procedure delete_any_pay_proposals(p_ass_id number,
1000 p_ass_end_date date) is
1001 --
1002 -- Private proc to delete any pay proposals which have
1003 -- a change date after the validation start date of the
1004 -- current assignment. It is used for assignments
1005 -- which have just been ended or terminated.
1006 --
1007 begin
1008 --
1009 delete from per_pay_proposals p
1010 where p.assignment_id = P_ASS_ID
1011 and p.change_date > P_ASS_END_DATE;
1012 --
1013 end delete_any_pay_proposals;
1014 --
1015 ---------------------------------------------------------
1016 begin
1017 --
1018 hr_utility.set_location('Entering : '||l_proc,10);
1019 hr_utility.set_location(l_proc||' Update Mode: '||p_upd_mode,11);
1020 hr_utility.set_location(l_proc||' p_sess_date = '||p_sess_date,12);
1021 --
1022 p_warning := null;
1023 --
1024 -- If the assignment was updated to End Assign then value would
1025 -- have been reset at pre-update so validate now against END.
1026 --
1027 if p_was_end_assign = 'Y' then
1028 --
1029 l_per_sys_st := 'END';
1030 --
1031 else
1032 --
1033 l_per_sys_st := p_per_sys_st;
1034 --
1035 end if;
1036 --
1037 hr_utility.trace('Reentry Point is '||to_char(p_re_entry_point));
1038 hr_utility.trace('l_per_sys_st is '||l_per_sys_st);
1039 --
1040 if p_re_entry_point = 1 then
1041 --
1042 goto RE_ENTRY_POINT_1;
1043 --
1044 elsif p_re_entry_point = 2 then
1045 --
1046 goto RE_ENTRY_POINT_2;
1047 --
1048 end if;
1049 --
1050 if p_prim_change_flag = 'Y' then
1051 --
1052 hr_utility.set_location(l_proc,20);
1053 --
1054 iud_update_primary( p_upd_mode,
1055 p_new_prim_flag,
1056 p_val_st_date,
1057 p_new_end_date,
1058 p_eot,
1059 p_pd_os_id,
1060 p_ass_id,
1061 p_new_prim_ass_id,
1062 p_prim_change_flag);
1063 --
1064 end if;
1065 --
1066 hr_utility.set_location(l_proc,30);
1067 --
1068 update_group( p_new_pg_id,
1069 p_group_name,
1070 p_bg_id);
1071 --
1072 hr_utility.set_location(l_proc,40);
1073 --
1074 update_scl(
1075 p_scl_id,
1076 p_scl_concat);
1077 --
1078 if p_upd_mode = 'UPDATE_OVERRIDE' then
1079 --
1080 hr_utility.set_location(l_proc,50);
1081 --
1082 hr_assignment_internal.maintain_spp_asg
1083 (p_assignment_id => p_ass_id
1084 ,p_datetrack_mode => p_upd_mode
1085 ,p_validation_start_date => p_val_st_Date
1086 ,p_validation_end_date => p_val_end_date
1087 ,p_grade_id => p_grd_id
1088 ,p_spp_delete_warning => l_future_spp_warnings);
1089 --
1090 p_future_spp_warning := l_future_spp_warnings;
1091 --
1092 -- Execute the future changes delete cleanup trigger. This is
1093 -- because part of the functionality of the UPDATE_OVERRIDE
1094 -- option is to perform a future changes delete.
1095 --
1096 l_calling_proc := 'POST_UPDATE';
1097 --
1098 future_del_cleanup(
1099 p_ass_id,
1100 p_grd_id,
1101 p_sess_date,
1102 l_calling_proc,
1103 p_val_st_date,
1104 p_val_end_date,
1105 p_upd_mode,
1106 l_dummy_warning);
1107 --
1108 hr_utility.set_location(l_proc,60);
1109 --
1110 --
1111 -- If datetrack mode is not UPDATE_OVERRIDE
1112 --
1113 else
1114 --
1115 -- Check to see if the grade has changed. If so then date
1116 -- effectively delete any spinal point placement records that
1117 -- exist on or after the validation start date. Perform if
1118 -- p_s_grd_id is not null.
1119 -- Note that processing of placements for the update mode of
1120 -- UPDATE_OVERRIDE is handled by the FUTURE_DEL_CLEANUP
1121 -- procedure.
1122 -- Perform a date effective delete on the spinal point
1123 -- placements table for the current assignment, based on the
1124 -- value in VALIDATION_START_DATE. First delete all records
1125 -- starting after the day before this date, then end the
1126 -- current placement record.
1127 --
1128 -- Added code to select the minimum grade step for the new grade
1129 -- so that the future records can be deleted and then the current
1130 -- record end dated and the next record being inserted with
1131 -- the assignment on the minimum step for the grade with the
1132 -- auto increment flag not ticked and without a increment number
1133 --
1134 -- Start of 3335915
1135 /*
1136 -- Start of Fix for Bug 2849080
1137 --
1138 hr_utility.set_location('p_was_end_assign'||p_was_end_assign,2);
1139 hr_utility.set_location('l_per_sys_st '||l_per_sys_st,2);
1140
1141 IF (p_grd_id is not null ) and (p_grd_id = p_s_grd_id) then
1142 -- start of fix for bug 3053428
1143 IF l_per_sys_st = 'END' then
1144
1145 OPEN csr_spp_id;
1146 FETCH csr_spp_id INTO l_placement_id, l_object_version_number,l_spp_end_date;
1147
1148 IF csr_spp_id%found then
1149 IF (l_spp_end_date <> p_sess_date) THEN
1150 hr_sp_placement_api.delete_spp
1151 (p_effective_date => P_sess_date
1152 ,p_datetrack_mode => 'DELETE'
1153 ,p_placement_id => l_placement_id
1154 ,p_object_version_number => l_object_version_number
1155 ,p_effective_start_date => l_effective_start_date
1156 ,p_effective_end_date => l_effective_end_date);
1157 END IF;
1158 END if;
1159
1160 CLOSE csr_spp_id;
1161 -- -- End of fix for bug 3053428
1162 ElSe
1163
1164 hr_utility.set_location('Ass Eff dt matching ',2);
1165
1166 OPEN csr_grade_step;
1167 FETCH csr_grade_step
1168 INTO l_placement_id,l_object_version_number,l_step_id, l_spp_end_date,l_spp_st_date;
1169
1170
1171 IF csr_grade_step%found then
1172 hr_utility.set_location('Record Found ',2);
1173 select max(effective_end_date)
1174 into l_max_spp_date
1175 from per_spinal_point_placements_f
1176 where placement_id = l_placement_id;
1177
1178 hr_utility.set_location('PD: Max SPP End Dt '|| l_max_spp_date,2);
1179 hr_utility.set_location('PD: Current SPP end dt '||l_spp_end_date,2);
1180 hr_utility.set_location('PD: Val Dt '|| p_val_st_date,2);
1181 hr_utility.set_location('PD: Current SPP st dt '||l_spp_st_date,2);
1182
1183 IF (l_spp_st_date = p_val_st_date) THEN
1184 l_datetrack_mode := 'CORRECTION';
1185 ELSIF (l_max_spp_date = l_spp_end_date) THEN
1186 l_datetrack_mode := 'UPDATE';
1187 ELSE
1188 l_datetrack_mode := 'UPDATE_CHANGE_INSERT';
1189 END IF;
1190
1191 hr_utility.set_location('PD: Date Track Mode '||l_datetrack_mode,2);
1192
1193
1194 hr_utility.set_location('Calling upadate_spp from post_update ',2);
1195 hr_utility.set_location('effective_date : '||p_val_st_date,2);
1196 hr_utility.set_location('datetrack_mode : '||l_datetrack_mode,2);
1197 hr_utility.set_location('placement_id : '||l_placement_id ,2);
1198 hr_utility.set_location('OVN : '||l_object_version_number,2);
1199 hr_utility.set_location('Step Id : '||l_step_id,2);
1200 hr_utility.set_location('Effective Start date : '||l_effective_start_date,2);
1201 hr_utility.set_location('Efective end date : '||l_effective_end_date,2);
1202 hr_utility.set_location ('Session Date : '||p_sess_date, 2);
1203
1204
1205 hr_sp_placement_api.update_spp
1206 (p_effective_date => p_val_st_date
1207 ,p_datetrack_mode => l_datetrack_mode
1208 ,p_placement_id => l_placement_id
1209 ,p_object_version_number => l_object_version_number
1210 ,p_step_id => l_step_id
1211 ,p_effective_start_date => l_effective_start_date
1212 ,p_effective_end_date => l_effective_end_date);
1213
1214
1215
1216
1217 hr_utility.set_location('Call to update_SPP finished ',2);
1218
1219 END IF;
1220 CLOSE csr_grade_step;
1221
1222 END IF;
1223 END IF;
1224 --
1225 --End of Fix for bug 2849080
1226 --
1227 */
1228 -- End of 3335915
1229
1230 if (p_s_grd_id <> p_grd_id) or
1231 (p_grd_id is null and p_s_grd_id is not null) then
1232 --
1233 hr_utility.set_location(l_proc||'Grade ID = '||p_grd_id,70);
1234 hr_utility.set_location(l_proc||'Asg ID = '||p_ass_id,71);
1235 hr_utility.set_location(l_proc||'Val Start Date = '||p_val_st_date,72);
1236 --
1237 -- Check that the effective date of the process is not less than the min
1238 -- effective start date for the spp record for the assignment
1239 -- If it is then the process will not be able to update the current step
1240 -- as there is none so raise an error
1241 --
1242 open csr_min_spp_date;
1243 fetch csr_min_spp_date into l_min_start_date;
1244 --
1245 if l_min_start_date > p_val_st_date then
1246 --
1247 fnd_message.set_name('PER', 'HR_289771_SPP_MIN_START_DATE');
1248 hr_utility.raise_error;
1249 --
1250 end if;
1251 --
1252 close csr_min_spp_date;
1253 --
1254 hr_utility.set_location(l_proc,80);
1255 --
1256 hr_assignment_internal.maintain_spp_asg
1257 (p_assignment_id => p_ass_id
1258 ,p_datetrack_mode => p_upd_mode
1259 ,p_validation_start_date => p_val_st_Date
1260 ,p_validation_end_date => p_val_end_date
1261 ,p_grade_id => p_grd_id
1262 ,p_spp_delete_warning => l_future_spp_warnings);
1263 --
1264 end if; -- if p_s_grd_id <> p_grd_id then
1265 --
1266 end if;
1267 --
1268 <<RE_ENTRY_POINT_1>>
1269 --
1270 hr_utility.set_location(l_proc||' RE_ENTRY_POINT_1 ',90);
1271 --
1272 if l_per_sys_st = 'END' then
1273 --
1274 hr_utility.set_location(l_proc,100);
1275 --
1276 -- Date Effectively Delete any of the assignments' children
1277 -- records.
1278 -- The following tables are affected
1279 -- PER_SPINAL_POINT_PLACEMENTS_F
1280 -- Warn the user that any associated spinal point placement
1281 -- records will be deleted and prompt the user to continue.
1282 -- Then DE delete any such records.
1283 --
1284 -- RE_ENTRY_POINT_1 is really further down so need 2nd goto
1285 -- within this IF construct.
1286 --
1287 if p_re_entry_point = 1 then
1288 --
1289 hr_utility.set_location(l_proc,110);
1290 --
1291 goto RE_ENTRY_POINT_1a;
1292 --
1293 end if;
1294 --
1295 l_calling_proc := 'POST_UPDATE';
1296 --
1297 hr_utility.set_location(l_proc,120);
1298 --
1299 hr_assignment.del_ref_int_delete
1300 (p_ass_id,
1301 null,
1302 'END',
1303 p_sess_date,
1304 0,
1305 0,
1306 l_calling_proc,
1307 p_val_st_date,
1308 p_val_end_date,
1309 p_upd_mode,
1310 l_future_spp_warnings);
1311 --
1312 hr_utility.set_location(l_proc,130);
1313 --
1314 p_future_spp_warning := l_future_spp_warnings;
1315 --
1316 -- NB l_cost_Warning is not set in this scenario.
1317 -- It is only used if mode is FUTURE>
1318 --
1319 --
1320 -- Fix for bug 4278579 starts here.
1321 -- Move the proc call down after to the maintain_entries().
1322 --
1323 /*
1324 tidy_up_ref_int
1325 ('END',
1326 p_sess_date,
1327 p_new_end_date,
1328 p_val_end_date,
1329 p_eff_end_date,
1330 p_ass_id,
1331 l_cost_warning);
1332 */
1333 --
1334 -- Fix for bug 4278579 ends here.
1335 --
1336 hr_utility.set_location(l_proc,140);
1337 --
1338 -- Pass null dt delete mode to ensure it is null.
1339 --
1340 hr_utility.set_location(l_proc,150);
1341 --
1342 maintain_entries
1343 (p_upd_mode,
1344 null,
1345 l_per_sys_st,
1346 p_sess_date,
1347 p_val_st_date,
1348 p_val_end_date,
1349 p_new_end_date,
1350 p_ass_id,
1351 p_bg_id,
1352 p_old_pay_id,
1353 p_new_pay_id,
1354 p_old_pg_id, -- Added for Bug#3924690
1355 p_new_pg_id, -- Added for Bug#3924690.
1356 l_raise_warning);
1357 --
1358 --
1359 -- Fix for bug 4278579 starts here.
1360 --
1361 tidy_up_ref_int
1362 ('END',
1363 p_sess_date,
1364 p_new_end_date,
1365 p_val_end_date,
1366 p_eff_end_date,
1367 p_ass_id,
1368 l_cost_warning);
1369 --
1370 -- Fix for bug 4278579 ends here.
1371 --
1372 hr_utility.set_location(l_proc,160);
1373 --
1374 if l_raise_warning in ('Y','S') then
1375 --
1376 hr_utility.set_location(l_proc,170);
1377 --
1378 if l_raise_warning = 'Y' then
1379 --
1380 hr_utility.set_location(l_proc,180);
1381 --
1382 p_warning := 'HR_7016_ASS_ENTRIES_CHANGED';
1383 --
1384 else
1385 --
1386 hr_utility.set_location(l_proc,190);
1387 --
1388 p_warning := 'HR_7442_ASS_SAL_ENT_CHANGED';
1389 --
1390 end if;
1391 --
1392 p_re_entry_point := 1;
1393 return;
1394 --
1395 end if;
1396 --
1397 <<RE_ENTRY_POINT_1a>>
1398 --
1399 hr_utility.set_location(l_proc||' RE_ENTRY_POINT_1a ',200);
1400 --
1401 terminate_entries
1402 (l_per_sys_st,
1403 p_ass_id,
1404 p_sess_date,
1405 p_val_st_date);
1406 --
1407 hr_utility.set_location(l_proc,210);
1408 --
1409 -- Now delete any pay proposals which have a change date
1410 -- after the end of this assignment.
1411 --
1412 delete_any_pay_proposals
1413 (p_ass_id,
1414 p_val_st_date);
1415 --
1416 hr_utility.set_location(l_proc,220);
1417 --
1418 end if; -- if l_per_sys_st = 'END'
1419 --
1420 <<RE_ENTRY_POINT_2>>
1421 --
1422 hr_utility.set_location(l_proc||' RE_ENTRY_POINT2 ',230);
1423 --
1424 if l_per_sys_st <> 'END' then
1425 --
1426 hr_utility.set_location(l_proc,240);
1427 --
1428 -- If UPDATE_OVERRIDE caused TERM_ASSIGNs to be removed this may have
1429 -- caused the END DATE to move.
1430 -- If so, the new_end_date will be NOT NULL.
1431 --
1432 -- RE_ENTRY_POINT_2 is really further down so need 2nd goto
1433 -- within this IF construct.
1434 --
1435 if p_re_entry_point = 2 then
1436 --
1437 hr_utility.set_location(l_proc,250);
1438 --
1439 goto RE_ENTRY_POINT_2a;
1440 --
1441 end if;
1442 --
1443 if p_new_end_date is not null then
1444 --
1445 hr_utility.set_location(l_proc,260);
1446 --
1447 set_end_date(p_new_end_date,
1448 p_ass_id);
1449 --
1450 end if;
1451 --
1452 hr_utility.set_location(l_proc,270);
1453 --
1454 do_cancel_reterm
1455 (p_ass_id,
1456 p_bg_id,
1457 p_cancel_atd,
1458 p_cancel_lspd,
1459 p_reterm_atd,
1460 p_reterm_lspd);
1461 --
1462 hr_utility.set_location(l_proc,280);
1463 --
1464 -- bug 5190394 added if condition
1465 if l_per_sys_st = 'TERM_ASSIGN' and p_val_st_date is not null
1466 and (p_old_per_sys_st = l_per_sys_st) then
1467 null;
1468 else
1469 maintain_entries
1470 (p_upd_mode,
1471 p_del_mode,
1472 l_per_sys_st,
1473 p_sess_date,
1474 p_val_st_date,
1475 p_val_end_date,
1476 p_new_end_date,
1477 p_ass_id,
1478 p_bg_id,
1479 p_old_pay_id,
1480 p_new_pay_id,
1481 p_old_pg_id, -- Added for bug#3924690
1482 p_new_pg_id, -- Added for bug#3924690
1483 l_raise_warning);
1484 --
1485 hr_utility.set_location(l_proc,290);
1486 --
1487 if l_raise_warning in ('Y','S') then
1488 --
1489 hr_utility.set_location(l_proc,300);
1490 --
1491 if l_raise_warning = 'Y' then
1492 --
1493 hr_utility.set_location(l_proc,310);
1494 --
1495 p_warning := 'HR_7016_ASS_ENTRIES_CHANGED';
1496 --
1497 else
1498 --
1499 hr_utility.set_location(l_proc,320);
1500 --
1501 p_warning := 'HR_7442_ASS_SAL_ENT_CHANGED';
1502 --
1503 end if;
1504 --
1505 p_re_entry_point := 2;
1506 return;
1507 --
1508 end if;
1509 end if; -- bug 5190394
1510 --
1511 <<RE_ENTRY_POINT_2a>>
1512 --
1513 hr_utility.set_location(l_proc||' RE_ENTRY_POINT_2a',330);
1514 --
1515 if l_per_sys_st = 'TERM_ASSIGN' and
1516 p_val_st_date is not null then
1517 --
1518 if (p_old_per_sys_st <> l_per_sys_st) -- #2404335
1519 then
1520 --
1521 hr_utility.set_location(l_proc,340);
1522
1523 terminate_entries(l_per_sys_st,
1524 p_ass_id,
1525 p_sess_date,
1526 p_val_st_date);
1527 end if;
1528 --
1529 hr_utility.set_location(l_proc,350);
1530 --
1531 delete_any_pay_proposals(p_ass_id,
1532 p_val_st_date);
1533 --
1534 end if;
1535 --
1536 end if; -- if l_per_sys_st <> 'END'
1537 --
1538 p_re_entry_point := 0;
1539 --
1540 -- Set out parameters
1541 --
1542 p_future_spp_warning := l_future_spp_warnings;
1543 --
1544 -- Payroll Object Group functionality, requires call to
1545 -- pay_pog_all_assignments_pkg. This is designed to be called from a row
1546 -- handler user hook, hence has many parameters that are not available here.
1547 -- So a cursor is used to return the current assignment values, to pass to
1548 -- the pog procedure. The 'old' values were stored in a global record, as
1549 -- part of the pre_update_bundle procedure, ready for use here.
1550 --
1551 hr_utility.set_location(l_proc,355);
1552
1553 OPEN asg_details(p_ass_id, p_sess_date);
1554 FETCH asg_details into cur_asg_rec;
1555 IF asg_details%NOTFOUND THEN
1556 CLOSE asg_details;
1557 hr_utility.trace('no rows for cur_asg_rec');
1558 ELSE
1559 CLOSE asg_details;
1560 END IF;
1561 --
1562
1563 hr_utility.set_location(l_proc,357);
1564
1565 pay_pog_all_assignments_pkg.after_update
1566 (p_effective_date => p_sess_date
1567 ,p_datetrack_mode => p_upd_mode
1568 ,p_validation_start_date => p_val_st_date
1569 ,p_validation_end_date => p_val_end_date
1570 ,P_APPLICANT_RANK => cur_asg_rec.applicant_rank
1571 ,P_APPLICATION_ID => cur_asg_rec.application_id
1572 ,P_ASSIGNMENT_CATEGORY => cur_asg_rec.assignment_category
1573 ,P_ASSIGNMENT_ID => cur_asg_rec.assignment_id
1574 ,P_ASSIGNMENT_NUMBER => cur_asg_rec.assignment_number
1575 ,P_ASSIGNMENT_STATUS_TYPE_ID => cur_asg_rec.assignment_status_type_id
1576 ,P_ASSIGNMENT_TYPE => cur_asg_rec.assignment_type
1577 ,P_ASS_ATTRIBUTE1 => cur_asg_rec.ass_attribute1
1578 ,P_ASS_ATTRIBUTE10 => cur_asg_rec.ass_attribute10
1579 ,P_ASS_ATTRIBUTE11 => cur_asg_rec.ass_attribute11
1580 ,P_ASS_ATTRIBUTE12 => cur_asg_rec.ass_attribute12
1581 ,P_ASS_ATTRIBUTE13 => cur_asg_rec.ass_attribute13
1582 ,P_ASS_ATTRIBUTE14 => cur_asg_rec.ass_attribute14
1583 ,P_ASS_ATTRIBUTE15 => cur_asg_rec.ass_attribute15
1584 ,P_ASS_ATTRIBUTE16 => cur_asg_rec.ass_attribute16
1585 ,P_ASS_ATTRIBUTE17 => cur_asg_rec.ass_attribute17
1586 ,P_ASS_ATTRIBUTE18 => cur_asg_rec.ass_attribute18
1587 ,P_ASS_ATTRIBUTE19 => cur_asg_rec.ass_attribute19
1588 ,P_ASS_ATTRIBUTE2 => cur_asg_rec.ass_attribute2
1589 ,P_ASS_ATTRIBUTE20 => cur_asg_rec.ass_attribute20
1590 ,P_ASS_ATTRIBUTE21 => cur_asg_rec.ass_attribute21
1591 ,P_ASS_ATTRIBUTE22 => cur_asg_rec.ass_attribute22
1592 ,P_ASS_ATTRIBUTE23 => cur_asg_rec.ass_attribute23
1593 ,P_ASS_ATTRIBUTE24 => cur_asg_rec.ass_attribute24
1594 ,P_ASS_ATTRIBUTE25 => cur_asg_rec.ass_attribute25
1595 ,P_ASS_ATTRIBUTE26 => cur_asg_rec.ass_attribute26
1596 ,P_ASS_ATTRIBUTE27 => cur_asg_rec.ass_attribute27
1597 ,P_ASS_ATTRIBUTE28 => cur_asg_rec.ass_attribute28
1598 ,P_ASS_ATTRIBUTE29 => cur_asg_rec.ass_attribute29
1599 ,P_ASS_ATTRIBUTE3 => cur_asg_rec.ass_attribute3
1600 ,P_ASS_ATTRIBUTE30 => cur_asg_rec.ass_attribute30
1601 ,P_ASS_ATTRIBUTE4 => cur_asg_rec.ass_attribute4
1602 ,P_ASS_ATTRIBUTE5 => cur_asg_rec.ass_attribute5
1603 ,P_ASS_ATTRIBUTE6 => cur_asg_rec.ass_attribute6
1604 ,P_ASS_ATTRIBUTE7 => cur_asg_rec.ass_attribute7
1605 ,P_ASS_ATTRIBUTE8 => cur_asg_rec.ass_attribute8
1606 ,P_ASS_ATTRIBUTE9 => cur_asg_rec.ass_attribute9
1607 ,P_ASS_ATTRIBUTE_CATEGORY => cur_asg_rec.ass_attribute_category
1608 ,P_BARGAINING_UNIT_CODE => cur_asg_rec.bargaining_unit_code
1609 ,P_CAGR_GRADE_DEF_ID => cur_asg_rec.cagr_grade_def_id
1610 ,P_CAGR_ID_FLEX_NUM => cur_asg_rec.cagr_id_flex_num
1611 ,P_CHANGE_REASON => cur_asg_rec.change_reason
1612 ,P_COLLECTIVE_AGREEMENT_ID => cur_asg_rec.collective_agreement_id
1613 ,P_COMMENTS => cur_asg_rec.comment_text
1614 ,P_COMMENT_ID => cur_asg_rec.comment_id
1615 ,P_CONTRACT_ID => cur_asg_rec.contract_id
1616 ,P_DATE_PROBATION_END => cur_asg_rec.date_probation_end
1617 ,P_DEFAULT_CODE_COMB_ID => cur_asg_rec.default_code_comb_id
1618 ,P_EFFECTIVE_END_DATE => cur_asg_rec.effective_end_date
1619 ,P_EFFECTIVE_START_DATE => cur_asg_rec.effective_start_date
1620 ,P_EMPLOYEE_CATEGORY => cur_asg_rec.employee_category
1621 ,P_EMPLOYMENT_CATEGORY => cur_asg_rec.employment_category
1622 ,P_ESTABLISHMENT_ID => cur_asg_rec.establishment_id
1623 ,P_FREQUENCY => cur_asg_rec.frequency
1624 ,P_GRADE_ID => cur_asg_rec.grade_id
1625 ,P_HOURLY_SALARIED_CODE => cur_asg_rec.hourly_salaried_code
1626 ,P_HOURLY_SALARIED_WARNING => null
1627 ,P_INTERNAL_ADDRESS_LINE => cur_asg_rec.internal_address_line
1628 ,P_JOB_ID => cur_asg_rec.job_id
1629 ,P_JOB_POST_SOURCE_NAME => cur_asg_rec.job_post_source_name
1630 ,P_LABOUR_UNION_MEMBER_FLAG => cur_asg_rec.labour_union_member_flag
1631 ,P_LOCATION_ID => cur_asg_rec.location_id
1632 ,P_MANAGER_FLAG => cur_asg_rec.manager_flag
1633 ,P_NORMAL_HOURS => cur_asg_rec.normal_hours
1634 ,P_NOTICE_PERIOD => cur_asg_rec.notice_period
1635 ,P_NOTICE_PERIOD_UOM => cur_asg_rec.notice_period_uom
1636 ,P_NO_MANAGERS_WARNING => null
1637 ,P_OBJECT_VERSION_NUMBER => cur_asg_rec.object_version_number
1638 ,P_ORGANIZATION_ID => cur_asg_rec.organization_id
1639 ,P_ORG_NOW_NO_MANAGER_WARNING => null
1640 ,P_OTHER_MANAGER_WARNING => null
1641 ,P_PAYROLL_ID => cur_asg_rec.payroll_id
1642 ,P_PAYROLL_ID_UPDATED => null
1643 ,P_PAY_BASIS_ID => cur_asg_rec.pay_basis_id
1644 ,P_PEOPLE_GROUP_ID => cur_asg_rec.people_group_id
1645 ,P_PERF_REVIEW_PERIOD => cur_asg_rec.perf_review_period
1646 ,P_PERF_REVIEW_PERIOD_FREQUEN => cur_asg_rec.perf_review_period_frequency
1647 ,P_PERIOD_OF_SERVICE_ID => cur_asg_rec.period_of_service_id
1648 ,P_PERSON_REFERRED_BY_ID => cur_asg_rec.person_referred_by_id
1649 ,P_PLACEMENT_DATE_START => cur_asg_rec.period_of_placement_date_start
1650 ,P_POSITION_ID => cur_asg_rec.position_id
1651 ,P_POSTING_CONTENT_ID => cur_asg_rec.posting_content_id
1652 ,P_PRIMARY_FLAG => cur_asg_rec.primary_flag
1653 ,P_PROBATION_PERIOD => cur_asg_rec.probation_period
1654 ,P_PROBATION_UNIT => cur_asg_rec.probation_unit
1655 ,P_PROGRAM_APPLICATION_ID => cur_asg_rec.program_application_id
1656 ,P_PROGRAM_ID => cur_asg_rec.program_id
1657 ,P_PROGRAM_UPDATE_DATE => cur_asg_rec.program_update_date
1658 ,P_PROJECT_TITLE => cur_asg_rec.project_title
1659 ,P_RECRUITER_ID => cur_asg_rec.recruiter_id
1660 ,P_RECRUITMENT_ACTIVITY_ID => cur_asg_rec.recruitment_activity_id
1661 ,P_REQUEST_ID => cur_asg_rec.request_id
1662 ,P_SAL_REVIEW_PERIOD => cur_asg_rec.sal_review_period
1663 ,P_SAL_REVIEW_PERIOD_FREQUEN => cur_asg_rec.sal_review_period_frequency
1664 ,P_SET_OF_BOOKS_ID => cur_asg_rec.set_of_books_id
1665 ,P_SOFT_CODING_KEYFLEX_ID => cur_asg_rec.soft_coding_keyflex_id
1666 ,P_SOURCE_ORGANIZATION_ID => cur_asg_rec.source_organization_id
1667 ,P_SOURCE_TYPE => cur_asg_rec.source_type
1668 ,P_SPECIAL_CEILING_STEP_ID => cur_asg_rec.special_ceiling_step_id
1669 ,P_SUPERVISOR_ID => cur_asg_rec.supervisor_id
1670 ,P_TIME_NORMAL_FINISH => cur_asg_rec.time_normal_finish
1671 ,P_TIME_NORMAL_START => cur_asg_rec.time_normal_start
1672 ,P_TITLE => cur_asg_rec.title
1673 ,P_VACANCY_ID => cur_asg_rec.vacancy_id
1674 ,P_VENDOR_ASSIGNMENT_NUMBER => cur_asg_rec.vendor_assignment_number
1675 ,P_VENDOR_EMPLOYEE_NUMBER => cur_asg_rec.vendor_employee_number
1676 ,P_VENDOR_ID => cur_asg_rec.vendor_id
1677 ,P_WORK_AT_HOME => cur_asg_rec.work_at_home
1678 ,P_GRADE_LADDER_PGM_ID => cur_asg_rec.grade_ladder_pgm_id
1679 ,P_SUPERVISOR_ASSIGNMENT_ID => cur_asg_rec.supervisor_assignment_id
1680 ,P_VENDOR_SITE_ID => cur_asg_rec.vendor_site_id
1681 ,P_PO_HEADER_ID => cur_asg_rec.po_header_id
1682 ,P_PO_LINE_ID => cur_asg_rec.po_line_id
1683 ,P_PROJECTED_ASSIGNMENT_END => cur_asg_rec.projected_assignment_end
1684 ,P_APPLICANT_RANK_O
1685 => per_assignments_f2_pkg.g_old_asg_rec.applicant_rank
1686 ,P_APPLICATION_ID_O
1687 => per_assignments_f2_pkg.g_old_asg_rec.application_id
1688 ,P_ASSIGNMENT_CATEGORY_O
1689 => per_assignments_f2_pkg.g_old_asg_rec.assignment_category
1690 ,P_ASSIGNMENT_NUMBER_O
1691 => per_assignments_f2_pkg.g_old_asg_rec.assignment_number
1692 ,P_ASSIGNMENT_SEQUENCE_O
1693 => per_assignments_f2_pkg.g_old_asg_rec.assignment_sequence
1694 ,P_ASSIGNMENT_STATUS_TYPE_ID_O
1695 => per_assignments_f2_pkg.g_old_asg_rec.assignment_status_type_id
1696 ,P_ASSIGNMENT_TYPE_O
1697 => per_assignments_f2_pkg.g_old_asg_rec.assignment_type
1698 ,P_ASS_ATTRIBUTE1_O
1699 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute1
1700 ,P_ASS_ATTRIBUTE10_O
1701 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute10
1702 ,P_ASS_ATTRIBUTE11_O
1703 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute11
1704 ,P_ASS_ATTRIBUTE12_O
1705 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute12
1706 ,P_ASS_ATTRIBUTE13_O
1707 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute13
1708 ,P_ASS_ATTRIBUTE14_O
1709 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute14
1710 ,P_ASS_ATTRIBUTE15_O
1711 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute15
1712 ,P_ASS_ATTRIBUTE16_O
1713 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute16
1714 ,P_ASS_ATTRIBUTE17_O
1715 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute17
1716 ,P_ASS_ATTRIBUTE18_O
1717 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute18
1718 ,P_ASS_ATTRIBUTE19_O
1719 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute19
1720 ,P_ASS_ATTRIBUTE2_O
1721 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute2
1722 ,P_ASS_ATTRIBUTE20_O
1723 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute20
1724 ,P_ASS_ATTRIBUTE21_O
1725 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute21
1726 ,P_ASS_ATTRIBUTE22_O
1727 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute22
1728 ,P_ASS_ATTRIBUTE23_O
1729 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute23
1730 ,P_ASS_ATTRIBUTE24_O
1731 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute24
1732 ,P_ASS_ATTRIBUTE25_O
1733 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute25
1734 ,P_ASS_ATTRIBUTE26_O
1735 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute26
1736 ,P_ASS_ATTRIBUTE27_O
1737 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute27
1738 ,P_ASS_ATTRIBUTE28_O
1739 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute28
1740 ,P_ASS_ATTRIBUTE29_O
1741 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute29
1742 ,P_ASS_ATTRIBUTE3_O
1743 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute3
1744 ,P_ASS_ATTRIBUTE30_O
1745 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute30
1746 ,P_ASS_ATTRIBUTE4_O
1747 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute4
1748 ,P_ASS_ATTRIBUTE5_O
1749 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute5
1750 ,P_ASS_ATTRIBUTE6_O
1751 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute6
1752 ,P_ASS_ATTRIBUTE7_O
1753 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute7
1754 ,P_ASS_ATTRIBUTE8_O
1755 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute8
1756 ,P_ASS_ATTRIBUTE9_O
1757 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute9
1758 ,P_ASS_ATTRIBUTE_CATEGORY_O
1759 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute_category
1760 ,P_BARGAINING_UNIT_CODE_O
1761 => per_assignments_f2_pkg.g_old_asg_rec.bargaining_unit_code
1762 ,P_BUSINESS_GROUP_ID_O
1763 => per_assignments_f2_pkg.g_old_asg_rec.business_group_id
1764 ,P_CAGR_GRADE_DEF_ID_O
1765 => per_assignments_f2_pkg.g_old_asg_rec.cagr_grade_def_id
1766 ,P_CAGR_ID_FLEX_NUM_O
1767 => per_assignments_f2_pkg.g_old_asg_rec.cagr_id_flex_num
1768 ,P_CHANGE_REASON_O
1769 => per_assignments_f2_pkg.g_old_asg_rec.change_reason
1770 ,P_COLLECTIVE_AGREEMENT_ID_O
1771 => per_assignments_f2_pkg.g_old_asg_rec.collective_agreement_id
1772 ,P_COMMENT_ID_O
1773 => per_assignments_f2_pkg.g_old_asg_rec.comment_id
1774 ,P_CONTRACT_ID_O
1775 => per_assignments_f2_pkg.g_old_asg_rec.contract_id
1776 ,P_DATE_PROBATION_END_O
1777 => per_assignments_f2_pkg.g_old_asg_rec.date_probation_end
1778 ,P_DEFAULT_CODE_COMB_ID_O
1779 => per_assignments_f2_pkg.g_old_asg_rec.default_code_comb_id
1780 ,P_EFFECTIVE_END_DATE_O
1781 => per_assignments_f2_pkg.g_old_asg_rec.effective_end_date
1782 ,P_EFFECTIVE_START_DATE_O
1783 => per_assignments_f2_pkg.g_old_asg_rec.effective_start_date
1784 ,P_EMPLOYEE_CATEGORY_O
1785 => per_assignments_f2_pkg.g_old_asg_rec.employee_category
1786 ,P_EMPLOYMENT_CATEGORY_O
1787 => per_assignments_f2_pkg.g_old_asg_rec.employment_category
1788 ,P_ESTABLISHMENT_ID_O
1789 => per_assignments_f2_pkg.g_old_asg_rec.establishment_id
1790 ,P_FREQUENCY_O
1791 => per_assignments_f2_pkg.g_old_asg_rec.frequency
1792 ,P_GRADE_ID_O
1793 => per_assignments_f2_pkg.g_old_asg_rec.grade_id
1794 ,P_HOURLY_SALARIED_CODE_O
1795 => per_assignments_f2_pkg.g_old_asg_rec.hourly_salaried_code
1796 ,P_INTERNAL_ADDRESS_LINE_O
1797 => per_assignments_f2_pkg.g_old_asg_rec.internal_address_line
1798 ,P_JOB_ID_O
1799 => per_assignments_f2_pkg.g_old_asg_rec.job_id
1800 ,P_JOB_POST_SOURCE_NAME_O
1801 => per_assignments_f2_pkg.g_old_asg_rec.job_post_source_name
1802 ,P_LABOUR_UNION_MEMBER_FLAG_O
1803 => per_assignments_f2_pkg.g_old_asg_rec.labour_union_member_flag
1804 ,P_LOCATION_ID_O
1805 => per_assignments_f2_pkg.g_old_asg_rec.location_id
1806 ,P_MANAGER_FLAG_O
1807 => per_assignments_f2_pkg.g_old_asg_rec.manager_flag
1808 ,P_NORMAL_HOURS_O
1809 => per_assignments_f2_pkg.g_old_asg_rec.normal_hours
1810 ,P_NOTICE_PERIOD_O
1811 => per_assignments_f2_pkg.g_old_asg_rec.notice_period
1812 ,P_NOTICE_PERIOD_UOM_O
1813 => per_assignments_f2_pkg.g_old_asg_rec.notice_period_uom
1814 ,P_OBJECT_VERSION_NUMBER_O
1815 => per_assignments_f2_pkg.g_old_asg_rec.object_version_number
1816 ,P_ORGANIZATION_ID_O
1817 => per_assignments_f2_pkg.g_old_asg_rec.organization_id
1818 ,P_PAYROLL_ID_O
1819 => per_assignments_f2_pkg.g_old_asg_rec.payroll_id
1820 ,P_PAY_BASIS_ID_O
1821 => per_assignments_f2_pkg.g_old_asg_rec.pay_basis_id
1822 ,P_PEOPLE_GROUP_ID_O
1823 => per_assignments_f2_pkg.g_old_asg_rec.people_group_id
1824 ,P_PERF_REVIEW_PERIOD_O
1825 => per_assignments_f2_pkg.g_old_asg_rec.perf_review_period
1826 ,P_PERF_REVIEW_PERIOD_FREQUEN_O
1827 => per_assignments_f2_pkg.g_old_asg_rec.perf_review_period_frequency
1828 ,P_PERIOD_OF_SERVICE_ID_O
1829 => per_assignments_f2_pkg.g_old_asg_rec.period_of_service_id
1830 ,P_PERSON_ID_O
1831 => per_assignments_f2_pkg.g_old_asg_rec.person_id
1832 ,P_PERSON_REFERRED_BY_ID_O
1833 => per_assignments_f2_pkg.g_old_asg_rec.person_referred_by_id
1834 ,P_PLACEMENT_DATE_START_O
1835 => per_assignments_f2_pkg.g_old_asg_rec.period_of_placement_date_start
1836 ,P_POSITION_ID_O
1837 => per_assignments_f2_pkg.g_old_asg_rec.position_id
1838 ,P_POSTING_CONTENT_ID_O
1839 => per_assignments_f2_pkg.g_old_asg_rec.posting_content_id
1840 ,P_PRIMARY_FLAG_O
1841 => per_assignments_f2_pkg.g_old_asg_rec.primary_flag
1842 ,P_PROBATION_PERIOD_O
1843 => per_assignments_f2_pkg.g_old_asg_rec.probation_period
1844 ,P_PROBATION_UNIT_O
1845 => per_assignments_f2_pkg.g_old_asg_rec.probation_unit
1846 ,P_PROGRAM_APPLICATION_ID_O
1847 => per_assignments_f2_pkg.g_old_asg_rec.program_application_id
1848 ,P_PROGRAM_ID_O
1849 => per_assignments_f2_pkg.g_old_asg_rec.program_id
1850 ,P_PROGRAM_UPDATE_DATE_O
1851 => per_assignments_f2_pkg.g_old_asg_rec.program_update_date
1852 ,P_PROJECT_TITLE_O
1853 => per_assignments_f2_pkg.g_old_asg_rec.project_title
1854 ,P_RECRUITER_ID_O
1855 => per_assignments_f2_pkg.g_old_asg_rec.recruiter_id
1856 ,P_RECRUITMENT_ACTIVITY_ID_O
1857 => per_assignments_f2_pkg.g_old_asg_rec.recruitment_activity_id
1858 ,P_REQUEST_ID_O
1859 => per_assignments_f2_pkg.g_old_asg_rec.request_id
1860 ,P_SAL_REVIEW_PERIOD_O
1861 => per_assignments_f2_pkg.g_old_asg_rec.sal_review_period
1862 ,P_SAL_REVIEW_PERIOD_FREQUEN_O
1863 => per_assignments_f2_pkg.g_old_asg_rec.sal_review_period_frequency
1864 ,P_SET_OF_BOOKS_ID_O
1865 => per_assignments_f2_pkg.g_old_asg_rec.set_of_books_id
1866 ,P_SOFT_CODING_KEYFLEX_ID_O
1867 => per_assignments_f2_pkg.g_old_asg_rec.soft_coding_keyflex_id
1868 ,P_SOURCE_ORGANIZATION_ID_O
1869 => per_assignments_f2_pkg.g_old_asg_rec.source_organization_id
1870 ,P_SOURCE_TYPE_O
1871 => per_assignments_f2_pkg.g_old_asg_rec.source_type
1872 ,P_SPECIAL_CEILING_STEP_ID_O
1873 => per_assignments_f2_pkg.g_old_asg_rec.special_ceiling_step_id
1874 ,P_SUPERVISOR_ID_O
1875 => per_assignments_f2_pkg.g_old_asg_rec.supervisor_id
1876 ,P_TIME_NORMAL_FINISH_O
1877 => per_assignments_f2_pkg.g_old_asg_rec.time_normal_finish
1878 ,P_TIME_NORMAL_START_O
1879 => per_assignments_f2_pkg.g_old_asg_rec.time_normal_start
1880 ,P_TITLE_O
1881 => per_assignments_f2_pkg.g_old_asg_rec.title
1882 ,P_VACANCY_ID_O
1883 => per_assignments_f2_pkg.g_old_asg_rec.vacancy_id
1884 ,P_VENDOR_ASSIGNMENT_NUMBER_O
1885 => per_assignments_f2_pkg.g_old_asg_rec.vendor_assignment_number
1886 ,P_VENDOR_EMPLOYEE_NUMBER_O
1887 => per_assignments_f2_pkg.g_old_asg_rec.vendor_employee_number
1888 ,P_VENDOR_ID_O
1889 => per_assignments_f2_pkg.g_old_asg_rec.vendor_id
1890 ,P_WORK_AT_HOME_O
1891 => per_assignments_f2_pkg.g_old_asg_rec.work_at_home
1892 ,P_GRADE_LADDER_PGM_ID_O
1893 => per_assignments_f2_pkg.g_old_asg_rec.grade_ladder_pgm_id
1894 ,P_SUPERVISOR_ASSIGNMENT_ID_O
1895 => per_assignments_f2_pkg.g_old_asg_rec.supervisor_assignment_id
1896 ,P_VENDOR_SITE_ID_O
1897 => per_assignments_f2_pkg.g_old_asg_rec.vendor_site_id
1898 ,P_PO_HEADER_ID_O
1899 => per_assignments_f2_pkg.g_old_asg_rec.po_header_id
1900 ,P_PO_LINE_ID_O
1901 => per_assignments_f2_pkg.g_old_asg_rec.po_line_id
1902 ,P_PROJECTED_ASSIGNMENT_END_O
1903 => per_assignments_f2_pkg.g_old_asg_rec.projected_assignment_end
1904 );
1905 --
1906 hr_utility.set_location('Leaving : '||l_proc,999);
1907 --
1908 end post_update;
1909 -----------------------------------------------------------------------------
1910 procedure post_insert(
1911 p_prim_change_flag IN OUT NOCOPY varchar2,
1912 p_val_st_date date,
1913 p_new_end_date date,
1914 p_eot date,
1915 p_pd_os_id number,
1916 p_ass_id number,
1917 p_new_prim_ass_id IN OUT NOCOPY number,
1918 p_pg_id number,
1919 p_group_name varchar2,
1920 p_bg_id number,
1921 p_dt_upd_mode varchar2,
1922 p_dt_del_mode varchar2,
1923 p_per_sys_st varchar2,
1924 p_sess_date date,
1925 p_val_end_date date,
1926 p_new_pay_id number,
1927 p_old_pay_id number,
1928 p_scl_id number,
1929 p_scl_concat varchar2,
1930 p_warning IN OUT NOCOPY varchar2) is
1931 --
1932 l_raise_warning varchar2(1);
1933 --
1934 -- Payroll Object Group (POG) functionality.
1935 --
1936 ins_asg_rec per_asg_shd.g_rec_type;
1937 --
1938 cursor asg_details(p_asg_id number
1939 ,p_eff_date date)
1940 is
1941 select assignment_id
1942 ,effective_start_date
1943 ,effective_end_date
1944 ,business_group_id
1945 ,recruiter_id
1946 ,grade_id
1947 ,position_id
1948 ,job_id
1949 ,assignment_status_type_id
1950 ,payroll_id
1951 ,location_id
1952 ,person_referred_by_id
1953 ,supervisor_id
1954 ,special_ceiling_step_id
1955 ,person_id
1956 ,recruitment_activity_id
1957 ,source_organization_id
1958 ,organization_id
1959 ,people_group_id
1960 ,soft_coding_keyflex_id
1961 ,vacancy_id
1962 ,pay_basis_id
1963 ,assignment_sequence
1964 ,assignment_type
1965 ,primary_flag
1966 ,application_id
1967 ,assignment_number
1968 ,change_reason
1969 ,comment_id
1970 ,null
1971 ,date_probation_end
1972 ,default_code_comb_id
1973 ,employment_category
1974 ,frequency
1975 ,internal_address_line
1976 ,manager_flag
1977 ,normal_hours
1978 ,perf_review_period
1979 ,perf_review_period_frequency
1980 ,period_of_service_id
1981 ,probation_period
1982 ,probation_unit
1983 ,sal_review_period
1984 ,sal_review_period_frequency
1985 ,set_of_books_id
1986 ,source_type
1987 ,time_normal_finish
1988 ,time_normal_start
1989 ,bargaining_unit_code
1990 ,labour_union_member_flag
1991 ,hourly_salaried_code
1992 ,request_id
1993 ,program_application_id
1994 ,program_id
1995 ,program_update_date
1996 ,ass_attribute_category
1997 ,ass_attribute1
1998 ,ass_attribute2
1999 ,ass_attribute3
2000 ,ass_attribute4
2001 ,ass_attribute5
2002 ,ass_attribute6
2003 ,ass_attribute7
2004 ,ass_attribute8
2005 ,ass_attribute9
2006 ,ass_attribute10
2007 ,ass_attribute11
2008 ,ass_attribute12
2009 ,ass_attribute13
2010 ,ass_attribute14
2011 ,ass_attribute15
2012 ,ass_attribute16
2013 ,ass_attribute17
2014 ,ass_attribute18
2015 ,ass_attribute19
2016 ,ass_attribute20
2017 ,ass_attribute21
2018 ,ass_attribute22
2019 ,ass_attribute23
2020 ,ass_attribute24
2021 ,ass_attribute25
2022 ,ass_attribute26
2023 ,ass_attribute27
2024 ,ass_attribute28
2025 ,ass_attribute29
2026 ,ass_attribute30
2027 ,title
2028 ,object_version_number
2029 ,contract_id
2030 ,establishment_id
2031 ,collective_agreement_id
2032 ,cagr_grade_def_id
2033 ,cagr_id_flex_num
2034 ,notice_period
2035 ,notice_period_uom
2036 ,employee_category
2037 ,work_at_home
2038 ,job_post_source_name
2039 ,posting_content_id
2040 ,period_of_placement_date_start
2041 ,vendor_id
2042 ,vendor_employee_number
2043 ,vendor_assignment_number
2044 ,assignment_category
2045 ,project_title
2046 ,applicant_rank
2047 ,grade_ladder_pgm_id
2048 ,supervisor_assignment_id
2049 ,vendor_site_id
2050 ,po_header_id
2051 ,po_line_id
2052 ,projected_assignment_end
2053 from per_all_assignments_f
2054 where assignment_id = p_asg_id
2055 and p_eff_date between effective_start_date
2056 and effective_end_date;
2057 --
2058 l_vsd date;
2059 l_ved date;
2060 --
2061 l_proc varchar2(11) := 'post_insert';
2062 --
2063 begin
2064 g_debug := hr_utility.debug_enabled; -- get debug status
2065 IF g_debug THEN
2066 hr_utility.set_location('Entering: '|| g_package || l_proc, 5);
2067 END IF;
2068
2069 if p_prim_change_flag = 'Y' then
2070 --
2071 -- Perform primary flag validation / processing.
2072 --
2073 iud_update_primary(
2074 'INSERT',
2075 'Y',
2076 p_val_st_date,
2077 p_new_end_date,
2078 p_eot,
2079 p_pd_os_id,
2080 p_ass_id,
2081 p_new_prim_ass_id,
2082 p_prim_change_flag);
2083 --
2084 -- NB The above proc may have changed the last 2 parameters.
2085 --
2086 end if;
2087 --
2088 IF g_debug THEN
2089 hr_utility.set_location( g_package || l_proc, 10);
2090 END IF;
2091 update_group(
2092 p_pg_id,
2093 p_group_name,
2094 p_bg_id);
2095 --
2096 IF g_debug THEN
2097 hr_utility.set_location( g_package || l_proc, 20);
2098 END IF;
2099 update_scl(
2100 p_scl_id,
2101 p_scl_concat);
2102 --
2103 -- Now insert assignment budget values from the defaults for this
2104 -- bg.
2105 -- NB to_char(0)'s are last_updated_by and last_update_login which
2106 -- are varchar2 parameters in load_budget_values.
2107 --
2108 IF g_debug THEN
2109 hr_utility.set_location( g_package || l_proc, 30);
2110 END IF;
2111 hr_assignment.load_budget_values(
2112 p_ass_id,
2113 p_bg_id,
2114 to_char(0),
2115 to_char(0),
2116 p_val_st_date,
2117 p_eot);
2118 --
2119 -- To load default assignment cost allocations
2120 --
2121 IF g_debug THEN
2122 hr_utility.set_location( g_package || l_proc, 40);
2123 END IF;
2124 declare
2125 l_position_id number;
2126 --
2127 cursor c_position is
2128 select position_id
2129 from per_all_assignments
2130 where assignment_id = p_ass_id;
2131 begin
2132 --
2133 open c_position;
2134 fetch c_position into l_position_id;
2135 close c_position;
2136 --
2137 IF g_debug THEN
2138 hr_utility.set_location( g_package || l_proc, 45);
2139 END IF;
2140 hr_assignment.load_assignment_allocation
2141 (p_assignment_id => p_ass_id
2142 ,p_business_group_id => p_bg_id
2143 ,p_effective_date =>p_val_st_date
2144 ,p_position_id => l_position_id);
2145 end;
2146 --
2147 -- Insert element entries for new assignment, 1st 2 parameters are
2148 -- dt update and delete modes - ensure these are null.
2149 --
2150 IF g_debug THEN
2151 hr_utility.set_location( g_package || l_proc, 50);
2152 END IF;
2153 maintain_entries(
2154 null,
2155 null,
2156 p_per_sys_st,
2157 p_sess_date,
2158 p_val_st_date,
2159 p_val_end_date,
2160 p_new_end_date,
2161 p_ass_id,
2162 p_bg_id,
2163 p_old_pay_id,
2164 p_new_pay_id,
2165 null, -- p_old_pg_id. Added for bug#3924690.
2166 null, -- p_new_pg_id. Added for bug#3924690.
2167 l_raise_warning);
2168 --
2169 if l_raise_warning in ('Y','S') then
2170 if l_raise_warning = 'Y' then
2171 p_warning := 'HR_7016_ASS_ENTRIES_CHANGED';
2172 else
2173 p_warning := 'HR_7442_ASS_SAL_ENT_CHANGED';
2174 end if;
2175 --
2176 end if;
2177 --
2178 -- Payroll Object Group functionality, requires call to
2179 -- pay_pog_all_assignments_pkg. This is designed to be called from a row
2180 -- handler user hook, hence has many parameters that are not available here.
2181 -- So a cursor is used to return the values, to pass to the pog procedure.
2182 --
2183 IF g_debug THEN
2184 hr_utility.set_location( g_package || l_proc, 60);
2185 END IF;
2186 OPEN asg_details(p_ass_id, p_sess_date);
2187 FETCH asg_details into ins_asg_rec;
2188 IF asg_details%NOTFOUND THEN
2189 CLOSE asg_details;
2190 hr_utility.trace('no rows for asg_details');
2191 ELSE
2192 CLOSE asg_details;
2193 END IF;
2194 --
2195 IF g_debug THEN
2196 hr_utility.set_location( g_package || l_proc, 70);
2197 END IF;
2198 dt_api.validate_dt_mode
2199 (p_effective_date => p_sess_date
2200 ,p_datetrack_mode => 'INSERT'
2201 ,p_base_table_name => 'per_all_assignments_f'
2202 ,p_base_key_column => 'assignment_id'
2203 ,p_base_key_value => p_ass_id
2204 ,p_validation_start_date => l_vsd
2205 ,p_validation_end_date => l_ved
2206 );
2207 --
2208 IF g_debug THEN
2209 hr_utility.set_location( g_package || l_proc, 80);
2210 END IF;
2211
2212 pay_pog_all_assignments_pkg.after_insert
2213 (p_effective_date => p_sess_date
2214 ,p_validation_start_date => l_vsd
2215 ,p_validation_end_date => l_ved
2216 ,P_APPLICANT_RANK => ins_asg_rec.applicant_rank
2217 ,P_APPLICATION_ID => ins_asg_rec.program_application_id
2218 ,P_ASSIGNMENT_CATEGORY => ins_asg_rec.assignment_category
2219 ,P_ASSIGNMENT_ID => ins_asg_rec.assignment_id
2220 ,P_ASSIGNMENT_NUMBER => ins_asg_rec.assignment_number
2221 ,P_ASSIGNMENT_SEQUENCE => ins_asg_rec.assignment_sequence
2222 ,P_ASSIGNMENT_STATUS_TYPE_ID => ins_asg_rec.assignment_status_type_id
2223 ,P_ASSIGNMENT_TYPE => ins_asg_rec.assignment_type
2224 ,P_ASS_ATTRIBUTE1 => ins_asg_rec.ass_attribute1
2225 ,P_ASS_ATTRIBUTE10 => ins_asg_rec.ass_attribute10
2226 ,P_ASS_ATTRIBUTE11 => ins_asg_rec.ass_attribute11
2227 ,P_ASS_ATTRIBUTE12 => ins_asg_rec.ass_attribute12
2228 ,P_ASS_ATTRIBUTE13 => ins_asg_rec.ass_attribute13
2229 ,P_ASS_ATTRIBUTE14 => ins_asg_rec.ass_attribute14
2230 ,P_ASS_ATTRIBUTE15 => ins_asg_rec.ass_attribute15
2231 ,P_ASS_ATTRIBUTE16 => ins_asg_rec.ass_attribute16
2232 ,P_ASS_ATTRIBUTE17 => ins_asg_rec.ass_attribute17
2233 ,P_ASS_ATTRIBUTE18 => ins_asg_rec.ass_attribute18
2234 ,P_ASS_ATTRIBUTE19 => ins_asg_rec.ass_attribute19
2235 ,P_ASS_ATTRIBUTE2 => ins_asg_rec.ass_attribute2
2236 ,P_ASS_ATTRIBUTE20 => ins_asg_rec.ass_attribute20
2237 ,P_ASS_ATTRIBUTE21 => ins_asg_rec.ass_attribute21
2238 ,P_ASS_ATTRIBUTE22 => ins_asg_rec.ass_attribute22
2239 ,P_ASS_ATTRIBUTE23 => ins_asg_rec.ass_attribute23
2240 ,P_ASS_ATTRIBUTE24 => ins_asg_rec.ass_attribute24
2241 ,P_ASS_ATTRIBUTE25 => ins_asg_rec.ass_attribute25
2242 ,P_ASS_ATTRIBUTE26 => ins_asg_rec.ass_attribute26
2243 ,P_ASS_ATTRIBUTE27 => ins_asg_rec.ass_attribute27
2244 ,P_ASS_ATTRIBUTE28 => ins_asg_rec.ass_attribute28
2245 ,P_ASS_ATTRIBUTE29 => ins_asg_rec.ass_attribute29
2246 ,P_ASS_ATTRIBUTE3 => ins_asg_rec.ass_attribute3
2247 ,P_ASS_ATTRIBUTE30 => ins_asg_rec.ass_attribute30
2248 ,P_ASS_ATTRIBUTE4 => ins_asg_rec.ass_attribute4
2249 ,P_ASS_ATTRIBUTE5 => ins_asg_rec.ass_attribute5
2250 ,P_ASS_ATTRIBUTE6 => ins_asg_rec.ass_attribute6
2251 ,P_ASS_ATTRIBUTE7 => ins_asg_rec.ass_attribute7
2252 ,P_ASS_ATTRIBUTE8 => ins_asg_rec.ass_attribute8
2253 ,P_ASS_ATTRIBUTE9 => ins_asg_rec.ass_attribute9
2254 ,P_ASS_ATTRIBUTE_CATEGORY => ins_asg_rec.ass_attribute_category
2255 ,P_BARGAINING_UNIT_CODE => ins_asg_rec.bargaining_unit_code
2256 ,P_BUSINESS_GROUP_ID => ins_asg_rec.business_group_id
2257 ,P_CAGR_GRADE_DEF_ID => ins_asg_rec.cagr_grade_def_id
2258 ,P_CAGR_ID_FLEX_NUM => ins_asg_rec.cagr_id_flex_num
2259 ,P_CHANGE_REASON => ins_asg_rec.change_reason
2260 ,P_COLLECTIVE_AGREEMENT_ID => ins_asg_rec.collective_agreement_id
2261 ,P_COMMENT_ID => ins_asg_rec.comment_id
2262 ,P_CONTRACT_ID => ins_asg_rec.contract_id
2263 ,P_DATE_PROBATION_END => ins_asg_rec.date_probation_end
2264 ,P_DEFAULT_CODE_COMB_ID => ins_asg_rec.default_code_comb_id
2265 ,P_EFFECTIVE_END_DATE => ins_asg_rec.effective_end_date
2266 ,P_EFFECTIVE_START_DATE => ins_asg_rec.effective_start_date
2267 ,P_EMPLOYEE_CATEGORY => ins_asg_rec.employee_category
2268 ,P_EMPLOYMENT_CATEGORY => ins_asg_rec.employment_category
2269 ,P_ESTABLISHMENT_ID => ins_asg_rec.establishment_id
2270 ,P_FREQUENCY => ins_asg_rec.frequency
2271 ,P_GRADE_ID => ins_asg_rec.grade_id
2272 ,P_HOURLY_SALARIED_CODE => ins_asg_rec.hourly_salaried_code
2273 ,P_INTERNAL_ADDRESS_LINE => ins_asg_rec.internal_address_line
2274 ,P_JOB_ID => ins_asg_rec.job_id
2275 ,P_JOB_POST_SOURCE_NAME => ins_asg_rec.job_post_source_name
2276 ,P_LABOUR_UNION_MEMBER_FLAG => ins_asg_rec.labour_union_member_flag
2277 ,P_LOCATION_ID => ins_asg_rec.location_id
2278 ,P_MANAGER_FLAG => ins_asg_rec.manager_flag
2279 ,P_NORMAL_HOURS => ins_asg_rec.normal_hours
2280 ,P_NOTICE_PERIOD => ins_asg_rec.notice_period
2281 ,P_NOTICE_PERIOD_UOM => ins_asg_rec.notice_period_uom
2282 ,P_OBJECT_VERSION_NUMBER => ins_asg_rec.object_version_number
2283 ,P_ORGANIZATION_ID => ins_asg_rec.organization_id
2284 ,P_PAYROLL_ID => ins_asg_rec.payroll_id
2285 ,P_PAY_BASIS_ID => ins_asg_rec.pay_basis_id
2286 ,P_PEOPLE_GROUP_ID => ins_asg_rec.people_group_id
2287 ,P_PERF_REVIEW_PERIOD => ins_asg_rec.perf_review_period
2288 ,P_PERF_REVIEW_PERIOD_FREQUEN => ins_asg_rec.perf_review_period_frequency
2289 ,P_PERIOD_OF_SERVICE_ID => ins_asg_rec.period_of_service_id
2290 ,P_PERSON_ID => ins_asg_rec.person_id
2291 ,P_PERSON_REFERRED_BY_ID => ins_asg_rec.person_referred_by_id
2292 ,P_PLACEMENT_DATE_START => ins_asg_rec.period_of_placement_date_start
2293 ,P_POSITION_ID => ins_asg_rec.position_id
2294 ,P_POSTING_CONTENT_ID => ins_asg_rec.posting_content_id
2295 ,P_PRIMARY_FLAG => ins_asg_rec.primary_flag
2296 ,P_PROBATION_PERIOD => ins_asg_rec.probation_period
2297 ,P_PROBATION_UNIT => ins_asg_rec.probation_unit
2298 ,P_PROGRAM_APPLICATION_ID => ins_asg_rec.program_application_id
2299 ,P_PROGRAM_ID => ins_asg_rec.program_id
2300 ,P_PROGRAM_UPDATE_DATE => ins_asg_rec.program_update_date
2301 ,P_PROJECT_TITLE => ins_asg_rec.project_title
2302 ,P_RECRUITER_ID => ins_asg_rec.recruiter_id
2303 ,P_RECRUITMENT_ACTIVITY_ID => ins_asg_rec.recruitment_activity_id
2304 ,P_REQUEST_ID => ins_asg_rec.request_id
2305 ,P_SAL_REVIEW_PERIOD => ins_asg_rec.sal_review_period
2306 ,P_SAL_REVIEW_PERIOD_FREQUEN => ins_asg_rec.sal_review_period_frequency
2307 ,P_SET_OF_BOOKS_ID => ins_asg_rec.set_of_books_id
2308 ,P_SOFT_CODING_KEYFLEX_ID => ins_asg_rec.soft_coding_keyflex_id
2309 ,P_SOURCE_ORGANIZATION_ID => ins_asg_rec.source_organization_id
2310 ,P_SOURCE_TYPE => ins_asg_rec.source_type
2311 ,P_SPECIAL_CEILING_STEP_ID => ins_asg_rec.special_ceiling_step_id
2312 ,P_SUPERVISOR_ID => ins_asg_rec.supervisor_id
2313 ,P_TIME_NORMAL_FINISH => ins_asg_rec.time_normal_finish
2314 ,P_TIME_NORMAL_START => ins_asg_rec.time_normal_start
2315 ,P_TITLE => ins_asg_rec.title
2316 ,P_VACANCY_ID => ins_asg_rec.vacancy_id
2317 ,P_VENDOR_ASSIGNMENT_NUMBER => ins_asg_rec.vendor_assignment_number
2318 ,P_VENDOR_EMPLOYEE_NUMBER => ins_asg_rec.vendor_employee_number
2319 ,P_VENDOR_ID => ins_asg_rec.vendor_id
2320 ,P_WORK_AT_HOME => ins_asg_rec.work_at_home
2321 ,P_GRADE_LADDER_PGM_ID => ins_asg_rec.grade_ladder_pgm_id
2322 ,P_SUPERVISOR_ASSIGNMENT_ID => ins_asg_rec.supervisor_assignment_id
2323 ,P_VENDOR_SITE_ID => ins_asg_rec.vendor_site_id
2324 ,P_PO_HEADER_ID => ins_asg_rec.po_header_id
2325 ,P_PO_LINE_ID => ins_asg_rec.po_line_id
2326 ,P_PROJECTED_ASSIGNMENT_END => ins_asg_rec.projected_assignment_end
2327 );
2328 IF g_debug THEN
2329 hr_utility.set_location( 'Leaving ' || g_package || l_proc, 10);
2330 END IF;
2331
2332 end post_insert;
2333 -----------------------------------------------------------------------------
2334 procedure post_delete(
2335 p_ass_id number,
2336 p_grd_id number,
2337 p_sess_date date,
2338 p_new_end_date date,
2339 p_val_end_date date,
2340 p_eff_end_date date,
2341 p_del_mode varchar2,
2342 p_val_st_date date,
2343 p_new_prim_flag varchar2,
2344 p_eot date,
2345 p_pd_os_id number,
2346 p_new_prim_ass_id IN OUT NOCOPY number,
2347 p_prim_change_flag IN OUT NOCOPY varchar2,
2348 p_per_sys_st varchar2,
2349 p_bg_id number,
2350 p_old_pay_id number,
2351 p_new_pay_id number,
2352 p_cancel_atd date,
2353 p_cancel_lspd date,
2354 p_reterm_atd date,
2355 p_reterm_lspd date,
2356 p_warning IN OUT NOCOPY varchar2,
2357 p_future_spp_warning OUT NOCOPY boolean,
2358 p_cost_warning OUT NOCOPY boolean) is
2359 l_raise_warning varchar2(1);
2360 l_calling_proc varchar2(30);
2361 l_future_spp_warnings boolean;
2362 l_dummy_warning boolean;
2363 l_Cost_warning boolean;
2364 --
2365 l_proc VARCHAR2(72) := g_package||'post_delete';
2366 --
2367 -- Payroll Object Group functionality. Not all the values required for call
2368 -- to pay_pog_all_assignments_pkg are available, so cursor is used to get the
2369 -- values.
2370 --
2371 cursor cur_asg_details(p_asg_id number
2372 ,p_eff_date date)
2373 is
2374 select effective_start_date
2375 , object_version_number
2376 , business_group_id
2377 from per_all_assignments_f
2378 where assignment_id = p_asg_id
2379 and p_eff_date between effective_start_date
2380 and effective_end_date;
2381 --
2382 l_esd date;
2383 l_ovn number;
2384 l_bg_id number;
2385 --
2386 begin
2387 --
2388 hr_utility.set_location('Entering : '||l_proc,10);
2389 --
2390 --
2391 hr_assignment_internal.maintain_spp_asg
2392 (p_assignment_id => p_ass_id
2393 ,p_datetrack_mode => p_del_mode
2394 ,p_validation_start_date => p_val_st_Date
2395 ,p_validation_end_date => p_val_end_date
2396 ,p_grade_id => p_grd_id
2397 ,p_spp_delete_warning => l_future_spp_warnings);
2398 --
2399 hr_utility.set_location(l_proc,20);
2400 --
2401 if p_del_mode in ('FUTURE_CHANGE', 'DELETE_NEXT_CHANGE') then
2402 --
2403 l_calling_proc := 'POST_DELETE';
2404 --
2405 hr_utility.set_location(l_proc||' / '||p_del_mode,30);
2406 --
2407 future_del_cleanup
2408 (p_ass_id,
2409 p_grd_id,
2410 p_sess_date,
2411 l_calling_proc,
2412 p_val_st_date,
2413 p_val_end_date,
2414 p_del_mode,
2415 l_dummy_warning);
2416 --
2417 if p_new_end_date is null then
2418 --
2419 if p_val_end_date = p_eot then
2420 --
2421 tidy_up_ref_int(
2422 'FUTURE',
2423 p_sess_date,
2424 p_new_end_date,
2425 p_val_end_date,
2426 p_eff_end_date,
2427 p_ass_id,
2428 l_cost_warning);
2429 --
2430 end if;
2431 --
2432 else
2433 --
2434 l_calling_proc := 'POST_DELETE';
2435 --
2436 hr_utility.set_location(l_proc,40);
2437
2438 hr_assignment.del_ref_int_delete(
2439 p_ass_id,
2440 p_grd_id,
2441 'END',
2442 p_new_end_date,
2443 0, 0,
2444 l_calling_proc,
2445 p_val_st_date,
2446 p_val_end_date,
2447 p_del_mode,
2448 l_dummy_warning);
2449 --
2450 -- NB l_cost_warning is not set in this sceanrio. It
2451 -- is only used if mode is FUTURE.
2452 --
2453 tidy_up_ref_int
2454 ('INT-END',
2455 p_sess_date,
2456 p_new_end_date,
2457 p_val_end_date,
2458 p_eff_end_date,
2459 p_ass_id,
2460 l_cost_warning);
2461 --
2462 end if;
2463 --
2464 elsif p_del_mode = 'ZAP' then
2465 --
2466 -- Delete any of the assignments' children records.
2467 -- Warn the user that any associated assignment status,
2468 -- nonrecurring entry, or recurring entry records will be
2469 -- deleted, and prompt the user to continue. Then delete any
2470 -- such records. Checks are performed to ensure that
2471 -- nonrecurring or recurring entry records exist before
2472 -- deleting them, as this improves performance.
2473 --
2474 l_calling_proc := 'POST_DELETE';
2475 --
2476 hr_utility.set_location(l_proc,50);
2477
2478 hr_assignment.del_ref_int_delete(
2479 p_ass_id,
2480 null,
2481 'ZAP',
2482 p_val_st_date,
2483 0, 0,
2484 l_calling_proc,
2485 p_val_st_date,
2486 p_val_end_date,
2487 p_del_mode,
2488 l_dummy_warning);
2489 --
2490 end if;
2491 --
2492 if p_prim_change_flag = 'Y' then
2493 --
2494 hr_utility.set_location(l_proc,60);
2495
2496 iud_update_primary(
2497 p_del_mode,
2498 p_new_prim_flag,
2499 p_val_st_date,
2500 p_new_end_date,
2501 p_eot,
2502 p_pd_os_id,
2503 p_ass_id,
2504 p_new_prim_ass_id,
2505 p_prim_change_flag);
2506 --
2507 end if;
2508 --
2509 -- If TERM_ASSIGN statuses were removed or if the END status was
2510 -- overridden then a new end date may need to be set. This was
2511 -- determined in the HR_ASSIGNMENT.CHECK_TERM server-side pkg
2512 -- called from the CHECK_TERM_BY_POS call (in
2513 -- update_and_delete_bundle) and a value for the new end date will
2514 -- have been put in P_NEW_END_DATE.
2515 --
2516 if p_del_mode in ('DELETE_NEXT_CHANGE', 'FUTURE_CHANGE') then
2517 --
2518 if p_new_end_date is not null then
2519 --
2520 set_end_date
2521 (p_new_end_date,
2522 p_ass_id);
2523 --
2524 end if;
2525 --
2526 end if;
2527 --
2528 hr_utility.set_location(l_proc,70);
2529
2530 do_cancel_reterm(
2531 p_ass_id,
2532 p_bg_id,
2533 p_cancel_atd,
2534 p_cancel_lspd,
2535 p_reterm_atd,
2536 p_reterm_lspd);
2537 --
2538 -- Pass null p_upd_mode.
2539 --
2540 hr_utility.set_location(l_proc,80);
2541
2542 maintain_entries
2543 (null,
2544 p_del_mode,
2545 p_per_sys_st,
2546 p_sess_date,
2547 p_val_st_date,
2548 p_val_end_date,
2549 p_new_end_date,
2550 p_ass_id,
2551 p_bg_id,
2552 p_old_pay_id,
2553 p_new_pay_id,
2554 null, -- p_old_pg_id. Added for bug#3924690.
2555 null, -- p_new_pg_id. Added for bug#3924690.
2556 l_raise_warning);
2557 --
2558 if l_raise_warning in ('Y','S') then
2559 --
2560 if l_raise_warning = 'Y' then
2561 --
2562 p_warning := 'HR_7016_ASS_ENTRIES_CHANGED';
2563 --
2564 else
2565 --
2566 p_warning := 'HR_7442_ASS_SAL_ENT_CHANGED';
2567 --
2568 end if;
2569 --
2570 end if;
2571 --
2572 p_cost_warning := l_cost_warning;
2573 p_future_spp_warning := l_future_spp_warnings;
2574 --
2575 --
2576 -- Payroll Object Group functionality, requires call to
2577 -- pay_pog_all_assignments_pkg. This is designed to be called from a row
2578 -- handler user hook, hence has many parameters that are not available here.
2579 -- So a cursor is used to return those values that are not available to this
2580 -- procedure. The 'old' values have been selected into a record in the
2581 -- pre_delete procedure
2582 --
2583 hr_utility.set_location(l_proc,90);
2584 OPEN cur_asg_details(p_ass_id, p_sess_date);
2585 FETCH cur_asg_details into l_esd, l_ovn, l_bg_id;
2586 IF cur_asg_details%NOTFOUND THEN
2587 CLOSE cur_asg_details;
2588 hr_utility.trace('no rows from cur_asg_details');
2589 --
2590 -- if ZAP mode no rows returned, setup l_ovn and l_esd
2591 --
2592 IF p_del_mode = 'ZAP' THEN
2593 l_ovn := per_assignments_f2_pkg.g_old_asg_rec.object_version_number;
2594 l_esd := per_assignments_f2_pkg.g_old_asg_rec.effective_start_date;
2595 ELSE
2596 hr_utility.trace('Not zap - error');
2597 END IF;
2598 ELSE
2599 CLOSE cur_asg_details;
2600 END IF;
2601 --
2602 -- call temporary POG package
2603 --
2604 hr_utility.set_location(l_proc,100);
2605 pay_pog_all_assignments_pkg.after_delete
2606 (p_effective_date => p_sess_date
2607 ,p_datetrack_mode => p_del_mode
2608 ,p_validation_start_date => p_val_st_date
2609 ,p_validation_end_date => p_val_end_date
2610 ,P_ASSIGNMENT_ID => p_ass_id
2611 ,P_EFFECTIVE_END_DATE => p_eff_end_date
2612 ,P_EFFECTIVE_START_DATE => l_esd
2613 ,P_OBJECT_VERSION_NUMBER => l_ovn
2614 ,P_ORG_NOW_NO_MANAGER_WARNING => null
2615 ,P_APPLICANT_RANK_O
2616 => per_assignments_f2_pkg.g_old_asg_rec.applicant_rank
2617 ,P_APPLICATION_ID_O
2618 => per_assignments_f2_pkg.g_old_asg_rec.application_id
2619 ,P_ASSIGNMENT_CATEGORY_O
2620 => per_assignments_f2_pkg.g_old_asg_rec.assignment_category
2621 ,P_ASSIGNMENT_NUMBER_O
2622 => per_assignments_f2_pkg.g_old_asg_rec.assignment_number
2623 ,P_ASSIGNMENT_SEQUENCE_O
2624 => per_assignments_f2_pkg.g_old_asg_rec.assignment_sequence
2625 ,P_ASSIGNMENT_STATUS_TYPE_ID_O
2626 => per_assignments_f2_pkg.g_old_asg_rec.assignment_status_type_id
2627 ,P_ASSIGNMENT_TYPE_O
2628 => per_assignments_f2_pkg.g_old_asg_rec.assignment_type
2629 ,P_ASS_ATTRIBUTE1_O
2630 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute1
2631 ,P_ASS_ATTRIBUTE10_O
2632 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute10
2633 ,P_ASS_ATTRIBUTE11_O
2634 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute11
2635 ,P_ASS_ATTRIBUTE12_O
2636 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute12
2637 ,P_ASS_ATTRIBUTE13_O
2638 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute13
2639 ,P_ASS_ATTRIBUTE14_O
2640 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute14
2641 ,P_ASS_ATTRIBUTE15_O
2642 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute15
2643 ,P_ASS_ATTRIBUTE16_O
2644 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute16
2645 ,P_ASS_ATTRIBUTE17_O
2646 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute17
2647 ,P_ASS_ATTRIBUTE18_O
2648 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute18
2649 ,P_ASS_ATTRIBUTE19_O
2650 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute19
2651 ,P_ASS_ATTRIBUTE2_O
2652 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute2
2653 ,P_ASS_ATTRIBUTE20_O
2654 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute20
2655 ,P_ASS_ATTRIBUTE21_O
2656 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute21
2657 ,P_ASS_ATTRIBUTE22_O
2658 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute22
2659 ,P_ASS_ATTRIBUTE23_O
2660 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute23
2661 ,P_ASS_ATTRIBUTE24_O
2662 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute24
2663 ,P_ASS_ATTRIBUTE25_O
2664 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute25
2665 ,P_ASS_ATTRIBUTE26_O
2666 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute26
2667 ,P_ASS_ATTRIBUTE27_O
2668 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute27
2669 ,P_ASS_ATTRIBUTE28_O
2670 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute28
2671 ,P_ASS_ATTRIBUTE29_O
2672 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute29
2673 ,P_ASS_ATTRIBUTE3_O
2674 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute3
2675 ,P_ASS_ATTRIBUTE30_O
2676 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute30
2677 ,P_ASS_ATTRIBUTE4_O
2678 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute4
2679 ,P_ASS_ATTRIBUTE5_O
2680 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute5
2681 ,P_ASS_ATTRIBUTE6_O
2682 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute6
2683 ,P_ASS_ATTRIBUTE7_O
2684 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute7
2685 ,P_ASS_ATTRIBUTE8_O
2686 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute8
2687 ,P_ASS_ATTRIBUTE9_O
2688 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute9
2689 ,P_ASS_ATTRIBUTE_CATEGORY_O
2690 => per_assignments_f2_pkg.g_old_asg_rec.ass_attribute_category
2691 ,P_BARGAINING_UNIT_CODE_O
2692 => per_assignments_f2_pkg.g_old_asg_rec.bargaining_unit_code
2693 ,P_BUSINESS_GROUP_ID_O
2694 => p_bg_id
2695 ,P_CAGR_GRADE_DEF_ID_O
2696 => per_assignments_f2_pkg.g_old_asg_rec.cagr_grade_def_id
2697 ,P_CAGR_ID_FLEX_NUM_O
2698 => per_assignments_f2_pkg.g_old_asg_rec.cagr_id_flex_num
2699 ,P_CHANGE_REASON_O
2700 => per_assignments_f2_pkg.g_old_asg_rec.change_reason
2701 ,P_COLLECTIVE_AGREEMENT_ID_O
2702 => per_assignments_f2_pkg.g_old_asg_rec.collective_agreement_id
2703 ,P_COMMENT_ID_O
2704 => per_assignments_f2_pkg.g_old_asg_rec.comment_id
2705 ,P_CONTRACT_ID_O
2706 => per_assignments_f2_pkg.g_old_asg_rec.contract_id
2707 ,P_DATE_PROBATION_END_O
2708 => per_assignments_f2_pkg.g_old_asg_rec.date_probation_end
2709 ,P_DEFAULT_CODE_COMB_ID_O
2710 => per_assignments_f2_pkg.g_old_asg_rec.default_code_comb_id
2711 ,P_EFFECTIVE_END_DATE_O
2712 => per_assignments_f2_pkg.g_old_asg_rec.effective_end_date
2713 ,P_EFFECTIVE_START_DATE_O
2714 => per_assignments_f2_pkg.g_old_asg_rec.effective_start_date
2715 ,P_EMPLOYEE_CATEGORY_O
2716 => per_assignments_f2_pkg.g_old_asg_rec.employee_category
2717 ,P_EMPLOYMENT_CATEGORY_O
2718 => per_assignments_f2_pkg.g_old_asg_rec.employment_category
2719 ,P_ESTABLISHMENT_ID_O
2720 => per_assignments_f2_pkg.g_old_asg_rec.establishment_id
2721 ,P_FREQUENCY_O
2722 => per_assignments_f2_pkg.g_old_asg_rec.frequency
2723 ,P_GRADE_ID_O
2724 => per_assignments_f2_pkg.g_old_asg_rec.grade_id
2725 ,P_HOURLY_SALARIED_CODE_O
2726 => per_assignments_f2_pkg.g_old_asg_rec.hourly_salaried_code
2727 ,P_INTERNAL_ADDRESS_LINE_O
2728 => per_assignments_f2_pkg.g_old_asg_rec.internal_address_line
2729 ,P_JOB_ID_O
2730 => per_assignments_f2_pkg.g_old_asg_rec.job_id
2731 ,P_JOB_POST_SOURCE_NAME_O
2732 => per_assignments_f2_pkg.g_old_asg_rec.job_post_source_name
2733 ,P_LABOUR_UNION_MEMBER_FLAG_O
2734 => per_assignments_f2_pkg.g_old_asg_rec.labour_union_member_flag
2735 ,P_LOCATION_ID_O
2736 => per_assignments_f2_pkg.g_old_asg_rec.location_id
2737 ,P_MANAGER_FLAG_O
2738 => per_assignments_f2_pkg.g_old_asg_rec.manager_flag
2739 ,P_NORMAL_HOURS_O
2740 => per_assignments_f2_pkg.g_old_asg_rec.normal_hours
2741 ,P_NOTICE_PERIOD_O
2742 => per_assignments_f2_pkg.g_old_asg_rec.notice_period
2743 ,P_NOTICE_PERIOD_UOM_O
2744 => per_assignments_f2_pkg.g_old_asg_rec.notice_period_uom
2745 ,P_OBJECT_VERSION_NUMBER_O
2746 => per_assignments_f2_pkg.g_old_asg_rec.object_version_number
2747 ,P_ORGANIZATION_ID_O
2748 => per_assignments_f2_pkg.g_old_asg_rec.organization_id
2749 ,P_PAYROLL_ID_O
2750 => per_assignments_f2_pkg.g_old_asg_rec.payroll_id
2751 ,P_PAY_BASIS_ID_O
2752 => per_assignments_f2_pkg.g_old_asg_rec.pay_basis_id
2753 ,P_PEOPLE_GROUP_ID_O
2754 => per_assignments_f2_pkg.g_old_asg_rec.people_group_id
2755 ,P_PERF_REVIEW_PERIOD_O
2756 => per_assignments_f2_pkg.g_old_asg_rec.perf_review_period
2757 ,P_PERF_REVIEW_PERIOD_FREQUEN_O
2758 => per_assignments_f2_pkg.g_old_asg_rec.perf_review_period_frequency
2759 ,P_PERIOD_OF_SERVICE_ID_O
2760 => per_assignments_f2_pkg.g_old_asg_rec.period_of_service_id
2761 ,P_PERSON_ID_O
2762 => per_assignments_f2_pkg.g_old_asg_rec.person_id
2763 ,P_PERSON_REFERRED_BY_ID_O
2764 => per_assignments_f2_pkg.g_old_asg_rec.person_referred_by_id
2765 ,P_PLACEMENT_DATE_START_O
2766 => per_assignments_f2_pkg.g_old_asg_rec.period_of_placement_date_start
2767 ,P_POSITION_ID_O
2768 => per_assignments_f2_pkg.g_old_asg_rec.position_id
2769 ,P_POSTING_CONTENT_ID_O
2770 => per_assignments_f2_pkg.g_old_asg_rec.posting_content_id
2771 ,P_PRIMARY_FLAG_O
2772 => per_assignments_f2_pkg.g_old_asg_rec.primary_flag
2773 ,P_PROBATION_PERIOD_O
2774 => per_assignments_f2_pkg.g_old_asg_rec.probation_period
2775 ,P_PROBATION_UNIT_O
2776 => per_assignments_f2_pkg.g_old_asg_rec.probation_unit
2777 ,P_PROGRAM_APPLICATION_ID_O
2778 => per_assignments_f2_pkg.g_old_asg_rec.program_application_id
2779 ,P_PROGRAM_ID_O
2780 => per_assignments_f2_pkg.g_old_asg_rec.program_id
2781 ,P_PROGRAM_UPDATE_DATE_O
2782 => per_assignments_f2_pkg.g_old_asg_rec.program_update_date
2783 ,P_PROJECT_TITLE_O
2784 => per_assignments_f2_pkg.g_old_asg_rec.project_title
2785 ,P_RECRUITER_ID_O
2786 => per_assignments_f2_pkg.g_old_asg_rec.recruiter_id
2787 ,P_RECRUITMENT_ACTIVITY_ID_O
2788 => per_assignments_f2_pkg.g_old_asg_rec.recruitment_activity_id
2789 ,P_REQUEST_ID_O
2790 => per_assignments_f2_pkg.g_old_asg_rec.request_id
2791 ,P_SAL_REVIEW_PERIOD_O
2792 => per_assignments_f2_pkg.g_old_asg_rec.sal_review_period
2793 ,P_SAL_REVIEW_PERIOD_FREQUEN_O
2794 => per_assignments_f2_pkg.g_old_asg_rec.sal_review_period_frequency
2795 ,P_SET_OF_BOOKS_ID_O
2796 => per_assignments_f2_pkg.g_old_asg_rec.set_of_books_id
2797 ,P_SOFT_CODING_KEYFLEX_ID_O
2798 => per_assignments_f2_pkg.g_old_asg_rec.soft_coding_keyflex_id
2799 ,P_SOURCE_ORGANIZATION_ID_O
2800 => per_assignments_f2_pkg.g_old_asg_rec.source_organization_id
2801 ,P_SOURCE_TYPE_O
2802 => per_assignments_f2_pkg.g_old_asg_rec.source_type
2803 ,P_SPECIAL_CEILING_STEP_ID_O
2804 => per_assignments_f2_pkg.g_old_asg_rec.special_ceiling_step_id
2805 ,P_SUPERVISOR_ID_O
2806 => per_assignments_f2_pkg.g_old_asg_rec.supervisor_id
2807 ,P_TIME_NORMAL_FINISH_O
2808 => per_assignments_f2_pkg.g_old_asg_rec.time_normal_finish
2809 ,P_TIME_NORMAL_START_O
2810 => per_assignments_f2_pkg.g_old_asg_rec.time_normal_start
2811 ,P_TITLE_O
2812 => per_assignments_f2_pkg.g_old_asg_rec.title
2813 ,P_VACANCY_ID_O
2814 => per_assignments_f2_pkg.g_old_asg_rec.vacancy_id
2815 ,P_VENDOR_ASSIGNMENT_NUMBER_O
2816 => per_assignments_f2_pkg.g_old_asg_rec.vendor_assignment_number
2817 ,P_VENDOR_EMPLOYEE_NUMBER_O
2818 => per_assignments_f2_pkg.g_old_asg_rec.vendor_employee_number
2819 ,P_VENDOR_ID_O
2820 => per_assignments_f2_pkg.g_old_asg_rec.vendor_id
2821 ,P_WORK_AT_HOME_O
2822 => per_assignments_f2_pkg.g_old_asg_rec.work_at_home
2823 ,P_GRADE_LADDER_PGM_ID_O
2824 => per_assignments_f2_pkg.g_old_asg_rec.grade_ladder_pgm_id
2825 ,P_SUPERVISOR_ASSIGNMENT_ID_O
2826 => per_assignments_f2_pkg.g_old_asg_rec.supervisor_assignment_id
2827 ,P_VENDOR_SITE_ID_O
2828 => per_assignments_f2_pkg.g_old_asg_rec.vendor_site_id
2829 ,P_PO_HEADER_ID_O
2830 => per_assignments_f2_pkg.g_old_asg_rec.po_header_id
2831 ,P_PO_LINE_ID_O
2832 => per_assignments_f2_pkg.g_old_asg_rec.po_line_id
2833 ,P_PROJECTED_ASSIGNMENT_END_O
2834 => per_assignments_f2_pkg.g_old_asg_rec.projected_assignment_end
2835 );
2836 --
2837 hr_utility.set_location('Leaving : '||l_proc,999);
2838 --
2839 end post_delete;
2840 -----------------------------------------------------------------------------
2841 END PER_ASSIGNMENTS_F1_PKG;