DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_IRF_INS

Source


1 Package Body irc_irf_ins as
2 /* $Header: irirfrhi.pkb 120.1 2008/04/16 07:34:32 vmummidi noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  irc_irf_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_referral_info_id_i  number   default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19   (p_referral_info_id  in  number) is
20 --
21   l_proc       varchar2(72) := g_package||'set_base_key_value';
22 --
23 Begin
24   hr_utility.set_location('Entering:'||l_proc, 10);
25   --
26   irc_irf_ins.g_referral_info_id_i := p_referral_info_id;
27   --
28   hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30 --
31 --
32 -- ----------------------------------------------------------------------------
33 -- |----------------------------< dt_insert_dml >-----------------------------|
34 -- ----------------------------------------------------------------------------
35 -- {Start Of Comments}
36 --
37 -- Description:
38 --   This procedure controls the actual dml insert logic for datetrack. The
39 --   functions of this procedure are as follows:
40 --   1) Get the object_version_number.
41 --   2) To set the effective start and end dates to the corresponding
42 --      validation start and end dates. Also, the object version number
43 --      record attribute is set.
44 --   3) To set and unset the g_api_dml status as required (as we are about to
45 --      perform dml).
46 --   4) To insert the row into the schema with the derived effective start
47 --      and end dates and the object version number.
48 --   5) To trap any constraint violations that may have occurred.
49 --   6) To raise any other errors.
50 --
51 -- Prerequisites:
52 --   This is an internal private procedure which must be called from the
53 --   insert_dml and pre_update (logic permitting) procedure and must have
54 --   all mandatory arguments set.
55 --
56 -- In Parameters:
57 --   A Pl/Sql record structure.
58 --
59 -- Post Success:
60 --   The specified row will be inserted into the schema.
61 --
62 -- Post Failure:
63 --   On the insert dml failure it is important to note that we always reset the
64 --   g_api_dml status to false.
65 --   If a check or unique integrity constraint violation is raised the
66 --   constraint_error procedure will be called.
67 --   If any other error is reported, the error will be raised after the
68 --   g_api_dml status is reset.
69 --
70 -- Developer Implementation Notes:
71 --   This is an internal datetrack maintenance procedure which should
72 --   not be modified in anyway.
73 --
74 -- Access Status:
75 --   Internal Row Handler Use Only.
76 --
77 -- {End Of Comments}
78 -- ----------------------------------------------------------------------------
79 Procedure dt_insert_dml
80   (p_rec                     in out nocopy irc_irf_shd.g_rec_type
81   ,p_effective_date          in date
82   ,p_datetrack_mode          in varchar2
83   ,p_validation_start_date   in date
84   ,p_validation_end_date     in date
85   ) is
86 -- Cursor to select 'old' created AOL who column values
87 --
88   Cursor C_Sel1 Is
89     select t.creation_date
90     from   irc_referral_info t
91     where t.referral_info_id = p_rec.referral_info_id
92     and    t.start_date =
93              irc_irf_shd.g_old_rec.start_date
94     and    t.end_date   = p_validation_start_date;
95 --
96 --
97   l_proc                varchar2(72) := g_package||'dt_insert_dml';
98   l_creation_date       irc_referral_info.creation_date%TYPE;
99   l_current_user_id     integer;
100   l_temp_count          integer;
101 --
102 Begin
103   hr_utility.set_location('Entering:'||l_proc, 5);
104   --
105   -- Set the effective start and end dates to the corresponding
106   -- validation start and end dates
107   --
108   p_rec.start_date  := p_validation_start_date;
109   p_rec.end_date    := p_validation_end_date;
110   l_current_user_id := fnd_global.user_id;
111   --
112   -- If the datetrack_mode is not INSERT then we must populate the WHO
113   -- columns with the 'old' creation values and 'new' updated values.
114   --
115   If (p_datetrack_mode <> hr_api.g_insert) then
116     hr_utility.set_location(l_proc, 10);
117     --
118       -- Get the object version number for the insert
119   --
120   p_rec.object_version_number :=
121    irc_irf_shd.get_object_version_number
122       (p_referral_info_id =>  p_rec.referral_info_id
123       );
124   --
125     -- Select the 'old' created values
126     --
127     Open C_Sel1;
128     Fetch C_Sel1 Into l_creation_date;
129     If C_Sel1%notfound Then
130       --
131       -- The previous 'old' created row has not been found. We need
132       -- to error as an internal datetrack problem exists.
133       --
134       Close C_Sel1;
135       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
136       fnd_message.set_token('PROCEDURE', l_proc);
137       fnd_message.set_token('STEP','10');
138       fnd_message.raise_error;
139     End If;
140     Close C_Sel1;
141     --
142     --
143     -- Set the AOL updated WHO values
144     --
145   Else
146     p_rec.object_version_number := 1;  -- Initialise the object version
147   End If;
148   --
149   --
150   --
151   -- Insert the row into: irc_referral_info
152   --
153   insert into irc_referral_info
154       (referral_info_id
155       ,object_id
156       ,object_type
157       ,start_date
158       ,end_date
159       ,source_type
160       ,source_name
161       ,source_criteria1
162       ,source_value1
163       ,source_criteria2
164       ,source_value2
165       ,source_criteria3
166       ,source_value3
167       ,source_criteria4
168       ,source_value4
169       ,source_criteria5
170       ,source_value5
171       ,source_person_id
172       ,candidate_comment
173       ,employee_comment
174       ,irf_attribute_category
175       ,irf_attribute1
176       ,irf_attribute2
177       ,irf_attribute3
178       ,irf_attribute4
179       ,irf_attribute5
180       ,irf_attribute6
181       ,irf_attribute7
182       ,irf_attribute8
183       ,irf_attribute9
184       ,irf_attribute10
185       ,irf_information_category
186       ,irf_information1
187       ,irf_information2
188       ,irf_information3
189       ,irf_information4
190       ,irf_information5
191       ,irf_information6
192       ,irf_information7
193       ,irf_information8
194       ,irf_information9
195       ,irf_information10
196       ,object_created_by
197       ,created_by
198       ,object_version_number
199       )
200   Values
201     (p_rec.referral_info_id
202     ,p_rec.object_id
203     ,p_rec.object_type
204     ,p_rec.start_date
205     ,p_rec.end_date
206     ,p_rec.source_type
207     ,p_rec.source_name
208     ,p_rec.source_criteria1
209     ,p_rec.source_value1
210     ,p_rec.source_criteria2
211     ,p_rec.source_value2
212     ,p_rec.source_criteria3
213     ,p_rec.source_value3
214     ,p_rec.source_criteria4
215     ,p_rec.source_value4
216     ,p_rec.source_criteria5
217     ,p_rec.source_value5
218     ,p_rec.source_person_id
219     ,p_rec.candidate_comment
220     ,p_rec.employee_comment
221     ,p_rec.irf_attribute_category
222     ,p_rec.irf_attribute1
223     ,p_rec.irf_attribute2
224     ,p_rec.irf_attribute3
225     ,p_rec.irf_attribute4
226     ,p_rec.irf_attribute5
227     ,p_rec.irf_attribute6
228     ,p_rec.irf_attribute7
229     ,p_rec.irf_attribute8
230     ,p_rec.irf_attribute9
231     ,p_rec.irf_attribute10
232     ,p_rec.irf_information_category
233     ,p_rec.irf_information1
234     ,p_rec.irf_information2
235     ,p_rec.irf_information3
236     ,p_rec.irf_information4
237     ,p_rec.irf_information5
238     ,p_rec.irf_information6
239     ,p_rec.irf_information7
240     ,p_rec.irf_information8
241     ,p_rec.irf_information9
242     ,p_rec.irf_information10
243     ,p_rec.object_created_by
244     ,p_rec.created_by
245     ,p_rec.object_version_number
246     );
247   --
248   --
249   hr_utility.set_location(' Leaving:'||l_proc, 15);
250 --
251 Exception
252   When hr_api.check_integrity_violated Then
253     -- A check constraint has been violated
254     --
255     irc_irf_shd.constraint_error
256       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
257   When hr_api.unique_integrity_violated Then
258     -- Unique integrity has been violated
259     --
260     irc_irf_shd.constraint_error
261       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
262   When Others Then
263     --
264     Raise;
265 End dt_insert_dml;
266 --
267 -- ----------------------------------------------------------------------------
268 -- |------------------------------< insert_dml >------------------------------|
269 -- ----------------------------------------------------------------------------
270 Procedure insert_dml
271   (p_rec                   in out nocopy irc_irf_shd.g_rec_type
272   ,p_effective_date        in date
273   ,p_datetrack_mode        in varchar2
274   ,p_validation_start_date in date
275   ,p_validation_end_date   in date
276   ) is
277 --
278   l_proc        varchar2(72) := g_package||'insert_dml';
279 --
280 Begin
281   hr_utility.set_location('Entering:'||l_proc, 5);
282   --
283   irc_irf_ins.dt_insert_dml
284     (p_rec                   => p_rec
285     ,p_effective_date        => p_effective_date
286     ,p_datetrack_mode        => p_datetrack_mode
287     ,p_validation_start_date => p_validation_start_date
288     ,p_validation_end_date   => p_validation_end_date
289     );
290   --
291   hr_utility.set_location(' Leaving:'||l_proc, 10);
292 End insert_dml;
293 --
294 -- ----------------------------------------------------------------------------
295 -- |------------------------------< pre_insert >------------------------------|
296 -- ----------------------------------------------------------------------------
297 -- {Start Of Comments}
298 --
299 -- Description:
300 --   This private procedure contains any processing which is required before
301 --   the insert dml. Presently, if the entity has a corresponding primary
302 --   key which is maintained by an associating sequence, the primary key for
303 --   the entity will be populated with the next sequence value in
304 --   preparation for the insert dml.
305 --   Also, if comments are defined for this entity, the comments insert
306 --   logic will also be called, generating a comment_id if required.
307 --
308 -- Prerequisites:
309 --   This is an internal procedure which is called from the ins procedure.
310 --
311 -- In Parameters:
312 --   A Pl/Sql record structure.
313 --
314 -- Post Success:
315 --   Processing continues.
316 --
317 -- Post Failure:
318 --   If an error has occurred, an error message and exception will be raised
319 --   but not handled.
320 --
321 -- Developer Implementation Notes:
322 --   Any pre-processing required before the insert dml is issued should be
323 --   coded within this procedure. As stated above, a good example is the
324 --   generation of a primary key number via a corresponding sequence.
325 --   It is important to note that any 3rd party maintenance should be reviewed
326 --   before placing in this procedure.
327 --
328 -- Access Status:
329 --   Internal Row Handler Use Only.
330 --
331 -- {End Of Comments}
332 -- ----------------------------------------------------------------------------
333 Procedure pre_insert
334   (p_rec                   in out nocopy irc_irf_shd.g_rec_type
335   ,p_effective_date        in date
336   ,p_datetrack_mode        in varchar2
337   ,p_validation_start_date in date
338   ,p_validation_end_date   in date
339   ) is
340 --
341   Cursor C_Sel1 is select irc_referral_info_s.nextval from sys.dual;
342 --
343  Cursor C_Sel2 is
344     Select null
345       from irc_referral_info
346      where object_id = p_rec.object_id
347        and object_type = p_rec.object_type
348        and p_effective_date between start_date
349              and end_date;
350 --
351   l_proc        varchar2(72) := g_package||'pre_insert';
352   l_exists      varchar2(1);
353 --
354 Begin
355   hr_utility.set_location('Entering:'||l_proc, 5);
356   --
357   --
358   -- Verify registered primary key values not already in use
359   --
360   Open C_Sel2;
361   Fetch C_Sel2 into l_exists;
362   If C_Sel2%found Then
363      Close C_Sel2;
364      --
365      -- The primary key values are already in use.
366      --
367      fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
368      fnd_message.set_token('TABLE_NAME','irc_referral_info');
369      fnd_message.raise_error;
370   End If;
371   Close C_Sel2;
372   If (irc_irf_ins.g_referral_info_id_i is not null) Then
373     --
374     -- Use registered key values and clear globals
375     --
376     p_rec.referral_info_id :=
377       irc_irf_ins.g_referral_info_id_i;
378     irc_irf_ins.g_referral_info_id_i := null;
379   Else
380     --
381     -- No registerd key values, so select the next sequence number
382     --
383     --
384     -- Select the next sequence number
385     --
386     Open C_Sel1;
387     Fetch C_Sel1 Into p_rec.referral_info_id;
388     Close C_Sel1;
389   End If;
390   --
391   --
392   hr_utility.set_location(' Leaving:'||l_proc, 10);
393 End pre_insert;
394 --
395 -- ----------------------------------------------------------------------------
396 -- |----------------------------< post_insert >-------------------------------|
397 -- ----------------------------------------------------------------------------
398 -- {Start Of Comments}
399 --
400 -- Description:
401 --   This private procedure contains any processing which is required after
402 --   the insert dml.
403 --
404 -- Prerequisites:
405 --   This is an internal procedure which is called from the ins procedure.
406 --
407 -- In Parameters:
408 --   A Pl/Sql record structure.
409 --
410 -- Post Success:
411 --   Processing continues.
412 --
413 -- Post Failure:
414 --   If an error has occurred, an error message and exception will be raised
415 --   but not handled.
416 --
417 -- Developer Implementation Notes:
418 --   Any post-processing required after the insert dml is issued should be
419 --   coded within this procedure. It is important to note that any 3rd party
420 --   maintenance should be reviewed before placing in this procedure.
421 --
422 -- Access Status:
423 --   Internal Row Handler Use Only.
424 --
425 -- {End Of Comments}
426 -- ----------------------------------------------------------------------------
427 Procedure post_insert
428   (p_rec                   in irc_irf_shd.g_rec_type
429   ,p_effective_date        in date
430   ,p_datetrack_mode        in varchar2
431   ,p_validation_start_date in date
432   ,p_validation_end_date   in date
433   ) is
434 --
435   l_proc        varchar2(72) := g_package||'post_insert';
436 --
437 Begin
438   hr_utility.set_location('Entering:'||l_proc, 5);
439   begin
440     --
441     irc_irf_rki.after_insert
442       (p_effective_date              => p_effective_date
443       ,p_validation_start_date       => p_validation_start_date
444       ,p_validation_end_date         => p_validation_end_date
445       ,p_referral_info_id             => p_rec.referral_info_id
446 	  ,p_object_id                    => p_rec.object_id
447 	  ,p_object_type                  => p_rec.object_type
448 	  ,p_start_date                   => p_rec.start_date
449 	  ,p_end_date            	      => p_rec.end_date
450 	  ,p_source_type            	  => p_rec.source_type
451 	  ,p_source_name            	  => p_rec.source_name
452 	  ,p_source_criteria1             => p_rec.source_criteria1
453 	  ,p_source_value1            	  => p_rec.source_value1
454 	  ,p_source_criteria2             => p_rec.source_criteria2
455 	  ,p_source_value2            	  => p_rec.source_value2
456 	  ,p_source_criteria3             => p_rec.source_criteria3
457 	  ,p_source_value3                => p_rec.source_value3
458 	  ,p_source_criteria4             => p_rec.source_criteria4
459 	  ,p_source_value4                => p_rec.source_value4
460 	  ,p_source_criteria5             => p_rec.source_criteria5
461 	  ,p_source_value5                => p_rec.source_value5
462 	  ,p_source_person_id             => p_rec.source_person_id
463 	  ,p_candidate_comment            => p_rec.candidate_comment
464 	  ,p_employee_comment             => p_rec.employee_comment
465 	  ,p_irf_attribute_category       => p_rec.irf_attribute_category
466 	  ,p_irf_attribute1               => p_rec.irf_attribute1
467 	  ,p_irf_attribute2               => p_rec.irf_attribute2
468 	  ,p_irf_attribute3               => p_rec.irf_attribute3
469 	  ,p_irf_attribute4               => p_rec.irf_attribute4
470 	  ,p_irf_attribute5               => p_rec.irf_attribute5
471 	  ,p_irf_attribute6               => p_rec.irf_attribute6
472 	  ,p_irf_attribute7               => p_rec.irf_attribute7
473 	  ,p_irf_attribute8               => p_rec.irf_attribute8
474 	  ,p_irf_attribute9               => p_rec.irf_attribute9
475 	  ,p_irf_attribute10              => p_rec.irf_attribute10
476 	  ,p_irf_information_category     => p_rec.irf_information_category
477 	  ,p_irf_information1             => p_rec.irf_information1
478 	  ,p_irf_information2             => p_rec.irf_information2
479 	  ,p_irf_information3             => p_rec.irf_information3
480 	  ,p_irf_information4             => p_rec.irf_information4
481 	  ,p_irf_information5             => p_rec.irf_information5
482 	  ,p_irf_information6             => p_rec.irf_information6
483 	  ,p_irf_information7             => p_rec.irf_information7
484 	  ,p_irf_information8             => p_rec.irf_information8
485 	  ,p_irf_information9             => p_rec.irf_information9
486 	  ,p_irf_information10            => p_rec.irf_information10
487 	  ,p_object_created_by            => p_rec.object_created_by
488 	  ,p_created_by                   => p_rec.created_by
489 	  ,p_object_version_number        => p_rec.object_version_number
490       );
491     --
492   exception
493     --
494     when hr_api.cannot_find_prog_unit then
495       --
496       hr_api.cannot_find_prog_unit_error
497         (p_module_name => 'IRC_REFERRAL_INFO'
498         ,p_hook_type   => 'AI');
499       --
500   end;
501   --
502   hr_utility.set_location(' Leaving:'||l_proc, 10);
503 End post_insert;
504 --
505 -- ----------------------------------------------------------------------------
506 -- |-------------------------------< ins_lck >--------------------------------|
507 -- ----------------------------------------------------------------------------
508 -- {Start Of Comments}
509 --
510 -- Description:
511 --   The ins_lck process has one main function to perform. When inserting
512 --   a datetracked row, we must validate the DT mode.
513 --
514 -- Prerequisites:
515 --   This procedure can only be called for the datetrack mode of INSERT.
516 --
517 -- In Parameters:
518 --
519 -- Post Success:
520 --   On successful completion of the ins_lck process the parental
521 --   datetracked rows will be locked providing the p_enforce_foreign_locking
522 --   argument value is TRUE.
523 --   If the p_enforce_foreign_locking argument value is FALSE then the
524 --   parential rows are not locked.
525 --
526 -- Post Failure:
527 --   The Lck process can fail for:
528 --   1) When attempting to lock the row the row could already be locked by
529 --      another user. This will raise the HR_Api.Object_Locked exception.
530 --   2) When attempting to the lock the parent which doesn't exist.
531 --      For the entity to be locked the parent must exist!
532 --
533 -- Developer Implementation Notes:
534 --   None.
535 --
536 -- Access Status:
537 --   Internal Row Handler Use Only.
538 --
539 -- {End Of Comments}
540 -- ----------------------------------------------------------------------------
541 Procedure ins_lck
542   (p_effective_date        in date
543   ,p_datetrack_mode        in varchar2
544   ,p_rec                   in irc_irf_shd.g_rec_type
545   ,p_validation_start_date out nocopy date
546   ,p_validation_end_date   out nocopy date
547   ) is
548 --
549   l_proc                  varchar2(72) := g_package||'ins_lck';
550   l_validation_start_date date;
551   l_validation_end_date   date;
552 --
553 Begin
554   hr_utility.set_location('Entering:'||l_proc, 5);
555   --
556   -- Validate the datetrack mode mode getting the validation start
557   -- and end dates for the specified datetrack operation.
558   --
559   --
560   -- Set the validation start and end date OUT arguments
561   --
562 --  p_validation_start_date := l_validation_start_date;
563 --  p_validation_end_date   := l_validation_end_date;
564   p_validation_start_date := sysdate;
565   p_validation_end_date   := hr_general.end_of_time;
566   --
567   hr_utility.set_location(' Leaving:'||l_proc, 10);
568   --
569 End ins_lck;
570 --
571 -- ----------------------------------------------------------------------------
572 -- |---------------------------------< ins >----------------------------------|
573 -- ----------------------------------------------------------------------------
574 Procedure ins
575   (p_effective_date in     date
576   ,p_rec            in out nocopy irc_irf_shd.g_rec_type
577   ) is
578 --
579   l_proc                        varchar2(72) := g_package||'ins';
580   l_datetrack_mode              varchar2(30) := hr_api.g_insert;
581   l_validation_start_date       date;
582   l_validation_end_date         date;
583 --
584 Begin
585   hr_utility.set_location('Entering:'||l_proc, 5);
586   --
587   -- Call the lock operation
588   --
589   irc_irf_ins.ins_lck
590     (p_effective_date        => p_effective_date
591     ,p_datetrack_mode        => l_datetrack_mode
592     ,p_rec                   => p_rec
593     ,p_validation_start_date => l_validation_start_date
594     ,p_validation_end_date   => l_validation_end_date
595     );
596   --
597   -- Call the supporting insert validate operations
598   --
599     irc_irf_bus.insert_validate
600     (p_rec                   => p_rec
601     ,p_effective_date        => p_effective_date
602     ,p_datetrack_mode        => l_datetrack_mode
603     ,p_validation_start_date => l_validation_start_date
604     ,p_validation_end_date   => l_validation_end_date
605     );
606   --
607   -- Call to raise any errors on multi-message list
608   hr_multi_message.end_validation_set;
609   --
610   -- Call the supporting pre-insert operation
611   --
612   irc_irf_ins.pre_insert
613     (p_rec                   => p_rec
614     ,p_effective_date        => p_effective_date
615     ,p_datetrack_mode        => l_datetrack_mode
616     ,p_validation_start_date => l_validation_start_date
617     ,p_validation_end_date   => l_validation_end_date
618     );
619   --
620   -- Insert the row
621   --
622   irc_irf_ins.insert_dml
623     (p_rec                   => p_rec
624     ,p_effective_date        => p_effective_date
625     ,p_datetrack_mode        => l_datetrack_mode
626     ,p_validation_start_date => l_validation_start_date
627     ,p_validation_end_date   => l_validation_end_date
628     );
629   --
630   -- Call the supporting post-insert operation
631   --
632   irc_irf_ins.post_insert
633     (p_rec                   => p_rec
634     ,p_effective_date        => p_effective_date
635     ,p_datetrack_mode        => l_datetrack_mode
636     ,p_validation_start_date => l_validation_start_date
637     ,p_validation_end_date   => l_validation_end_date
638     );
639   --
640   -- Call to raise any errors on multi-message list
641   hr_multi_message.end_validation_set;
642   --
643   hr_utility.set_location('Leaving:'||l_proc,10);
644 end ins;
645 --
646 -- ----------------------------------------------------------------------------
647 -- |---------------------------------< ins >----------------------------------|
648 -- ----------------------------------------------------------------------------
649 Procedure ins
650   (p_effective_date                 in 		 date
651   ,p_object_id                   	in 		 number
652   ,p_object_type                    in 		 varchar2
653   ,p_source_type            		in 		 varchar2
654   ,p_source_name            		in 		 varchar2
655   ,p_source_criteria1               in 	     varchar2
656   ,p_source_value1            	    in 		 varchar2
657   ,p_source_criteria2               in 		 varchar2
658   ,p_source_value2            	    in 		 varchar2
659   ,p_source_criteria3               in 		 varchar2
660   ,p_source_value3                  in 		 varchar2
661   ,p_source_criteria4               in 		 varchar2
662   ,p_source_value4                  in 		 varchar2
663   ,p_source_criteria5               in 		 varchar2
664   ,p_source_value5                  in 		 varchar2
665   ,p_source_person_id               in 		 number
666   ,p_candidate_comment              in 		 varchar2
667   ,p_employee_comment               in 		 varchar2
668   ,p_irf_attribute_category         in 		 varchar2
669   ,p_irf_attribute1                 in 		 varchar2
670   ,p_irf_attribute2                 in 		 varchar2
671   ,p_irf_attribute3                 in 		 varchar2
672   ,p_irf_attribute4                 in 		 varchar2
673   ,p_irf_attribute5                 in 		 varchar2
674   ,p_irf_attribute6                 in 		 varchar2
675   ,p_irf_attribute7                 in 		 varchar2
676   ,p_irf_attribute8                 in 		 varchar2
677   ,p_irf_attribute9                 in 		 varchar2
678   ,p_irf_attribute10                in 		 varchar2
679   ,p_irf_information_category       in 		 varchar2
680   ,p_irf_information1               in 		 varchar2
681   ,p_irf_information2               in 		 varchar2
682   ,p_irf_information3               in 		 varchar2
683   ,p_irf_information4               in 		 varchar2
684   ,p_irf_information5               in 		 varchar2
685   ,p_irf_information6               in 		 varchar2
686   ,p_irf_information7               in 		 varchar2
687   ,p_irf_information8               in 		 varchar2
688   ,p_irf_information9               in 		 varchar2
689   ,p_irf_information10              in 		 varchar2
690   ,p_object_created_by              in 		 varchar2
691   ,p_referral_info_id               out nocopy number
692   ,p_object_version_number          out nocopy number
693   ,p_start_date                     out nocopy date
694   ,p_end_date                       out nocopy date
695   ) is
696 --
697   l_rec         irc_irf_shd.g_rec_type;
698   l_proc        varchar2(72) := g_package||'ins';
699 --
700 Begin
701   hr_utility.set_location('Entering:'||l_proc, 5);
702   --
703   -- Call conversion function to turn arguments into the
704   -- p_rec structure.
705   --
706   l_rec :=
707   irc_irf_shd.convert_args
708     (null
709     ,p_object_id
710     ,p_object_type
711     ,p_start_date
712     ,p_end_date
713     ,p_source_type
714     ,p_source_name
715     ,p_source_criteria1
716     ,p_source_value1
717     ,p_source_criteria2
718     ,p_source_value2
719     ,p_source_criteria3
720     ,p_source_value3
721     ,p_source_criteria4
722     ,p_source_value4
723     ,p_source_criteria5
724     ,p_source_value5
725     ,p_source_person_id
726     ,p_candidate_comment
727     ,p_employee_comment
728     ,p_irf_attribute_category
729     ,p_irf_attribute1
730     ,p_irf_attribute2
731     ,p_irf_attribute3
732     ,p_irf_attribute4
733     ,p_irf_attribute5
734     ,p_irf_attribute6
735     ,p_irf_attribute7
736     ,p_irf_attribute8
737     ,p_irf_attribute9
738     ,p_irf_attribute10
739     ,p_irf_information_category
740     ,p_irf_information1
741     ,p_irf_information2
742     ,p_irf_information3
743     ,p_irf_information4
744     ,p_irf_information5
745     ,p_irf_information6
746     ,p_irf_information7
747     ,p_irf_information8
748     ,p_irf_information9
749     ,p_irf_information10
750     ,p_object_created_by
751     ,null
752     );
753   --
754   -- Having converted the arguments into the irc_irf_rec
755   -- plsql record structure we call the corresponding record
756   -- business process.
757   --
758   irc_irf_ins.ins
759     (p_effective_date
760     ,l_rec
761     );
762   --
763   -- Set the OUT arguments.
764   --
765   p_referral_info_id := l_rec.referral_info_id;
766   p_start_date             := l_rec.start_date;
767   p_end_date               := l_rec.end_date;
768   p_object_version_number            := l_rec.object_version_number;
769   --
770   --
771   hr_utility.set_location(' Leaving:'||l_proc, 10);
772 End ins;
773 --
774 end irc_irf_ins;