[Home] [Help]
PACKAGE BODY: APPS.BEN_QIG_INS
Source
1 Package Body ben_qig_ins as
2 /* $Header: beqigrhi.pkb 120.3 2008/02/05 08:40:32 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_qig_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_qua_in_gr_rt_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_qua_in_gr_rt_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 ben_qig_ins.g_qua_in_gr_rt_id_i := p_qua_in_gr_rt_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 ben_qig_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.created_by,
90 t.creation_date
91 from ben_qua_in_gr_rt_f t
92 where t.qua_in_gr_rt_id = p_rec.qua_in_gr_rt_id
93 and t.effective_start_date =
94 ben_qig_shd.g_old_rec.effective_start_date
95 and t.effective_end_date = (p_validation_start_date - 1);
96 --
97 l_proc varchar2(72) := g_package||'dt_insert_dml';
98 l_created_by ben_qua_in_gr_rt_f.created_by%TYPE;
99 l_creation_date ben_qua_in_gr_rt_f.creation_date%TYPE;
100 l_last_update_date ben_qua_in_gr_rt_f.last_update_date%TYPE;
101 l_last_updated_by ben_qua_in_gr_rt_f.last_updated_by%TYPE;
102 l_last_update_login ben_qua_in_gr_rt_f.last_update_login%TYPE;
103 --
104 Begin
105 hr_utility.set_location('Entering:'||l_proc, 5);
106 --
107 -- Get the object version number for the insert
108 --
109 p_rec.object_version_number :=
110 dt_api.get_object_version_number
111 (p_base_table_name => 'ben_qua_in_gr_rt_f'
112 ,p_base_key_column => 'qua_in_gr_rt_id'
113 ,p_base_key_value => p_rec.qua_in_gr_rt_id
114 );
115 --
116 -- Set the effective start and end dates to the corresponding
117 -- validation start and end dates
118 --
119 p_rec.effective_start_date := p_validation_start_date;
120 p_rec.effective_end_date := p_validation_end_date;
121 --
122 -- If the datetrack_mode is not INSERT then we must populate the WHO
123 -- columns with the 'old' creation values and 'new' updated values.
124 --
125 If (p_datetrack_mode <> hr_api.g_insert) then
126 hr_utility.set_location(l_proc, 10);
127 --
128 -- Select the 'old' created values
129 --
130 Open C_Sel1;
131 Fetch C_Sel1 Into l_created_by, l_creation_date;
132 If C_Sel1%notfound Then
133 --
134 -- The previous 'old' created row has not been found. We need
135 -- to error as an internal datetrack problem exists.
136 --
137 Close C_Sel1;
138 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
139 fnd_message.set_token('PROCEDURE', l_proc);
140 fnd_message.set_token('STEP','10');
141 fnd_message.raise_error;
142 End If;
143 Close C_Sel1;
144 --
145 -- Set the AOL updated WHO values
146 --
147 l_last_update_date := sysdate;
148 l_last_updated_by := fnd_global.user_id;
149 l_last_update_login := fnd_global.login_id;
150 End If;
151 --
152 --
153 --
154 -- Insert the row into: ben_qua_in_gr_rt_f
155 --
156 insert into ben_qua_in_gr_rt_f
157 (qua_in_gr_rt_id
158 ,effective_start_date
159 ,effective_end_date
160 ,quar_in_grade_cd
161 ,excld_flag
162 ,business_group_id
163 ,vrbl_rt_prfl_id
164 ,object_version_number
165 ,ordr_num
166 ,qig_attribute_category
167 ,qig_attribute1
168 ,qig_attribute2
169 ,qig_attribute3
170 ,qig_attribute4
171 ,qig_attribute5
172 ,qig_attribute6
173 ,qig_attribute7
174 ,qig_attribute8
175 ,qig_attribute9
176 ,qig_attribute10
177 ,qig_attribute11
178 ,qig_attribute12
179 ,qig_attribute13
180 ,qig_attribute14
181 ,qig_attribute15
182 ,qig_attribute16
183 ,qig_attribute17
184 ,qig_attribute18
185 ,qig_attribute19
186 ,qig_attribute20
187 ,qig_attribute21
188 ,qig_attribute22
189 ,qig_attribute23
190 ,qig_attribute24
191 ,qig_attribute25
192 ,qig_attribute26
193 ,qig_attribute27
194 ,qig_attribute28
195 ,qig_attribute29
196 ,qig_attribute30
197 ,created_by
198 ,creation_date
199 ,last_update_date
200 ,last_updated_by
201 ,last_update_login
202 )
203 Values
204 (p_rec.qua_in_gr_rt_id
205 ,p_rec.effective_start_date
206 ,p_rec.effective_end_date
207 ,p_rec.quar_in_grade_cd
208 ,p_rec.excld_flag
209 ,p_rec.business_group_id
210 ,p_rec.vrbl_rt_prfl_id
211 ,p_rec.object_version_number
212 ,p_rec.ordr_num
213 ,p_rec.qig_attribute_category
214 ,p_rec.qig_attribute1
215 ,p_rec.qig_attribute2
216 ,p_rec.qig_attribute3
217 ,p_rec.qig_attribute4
218 ,p_rec.qig_attribute5
219 ,p_rec.qig_attribute6
220 ,p_rec.qig_attribute7
221 ,p_rec.qig_attribute8
222 ,p_rec.qig_attribute9
223 ,p_rec.qig_attribute10
224 ,p_rec.qig_attribute11
225 ,p_rec.qig_attribute12
226 ,p_rec.qig_attribute13
227 ,p_rec.qig_attribute14
228 ,p_rec.qig_attribute15
229 ,p_rec.qig_attribute16
230 ,p_rec.qig_attribute17
231 ,p_rec.qig_attribute18
232 ,p_rec.qig_attribute19
233 ,p_rec.qig_attribute20
234 ,p_rec.qig_attribute21
235 ,p_rec.qig_attribute22
236 ,p_rec.qig_attribute23
237 ,p_rec.qig_attribute24
238 ,p_rec.qig_attribute25
239 ,p_rec.qig_attribute26
240 ,p_rec.qig_attribute27
241 ,p_rec.qig_attribute28
242 ,p_rec.qig_attribute29
243 ,p_rec.qig_attribute30
244 ,l_created_by
245 ,l_creation_date
246 ,l_last_update_date
247 ,l_last_updated_by
248 ,l_last_update_login
249 );
250 --
251 --
252 hr_utility.set_location(' Leaving:'||l_proc, 15);
253 --
254 Exception
255 When hr_api.check_integrity_violated Then
256 -- A check constraint has been violated
257 --
258 ben_qig_shd.constraint_error
259 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
260 When hr_api.unique_integrity_violated Then
261 -- Unique integrity has been violated
262 --
263 ben_qig_shd.constraint_error
264 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
265 When Others Then
266 --
267 Raise;
268 End dt_insert_dml;
269 --
270 -- ----------------------------------------------------------------------------
271 -- |------------------------------< insert_dml >------------------------------|
272 -- ----------------------------------------------------------------------------
273 Procedure insert_dml
274 (p_rec in out nocopy ben_qig_shd.g_rec_type
275 ,p_effective_date in date
276 ,p_datetrack_mode in varchar2
277 ,p_validation_start_date in date
278 ,p_validation_end_date in date
279 ) is
280 --
281 l_proc varchar2(72) := g_package||'insert_dml';
282 --
283 Begin
284 hr_utility.set_location('Entering:'||l_proc, 5);
285 --
286 ben_qig_ins.dt_insert_dml
287 (p_rec => p_rec
288 ,p_effective_date => p_effective_date
289 ,p_datetrack_mode => p_datetrack_mode
290 ,p_validation_start_date => p_validation_start_date
291 ,p_validation_end_date => p_validation_end_date
292 );
293 --
294 hr_utility.set_location(' Leaving:'||l_proc, 10);
295 End insert_dml;
296 --
297 -- ----------------------------------------------------------------------------
298 -- |------------------------------< pre_insert >------------------------------|
299 -- ----------------------------------------------------------------------------
300 -- {Start Of Comments}
301 --
302 -- Description:
303 -- This private procedure contains any processing which is required before
304 -- the insert dml. Presently, if the entity has a corresponding primary
305 -- key which is maintained by an associating sequence, the primary key for
306 -- the entity will be populated with the next sequence value in
307 -- preparation for the insert dml.
308 -- Also, if comments are defined for this entity, the comments insert
309 -- logic will also be called, generating a comment_id if required.
310 --
311 -- Prerequisites:
312 -- This is an internal procedure which is called from the ins procedure.
313 --
314 -- In Parameters:
315 -- A Pl/Sql record structure.
316 --
317 -- Post Success:
318 -- Processing continues.
319 --
320 -- Post Failure:
321 -- If an error has occurred, an error message and exception will be raised
322 -- but not handled.
323 --
324 -- Developer Implementation Notes:
325 -- Any pre-processing required before the insert dml is issued should be
326 -- coded within this procedure. As stated above, a good example is the
327 -- generation of a primary key number via a corresponding sequence.
328 -- It is important to note that any 3rd party maintenance should be reviewed
329 -- before placing in this procedure.
330 --
331 -- Access Status:
332 -- Internal Row Handler Use Only.
333 --
334 -- {End Of Comments}
335 -- ----------------------------------------------------------------------------
336 Procedure pre_insert
337 (p_rec in out nocopy ben_qig_shd.g_rec_type
338 ,p_effective_date in date
339 ,p_datetrack_mode in varchar2
340 ,p_validation_start_date in date
341 ,p_validation_end_date in date
342 ) is
343 --
344 Cursor C_Sel1 is select ben_qua_in_gr_rt_f_s.nextval from sys.dual;
345 --
346 Cursor C_Sel2 is
347 Select null
348 from ben_qua_in_gr_rt_f
349 where qua_in_gr_rt_id =
350 ben_qig_ins.g_qua_in_gr_rt_id_i;
351 --
352 l_proc varchar2(72) := g_package||'pre_insert';
353 l_exists varchar2(1);
354 --
355 Begin
356 hr_utility.set_location('Entering:'||l_proc, 5);
357 --
358 If (ben_qig_ins.g_qua_in_gr_rt_id_i is not null) Then
359 --
360 -- Verify registered primary key values not already in use
361 --
362 Open C_Sel2;
363 Fetch C_Sel2 into l_exists;
364 If C_Sel2%found Then
365 Close C_Sel2;
366 --
367 -- The primary key values are already in use.
368 --
369 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
370 fnd_message.set_token('TABLE_NAME','ben_qua_in_gr_rt_f');
371 fnd_message.raise_error;
372 End If;
373 Close C_Sel2;
374 --
375 -- Use registered key values and clear globals
376 --
377 p_rec.qua_in_gr_rt_id :=
378 ben_qig_ins.g_qua_in_gr_rt_id_i;
379 ben_qig_ins.g_qua_in_gr_rt_id_i := null;
380 Else
381 --
382 -- No registerd key values, so select the next sequence number
383 --
384 --
385 -- Select the next sequence number
386 --
387 Open C_Sel1;
388 Fetch C_Sel1 Into p_rec.qua_in_gr_rt_id;
389 Close C_Sel1;
390 End If;
391 --
392 --
393 hr_utility.set_location(' Leaving:'||l_proc, 10);
394 End pre_insert;
395 --
396 -- ----------------------------------------------------------------------------
397 -- |----------------------------< post_insert >-------------------------------|
398 -- ----------------------------------------------------------------------------
399 -- {Start Of Comments}
400 --
401 -- Description:
402 -- This private procedure contains any processing which is required after
403 -- the insert dml.
404 --
405 -- Prerequisites:
406 -- This is an internal procedure which is called from the ins procedure.
407 --
408 -- In Parameters:
409 -- A Pl/Sql record structure.
410 --
411 -- Post Success:
412 -- Processing continues.
413 --
414 -- Post Failure:
415 -- If an error has occurred, an error message and exception will be raised
416 -- but not handled.
417 --
418 -- Developer Implementation Notes:
419 -- Any post-processing required after the insert dml is issued should be
420 -- coded within this procedure. It is important to note that any 3rd party
421 -- maintenance should be reviewed before placing in this procedure.
422 --
423 -- Access Status:
424 -- Internal Row Handler Use Only.
425 --
426 -- {End Of Comments}
427 -- ----------------------------------------------------------------------------
428 Procedure post_insert
429 (p_rec in ben_qig_shd.g_rec_type
430 ,p_effective_date in date
431 ,p_datetrack_mode in varchar2
432 ,p_validation_start_date in date
433 ,p_validation_end_date in date
434 ) is
435 --
436 l_proc varchar2(72) := g_package||'post_insert';
437 --
438 Begin
439 hr_utility.set_location('Entering:'||l_proc, 5);
440 begin
441 --
442 ben_qig_rki.after_insert
443 (p_effective_date
444 => p_effective_date
445 ,p_validation_start_date
446 => p_validation_start_date
447 ,p_validation_end_date
448 => p_validation_end_date
449 ,p_qua_in_gr_rt_id
450 => p_rec.qua_in_gr_rt_id
451 ,p_effective_start_date
452 => p_rec.effective_start_date
453 ,p_effective_end_date
454 => p_rec.effective_end_date
455 ,p_quar_in_grade_cd
456 => p_rec.quar_in_grade_cd
457 ,p_excld_flag
458 => p_rec.excld_flag
459 ,p_business_group_id
460 => p_rec.business_group_id
461 ,p_vrbl_rt_prfl_id
462 => p_rec.vrbl_rt_prfl_id
463 ,p_object_version_number
464 => p_rec.object_version_number
465 ,p_ordr_num
466 => p_rec.ordr_num
467 ,p_qig_attribute_category
468 => p_rec.qig_attribute_category
469 ,p_qig_attribute1
470 => p_rec.qig_attribute1
471 ,p_qig_attribute2
472 => p_rec.qig_attribute2
473 ,p_qig_attribute3
474 => p_rec.qig_attribute3
475 ,p_qig_attribute4
476 => p_rec.qig_attribute4
477 ,p_qig_attribute5
478 => p_rec.qig_attribute5
479 ,p_qig_attribute6
480 => p_rec.qig_attribute6
481 ,p_qig_attribute7
482 => p_rec.qig_attribute7
483 ,p_qig_attribute8
484 => p_rec.qig_attribute8
485 ,p_qig_attribute9
486 => p_rec.qig_attribute9
487 ,p_qig_attribute10
488 => p_rec.qig_attribute10
489 ,p_qig_attribute11
490 => p_rec.qig_attribute11
491 ,p_qig_attribute12
492 => p_rec.qig_attribute12
493 ,p_qig_attribute13
494 => p_rec.qig_attribute13
495 ,p_qig_attribute14
496 => p_rec.qig_attribute14
497 ,p_qig_attribute15
498 => p_rec.qig_attribute15
499 ,p_qig_attribute16
500 => p_rec.qig_attribute16
501 ,p_qig_attribute17
502 => p_rec.qig_attribute17
503 ,p_qig_attribute18
504 => p_rec.qig_attribute18
505 ,p_qig_attribute19
506 => p_rec.qig_attribute19
507 ,p_qig_attribute20
508 => p_rec.qig_attribute20
509 ,p_qig_attribute21
510 => p_rec.qig_attribute21
511 ,p_qig_attribute22
512 => p_rec.qig_attribute22
513 ,p_qig_attribute23
514 => p_rec.qig_attribute23
515 ,p_qig_attribute24
516 => p_rec.qig_attribute24
517 ,p_qig_attribute25
518 => p_rec.qig_attribute25
519 ,p_qig_attribute26
520 => p_rec.qig_attribute26
521 ,p_qig_attribute27
522 => p_rec.qig_attribute27
523 ,p_qig_attribute28
524 => p_rec.qig_attribute28
525 ,p_qig_attribute29
526 => p_rec.qig_attribute29
527 ,p_qig_attribute30
528 => p_rec.qig_attribute30
529 );
530 --
531 exception
532 --
533 when hr_api.cannot_find_prog_unit then
534 --
535 hr_api.cannot_find_prog_unit_error
536 (p_module_name => 'BEN_QUA_IN_GR_RT_F'
537 ,p_hook_type => 'AI');
538 --
539 end;
540 --
541 hr_utility.set_location(' Leaving:'||l_proc, 10);
542 End post_insert;
543 --
544 -- ----------------------------------------------------------------------------
545 -- |-------------------------------< ins_lck >--------------------------------|
546 -- ----------------------------------------------------------------------------
547 -- {Start Of Comments}
548 --
549 -- Description:
550 -- The ins_lck process has one main function to perform. When inserting
551 -- a datetracked row, we must validate the DT mode.
552 --
553 -- Prerequisites:
554 -- This procedure can only be called for the datetrack mode of INSERT.
555 --
556 -- In Parameters:
557 --
558 -- Post Success:
559 -- On successful completion of the ins_lck process the parental
560 -- datetracked rows will be locked providing the p_enforce_foreign_locking
561 -- argument value is TRUE.
562 -- If the p_enforce_foreign_locking argument value is FALSE then the
563 -- parential rows are not locked.
564 --
565 -- Post Failure:
566 -- The Lck process can fail for:
567 -- 1) When attempting to lock the row the row could already be locked by
568 -- another user. This will raise the HR_Api.Object_Locked exception.
569 -- 2) When attempting to the lock the parent which doesn't exist.
570 -- For the entity to be locked the parent must exist!
571 --
572 -- Developer Implementation Notes:
573 -- None.
574 --
575 -- Access Status:
576 -- Internal Row Handler Use Only.
577 --
578 -- {End Of Comments}
579 -- ----------------------------------------------------------------------------
580 Procedure ins_lck
581 (p_effective_date in date
582 ,p_datetrack_mode in varchar2
583 ,p_rec in ben_qig_shd.g_rec_type
584 ,p_validation_start_date out nocopy date
585 ,p_validation_end_date out nocopy date
586 ) is
587 --
588 l_proc varchar2(72) := g_package||'ins_lck';
589 l_validation_start_date date;
590 l_validation_end_date date;
591 --
592 Begin
593 hr_utility.set_location('Entering:'||l_proc, 5);
594 --
595 -- Validate the datetrack mode mode getting the validation start
596 -- and end dates for the specified datetrack operation.
597 --
598 dt_api.validate_dt_mode
599 (p_effective_date => p_effective_date
600 ,p_datetrack_mode => p_datetrack_mode
601 ,p_base_table_name => 'ben_qua_in_gr_rt_f'
602 ,p_base_key_column => 'qua_in_gr_rt_id'
603 ,p_base_key_value => p_rec.qua_in_gr_rt_id
604 ,p_parent_table_name1 => 'ben_vrbl_rt_prfl_f'
605 ,p_parent_key_column1 => 'vrbl_rt_prfl_id'
606 ,p_parent_key_value1 => p_rec.vrbl_rt_prfl_id
607 ,p_enforce_foreign_locking => true
608 ,p_validation_start_date => l_validation_start_date
609 ,p_validation_end_date => l_validation_end_date
610 );
611 --
612 -- Set the validation start and end date OUT arguments
613 --
614 p_validation_start_date := l_validation_start_date;
615 p_validation_end_date := l_validation_end_date;
616 --
617 hr_utility.set_location(' Leaving:'||l_proc, 10);
618 --
619 End ins_lck;
620 --
621 -- ----------------------------------------------------------------------------
622 -- |---------------------------------< ins >----------------------------------|
623 -- ----------------------------------------------------------------------------
624 Procedure ins
625 (p_effective_date in date
626 ,p_rec in out nocopy ben_qig_shd.g_rec_type
627 ) is
628 --
629 l_proc varchar2(72) := g_package||'ins';
630 l_datetrack_mode varchar2(30) := hr_api.g_insert;
631 l_validation_start_date date;
632 l_validation_end_date date;
633 --
634 Begin
635 hr_utility.set_location('Entering:'||l_proc, 5);
636 --
637 -- Call the lock operation
638 --
639 ben_qig_ins.ins_lck
640 (p_effective_date => p_effective_date
641 ,p_datetrack_mode => l_datetrack_mode
642 ,p_rec => p_rec
643 ,p_validation_start_date => l_validation_start_date
644 ,p_validation_end_date => l_validation_end_date
645 );
646 --
647 -- Call the supporting insert validate operations
648 --
649 ben_qig_bus.insert_validate
650 (p_rec => p_rec
651 ,p_effective_date => p_effective_date
652 ,p_datetrack_mode => l_datetrack_mode
653 ,p_validation_start_date => l_validation_start_date
654 ,p_validation_end_date => l_validation_end_date
655 );
656 --
657 -- Call to raise any errors on multi-message list
658 hr_multi_message.end_validation_set;
659 --
660 -- Call the supporting pre-insert operation
661 --
662 ben_qig_ins.pre_insert
663 (p_rec => p_rec
664 ,p_effective_date => p_effective_date
665 ,p_datetrack_mode => l_datetrack_mode
666 ,p_validation_start_date => l_validation_start_date
667 ,p_validation_end_date => l_validation_end_date
668 );
669 --
670 -- Insert the row
671 --
672 ben_qig_ins.insert_dml
673 (p_rec => p_rec
674 ,p_effective_date => p_effective_date
675 ,p_datetrack_mode => l_datetrack_mode
676 ,p_validation_start_date => l_validation_start_date
677 ,p_validation_end_date => l_validation_end_date
678 );
679 --
680 -- Call the supporting post-insert operation
681 --
682 ben_qig_ins.post_insert
683 (p_rec => p_rec
684 ,p_effective_date => p_effective_date
685 ,p_datetrack_mode => l_datetrack_mode
686 ,p_validation_start_date => l_validation_start_date
687 ,p_validation_end_date => l_validation_end_date
688 );
689 --
690 -- Call to raise any errors on multi-message list
691 hr_multi_message.end_validation_set;
692 --
693 hr_utility.set_location('Leaving:'||l_proc,10);
694 end ins;
695 --
696 -- ----------------------------------------------------------------------------
697 -- |---------------------------------< ins >----------------------------------|
698 -- ----------------------------------------------------------------------------
699 Procedure ins
700 (p_effective_date in date
701 ,p_quar_in_grade_cd in varchar2
702 ,p_excld_flag in varchar2
703 ,p_business_group_id in number
704 ,p_vrbl_rt_prfl_id in number
705 ,p_ordr_num in number default null
706 ,p_qig_attribute_category in varchar2 default null
707 ,p_qig_attribute1 in varchar2 default null
708 ,p_qig_attribute2 in varchar2 default null
709 ,p_qig_attribute3 in varchar2 default null
710 ,p_qig_attribute4 in varchar2 default null
711 ,p_qig_attribute5 in varchar2 default null
712 ,p_qig_attribute6 in varchar2 default null
713 ,p_qig_attribute7 in varchar2 default null
714 ,p_qig_attribute8 in varchar2 default null
715 ,p_qig_attribute9 in varchar2 default null
716 ,p_qig_attribute10 in varchar2 default null
717 ,p_qig_attribute11 in varchar2 default null
718 ,p_qig_attribute12 in varchar2 default null
719 ,p_qig_attribute13 in varchar2 default null
720 ,p_qig_attribute14 in varchar2 default null
721 ,p_qig_attribute15 in varchar2 default null
722 ,p_qig_attribute16 in varchar2 default null
723 ,p_qig_attribute17 in varchar2 default null
724 ,p_qig_attribute18 in varchar2 default null
725 ,p_qig_attribute19 in varchar2 default null
726 ,p_qig_attribute20 in varchar2 default null
727 ,p_qig_attribute21 in varchar2 default null
728 ,p_qig_attribute22 in varchar2 default null
729 ,p_qig_attribute23 in varchar2 default null
730 ,p_qig_attribute24 in varchar2 default null
731 ,p_qig_attribute25 in varchar2 default null
732 ,p_qig_attribute26 in varchar2 default null
733 ,p_qig_attribute27 in varchar2 default null
734 ,p_qig_attribute28 in varchar2 default null
735 ,p_qig_attribute29 in varchar2 default null
736 ,p_qig_attribute30 in varchar2 default null
737 ,p_qua_in_gr_rt_id out nocopy number
738 ,p_object_version_number out nocopy number
739 ,p_effective_start_date out nocopy date
740 ,p_effective_end_date out nocopy date
741 ) is
742 --
743 l_rec ben_qig_shd.g_rec_type;
744 l_proc varchar2(72) := g_package||'ins';
745 --
746 Begin
747 hr_utility.set_location('Entering:'||l_proc, 5);
748 --
749 -- Call conversion function to turn arguments into the
750 -- p_rec structure.
751 --
752 l_rec :=
753 ben_qig_shd.convert_args
754 (null
755 ,null
756 ,null
757 ,p_quar_in_grade_cd
758 ,p_excld_flag
759 ,p_business_group_id
760 ,p_vrbl_rt_prfl_id
761 ,null
762 ,p_ordr_num
763 ,p_qig_attribute_category
764 ,p_qig_attribute1
765 ,p_qig_attribute2
766 ,p_qig_attribute3
767 ,p_qig_attribute4
768 ,p_qig_attribute5
769 ,p_qig_attribute6
770 ,p_qig_attribute7
771 ,p_qig_attribute8
772 ,p_qig_attribute9
773 ,p_qig_attribute10
774 ,p_qig_attribute11
775 ,p_qig_attribute12
776 ,p_qig_attribute13
777 ,p_qig_attribute14
778 ,p_qig_attribute15
779 ,p_qig_attribute16
780 ,p_qig_attribute17
781 ,p_qig_attribute18
782 ,p_qig_attribute19
783 ,p_qig_attribute20
784 ,p_qig_attribute21
785 ,p_qig_attribute22
786 ,p_qig_attribute23
787 ,p_qig_attribute24
788 ,p_qig_attribute25
789 ,p_qig_attribute26
790 ,p_qig_attribute27
791 ,p_qig_attribute28
792 ,p_qig_attribute29
793 ,p_qig_attribute30
794 );
795 --
796 -- Having converted the arguments into the ben_qig_rec
797 -- plsql record structure we call the corresponding record
798 -- business process.
799 --
800 ben_qig_ins.ins
801 (p_effective_date
802 ,l_rec
803 );
804 --
805 -- Set the OUT arguments.
806 --
807 p_qua_in_gr_rt_id := l_rec.qua_in_gr_rt_id;
808 p_effective_start_date := l_rec.effective_start_date;
809 p_effective_end_date := l_rec.effective_end_date;
810 p_object_version_number := l_rec.object_version_number;
811 --
812 --
813 hr_utility.set_location(' Leaving:'||l_proc, 10);
814 End ins;
815 --
816 end ben_qig_ins;