DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_DIS_INS

Source


1 Package Body per_dis_ins as
2 /* $Header: pedisrhi.pkb 115.8 2002/12/04 18:57:24 pkakar noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  per_dis_ins.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml insert logic for datetrack. The
17 --   functions of this procedure are as follows:
18 --   1) Get the object_version_number.
19 --   2) To set the effective start and end dates to the corresponding
20 --      validation start and end dates. Also, the object version number
21 --      record attribute is set.
22 --   3) To set and unset the g_api_dml status as required (as we are about to
23 --      perform dml).
24 --   4) To insert the row into the schema with the derived effective start
25 --      and end dates and the object version number.
26 --   5) To trap any constraint violations that may have occurred.
27 --   6) To raise any other errors.
28 --
29 -- Prerequisites:
30 --   This is an internal private procedure which must be called from the
31 --   insert_dml and pre_update (logic permitting) procedure and must have
32 --   all mandatory arguments set.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structure.
36 --
37 -- Post Success:
38 --   The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 --   On the insert dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   This is an internal datetrack maintenance procedure which should
50 --   not be modified in anyway.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58   (p_rec                     in out nocopy per_dis_shd.g_rec_type
59   ,p_effective_date          in date
60   ,p_datetrack_mode          in varchar2
61   ,p_validation_start_date   in date
62   ,p_validation_end_date     in date
63   ) is
64 -- Cursor to select 'old' created AOL who column values
65 --
66   Cursor C_Sel1 Is
67     select t.created_by,
68            t.creation_date
69     from   per_disabilities_f t
70     where  t.disability_id       = p_rec.disability_id
71     and    t.effective_start_date =
72              per_dis_shd.g_old_rec.effective_start_date
73     and    t.effective_end_date   = (p_validation_start_date - 1);
74 --
75   l_proc                varchar2(72) := g_package||'dt_insert_dml';
76   l_created_by          per_disabilities_f.created_by%TYPE;
77   l_creation_date       per_disabilities_f.creation_date%TYPE;
78   l_last_update_date   	per_disabilities_f.last_update_date%TYPE;
79   l_last_updated_by     per_disabilities_f.last_updated_by%TYPE;
80   l_last_update_login   per_disabilities_f.last_update_login%TYPE;
81 --
82 Begin
83   hr_utility.set_location('Entering:'||l_proc, 5);
84   --
85   -- Get the object version number for the insert
86   --
87   p_rec.object_version_number :=
88     dt_api.get_object_version_number
89       (p_base_table_name => 'per_disabilities_f'
90       ,p_base_key_column => 'disability_id'
91       ,p_base_key_value  => p_rec.disability_id
92       );
93   --
94   -- Set the effective start and end dates to the corresponding
95   -- validation start and end dates
96   --
97   p_rec.effective_start_date := p_validation_start_date;
98   p_rec.effective_end_date   := p_validation_end_date;
99   --
100   -- If the datetrack_mode is not INSERT then we must populate the WHO
101   -- columns with the 'old' creation values and 'new' updated values.
102   --
103   If (p_datetrack_mode <> hr_api.g_insert) then
104     hr_utility.set_location(l_proc, 10);
105     --
106     -- Select the 'old' created values
107     --
108     Open C_Sel1;
109     Fetch C_Sel1 Into l_created_by, l_creation_date;
110     If C_Sel1%notfound Then
111       --
112       -- The previous 'old' created row has not been found. We need
113       -- to error as an internal datetrack problem exists.
114       --
115       Close C_Sel1;
116       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
117       fnd_message.set_token('PROCEDURE', l_proc);
118       fnd_message.set_token('STEP','10');
119       fnd_message.raise_error;
120     End If;
121     Close C_Sel1;
122     --
123     -- Set the AOL updated WHO values
124     --
125     l_last_update_date   := sysdate;
126     l_last_updated_by    := fnd_global.user_id;
127     l_last_update_login  := fnd_global.login_id;
128   End If;
129   --
130   --
131   --
132   -- Insert the row into: per_disabilities_f
133   --
134   insert into per_disabilities_f
135       (disability_id
136       ,effective_start_date
137       ,effective_end_date
138       ,person_id
139       ,incident_id
140       ,organization_id
141       ,registration_id
142       ,registration_date
143       ,registration_exp_date
144       ,category
145       ,status
146       ,description
147       ,degree
148       ,quota_fte
149       ,reason
150       ,pre_registration_job
151       ,work_restriction
152       ,attribute_category
153       ,attribute1
154       ,attribute2
155       ,attribute3
156       ,attribute4
157       ,attribute5
158       ,attribute6
159       ,attribute7
160       ,attribute8
161       ,attribute9
162       ,attribute10
163       ,attribute11
164       ,attribute12
165       ,attribute13
166       ,attribute14
167       ,attribute15
168       ,attribute16
169       ,attribute17
170       ,attribute18
171       ,attribute19
172       ,attribute20
173       ,attribute21
174       ,attribute22
175       ,attribute23
176       ,attribute24
177       ,attribute25
178       ,attribute26
179       ,attribute27
180       ,attribute28
181       ,attribute29
182       ,attribute30
183       ,dis_information_category
184       ,dis_information1
185       ,dis_information2
186       ,dis_information3
187       ,dis_information4
188       ,dis_information5
189       ,dis_information6
190       ,dis_information7
191       ,dis_information8
192       ,dis_information9
193       ,dis_information10
194       ,dis_information11
195       ,dis_information12
196       ,dis_information13
197       ,dis_information14
198       ,dis_information15
199       ,dis_information16
200       ,dis_information17
201       ,dis_information18
202       ,dis_information19
203       ,dis_information20
204       ,dis_information21
205       ,dis_information22
206       ,dis_information23
207       ,dis_information24
208       ,dis_information25
209       ,dis_information26
210       ,dis_information27
211       ,dis_information28
212       ,dis_information29
213       ,dis_information30
214       ,object_version_number
215       ,created_by
216       ,creation_date
217       ,last_update_date
218       ,last_updated_by
219       ,last_update_login
220       )
221   Values
222     (p_rec.disability_id
223     ,p_rec.effective_start_date
224     ,p_rec.effective_end_date
225     ,p_rec.person_id
226     ,p_rec.incident_id
227     ,p_rec.organization_id
228     ,p_rec.registration_id
229     ,p_rec.registration_date
230     ,p_rec.registration_exp_date
231     ,p_rec.category
232     ,p_rec.status
233     ,p_rec.description
234     ,p_rec.degree
235     ,p_rec.quota_fte
236     ,p_rec.reason
237     ,p_rec.pre_registration_job
238     ,p_rec.work_restriction
239     ,p_rec.attribute_category
240     ,p_rec.attribute1
241     ,p_rec.attribute2
242     ,p_rec.attribute3
243     ,p_rec.attribute4
244     ,p_rec.attribute5
245     ,p_rec.attribute6
246     ,p_rec.attribute7
247     ,p_rec.attribute8
248     ,p_rec.attribute9
249     ,p_rec.attribute10
250     ,p_rec.attribute11
251     ,p_rec.attribute12
252     ,p_rec.attribute13
253     ,p_rec.attribute14
254     ,p_rec.attribute15
255     ,p_rec.attribute16
256     ,p_rec.attribute17
257     ,p_rec.attribute18
258     ,p_rec.attribute19
259     ,p_rec.attribute20
260     ,p_rec.attribute21
261     ,p_rec.attribute22
262     ,p_rec.attribute23
263     ,p_rec.attribute24
264     ,p_rec.attribute25
265     ,p_rec.attribute26
266     ,p_rec.attribute27
267     ,p_rec.attribute28
268     ,p_rec.attribute29
269     ,p_rec.attribute30
270     ,p_rec.dis_information_category
271     ,p_rec.dis_information1
272     ,p_rec.dis_information2
273     ,p_rec.dis_information3
274     ,p_rec.dis_information4
275     ,p_rec.dis_information5
276     ,p_rec.dis_information6
277     ,p_rec.dis_information7
278     ,p_rec.dis_information8
279     ,p_rec.dis_information9
280     ,p_rec.dis_information10
281     ,p_rec.dis_information11
282     ,p_rec.dis_information12
283     ,p_rec.dis_information13
284     ,p_rec.dis_information14
285     ,p_rec.dis_information15
286     ,p_rec.dis_information16
287     ,p_rec.dis_information17
288     ,p_rec.dis_information18
289     ,p_rec.dis_information19
290     ,p_rec.dis_information20
291     ,p_rec.dis_information21
292     ,p_rec.dis_information22
293     ,p_rec.dis_information23
294     ,p_rec.dis_information24
295     ,p_rec.dis_information25
296     ,p_rec.dis_information26
297     ,p_rec.dis_information27
298     ,p_rec.dis_information28
299     ,p_rec.dis_information29
300     ,p_rec.dis_information30
301     ,p_rec.object_version_number
302     ,l_created_by
303     ,l_creation_date
304     ,l_last_update_date
305     ,l_last_updated_by
306     ,l_last_update_login
307     );
308   --
309   --
310   hr_utility.set_location(' Leaving:'||l_proc, 15);
311 --
312 Exception
313   When hr_api.check_integrity_violated Then
314     -- A check constraint has been violated
315     --
316     per_dis_shd.constraint_error
317       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
318   When hr_api.unique_integrity_violated Then
319     -- Unique integrity has been violated
320     --
321     per_dis_shd.constraint_error
322       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
323   When Others Then
324     --
325     Raise;
326 End dt_insert_dml;
327 --
328 -- ----------------------------------------------------------------------------
329 -- |------------------------------< insert_dml >------------------------------|
330 -- ----------------------------------------------------------------------------
331 Procedure insert_dml
332   (p_rec                   in out nocopy per_dis_shd.g_rec_type
333   ,p_effective_date        in date
334   ,p_datetrack_mode        in varchar2
335   ,p_validation_start_date in date
336   ,p_validation_end_date   in date
337   ) is
338 --
339   l_proc	varchar2(72) := g_package||'insert_dml';
340 --
341 Begin
342   hr_utility.set_location('Entering:'||l_proc, 5);
343   --
344   per_dis_ins.dt_insert_dml
345     (p_rec                   => p_rec
346     ,p_effective_date        => p_effective_date
347     ,p_datetrack_mode        => p_datetrack_mode
348     ,p_validation_start_date => p_validation_start_date
349     ,p_validation_end_date   => p_validation_end_date
350     );
351   --
352   hr_utility.set_location(' Leaving:'||l_proc, 10);
353 End insert_dml;
354 --
355 -- ----------------------------------------------------------------------------
356 -- |------------------------------< pre_insert >------------------------------|
357 -- ----------------------------------------------------------------------------
358 -- {Start Of Comments}
359 --
360 -- Description:
361 --   This private procedure contains any processing which is required before
362 --   the insert dml. Presently, if the entity has a corresponding primary
363 --   key which is maintained by an associating sequence, the primary key for
364 --   the entity will be populated with the next sequence value in
365 --   preparation for the insert dml.
366 --   Also, if comments are defined for this entity, the comments insert
367 --   logic will also be called, generating a comment_id if required.
368 --
369 -- Prerequisites:
370 --   This is an internal procedure which is called from the ins procedure.
371 --
372 -- In Parameters:
373 --   A Pl/Sql record structure.
374 --
375 -- Post Success:
376 --   Processing continues.
377 --
378 -- Post Failure:
379 --   If an error has occurred, an error message and exception will be raised
380 --   but not handled.
381 --
382 -- Developer Implementation Notes:
383 --   Any pre-processing required before the insert dml is issued should be
384 --   coded within this procedure. As stated above, a good example is the
385 --   generation of a primary key number via a corresponding sequence.
386 --   It is important to note that any 3rd party maintenance should be reviewed
387 --   before placing in this procedure.
388 --
389 -- Access Status:
390 --   Internal Row Handler Use Only.
391 --
392 -- {End Of Comments}
393 -- ----------------------------------------------------------------------------
394 Procedure pre_insert
395   (p_rec                   in out nocopy per_dis_shd.g_rec_type
396   ,p_effective_date        in date
397   ,p_datetrack_mode        in varchar2
398   ,p_validation_start_date in date
399   ,p_validation_end_date   in date
400   ) is
401 --
402   l_proc	varchar2(72) := g_package||'pre_insert';
403 --
404   Cursor C_Sel1 is select per_disabilities_s.nextval from sys.dual;
405 --
406 Begin
407   hr_utility.set_location('Entering:'||l_proc, 5);
408   --
409   --
410   -- Select the next sequence number
411   --
412   Open C_Sel1;
413   Fetch C_Sel1 Into p_rec.disability_id;
414   Close C_Sel1;
415   --
416   --
417   hr_utility.set_location(' Leaving:'||l_proc, 10);
418 End pre_insert;
419 --
420 -- ----------------------------------------------------------------------------
421 -- |----------------------------< post_insert >-------------------------------|
422 -- ----------------------------------------------------------------------------
423 -- {Start Of Comments}
424 --
425 -- Description:
426 --   This private procedure contains any processing which is required after the
427 --   insert dml.
428 --
429 -- Prerequisites:
430 --   This is an internal procedure which is called from the ins procedure.
431 --
432 -- In Parameters:
433 --   A Pl/Sql record structure.
434 --
435 -- Post Success:
436 --   Processing continues.
437 --
438 -- Post Failure:
439 --   If an error has occurred, an error message and exception will be raised
440 --   but not handled.
441 --
442 -- Developer Implementation Notes:
443 --   Any post-processing required after the insert dml is issued should be
444 --   coded within this procedure. It is important to note that any 3rd party
445 --   maintenance should be reviewed before placing in this procedure.
446 --
450 -- {End Of Comments}
447 -- Access Status:
448 --   Internal Row Handler Use Only.
449 --
451 -- ----------------------------------------------------------------------------
452 Procedure post_insert
453   (p_rec                   in per_dis_shd.g_rec_type
454   ,p_effective_date        in date
455   ,p_datetrack_mode        in varchar2
456   ,p_validation_start_date in date
457   ,p_validation_end_date   in date
458   ) is
459 --
460   l_proc	varchar2(72) := g_package||'post_insert';
461 --
462 Begin
463   hr_utility.set_location('Entering:'||l_proc, 5);
464   begin
465     --
466     per_dis_rki.after_insert
467       (p_effective_date
468       => p_effective_date
469       ,p_validation_start_date
470       => p_validation_start_date
471       ,p_validation_end_date
472       => p_validation_end_date
473       ,p_disability_id
474       => p_rec.disability_id
475       ,p_effective_start_date
476       => p_rec.effective_start_date
477       ,p_effective_end_date
478       => p_rec.effective_end_date
479       ,p_person_id
480       => p_rec.person_id
481       ,p_incident_id
482       => p_rec.incident_id
483       ,p_organization_id
484       => p_rec.organization_id
485       ,p_registration_id
486       => p_rec.registration_id
487       ,p_registration_date
488       => p_rec.registration_date
489       ,p_registration_exp_date
490       => p_rec.registration_exp_date
491       ,p_category
492       => p_rec.category
493       ,p_status
494       => p_rec.status
495       ,p_description
496       => p_rec.description
497       ,p_degree
498       => p_rec.degree
499       ,p_quota_fte
500       => p_rec.quota_fte
501       ,p_reason
502       => p_rec.reason
503       ,p_pre_registration_job
504       => p_rec.pre_registration_job
505       ,p_work_restriction
506       => p_rec.work_restriction
507       ,p_attribute_category
508       => p_rec.attribute_category
509       ,p_attribute1
510       => p_rec.attribute1
511       ,p_attribute2
512       => p_rec.attribute2
513       ,p_attribute3
514       => p_rec.attribute3
515       ,p_attribute4
516       => p_rec.attribute4
517       ,p_attribute5
518       => p_rec.attribute5
519       ,p_attribute6
520       => p_rec.attribute6
521       ,p_attribute7
522       => p_rec.attribute7
523       ,p_attribute8
524       => p_rec.attribute8
525       ,p_attribute9
526       => p_rec.attribute9
527       ,p_attribute10
528       => p_rec.attribute10
529       ,p_attribute11
530       => p_rec.attribute11
531       ,p_attribute12
532       => p_rec.attribute12
533       ,p_attribute13
534       => p_rec.attribute13
535       ,p_attribute14
536       => p_rec.attribute14
537       ,p_attribute15
538       => p_rec.attribute15
539       ,p_attribute16
540       => p_rec.attribute16
541       ,p_attribute17
542       => p_rec.attribute17
543       ,p_attribute18
544       => p_rec.attribute18
545       ,p_attribute19
546       => p_rec.attribute19
547       ,p_attribute20
548       => p_rec.attribute20
549       ,p_attribute21
550       => p_rec.attribute21
551       ,p_attribute22
552       => p_rec.attribute22
553       ,p_attribute23
554       => p_rec.attribute23
555       ,p_attribute24
556       => p_rec.attribute24
557       ,p_attribute25
558       => p_rec.attribute25
559       ,p_attribute26
560       => p_rec.attribute26
561       ,p_attribute27
562       => p_rec.attribute27
563       ,p_attribute28
564       => p_rec.attribute28
565       ,p_attribute29
566       => p_rec.attribute29
567       ,p_attribute30
568       => p_rec.attribute30
569       ,p_dis_information_category
570       => p_rec.dis_information_category
571       ,p_dis_information1
572       => p_rec.dis_information1
573       ,p_dis_information2
574       => p_rec.dis_information2
575       ,p_dis_information3
576       => p_rec.dis_information3
577       ,p_dis_information4
578       => p_rec.dis_information4
579       ,p_dis_information5
580       => p_rec.dis_information5
581       ,p_dis_information6
582       => p_rec.dis_information6
583       ,p_dis_information7
584       => p_rec.dis_information7
585       ,p_dis_information8
586       => p_rec.dis_information8
587       ,p_dis_information9
588       => p_rec.dis_information9
589       ,p_dis_information10
590       => p_rec.dis_information10
591       ,p_dis_information11
592       => p_rec.dis_information11
593       ,p_dis_information12
594       => p_rec.dis_information12
595       ,p_dis_information13
596       => p_rec.dis_information13
597       ,p_dis_information14
598       => p_rec.dis_information14
599       ,p_dis_information15
600       => p_rec.dis_information15
601       ,p_dis_information16
602       => p_rec.dis_information16
603       ,p_dis_information17
604       => p_rec.dis_information17
605       ,p_dis_information18
606       => p_rec.dis_information18
610       => p_rec.dis_information20
607       ,p_dis_information19
608       => p_rec.dis_information19
609       ,p_dis_information20
611       ,p_dis_information21
612       => p_rec.dis_information21
613       ,p_dis_information22
614       => p_rec.dis_information22
615       ,p_dis_information23
616       => p_rec.dis_information23
617       ,p_dis_information24
618       => p_rec.dis_information24
619       ,p_dis_information25
620       => p_rec.dis_information25
621       ,p_dis_information26
622       => p_rec.dis_information26
623       ,p_dis_information27
624       => p_rec.dis_information27
625       ,p_dis_information28
626       => p_rec.dis_information28
627       ,p_dis_information29
628       => p_rec.dis_information29
629       ,p_dis_information30
630       => p_rec.dis_information30
631       ,p_object_version_number
632       => p_rec.object_version_number
633       );
634     --
635   exception
636     --
637     when hr_api.cannot_find_prog_unit then
638       --
639       hr_api.cannot_find_prog_unit_error
640         (p_module_name => 'PER_DISABILITIES_F'
641         ,p_hook_type   => 'AI');
642       --
643   end;
644   --
645   hr_utility.set_location(' Leaving:'||l_proc, 10);
646 End post_insert;
647 --
648 -- ----------------------------------------------------------------------------
649 -- |-------------------------------< ins_lck >--------------------------------|
650 -- ----------------------------------------------------------------------------
651 -- {Start Of Comments}
652 --
653 -- Description:
654 --   The ins_lck process has one main function to perform. When inserting
655 --   a datetracked row, we must validate the DT mode.
656 --
657 -- Prerequisites:
658 --   This procedure can only be called for the datetrack mode of INSERT.
659 --
660 -- In Parameters:
661 --
662 -- Post Success:
663 --   On successful completion of the ins_lck process the parental
664 --   datetracked rows will be locked providing the p_enforce_foreign_locking
665 --   argument value is TRUE.
666 --   If the p_enforce_foreign_locking argument value is FALSE then the
667 --   parential rows are not locked.
668 --
669 -- Post Failure:
670 --   The Lck process can fail for:
671 --   1) When attempting to lock the row the row could already be locked by
672 --      another user. This will raise the HR_Api.Object_Locked exception.
673 --   2) When attempting to the lock the parent which doesn't exist.
674 --      For the entity to be locked the parent must exist!
675 --
676 -- Developer Implementation Notes:
677 --   None.
678 --
679 -- Access Status:
680 --   Internal Row Handler Use Only.
681 --
682 -- {End Of Comments}
683 -- ----------------------------------------------------------------------------
684 Procedure ins_lck
685   (p_effective_date        in date
686   ,p_datetrack_mode        in varchar2
687   ,p_rec                   in per_dis_shd.g_rec_type
688   ,p_validation_start_date out nocopy date
689   ,p_validation_end_date   out nocopy date
690   ) is
691 --
692   l_proc		  varchar2(72) := g_package||'ins_lck';
693   l_validation_start_date date;
694   l_validation_end_date	  date;
695 --
696 Begin
697   hr_utility.set_location('Entering:'||l_proc, 5);
698   --
699   -- Validate the datetrack mode mode getting the validation start
700   -- and end dates for the specified datetrack operation.
701   --
702   dt_api.validate_dt_mode
703     (p_effective_date	       => p_effective_date
704     ,p_datetrack_mode          => p_datetrack_mode
705     ,p_base_table_name         => 'per_disabilities_f'
706     ,p_base_key_column         => 'disability_id'
707     ,p_base_key_value          => p_rec.disability_id
708     ,p_parent_table_name1      => 'per_all_people_f'
709     ,p_parent_key_column1      => 'person_id'
710     ,p_parent_key_value1       => p_rec.person_id
711     ,p_enforce_foreign_locking => true
712     ,p_validation_start_date   => l_validation_start_date
713     ,p_validation_end_date     => l_validation_end_date
714     );
715   --
716   -- Set the validation start and end date OUT arguments
717   --
718   p_validation_start_date := l_validation_start_date;
719   p_validation_end_date   := l_validation_end_date;
720   --
721   hr_utility.set_location(' Leaving:'||l_proc, 10);
722 --
723 End ins_lck;
724 --
725 -- ----------------------------------------------------------------------------
726 -- |---------------------------------< ins >----------------------------------|
727 -- ----------------------------------------------------------------------------
728 Procedure ins
729   (p_effective_date in     date
730   ,p_rec            in out nocopy per_dis_shd.g_rec_type
731   ) is
732 --
733   l_proc                        varchar2(72) := g_package||'ins';
734   l_datetrack_mode              varchar2(30) := hr_api.g_insert;
735   l_validation_start_date       date;
736   l_validation_end_date         date;
737 --
738 Begin
739   hr_utility.set_location('Entering:'||l_proc, 5);
740   --
741   -- Call the lock operation
742   --
743   per_dis_ins.ins_lck
744     (p_effective_date        => p_effective_date
745     ,p_datetrack_mode        => l_datetrack_mode
749     );
746     ,p_rec                   => p_rec
747     ,p_validation_start_date => l_validation_start_date
748     ,p_validation_end_date   => l_validation_end_date
750   --
751   -- Call the supporting insert validate operations
752   --
753   per_dis_bus.insert_validate
754     (p_rec                   => p_rec
755     ,p_effective_date        => p_effective_date
756     ,p_datetrack_mode        => l_datetrack_mode
757     ,p_validation_start_date => l_validation_start_date
758     ,p_validation_end_date   => l_validation_end_date
759     );
760   --
761   -- Call the supporting pre-insert operation
762   --
763   per_dis_ins.pre_insert
764     (p_rec                   => p_rec
765     ,p_effective_date        => p_effective_date
766     ,p_datetrack_mode        => l_datetrack_mode
767     ,p_validation_start_date => l_validation_start_date
768     ,p_validation_end_date   => l_validation_end_date
769     );
770   --
771   -- Insert the row
772   --
773   per_dis_ins.insert_dml
774     (p_rec                   => p_rec
775     ,p_effective_date        => p_effective_date
776     ,p_datetrack_mode        => l_datetrack_mode
777     ,p_validation_start_date => l_validation_start_date
778     ,p_validation_end_date   => l_validation_end_date
779     );
780   --
781   -- Call the supporting post-insert operation
782   --
783   per_dis_ins.post_insert
784     (p_rec                   => p_rec
785     ,p_effective_date        => p_effective_date
786     ,p_datetrack_mode        => l_datetrack_mode
787     ,p_validation_start_date => l_validation_start_date
788     ,p_validation_end_date   => l_validation_end_date
789     );
790   --
791   hr_utility.set_location('Leaving:'||l_proc,10);
792 end ins;
793 --
794 -- ----------------------------------------------------------------------------
795 -- |---------------------------------< ins >----------------------------------|
796 -- ----------------------------------------------------------------------------
797 Procedure ins
798   (p_effective_date                 in     date
799   ,p_person_id                      in     number
800   ,p_category                       in     varchar2
801   ,p_status                         in     varchar2
802   ,p_quota_fte                      in     number
803   ,p_incident_id                    in     number   default null
804   ,p_organization_id                in     number   default null
805   ,p_registration_id                in     varchar2 default null
806   ,p_registration_date              in     date     default null
807   ,p_registration_exp_date          in     date     default null
808   ,p_description                    in     varchar2 default null
809   ,p_degree                         in     number   default null
810   ,p_reason                         in     varchar2 default null
811   ,p_pre_registration_job           in     varchar2 default null
812   ,p_work_restriction               in     varchar2 default null
813   ,p_attribute_category             in     varchar2 default null
814   ,p_attribute1                     in     varchar2 default null
815   ,p_attribute2                     in     varchar2 default null
816   ,p_attribute3                     in     varchar2 default null
817   ,p_attribute4                     in     varchar2 default null
818   ,p_attribute5                     in     varchar2 default null
819   ,p_attribute6                     in     varchar2 default null
820   ,p_attribute7                     in     varchar2 default null
821   ,p_attribute8                     in     varchar2 default null
822   ,p_attribute9                     in     varchar2 default null
823   ,p_attribute10                    in     varchar2 default null
824   ,p_attribute11                    in     varchar2 default null
825   ,p_attribute12                    in     varchar2 default null
826   ,p_attribute13                    in     varchar2 default null
827   ,p_attribute14                    in     varchar2 default null
828   ,p_attribute15                    in     varchar2 default null
829   ,p_attribute16                    in     varchar2 default null
830   ,p_attribute17                    in     varchar2 default null
831   ,p_attribute18                    in     varchar2 default null
832   ,p_attribute19                    in     varchar2 default null
833   ,p_attribute20                    in     varchar2 default null
834   ,p_attribute21                    in     varchar2 default null
835   ,p_attribute22                    in     varchar2 default null
836   ,p_attribute23                    in     varchar2 default null
837   ,p_attribute24                    in     varchar2 default null
838   ,p_attribute25                    in     varchar2 default null
839   ,p_attribute26                    in     varchar2 default null
840   ,p_attribute27                    in     varchar2 default null
841   ,p_attribute28                    in     varchar2 default null
842   ,p_attribute29                    in     varchar2 default null
843   ,p_attribute30                    in     varchar2 default null
844   ,p_dis_information_category       in     varchar2 default null
845   ,p_dis_information1               in     varchar2 default null
846   ,p_dis_information2               in     varchar2 default null
847   ,p_dis_information3               in     varchar2 default null
851   ,p_dis_information7               in     varchar2 default null
848   ,p_dis_information4               in     varchar2 default null
849   ,p_dis_information5               in     varchar2 default null
850   ,p_dis_information6               in     varchar2 default null
852   ,p_dis_information8               in     varchar2 default null
853   ,p_dis_information9               in     varchar2 default null
854   ,p_dis_information10              in     varchar2 default null
855   ,p_dis_information11              in     varchar2 default null
856   ,p_dis_information12              in     varchar2 default null
857   ,p_dis_information13              in     varchar2 default null
858   ,p_dis_information14              in     varchar2 default null
859   ,p_dis_information15              in     varchar2 default null
860   ,p_dis_information16              in     varchar2 default null
861   ,p_dis_information17              in     varchar2 default null
862   ,p_dis_information18              in     varchar2 default null
863   ,p_dis_information19              in     varchar2 default null
864   ,p_dis_information20              in     varchar2 default null
865   ,p_dis_information21              in     varchar2 default null
866   ,p_dis_information22              in     varchar2 default null
867   ,p_dis_information23              in     varchar2 default null
868   ,p_dis_information24              in     varchar2 default null
869   ,p_dis_information25              in     varchar2 default null
870   ,p_dis_information26              in     varchar2 default null
871   ,p_dis_information27              in     varchar2 default null
872   ,p_dis_information28              in     varchar2 default null
873   ,p_dis_information29              in     varchar2 default null
874   ,p_dis_information30              in     varchar2 default null
875   ,p_disability_id                     out nocopy number
876   ,p_object_version_number             out nocopy number
877   ,p_effective_start_date              out nocopy date
878   ,p_effective_end_date                out nocopy date
879   ) is
880 --
881   l_rec         per_dis_shd.g_rec_type;
882   l_proc        varchar2(72) := g_package||'ins';
883 --
884 Begin
885   hr_utility.set_location('Entering:'||l_proc, 5);
886   --
887   -- Call conversion function to turn arguments into the
888   -- p_rec structure.
889   --
890   l_rec :=
891   per_dis_shd.convert_args
892     (null
893     ,null
894     ,null
895     ,p_person_id
896     ,p_incident_id
897     ,p_organization_id
898     ,p_registration_id
899     ,p_registration_date
900     ,p_registration_exp_date
901     ,p_category
902     ,p_status
903     ,p_description
904     ,p_degree
905     ,p_quota_fte
906     ,p_reason
907     ,p_pre_registration_job
908     ,p_work_restriction
909     ,p_attribute_category
910     ,p_attribute1
911     ,p_attribute2
912     ,p_attribute3
913     ,p_attribute4
914     ,p_attribute5
915     ,p_attribute6
916     ,p_attribute7
917     ,p_attribute8
918     ,p_attribute9
919     ,p_attribute10
920     ,p_attribute11
921     ,p_attribute12
922     ,p_attribute13
923     ,p_attribute14
924     ,p_attribute15
925     ,p_attribute16
926     ,p_attribute17
927     ,p_attribute18
928     ,p_attribute19
929     ,p_attribute20
930     ,p_attribute21
931     ,p_attribute22
932     ,p_attribute23
933     ,p_attribute24
934     ,p_attribute25
935     ,p_attribute26
936     ,p_attribute27
937     ,p_attribute28
938     ,p_attribute29
939     ,p_attribute30
940     ,p_dis_information_category
941     ,p_dis_information1
942     ,p_dis_information2
943     ,p_dis_information3
944     ,p_dis_information4
945     ,p_dis_information5
946     ,p_dis_information6
947     ,p_dis_information7
948     ,p_dis_information8
949     ,p_dis_information9
950     ,p_dis_information10
951     ,p_dis_information11
952     ,p_dis_information12
953     ,p_dis_information13
954     ,p_dis_information14
955     ,p_dis_information15
956     ,p_dis_information16
957     ,p_dis_information17
958     ,p_dis_information18
959     ,p_dis_information19
960     ,p_dis_information20
961     ,p_dis_information21
962     ,p_dis_information22
963     ,p_dis_information23
964     ,p_dis_information24
965     ,p_dis_information25
966     ,p_dis_information26
967     ,p_dis_information27
968     ,p_dis_information28
969     ,p_dis_information29
970     ,p_dis_information30
971     ,null
972     );
973   --
974   -- Having converted the arguments into the per_dis_rec
975   -- plsql record structure we call the corresponding record
976   -- business process.
977   --
978   per_dis_ins.ins
979     (p_effective_date
980     ,l_rec
981     );
982   --
983   -- Set the OUT arguments.
984   --
985   p_disability_id                    := l_rec.disability_id;
986   p_effective_start_date             := l_rec.effective_start_date;
987   p_effective_end_date               := l_rec.effective_end_date;
988   p_object_version_number            := l_rec.object_version_number;
989   --
990   --
991   hr_utility.set_location(' Leaving:'||l_proc, 10);
992 End ins;
993 --
994 end per_dis_ins;