[Home] [Help]
PACKAGE BODY: APPS.BEN_CTY_INS
Source
1 Package Body ben_cty_ins as
2 /* $Header: bectyrhi.pkb 120.2 2006/03/30 23:42:52 gsehgal noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_cty_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_comptncy_rt_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_comptncy_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_cty_ins.g_comptncy_rt_id_i := p_comptncy_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_cty_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_comptncy_rt_f t
92 where t.comptncy_rt_id = p_rec.comptncy_rt_id
93 and t.effective_start_date =
94 ben_cty_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_comptncy_rt_f.created_by%TYPE;
99 l_creation_date ben_comptncy_rt_f.creation_date%TYPE;
100 l_last_update_date ben_comptncy_rt_f.last_update_date%TYPE;
101 l_last_updated_by ben_comptncy_rt_f.last_updated_by%TYPE;
102 l_last_update_login ben_comptncy_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_comptncy_rt_f'
112 ,p_base_key_column => 'comptncy_rt_id'
113 ,p_base_key_value => p_rec.comptncy_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_comptncy_rt_f
155 --
156 insert into ben_comptncy_rt_f
157 (comptncy_rt_id
158 ,effective_start_date
159 ,effective_end_date
160 ,competence_id
161 ,rating_level_id
162 ,excld_flag
163 ,business_group_id
164 ,vrbl_rt_prfl_id
165 ,object_version_number
166 ,ordr_num
167 ,cty_attribute_category
168 ,cty_attribute1
169 ,cty_attribute2
170 ,cty_attribute3
171 ,cty_attribute4
172 ,cty_attribute5
173 ,cty_attribute6
174 ,cty_attribute7
175 ,cty_attribute8
176 ,cty_attribute9
177 ,cty_attribute10
178 ,cty_attribute11
179 ,cty_attribute12
180 ,cty_attribute13
181 ,cty_attribute14
182 ,cty_attribute15
183 ,cty_attribute16
184 ,cty_attribute17
185 ,cty_attribute18
186 ,cty_attribute19
187 ,cty_attribute20
188 ,cty_attribute21
189 ,cty_attribute22
190 ,cty_attribute23
191 ,cty_attribute24
192 ,cty_attribute25
193 ,cty_attribute26
194 ,cty_attribute27
195 ,cty_attribute28
196 ,cty_attribute29
197 ,cty_attribute30
198 ,created_by
199 ,creation_date
200 ,last_update_date
201 ,last_updated_by
202 ,last_update_login
203 )
204 Values
205 (p_rec.comptncy_rt_id
206 ,p_rec.effective_start_date
207 ,p_rec.effective_end_date
208 ,p_rec.competence_id
209 ,p_rec.rating_level_id
210 ,p_rec.excld_flag
211 ,p_rec.business_group_id
212 ,p_rec.vrbl_rt_prfl_id
213 ,p_rec.object_version_number
214 ,p_rec.ordr_num
215 ,p_rec.cty_attribute_category
216 ,p_rec.cty_attribute1
217 ,p_rec.cty_attribute2
218 ,p_rec.cty_attribute3
219 ,p_rec.cty_attribute4
220 ,p_rec.cty_attribute5
221 ,p_rec.cty_attribute6
222 ,p_rec.cty_attribute7
223 ,p_rec.cty_attribute8
224 ,p_rec.cty_attribute9
225 ,p_rec.cty_attribute10
226 ,p_rec.cty_attribute11
227 ,p_rec.cty_attribute12
228 ,p_rec.cty_attribute13
229 ,p_rec.cty_attribute14
230 ,p_rec.cty_attribute15
231 ,p_rec.cty_attribute16
232 ,p_rec.cty_attribute17
233 ,p_rec.cty_attribute18
234 ,p_rec.cty_attribute19
235 ,p_rec.cty_attribute20
236 ,p_rec.cty_attribute21
237 ,p_rec.cty_attribute22
238 ,p_rec.cty_attribute23
239 ,p_rec.cty_attribute24
240 ,p_rec.cty_attribute25
241 ,p_rec.cty_attribute26
242 ,p_rec.cty_attribute27
243 ,p_rec.cty_attribute28
244 ,p_rec.cty_attribute29
245 ,p_rec.cty_attribute30
246 ,l_created_by
247 ,l_creation_date
248 ,l_last_update_date
249 ,l_last_updated_by
250 ,l_last_update_login
251 );
252 --
253 --
254 hr_utility.set_location(' Leaving:'||l_proc, 15);
255 --
256 Exception
257 When hr_api.check_integrity_violated Then
258 -- A check constraint has been violated
259 --
260 ben_cty_shd.constraint_error
261 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
262 When hr_api.unique_integrity_violated Then
263 -- Unique integrity has been violated
264 --
265 ben_cty_shd.constraint_error
266 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
267 When Others Then
268 --
269 Raise;
270 End dt_insert_dml;
271 --
272 -- ----------------------------------------------------------------------------
273 -- |------------------------------< insert_dml >------------------------------|
274 -- ----------------------------------------------------------------------------
275 Procedure insert_dml
276 (p_rec in out nocopy ben_cty_shd.g_rec_type
277 ,p_effective_date in date
278 ,p_datetrack_mode in varchar2
279 ,p_validation_start_date in date
280 ,p_validation_end_date in date
281 ) is
282 --
283 l_proc varchar2(72) := g_package||'insert_dml';
284 --
285 Begin
286 hr_utility.set_location('Entering:'||l_proc, 5);
287 --
288 ben_cty_ins.dt_insert_dml
289 (p_rec => p_rec
290 ,p_effective_date => p_effective_date
291 ,p_datetrack_mode => p_datetrack_mode
292 ,p_validation_start_date => p_validation_start_date
293 ,p_validation_end_date => p_validation_end_date
294 );
295 --
296 hr_utility.set_location(' Leaving:'||l_proc, 10);
297 End insert_dml;
298 --
299 -- ----------------------------------------------------------------------------
300 -- |------------------------------< pre_insert >------------------------------|
301 -- ----------------------------------------------------------------------------
302 -- {Start Of Comments}
303 --
304 -- Description:
305 -- This private procedure contains any processing which is required before
306 -- the insert dml. Presently, if the entity has a corresponding primary
307 -- key which is maintained by an associating sequence, the primary key for
308 -- the entity will be populated with the next sequence value in
309 -- preparation for the insert dml.
310 -- Also, if comments are defined for this entity, the comments insert
311 -- logic will also be called, generating a comment_id if required.
312 --
313 -- Prerequisites:
314 -- This is an internal procedure which is called from the ins procedure.
315 --
316 -- In Parameters:
317 -- A Pl/Sql record structure.
318 --
319 -- Post Success:
320 -- Processing continues.
321 --
322 -- Post Failure:
323 -- If an error has occurred, an error message and exception will be raised
324 -- but not handled.
325 --
326 -- Developer Implementation Notes:
327 -- Any pre-processing required before the insert dml is issued should be
328 -- coded within this procedure. As stated above, a good example is the
329 -- generation of a primary key number via a corresponding sequence.
330 -- It is important to note that any 3rd party maintenance should be reviewed
331 -- before placing in this procedure.
332 --
333 -- Access Status:
334 -- Internal Row Handler Use Only.
335 --
336 -- {End Of Comments}
337 -- ----------------------------------------------------------------------------
338 Procedure pre_insert
339 (p_rec in out nocopy ben_cty_shd.g_rec_type
340 ,p_effective_date in date
341 ,p_datetrack_mode in varchar2
342 ,p_validation_start_date in date
343 ,p_validation_end_date in date
344 ) is
345 --
346 Cursor C_Sel1 is select ben_comptncy_rt_f_s.nextval from sys.dual;
347 --
348 Cursor C_Sel2 is
349 Select null
350 from ben_comptncy_rt_f
351 where comptncy_rt_id =
352 ben_cty_ins.g_comptncy_rt_id_i;
353 --
354 l_proc varchar2(72) := g_package||'pre_insert';
355 l_exists varchar2(1);
356 --
357 Begin
358 hr_utility.set_location('Entering:'||l_proc, 5);
359 --
360 If (ben_cty_ins.g_comptncy_rt_id_i is not null) Then
361 --
362 -- Verify registered primary key values not already in use
363 --
364 Open C_Sel2;
365 Fetch C_Sel2 into l_exists;
366 If C_Sel2%found Then
367 Close C_Sel2;
368 --
369 -- The primary key values are already in use.
370 --
371 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
372 fnd_message.set_token('TABLE_NAME','ben_comptncy_rt_f');
373 fnd_message.raise_error;
374 End If;
375 Close C_Sel2;
376 --
377 -- Use registered key values and clear globals
378 --
379 p_rec.comptncy_rt_id :=
380 ben_cty_ins.g_comptncy_rt_id_i;
381 ben_cty_ins.g_comptncy_rt_id_i := null;
382 Else
383 --
384 -- No registerd key values, so select the next sequence number
385 --
386 --
387 -- Select the next sequence number
388 --
389 Open C_Sel1;
390 Fetch C_Sel1 Into p_rec.comptncy_rt_id;
391 Close C_Sel1;
392 End If;
393 --
394 --
395 hr_utility.set_location(' Leaving:'||l_proc, 10);
396 End pre_insert;
397 --
398 -- ----------------------------------------------------------------------------
399 -- |----------------------------< post_insert >-------------------------------|
400 -- ----------------------------------------------------------------------------
401 -- {Start Of Comments}
402 --
403 -- Description:
404 -- This private procedure contains any processing which is required after
405 -- the insert dml.
406 --
407 -- Prerequisites:
408 -- This is an internal procedure which is called from the ins procedure.
409 --
410 -- In Parameters:
411 -- A Pl/Sql record structure.
412 --
413 -- Post Success:
414 -- Processing continues.
415 --
416 -- Post Failure:
417 -- If an error has occurred, an error message and exception will be raised
418 -- but not handled.
419 --
420 -- Developer Implementation Notes:
421 -- Any post-processing required after the insert dml is issued should be
422 -- coded within this procedure. It is important to note that any 3rd party
423 -- maintenance should be reviewed before placing in this procedure.
424 --
425 -- Access Status:
426 -- Internal Row Handler Use Only.
427 --
428 -- {End Of Comments}
429 -- ----------------------------------------------------------------------------
430 Procedure post_insert
431 (p_rec in ben_cty_shd.g_rec_type
432 ,p_effective_date in date
433 ,p_datetrack_mode in varchar2
434 ,p_validation_start_date in date
438 l_proc varchar2(72) := g_package||'post_insert';
435 ,p_validation_end_date in date
436 ) is
437 --
439 --
440 Begin
441 hr_utility.set_location('Entering:'||l_proc, 5);
442 begin
443 --
444 ben_cty_rki.after_insert
445 (p_effective_date
446 => p_effective_date
447 ,p_validation_start_date
448 => p_validation_start_date
449 ,p_validation_end_date
450 => p_validation_end_date
451 ,p_comptncy_rt_id
452 => p_rec.comptncy_rt_id
453 ,p_effective_start_date
454 => p_rec.effective_start_date
455 ,p_effective_end_date
456 => p_rec.effective_end_date
457 ,p_competence_id
458 => p_rec.competence_id
459 ,p_rating_level_id
460 => p_rec.rating_level_id
461 ,p_excld_flag
462 => p_rec.excld_flag
463 ,p_business_group_id
464 => p_rec.business_group_id
465 ,p_vrbl_rt_prfl_id
466 => p_rec.vrbl_rt_prfl_id
467 ,p_object_version_number
468 => p_rec.object_version_number
469 ,p_ordr_num
470 => p_rec.ordr_num
471 ,p_cty_attribute_category
472 => p_rec.cty_attribute_category
473 ,p_cty_attribute1
474 => p_rec.cty_attribute1
475 ,p_cty_attribute2
476 => p_rec.cty_attribute2
477 ,p_cty_attribute3
478 => p_rec.cty_attribute3
479 ,p_cty_attribute4
480 => p_rec.cty_attribute4
481 ,p_cty_attribute5
482 => p_rec.cty_attribute5
483 ,p_cty_attribute6
484 => p_rec.cty_attribute6
485 ,p_cty_attribute7
486 => p_rec.cty_attribute7
487 ,p_cty_attribute8
488 => p_rec.cty_attribute8
489 ,p_cty_attribute9
490 => p_rec.cty_attribute9
491 ,p_cty_attribute10
492 => p_rec.cty_attribute10
493 ,p_cty_attribute11
494 => p_rec.cty_attribute11
495 ,p_cty_attribute12
496 => p_rec.cty_attribute12
497 ,p_cty_attribute13
498 => p_rec.cty_attribute13
499 ,p_cty_attribute14
500 => p_rec.cty_attribute14
501 ,p_cty_attribute15
502 => p_rec.cty_attribute15
503 ,p_cty_attribute16
504 => p_rec.cty_attribute16
505 ,p_cty_attribute17
506 => p_rec.cty_attribute17
507 ,p_cty_attribute18
508 => p_rec.cty_attribute18
509 ,p_cty_attribute19
510 => p_rec.cty_attribute19
511 ,p_cty_attribute20
512 => p_rec.cty_attribute20
513 ,p_cty_attribute21
514 => p_rec.cty_attribute21
515 ,p_cty_attribute22
516 => p_rec.cty_attribute22
517 ,p_cty_attribute23
518 => p_rec.cty_attribute23
519 ,p_cty_attribute24
520 => p_rec.cty_attribute24
521 ,p_cty_attribute25
522 => p_rec.cty_attribute25
523 ,p_cty_attribute26
524 => p_rec.cty_attribute26
525 ,p_cty_attribute27
526 => p_rec.cty_attribute27
527 ,p_cty_attribute28
528 => p_rec.cty_attribute28
529 ,p_cty_attribute29
530 => p_rec.cty_attribute29
531 ,p_cty_attribute30
532 => p_rec.cty_attribute30
533 );
534 --
535 exception
536 --
537 when hr_api.cannot_find_prog_unit then
538 --
539 hr_api.cannot_find_prog_unit_error
540 (p_module_name => 'BEN_COMPTNCY_RT_F'
541 ,p_hook_type => 'AI');
542 --
543 end;
544 --
545 hr_utility.set_location(' Leaving:'||l_proc, 10);
546 End post_insert;
547 --
548 -- ----------------------------------------------------------------------------
549 -- |-------------------------------< ins_lck >--------------------------------|
550 -- ----------------------------------------------------------------------------
551 -- {Start Of Comments}
552 --
553 -- Description:
554 -- The ins_lck process has one main function to perform. When inserting
555 -- a datetracked row, we must validate the DT mode.
556 --
557 -- Prerequisites:
558 -- This procedure can only be called for the datetrack mode of INSERT.
559 --
560 -- In Parameters:
561 --
562 -- Post Success:
563 -- On successful completion of the ins_lck process the parental
564 -- datetracked rows will be locked providing the p_enforce_foreign_locking
565 -- argument value is TRUE.
566 -- If the p_enforce_foreign_locking argument value is FALSE then the
567 -- parential rows are not locked.
568 --
569 -- Post Failure:
570 -- The Lck process can fail for:
571 -- 1) When attempting to lock the row the row could already be locked by
572 -- another user. This will raise the HR_Api.Object_Locked exception.
573 -- 2) When attempting to the lock the parent which doesn't exist.
574 -- For the entity to be locked the parent must exist!
575 --
576 -- Developer Implementation Notes:
577 -- None.
578 --
579 -- Access Status:
580 -- Internal Row Handler Use Only.
581 --
582 -- {End Of Comments}
583 -- ----------------------------------------------------------------------------
584 Procedure ins_lck
585 (p_effective_date in date
589 ,p_validation_end_date out nocopy date
586 ,p_datetrack_mode in varchar2
587 ,p_rec in ben_cty_shd.g_rec_type
588 ,p_validation_start_date out nocopy date
590 ) is
591 --
592 l_proc varchar2(72) := g_package||'ins_lck';
593 l_validation_start_date date;
594 l_validation_end_date date;
595 --
596 Begin
597 hr_utility.set_location('Entering:'||l_proc, 5);
598 --
599 -- Validate the datetrack mode mode getting the validation start
600 -- and end dates for the specified datetrack operation.
601 --
602 dt_api.validate_dt_mode
603 (p_effective_date => p_effective_date
604 ,p_datetrack_mode => p_datetrack_mode
605 ,p_base_table_name => 'ben_comptncy_rt_f'
606 ,p_base_key_column => 'comptncy_rt_id'
607 ,p_base_key_value => p_rec.comptncy_rt_id
608 ,p_parent_table_name1 => 'ben_vrbl_rt_prfl_f'
609 ,p_parent_key_column1 => 'vrbl_rt_prfl_id'
610 ,p_parent_key_value1 => p_rec.vrbl_rt_prfl_id
611 ,p_enforce_foreign_locking => true
612 ,p_validation_start_date => l_validation_start_date
613 ,p_validation_end_date => l_validation_end_date
614 );
615 --
616 -- Set the validation start and end date OUT arguments
617 --
618 p_validation_start_date := l_validation_start_date;
619 p_validation_end_date := l_validation_end_date;
620 --
621 hr_utility.set_location(' Leaving:'||l_proc, 10);
622 --
623 End ins_lck;
624 --
625 -- ----------------------------------------------------------------------------
626 -- |---------------------------------< ins >----------------------------------|
627 -- ----------------------------------------------------------------------------
628 Procedure ins
629 (p_effective_date in date
630 ,p_rec in out nocopy ben_cty_shd.g_rec_type
631 ) is
632 --
633 l_proc varchar2(72) := g_package||'ins';
634 l_datetrack_mode varchar2(30) := hr_api.g_insert;
635 l_validation_start_date date;
636 l_validation_end_date date;
637 --
638 Begin
639 hr_utility.set_location('Entering:'||l_proc, 5);
640 --
641 -- Call the lock operation
642 --
643 ben_cty_ins.ins_lck
644 (p_effective_date => p_effective_date
645 ,p_datetrack_mode => l_datetrack_mode
646 ,p_rec => p_rec
647 ,p_validation_start_date => l_validation_start_date
648 ,p_validation_end_date => l_validation_end_date
649 );
650 --
651 -- Call the supporting insert validate operations
652 --
653 ben_cty_bus.insert_validate
654 (p_rec => p_rec
655 ,p_effective_date => p_effective_date
656 ,p_datetrack_mode => l_datetrack_mode
657 ,p_validation_start_date => l_validation_start_date
658 ,p_validation_end_date => l_validation_end_date
659 );
660 --
661 -- Call to raise any errors on multi-message list
662 hr_multi_message.end_validation_set;
663 --
664 -- Call the supporting pre-insert operation
665 --
666 ben_cty_ins.pre_insert
667 (p_rec => p_rec
668 ,p_effective_date => p_effective_date
669 ,p_datetrack_mode => l_datetrack_mode
670 ,p_validation_start_date => l_validation_start_date
671 ,p_validation_end_date => l_validation_end_date
672 );
673 --
674 -- Insert the row
675 --
676 ben_cty_ins.insert_dml
677 (p_rec => p_rec
678 ,p_effective_date => p_effective_date
679 ,p_datetrack_mode => l_datetrack_mode
680 ,p_validation_start_date => l_validation_start_date
681 ,p_validation_end_date => l_validation_end_date
682 );
683 --
684 -- Call the supporting post-insert operation
685 --
686 ben_cty_ins.post_insert
687 (p_rec => p_rec
688 ,p_effective_date => p_effective_date
689 ,p_datetrack_mode => l_datetrack_mode
690 ,p_validation_start_date => l_validation_start_date
691 ,p_validation_end_date => l_validation_end_date
692 );
693 --
694 -- Call to raise any errors on multi-message list
695 hr_multi_message.end_validation_set;
696 --
697 hr_utility.set_location('Leaving:'||l_proc,10);
698 end ins;
699 --
700 -- ----------------------------------------------------------------------------
701 -- |---------------------------------< ins >----------------------------------|
702 -- ----------------------------------------------------------------------------
703 Procedure ins
704 (p_effective_date in date
705 ,p_competence_id in number
706 ,p_rating_level_id in number
707 ,p_excld_flag in varchar2
708 ,p_business_group_id in number
709 ,p_vrbl_rt_prfl_id in number
710 ,p_ordr_num in number default null
711 ,p_cty_attribute_category in varchar2 default null
712 ,p_cty_attribute1 in varchar2 default null
713 ,p_cty_attribute2 in varchar2 default null
714 ,p_cty_attribute3 in varchar2 default null
715 ,p_cty_attribute4 in varchar2 default null
719 ,p_cty_attribute8 in varchar2 default null
716 ,p_cty_attribute5 in varchar2 default null
717 ,p_cty_attribute6 in varchar2 default null
718 ,p_cty_attribute7 in varchar2 default null
720 ,p_cty_attribute9 in varchar2 default null
721 ,p_cty_attribute10 in varchar2 default null
722 ,p_cty_attribute11 in varchar2 default null
723 ,p_cty_attribute12 in varchar2 default null
724 ,p_cty_attribute13 in varchar2 default null
725 ,p_cty_attribute14 in varchar2 default null
726 ,p_cty_attribute15 in varchar2 default null
727 ,p_cty_attribute16 in varchar2 default null
728 ,p_cty_attribute17 in varchar2 default null
729 ,p_cty_attribute18 in varchar2 default null
730 ,p_cty_attribute19 in varchar2 default null
731 ,p_cty_attribute20 in varchar2 default null
732 ,p_cty_attribute21 in varchar2 default null
733 ,p_cty_attribute22 in varchar2 default null
734 ,p_cty_attribute23 in varchar2 default null
735 ,p_cty_attribute24 in varchar2 default null
736 ,p_cty_attribute25 in varchar2 default null
737 ,p_cty_attribute26 in varchar2 default null
738 ,p_cty_attribute27 in varchar2 default null
739 ,p_cty_attribute28 in varchar2 default null
740 ,p_cty_attribute29 in varchar2 default null
741 ,p_cty_attribute30 in varchar2 default null
742 ,p_comptncy_rt_id out nocopy number
743 ,p_object_version_number out nocopy number
744 ,p_effective_start_date out nocopy date
745 ,p_effective_end_date out nocopy date
746 ) is
747 --
748 l_rec ben_cty_shd.g_rec_type;
749 l_proc varchar2(72) := g_package||'ins';
750 --
751 Begin
752 hr_utility.set_location('Entering:'||l_proc, 5);
753 --
754 -- Call conversion function to turn arguments into the
755 -- p_rec structure.
756 --
757 l_rec :=
758 ben_cty_shd.convert_args
759 (null
760 ,null
761 ,null
762 ,p_competence_id
763 ,p_rating_level_id
764 ,p_excld_flag
765 ,p_business_group_id
766 ,p_vrbl_rt_prfl_id
767 ,null
768 ,p_ordr_num
769 ,p_cty_attribute_category
770 ,p_cty_attribute1
771 ,p_cty_attribute2
772 ,p_cty_attribute3
773 ,p_cty_attribute4
774 ,p_cty_attribute5
775 ,p_cty_attribute6
776 ,p_cty_attribute7
777 ,p_cty_attribute8
778 ,p_cty_attribute9
779 ,p_cty_attribute10
780 ,p_cty_attribute11
781 ,p_cty_attribute12
782 ,p_cty_attribute13
783 ,p_cty_attribute14
784 ,p_cty_attribute15
785 ,p_cty_attribute16
786 ,p_cty_attribute17
787 ,p_cty_attribute18
788 ,p_cty_attribute19
789 ,p_cty_attribute20
790 ,p_cty_attribute21
791 ,p_cty_attribute22
792 ,p_cty_attribute23
793 ,p_cty_attribute24
794 ,p_cty_attribute25
795 ,p_cty_attribute26
796 ,p_cty_attribute27
797 ,p_cty_attribute28
798 ,p_cty_attribute29
799 ,p_cty_attribute30
800 );
801 --
802 -- Having converted the arguments into the ben_cty_rec
803 -- plsql record structure we call the corresponding record
804 -- business process.
805 --
806 ben_cty_ins.ins
807 (p_effective_date
808 ,l_rec
809 );
810 --
811 -- Set the OUT arguments.
812 --
813 p_comptncy_rt_id := l_rec.comptncy_rt_id;
814 p_effective_start_date := l_rec.effective_start_date;
815 p_effective_end_date := l_rec.effective_end_date;
816 p_object_version_number := l_rec.object_version_number;
817 --
818 --
819 hr_utility.set_location(' Leaving:'||l_proc, 10);
820 End ins;
821 --
822 end ben_cty_ins;