[Home] [Help]
PACKAGE BODY: APPS.PER_ABS_INS
Source
1 Package Body per_abs_ins as
2 /* $Header: peabsrhi.pkb 120.27.12020000.3 2012/11/05 11:44:22 srannama ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_abs_ins.'; -- Global package name
9
10 -- The following global variables are only to be used by
11 -- the set_base_key_value and pre_insert procedures.
12 --
13 g_absence_attendance_id_i number default null;
14
15 procedure set_base_key_value
16 (p_absence_attendance_id in number) is
17 --
18 l_proc varchar2(72) := g_package||'set_base_key_value';
19 --
20 Begin
21 hr_utility.set_location('Entering:'||l_proc, 10);
22 --
23 per_abs_ins.g_absence_attendance_id_i := p_absence_attendance_id;
24 --
25 hr_utility.set_location(' Leaving:'||l_proc, 20);
26 End set_base_key_value;
27
28 --
29 -- ----------------------------------------------------------------------------
30 -- |------------------------------< insert_dml >------------------------------|
31 -- ----------------------------------------------------------------------------
32 -- {Start Of Comments}
33 --
34 -- Description:
35 -- This procedure controls the actual dml insert logic. The processing of
36 -- this procedure are as follows:
37 -- 1) Initialise the object_version_number to 1 if the object_version_number
38 -- is defined as an attribute for this entity.
39 -- 2) To set and unset the g_api_dml status as required (as we are about to
40 -- perform dml).
41 -- 3) To insert the row into the schema.
42 -- 4) To trap any constraint violations that may have occurred.
43 -- 5) To raise any other errors.
44 --
45 -- Prerequisites:
46 -- This is an internal private procedure which must be called from the ins
47 -- procedure and must have all mandatory attributes set (except the
48 -- object_version_number which is initialised within this procedure).
49 --
50 -- In Parameters:
51 -- A Pl/Sql record structre.
52 --
53 -- Post Success:
54 -- The specified row will be inserted into the schema.
55 --
56 -- Post Failure:
57 -- On the insert dml failure it is important to note that we always reset the
58 -- g_api_dml status to false.
59 -- If a check, unique or parent integrity constraint violation is raised the
60 -- constraint_error procedure will be called.
61 -- If any other error is reported, the error will be raised after the
62 -- g_api_dml status is reset.
63 --
64 -- Developer Implementation Notes:
65 -- None.
66 --
67 -- Access Status:
68 -- Internal Row Handler Use Only.
69 --
70 -- {End Of Comments}
71 -- ----------------------------------------------------------------------------
72 Procedure insert_dml
73 (p_rec in out nocopy per_abs_shd.g_rec_type
74 ) is
75 --
76 l_proc varchar2(72) := g_package||'insert_dml';
77 --
78 Begin
79 hr_utility.set_location('Entering:'||l_proc, 5);
80 p_rec.object_version_number := 1; -- Initialise the object version
81 --
82 per_abs_shd.g_api_dml := true; -- Set the api dml status
83 --
84 -- Insert the row into: per_absence_attendances
85 --
86 insert into per_absence_attendances
87 (absence_attendance_id
88 ,business_group_id
89 ,absence_attendance_type_id
90 ,abs_attendance_reason_id
91 ,person_id
92 ,authorising_person_id
93 ,replacement_person_id
94 ,period_of_incapacity_id
95 ,absence_days
96 ,absence_hours
97 ,comments
98 ,date_end
99 ,date_notification
100 ,date_projected_end
101 ,date_projected_start
102 ,date_start
103 ,occurrence
104 ,ssp1_issued
105 ,time_end
106 ,time_projected_end
107 ,time_projected_start
108 ,time_start
109 ,request_id
110 ,program_application_id
111 ,program_id
112 ,program_update_date
113 ,attribute_category
114 ,attribute1
115 ,attribute2
116 ,attribute3
117 ,attribute4
118 ,attribute5
119 ,attribute6
120 ,attribute7
121 ,attribute8
122 ,attribute9
123 ,attribute10
124 ,attribute11
125 ,attribute12
126 ,attribute13
127 ,attribute14
128 ,attribute15
129 ,attribute16
130 ,attribute17
131 ,attribute18
132 ,attribute19
133 ,attribute20
134 ,maternity_id
135 ,sickness_start_date
136 ,sickness_end_date
137 ,pregnancy_related_illness
138 ,reason_for_notification_delay
139 ,accept_late_notification_flag
140 ,linked_absence_id
141 ,abs_information_category
142 ,abs_information1
143 ,abs_information2
144 ,abs_information3
145 ,abs_information4
146 ,abs_information5
147 ,abs_information6
148 ,abs_information7
149 ,abs_information8
150 ,abs_information9
151 ,abs_information10
152 ,abs_information11
153 ,abs_information12
154 ,abs_information13
155 ,abs_information14
156 ,abs_information15
157 ,abs_information16
158 ,abs_information17
159 ,abs_information18
160 ,abs_information19
161 ,abs_information20
162 ,abs_information21
163 ,abs_information22
164 ,abs_information23
165 ,abs_information24
166 ,abs_information25
167 ,abs_information26
168 ,abs_information27
169 ,abs_information28
170 ,abs_information29
171 ,abs_information30
172 ,batch_id
173 ,object_version_number
174 ,absence_case_id
175 )
176 Values
177 (p_rec.absence_attendance_id
178 ,p_rec.business_group_id
179 ,p_rec.absence_attendance_type_id
180 ,p_rec.abs_attendance_reason_id
181 ,p_rec.person_id
182 ,p_rec.authorising_person_id
183 ,p_rec.replacement_person_id
184 ,p_rec.period_of_incapacity_id
185 ,p_rec.absence_days
186 ,p_rec.absence_hours
187 ,p_rec.comments
188 ,p_rec.date_end
189 ,p_rec.date_notification
190 ,p_rec.date_projected_end
191 ,p_rec.date_projected_start
192 ,p_rec.date_start
193 ,p_rec.occurrence
194 ,p_rec.ssp1_issued
195 ,p_rec.time_end
196 ,p_rec.time_projected_end
197 ,p_rec.time_projected_start
198 ,p_rec.time_start
199 ,p_rec.request_id
200 ,p_rec.program_application_id
201 ,p_rec.program_id
202 ,p_rec.program_update_date
203 ,p_rec.attribute_category
204 ,p_rec.attribute1
205 ,p_rec.attribute2
206 ,p_rec.attribute3
207 ,p_rec.attribute4
208 ,p_rec.attribute5
209 ,p_rec.attribute6
210 ,p_rec.attribute7
211 ,p_rec.attribute8
212 ,p_rec.attribute9
213 ,p_rec.attribute10
214 ,p_rec.attribute11
215 ,p_rec.attribute12
216 ,p_rec.attribute13
217 ,p_rec.attribute14
218 ,p_rec.attribute15
219 ,p_rec.attribute16
220 ,p_rec.attribute17
221 ,p_rec.attribute18
222 ,p_rec.attribute19
223 ,p_rec.attribute20
224 ,p_rec.maternity_id
225 ,p_rec.sickness_start_date
226 ,p_rec.sickness_end_date
227 ,p_rec.pregnancy_related_illness
228 ,p_rec.reason_for_notification_delay
229 ,p_rec.accept_late_notification_flag
230 ,p_rec.linked_absence_id
231 ,p_rec.abs_information_category
232 ,p_rec.abs_information1
233 ,p_rec.abs_information2
234 ,p_rec.abs_information3
235 ,p_rec.abs_information4
236 ,p_rec.abs_information5
237 ,p_rec.abs_information6
238 ,p_rec.abs_information7
239 ,p_rec.abs_information8
240 ,p_rec.abs_information9
241 ,p_rec.abs_information10
242 ,p_rec.abs_information11
243 ,p_rec.abs_information12
244 ,p_rec.abs_information13
245 ,p_rec.abs_information14
246 ,p_rec.abs_information15
247 ,p_rec.abs_information16
248 ,p_rec.abs_information17
249 ,p_rec.abs_information18
250 ,p_rec.abs_information19
251 ,p_rec.abs_information20
252 ,p_rec.abs_information21
253 ,p_rec.abs_information22
254 ,p_rec.abs_information23
255 ,p_rec.abs_information24
256 ,p_rec.abs_information25
257 ,p_rec.abs_information26
258 ,p_rec.abs_information27
259 ,p_rec.abs_information28
260 ,p_rec.abs_information29
261 ,p_rec.abs_information30
262 ,p_rec.batch_id
263 ,p_rec.object_version_number
264 ,p_rec.absence_case_id
265 );
266 --
267 per_abs_shd.g_api_dml := false; -- Unset the api dml status
268 --
269 hr_utility.set_location(' Leaving:'||l_proc, 10);
270 Exception
271 When hr_api.check_integrity_violated Then
272 -- A check constraint has been violated
273 per_abs_shd.g_api_dml := false; -- Unset the api dml status
274 per_abs_shd.constraint_error
275 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
276 When hr_api.parent_integrity_violated Then
277 -- Parent integrity has been violated
278 per_abs_shd.g_api_dml := false; -- Unset the api dml status
279 per_abs_shd.constraint_error
280 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
281 When hr_api.unique_integrity_violated Then
282 -- Unique integrity has been violated
283 per_abs_shd.g_api_dml := false; -- Unset the api dml status
284 per_abs_shd.constraint_error
285 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
286 When Others Then
287 per_abs_shd.g_api_dml := false; -- Unset the api dml status
288 Raise;
289 End insert_dml;
290 --
291 -- ----------------------------------------------------------------------------
292 -- |------------------------------< pre_insert >------------------------------|
293 -- ----------------------------------------------------------------------------
294 -- {Start Of Comments}
295 --
296 -- Description:
297 -- This private procedure contains any processing which is required before
298 -- the insert dml. Presently, if the entity has a corresponding primary
299 -- key which is maintained by an associating sequence, the primary key for
300 -- the entity will be populated with the next sequence value in
301 -- preparation for the insert dml.
302 --
303 -- Prerequisites:
304 -- This is an internal procedure which is called from the ins procedure.
305 --
306 -- In Parameters:
307 -- A Pl/Sql record structre.
308 --
309 -- Post Success:
310 -- Processing continues.
311 --
312 -- Post Failure:
313 -- If an error has occurred, an error message and exception will be raised
314 -- but not handled.
315 --
316 -- Developer Implementation Notes:
317 -- Any pre-processing required before the insert dml is issued should be
318 -- coded within this procedure. As stated above, a good example is the
319 -- generation of a primary key number via a corresponding sequence.
320 -- It is important to note that any 3rd party maintenance should be reviewed
321 -- before placing in this procedure.
322 --
323 -- Access Status:
324 -- Internal Row Handler Use Only.
325 --
326 -- {End Of Comments}
327 -- ----------------------------------------------------------------------------
328 Procedure pre_insert
329 (p_rec in out nocopy per_abs_shd.g_rec_type
330 ,p_effective_date in date
331 ) is
332 --
333 l_proc varchar2(72) := g_package||'pre_insert';
334 l_occurrence number;
335 l_exists varchar2(1);
336 --
337 Cursor C_Sel1 is select per_absence_attendances_s.nextval from sys.dual;
338
339 Cursor C_Sel2 is
340 select null
341 from per_absence_attendances
342 where absence_attendance_id = per_abs_ins.g_absence_attendance_id_i;
343
344
345 Cursor c_get_occurrence is
346 select nvl(max(abs.occurrence), 0) + 1
347 from per_absence_attendances abs
348 where abs.business_group_id = p_rec.business_group_id
349 and abs.absence_attendance_type_id = p_rec.absence_attendance_type_id
350 and abs.person_id = p_rec.person_id;
351
352 --
353
354 Begin
355
356 hr_utility.set_location('Entering:'||l_proc, 5);
357
358 /*
359 per_abs_bus.chk_cal_duration
360 (p_absence_attendance_id => p_rec.absence_attendance_id
361 ,p_absence_attendance_type_id => p_rec.absence_attendance_type_id
362 ,p_object_version_number => p_rec.object_version_number
363 ,p_absence_days => p_rec.absence_days
364 ,p_absence_hours => p_rec.absence_hours
365 ,p_date_start => p_rec.date_start
366 ,p_date_end => p_rec.date_end
367 ,p_time_start => p_rec.time_start
368 ,p_time_end => p_rec.time_end
369 ,p_effective_date => p_effective_date
370 ,p_person_id => p_rec.person_id
371 ,p_business_group_id => p_rec.business_group_id
372 ,p_entitlement_warning => l_entitlement_warning
373 );
374 p_entitlement_warning := l_entitlement_warning;
375 */
376
377 hr_utility.set_location(l_proc, 10);
378
379 -- nachuri changes for using base key passed from bc4j
380 If per_abs_ins.g_absence_attendance_id_i is not null then
381 --
382 -- Verify registered primary key values not already in use
383 --
384 Open C_Sel2;
385 Fetch C_Sel2 into l_exists;
386 If C_Sel2%found then
387 Close C_Sel2;
388 --
389 -- The primary key values are already in use.
390 --
391 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
392 fnd_message.set_token('TABLE_NAME','PER_ABSENCE_ATTENDANCES');
393 fnd_message.raise_error;
394 end if;
395 Close C_Sel2;
396 --
397 -- Use registered key values and clear globals
398 --
399 p_rec.absence_attendance_id := per_abs_ins.g_absence_attendance_id_i;
400 per_abs_ins.g_absence_attendance_id_i := null;
401 --
402 else
403 --
404 --
405 --
406 -- Select the next sequence number
407 --
408 Open C_Sel1;
409 Fetch C_Sel1 Into p_rec.absence_attendance_id;
410 Close C_Sel1;
411 --
412 End If;
413
414
415 hr_utility.set_location(l_proc, 20);
416
417 --
418 -- Fetch the next occurrence number
419 --
420 open c_get_occurrence;
421 fetch c_get_occurrence into l_occurrence;
422 close c_get_occurrence;
423
424 --
425 -- Set the values that are system derived (note that absence days
426 -- and hours may not necessarily be system derived, but are set
427 -- to global variables regardless).
428 --
429 p_rec.occurrence := l_occurrence;
430 p_rec.absence_hours := per_abs_shd.g_absence_hours;
431 p_rec.absence_days := per_abs_shd.g_absence_days;
432
433
434 hr_utility.set_location(' Leaving:'||l_proc, 50);
435
436 End pre_insert;
437 --
438 -- ----------------------------------------------------------------------------
439 -- |-----------------------------< post_insert >------------------------------|
440 -- ----------------------------------------------------------------------------
441 -- {Start Of Comments}
442 --
443 -- Description:
444 -- This private procedure contains any processing which is required after the
445 -- insert dml.
446 --
447 -- Prerequisites:
448 -- This is an internal procedure which is called from the ins procedure.
449 --
450 -- In Parameters:
451 -- A Pl/Sql record structre.
452 --
453 -- Post Success:
454 -- Processing continues.
455 --
456 -- Post Failure:
457 -- If an error has occurred, an error message and exception will be raised
458 -- but not handled.
459 --
460 -- Developer Implementation Notes:
461 -- Any post-processing required after the insert dml is issued should be
462 -- coded within this procedure. It is important to note that any 3rd party
463 -- maintenance should be reviewed before placing in this procedure.
464 --
465 -- Access Status:
466 -- Internal Row Handler Use Only.
467 --
468 -- {End Of Comments}
469 -- ----------------------------------------------------------------------------
470 Procedure post_insert
471 (p_effective_date in date
472 ,p_rec in per_abs_shd.g_rec_type
473 ) is
474 --
475 l_proc varchar2(72) := g_package||'post_insert';
476 --
477 Begin
478 hr_utility.set_location('Entering:'||l_proc, 5);
479 begin
480 hr_utility.set_location(l_proc, 10);
481
482 per_abs_rki.after_insert
483 (p_effective_date => p_effective_date
484 ,p_absence_attendance_id
485 => p_rec.absence_attendance_id
486 ,p_business_group_id
487 => p_rec.business_group_id
488 ,p_absence_attendance_type_id
489 => p_rec.absence_attendance_type_id
490 ,p_abs_attendance_reason_id
491 => p_rec.abs_attendance_reason_id
492 ,p_person_id
493 => p_rec.person_id
494 ,p_authorising_person_id
495 => p_rec.authorising_person_id
496 ,p_replacement_person_id
497 => p_rec.replacement_person_id
498 ,p_period_of_incapacity_id
499 => p_rec.period_of_incapacity_id
500 ,p_absence_days
501 => p_rec.absence_days
502 ,p_absence_hours
503 => p_rec.absence_hours
504 ,p_comments
505 => p_rec.comments
506 ,p_date_end
507 => p_rec.date_end
508 ,p_date_notification
509 => p_rec.date_notification
510 ,p_date_projected_end
511 => p_rec.date_projected_end
512 ,p_date_projected_start
513 => p_rec.date_projected_start
514 ,p_date_start
515 => p_rec.date_start
516 ,p_occurrence
517 => p_rec.occurrence
518 ,p_ssp1_issued
519 => p_rec.ssp1_issued
520 ,p_time_end
521 => p_rec.time_end
522 ,p_time_projected_end
523 => p_rec.time_projected_end
524 ,p_time_projected_start
525 => p_rec.time_projected_start
526 ,p_time_start
527 => p_rec.time_start
528 ,p_request_id
529 => p_rec.request_id
530 ,p_program_application_id
531 => p_rec.program_application_id
532 ,p_program_id
533 => p_rec.program_id
534 ,p_program_update_date
535 => p_rec.program_update_date
536 ,p_attribute_category
537 => p_rec.attribute_category
538 ,p_attribute1
539 => p_rec.attribute1
540 ,p_attribute2
541 => p_rec.attribute2
542 ,p_attribute3
543 => p_rec.attribute3
544 ,p_attribute4
545 => p_rec.attribute4
546 ,p_attribute5
547 => p_rec.attribute5
548 ,p_attribute6
549 => p_rec.attribute6
550 ,p_attribute7
551 => p_rec.attribute7
552 ,p_attribute8
553 => p_rec.attribute8
554 ,p_attribute9
555 => p_rec.attribute9
556 ,p_attribute10
557 => p_rec.attribute10
558 ,p_attribute11
559 => p_rec.attribute11
560 ,p_attribute12
561 => p_rec.attribute12
562 ,p_attribute13
563 => p_rec.attribute13
564 ,p_attribute14
565 => p_rec.attribute14
566 ,p_attribute15
567 => p_rec.attribute15
568 ,p_attribute16
569 => p_rec.attribute16
570 ,p_attribute17
571 => p_rec.attribute17
572 ,p_attribute18
573 => p_rec.attribute18
574 ,p_attribute19
575 => p_rec.attribute19
576 ,p_attribute20
577 => p_rec.attribute20
578 ,p_maternity_id
579 => p_rec.maternity_id
580 ,p_sickness_start_date
581 => p_rec.sickness_start_date
582 ,p_sickness_end_date
583 => p_rec.sickness_end_date
584 ,p_pregnancy_related_illness
585 => p_rec.pregnancy_related_illness
586 ,p_reason_for_notification_dela
587 => p_rec.reason_for_notification_delay
588 ,p_accept_late_notification_fla
589 => p_rec.accept_late_notification_flag
590 ,p_linked_absence_id
591 => p_rec.linked_absence_id
592 ,p_abs_information_category
593 => p_rec.abs_information_category
594 ,p_abs_information1
595 => p_rec.abs_information1
596 ,p_abs_information2
597 => p_rec.abs_information2
598 ,p_abs_information3
599 => p_rec.abs_information3
600 ,p_abs_information4
601 => p_rec.abs_information4
602 ,p_abs_information5
603 => p_rec.abs_information5
604 ,p_abs_information6
605 => p_rec.abs_information6
606 ,p_abs_information7
607 => p_rec.abs_information7
608 ,p_abs_information8
609 => p_rec.abs_information8
610 ,p_abs_information9
611 => p_rec.abs_information9
612 ,p_abs_information10
613 => p_rec.abs_information10
614 ,p_abs_information11
615 => p_rec.abs_information11
616 ,p_abs_information12
617 => p_rec.abs_information12
618 ,p_abs_information13
619 => p_rec.abs_information13
620 ,p_abs_information14
621 => p_rec.abs_information14
622 ,p_abs_information15
623 => p_rec.abs_information15
624 ,p_abs_information16
625 => p_rec.abs_information16
626 ,p_abs_information17
627 => p_rec.abs_information17
628 ,p_abs_information18
629 => p_rec.abs_information18
630 ,p_abs_information19
631 => p_rec.abs_information19
632 ,p_abs_information20
633 => p_rec.abs_information20
634 ,p_abs_information21
635 => p_rec.abs_information21
636 ,p_abs_information22
637 => p_rec.abs_information22
638 ,p_abs_information23
639 => p_rec.abs_information23
640 ,p_abs_information24
641 => p_rec.abs_information24
642 ,p_abs_information25
643 => p_rec.abs_information25
644 ,p_abs_information26
645 => p_rec.abs_information26
646 ,p_abs_information27
647 => p_rec.abs_information27
648 ,p_abs_information28
649 => p_rec.abs_information28
650 ,p_abs_information29
651 => p_rec.abs_information29
652 ,p_abs_information30
653 => p_rec.abs_information30
654 ,p_absence_case_id
655 => p_rec.absence_case_id
656 ,p_batch_id
657 => p_rec.batch_id
658 ,p_object_version_number
659 => p_rec.object_version_number
660 );
661 --
662 exception
663 --
664 when hr_api.cannot_find_prog_unit then
665 --
666 hr_api.cannot_find_prog_unit_error
667 (p_module_name => 'PER_ABSENCE_ATTENDANCES'
668 ,p_hook_type => 'AI');
669 --
670 end;
671 --
672 hr_utility.set_location(' Leaving:'||l_proc, 10);
673 End post_insert;
674 --
675 -- ----------------------------------------------------------------------------
676 -- |---------------------------------< ins >----------------------------------|
677 -- ----------------------------------------------------------------------------
678 Procedure ins
679 (p_effective_date in date
680 ,p_rec in out nocopy per_abs_shd.g_rec_type
681 ,p_dur_dys_less_warning out nocopy boolean
682 ,p_dur_hrs_less_warning out nocopy boolean
683 ,p_exceeds_pto_entit_warning out nocopy boolean
684 ,p_exceeds_run_total_warning out nocopy boolean
685 ,p_abs_overlap_warning out nocopy boolean
686 ,p_abs_day_after_warning out nocopy boolean
687 ,p_dur_overwritten_warning out nocopy boolean
688 ) is
689 --
690 l_proc varchar2(72) := g_package||'ins';
691 --
692 Begin
693
694 hr_utility.set_location('Entering:'||l_proc, 5);
695 --
696 -- Call the supporting insert validate operations
697 --
698 per_abs_bus.insert_validate
699 (p_effective_date => p_effective_date
700 ,p_rec => p_rec
701 ,p_dur_dys_less_warning => p_dur_dys_less_warning
702 ,p_dur_hrs_less_warning => p_dur_hrs_less_warning
703 ,p_exceeds_pto_entit_warning => p_exceeds_pto_entit_warning
704 ,p_exceeds_run_total_warning => p_exceeds_run_total_warning
705 ,p_abs_overlap_warning => p_abs_overlap_warning
706 ,p_abs_day_after_warning => p_abs_day_after_warning
707 ,p_dur_overwritten_warning => p_dur_overwritten_warning
708 );
709 --
710 -- Call the supporting pre_insert operation
711 --
712 per_abs_ins.pre_insert(p_rec, p_effective_date);
713 --
714 -- Insert the row
715 --
716 per_abs_ins.insert_dml(p_rec);
717 --
718 -- Call the supporting post-insert operation
719 --
720 per_abs_ins.post_insert
721 (p_effective_date
722 ,p_rec
723 );
724 --
725 hr_utility.set_location('Leaving:'||l_proc, 20);
726
727 end ins;
728 --
729 -- ----------------------------------------------------------------------------
730 -- |---------------------------------< ins >----------------------------------|
731 -- ----------------------------------------------------------------------------
732 Procedure ins
733 (p_effective_date in date
734 ,p_business_group_id in number
735 ,p_absence_attendance_type_id in number
736 ,p_person_id in number
737 ,p_abs_attendance_reason_id in number default null
738 ,p_authorising_person_id in number default null
739 ,p_replacement_person_id in number default null
740 ,p_period_of_incapacity_id in number default null
741 ,p_absence_days in out nocopy number
742 ,p_absence_hours in out nocopy number
743 --start changes for bug 5987410
744 --,p_comments in varchar2 default null
745 ,p_comments in clob default null -- Bug#13362792
746 --end changes for bug 5987410
747 ,p_date_end in date default null
748 ,p_date_notification in date default null
749 ,p_date_projected_end in date default null
750 ,p_date_projected_start in date default null
751 ,p_date_start in date default null
752 ,p_occurrence out nocopy number
753 ,p_ssp1_issued in varchar2 default null
754 ,p_time_end in varchar2 default null
755 ,p_time_projected_end in varchar2 default null
756 ,p_time_projected_start in varchar2 default null
757 ,p_time_start in varchar2 default null
758 ,p_request_id in number default null
759 ,p_program_application_id in number default null
760 ,p_program_id in number default null
761 ,p_program_update_date in date default null
762 ,p_attribute_category in varchar2 default null
763 ,p_attribute1 in varchar2 default null
764 ,p_attribute2 in varchar2 default null
765 ,p_attribute3 in varchar2 default null
766 ,p_attribute4 in varchar2 default null
767 ,p_attribute5 in varchar2 default null
768 ,p_attribute6 in varchar2 default null
769 ,p_attribute7 in varchar2 default null
770 ,p_attribute8 in varchar2 default null
771 ,p_attribute9 in varchar2 default null
772 ,p_attribute10 in varchar2 default null
773 ,p_attribute11 in varchar2 default null
774 ,p_attribute12 in varchar2 default null
775 ,p_attribute13 in varchar2 default null
776 ,p_attribute14 in varchar2 default null
777 ,p_attribute15 in varchar2 default null
778 ,p_attribute16 in varchar2 default null
779 ,p_attribute17 in varchar2 default null
780 ,p_attribute18 in varchar2 default null
781 ,p_attribute19 in varchar2 default null
782 ,p_attribute20 in varchar2 default null
783 ,p_maternity_id in number default null
784 ,p_sickness_start_date in date default null
785 ,p_sickness_end_date in date default null
786 ,p_pregnancy_related_illness in varchar2 default null
787 ,p_reason_for_notification_dela in varchar2 default null
788 ,p_accept_late_notification_fla in varchar2 default null
789 ,p_linked_absence_id in number default null
790 ,p_abs_information_category in varchar2 default null
791 ,p_abs_information1 in varchar2 default null
792 ,p_abs_information2 in varchar2 default null
793 ,p_abs_information3 in varchar2 default null
794 ,p_abs_information4 in varchar2 default null
795 ,p_abs_information5 in varchar2 default null
796 ,p_abs_information6 in varchar2 default null
797 ,p_abs_information7 in varchar2 default null
798 ,p_abs_information8 in varchar2 default null
799 ,p_abs_information9 in varchar2 default null
800 ,p_abs_information10 in varchar2 default null
801 ,p_abs_information11 in varchar2 default null
802 ,p_abs_information12 in varchar2 default null
803 ,p_abs_information13 in varchar2 default null
804 ,p_abs_information14 in varchar2 default null
805 ,p_abs_information15 in varchar2 default null
806 ,p_abs_information16 in varchar2 default null
807 ,p_abs_information17 in varchar2 default null
808 ,p_abs_information18 in varchar2 default null
809 ,p_abs_information19 in varchar2 default null
810 ,p_abs_information20 in varchar2 default null
811 ,p_abs_information21 in varchar2 default null
812 ,p_abs_information22 in varchar2 default null
813 ,p_abs_information23 in varchar2 default null
814 ,p_abs_information24 in varchar2 default null
815 ,p_abs_information25 in varchar2 default null
816 ,p_abs_information26 in varchar2 default null
817 ,p_abs_information27 in varchar2 default null
818 ,p_abs_information28 in varchar2 default null
819 ,p_abs_information29 in varchar2 default null
820 ,p_abs_information30 in varchar2 default null
821 ,p_batch_id in number default null
822 ,p_absence_case_id in number default null
823 ,p_absence_attendance_id out nocopy number
824 ,p_object_version_number out nocopy number
825 ,p_dur_dys_less_warning out nocopy boolean
826 ,p_dur_hrs_less_warning out nocopy boolean
827 ,p_exceeds_pto_entit_warning out nocopy boolean
828 ,p_exceeds_run_total_warning out nocopy boolean
829 ,p_abs_overlap_warning out nocopy boolean
830 ,p_abs_day_after_warning out nocopy boolean
831 ,p_dur_overwritten_warning out nocopy boolean
832 ) is
833 --
834 l_rec per_abs_shd.g_rec_type;
835 l_proc varchar2(72) := g_package||'ins';
836 l_absence_days number;
837 l_absence_hours number;
838 --
839 Begin
840 hr_utility.set_location('Entering:'||l_proc, 5);
841 --
842 -- Call conversion function to turn arguments into the
843 -- p_rec structure.
844 --
845 l_rec :=
846 per_abs_shd.convert_args
847 (null
848 ,p_business_group_id
849 ,p_absence_attendance_type_id
850 ,p_abs_attendance_reason_id
851 ,p_person_id
852 ,p_authorising_person_id
853 ,p_replacement_person_id
854 ,p_period_of_incapacity_id
855 ,p_absence_days
856 ,p_absence_hours
857 ,p_comments
858 ,p_date_end
859 ,p_date_notification
860 ,p_date_projected_end
861 ,p_date_projected_start
862 ,p_date_start
863 ,null -- p_occurrence
864 ,p_ssp1_issued
865 ,p_time_end
866 ,p_time_projected_end
867 ,p_time_projected_start
868 ,p_time_start
869 ,p_request_id
870 ,p_program_application_id
871 ,p_program_id
872 ,p_program_update_date
873 ,p_attribute_category
874 ,p_attribute1
875 ,p_attribute2
876 ,p_attribute3
877 ,p_attribute4
878 ,p_attribute5
879 ,p_attribute6
880 ,p_attribute7
881 ,p_attribute8
882 ,p_attribute9
883 ,p_attribute10
884 ,p_attribute11
885 ,p_attribute12
886 ,p_attribute13
887 ,p_attribute14
888 ,p_attribute15
889 ,p_attribute16
890 ,p_attribute17
891 ,p_attribute18
892 ,p_attribute19
893 ,p_attribute20
894 ,p_maternity_id
895 ,p_sickness_start_date
896 ,p_sickness_end_date
897 ,p_pregnancy_related_illness
898 ,p_reason_for_notification_dela
899 ,p_accept_late_notification_fla
900 ,p_linked_absence_id
901 ,p_abs_information_category
902 ,p_abs_information1
903 ,p_abs_information2
904 ,p_abs_information3
905 ,p_abs_information4
906 ,p_abs_information5
907 ,p_abs_information6
908 ,p_abs_information7
909 ,p_abs_information8
910 ,p_abs_information9
911 ,p_abs_information10
912 ,p_abs_information11
913 ,p_abs_information12
914 ,p_abs_information13
915 ,p_abs_information14
916 ,p_abs_information15
917 ,p_abs_information16
918 ,p_abs_information17
919 ,p_abs_information18
920 ,p_abs_information19
921 ,p_abs_information20
922 ,p_abs_information21
923 ,p_abs_information22
924 ,p_abs_information23
925 ,p_abs_information24
926 ,p_abs_information25
927 ,p_abs_information26
928 ,p_abs_information27
929 ,p_abs_information28
930 ,p_abs_information29
931 ,p_abs_information30
932 ,p_absence_Case_id
933 ,p_batch_id
934 ,null
935 );
936 --
937 -- Having converted the arguments into the per_abs_rec
938 -- plsql record structure we call the corresponding record business process.
939 --
940 per_abs_ins.ins
941 (p_effective_date => p_effective_date
942 ,p_rec => l_rec
943 ,p_dur_dys_less_warning => p_dur_dys_less_warning
944 ,p_dur_hrs_less_warning => p_dur_hrs_less_warning
945 ,p_exceeds_pto_entit_warning => p_exceeds_pto_entit_warning
946 ,p_exceeds_run_total_warning => p_exceeds_run_total_warning
947 ,p_abs_overlap_warning => p_abs_overlap_warning
948 ,p_abs_day_after_warning => p_abs_day_after_warning
949 ,p_dur_overwritten_warning => p_dur_overwritten_warning
950 );
951 --
952 -- As the primary key argument(s)
953 -- are specified as an OUT's we must set these values.
954 --
955 p_absence_attendance_id := l_rec.absence_attendance_id;
956 p_object_version_number := l_rec.object_version_number;
957 p_absence_days := l_rec.absence_days;
958 p_absence_hours := l_rec.absence_hours;
959 p_occurrence := l_rec.occurrence;
960 --
961 hr_utility.set_location(' Leaving:'||l_proc, 10);
962 End ins;
963 --
964 end per_abs_ins;