[Home] [Help]
PACKAGE BODY: APPS.BEN_CCT_INS
Source
1 Package Body ben_cct_ins as
2 /* $Header: becctrhi.pkb 120.0 2005/05/28 00:58:57 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_cct_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 structre.
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 ben_cct_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) is
63 --
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 ben_cm_typ_f t
70 where t.cm_typ_id = p_rec.cm_typ_id
71 and t.effective_start_date =
72 ben_cct_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 ben_cm_typ_f.created_by%TYPE;
77 l_creation_date ben_cm_typ_f.creation_date%TYPE;
78 l_last_update_date ben_cm_typ_f.last_update_date%TYPE;
79 l_last_updated_by ben_cm_typ_f.last_updated_by%TYPE;
80 l_last_update_login ben_cm_typ_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 => 'ben_cm_typ_f',
90 p_base_key_column => 'cm_typ_id',
91 p_base_key_value => p_rec.cm_typ_id);
92 --
93 -- Set the effective start and end dates to the corresponding
94 -- validation start and end dates
95 --
96 p_rec.effective_start_date := p_validation_start_date;
97 p_rec.effective_end_date := p_validation_end_date;
98 --
99 -- If the datetrack_mode is not INSERT then we must populate the WHO
100 -- columns with the 'old' creation values and 'new' updated values.
101 --
102 If (p_datetrack_mode <> 'INSERT') then
103 hr_utility.set_location(l_proc, 10);
104 --
105 -- Select the 'old' created values
106 --
107 Open C_Sel1;
108 Fetch C_Sel1 Into l_created_by, l_creation_date;
109 If C_Sel1%notfound Then
110 --
111 -- The previous 'old' created row has not been found. We need
112 -- to error as an internal datetrack problem exists.
113 --
114 Close C_Sel1;
115 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116 hr_utility.set_message_token('PROCEDURE', l_proc);
117 hr_utility.set_message_token('STEP','10');
118 hr_utility.raise_error;
119 End If;
120 Close C_Sel1;
121 --
122 -- Set the AOL updated WHO values
123 --
124 l_last_update_date := sysdate;
125 l_last_updated_by := fnd_global.user_id;
126 l_last_update_login := fnd_global.login_id;
127 End If;
128 --
129 ben_cct_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_cm_typ_f
132 --
133 insert into ben_cm_typ_f
134 ( cm_typ_id,
135 effective_start_date,
136 effective_end_date,
137 name,
138 desc_txt,
139 cm_typ_rl,
140 cm_usg_cd,
141 whnvr_trgrd_flag,
142 shrt_name,
143 pc_kit_cd,
144 trk_mlg_flag,
145 mx_num_avlbl_val,
146 to_be_sent_dt_cd,
147 to_be_sent_dt_rl,
148 inspn_rqd_flag,
149 inspn_rqd_rl,
150 rcpent_cd,
151 parnt_cm_typ_id,
152 business_group_id,
153 cct_attribute_category,
154 cct_attribute1,
155 cct_attribute10,
156 cct_attribute11,
157 cct_attribute12,
158 cct_attribute13,
159 cct_attribute14,
160 cct_attribute15,
161 cct_attribute16,
162 cct_attribute17,
163 cct_attribute18,
164 cct_attribute19,
165 cct_attribute2,
166 cct_attribute20,
167 cct_attribute21,
168 cct_attribute22,
169 cct_attribute23,
170 cct_attribute24,
171 cct_attribute25,
172 cct_attribute26,
173 cct_attribute27,
174 cct_attribute28,
175 cct_attribute29,
176 cct_attribute3,
177 cct_attribute30,
178 cct_attribute4,
179 cct_attribute5,
180 cct_attribute6,
181 cct_attribute7,
182 cct_attribute8,
183 cct_attribute9,
184 object_version_number
185 , created_by,
186 creation_date,
187 last_update_date,
188 last_updated_by,
189 last_update_login
190 )
191 Values
192 ( p_rec.cm_typ_id,
193 p_rec.effective_start_date,
194 p_rec.effective_end_date,
195 p_rec.name,
196 p_rec.desc_txt,
197 p_rec.cm_typ_rl,
198 p_rec.cm_usg_cd,
199 p_rec.whnvr_trgrd_flag,
200 p_rec.shrt_name,
201 p_rec.pc_kit_cd,
202 p_rec.trk_mlg_flag,
203 p_rec.mx_num_avlbl_val,
204 p_rec.to_be_sent_dt_cd,
205 p_rec.to_be_sent_dt_rl,
206 p_rec.inspn_rqd_flag,
207 p_rec.inspn_rqd_rl,
208 p_rec.rcpent_cd,
209 p_rec.parnt_cm_typ_id,
210 p_rec.business_group_id,
211 p_rec.cct_attribute_category,
212 p_rec.cct_attribute1,
213 p_rec.cct_attribute10,
214 p_rec.cct_attribute11,
215 p_rec.cct_attribute12,
216 p_rec.cct_attribute13,
217 p_rec.cct_attribute14,
218 p_rec.cct_attribute15,
219 p_rec.cct_attribute16,
220 p_rec.cct_attribute17,
221 p_rec.cct_attribute18,
222 p_rec.cct_attribute19,
223 p_rec.cct_attribute2,
224 p_rec.cct_attribute20,
225 p_rec.cct_attribute21,
226 p_rec.cct_attribute22,
227 p_rec.cct_attribute23,
228 p_rec.cct_attribute24,
229 p_rec.cct_attribute25,
230 p_rec.cct_attribute26,
231 p_rec.cct_attribute27,
232 p_rec.cct_attribute28,
233 p_rec.cct_attribute29,
234 p_rec.cct_attribute3,
235 p_rec.cct_attribute30,
236 p_rec.cct_attribute4,
237 p_rec.cct_attribute5,
238 p_rec.cct_attribute6,
239 p_rec.cct_attribute7,
240 p_rec.cct_attribute8,
241 p_rec.cct_attribute9,
242 p_rec.object_version_number
243 , l_created_by,
244 l_creation_date,
245 l_last_update_date,
246 l_last_updated_by,
247 l_last_update_login
248 );
249 --
250 -- Insert into MLS table.
251 --
252 insert into ben_cm_typ_f_tl (
253 cm_typ_id,
254 effective_start_date,
255 effective_end_date,
256 shrt_name,
257 name,
258 language,
259 source_lang,
260 last_update_date,
261 last_updated_by,
262 last_update_login,
263 created_by,
264 creation_date
265 )
266 select
267 p_rec.cm_typ_id,
268 p_rec.effective_start_date,
269 p_rec.effective_end_date,
270 p_rec.shrt_name,
271 p_rec.name,
272 l.language_code,
273 userenv('LANG'),
274 l_last_update_date,
275 l_last_updated_by,
276 l_last_update_login,
277 fnd_global.user_id,
278 sysdate
279 from fnd_languages l
280 where l.installed_flag in ('I', 'B')
281 and not exists
282 (select null
283 from ben_cm_typ_f_tl t
284 where t.cm_typ_id = p_rec.cm_typ_id
285 and t.effective_start_date = p_rec.effective_start_date
286 and t.language = l.language_code);
287 --
288 ben_cct_shd.g_api_dml := false; -- Unset the api dml status
289 hr_utility.set_location(' Leaving:'||l_proc, 15);
290 --
291 Exception
292 When hr_api.check_integrity_violated Then
293 -- A check constraint has been violated
294 ben_cct_shd.g_api_dml := false; -- Unset the api dml status
295 ben_cct_shd.constraint_error
296 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
297 When hr_api.unique_integrity_violated Then
298 -- Unique integrity has been violated
299 ben_cct_shd.g_api_dml := false; -- Unset the api dml status
300 ben_cct_shd.constraint_error
301 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
302 When Others Then
303 ben_cct_shd.g_api_dml := false; -- Unset the api dml status
304 Raise;
305 End dt_insert_dml;
306 --
307 -- ----------------------------------------------------------------------------
308 -- |------------------------------< insert_dml >------------------------------|
309 -- ----------------------------------------------------------------------------
310 Procedure insert_dml
311 (p_rec in out nocopy ben_cct_shd.g_rec_type,
312 p_effective_date in date,
313 p_datetrack_mode in varchar2,
314 p_validation_start_date in date,
315 p_validation_end_date in date) is
316 --
317 l_proc varchar2(72) := g_package||'insert_dml';
318 --
319 Begin
320 hr_utility.set_location('Entering:'||l_proc, 5);
321 --
322 dt_insert_dml(p_rec => p_rec,
323 p_effective_date => p_effective_date,
324 p_datetrack_mode => p_datetrack_mode,
325 p_validation_start_date => p_validation_start_date,
326 p_validation_end_date => p_validation_end_date);
327 --
328 hr_utility.set_location(' Leaving:'||l_proc, 10);
329 End insert_dml;
330 --
331 -- ----------------------------------------------------------------------------
332 -- |------------------------------< pre_insert >------------------------------|
333 -- ----------------------------------------------------------------------------
334 -- {Start Of Comments}
335 --
336 -- Description:
337 -- This private procedure contains any processing which is required before
338 -- the insert dml. Presently, if the entity has a corresponding primary
339 -- key which is maintained by an associating sequence, the primary key for
340 -- the entity will be populated with the next sequence value in
341 -- preparation for the insert dml.
342 -- Also, if comments are defined for this entity, the comments insert
343 -- logic will also be called, generating a comment_id if required.
344 --
345 -- Prerequisites:
346 -- This is an internal procedure which is called from the ins procedure.
347 --
348 -- In Parameters:
349 -- A Pl/Sql record structre.
350 --
351 -- Post Success:
352 -- Processing continues.
353 --
354 -- Post Failure:
355 -- If an error has occurred, an error message and exception will be raised
356 -- but not handled.
357 --
358 -- Developer Implementation Notes:
359 -- Any pre-processing required before the insert dml is issued should be
360 -- coded within this procedure. As stated above, a good example is the
361 -- generation of a primary key number via a corresponding sequence.
362 -- It is important to note that any 3rd party maintenance should be reviewed
363 -- before placing in this procedure.
364 --
365 -- Access Status:
366 -- Internal Row Handler Use Only.
367 --
368 -- {End Of Comments}
369 -- ----------------------------------------------------------------------------
370 Procedure pre_insert
371 (p_rec in out nocopy ben_cct_shd.g_rec_type,
372 p_effective_date in date,
373 p_datetrack_mode in varchar2,
374 p_validation_start_date in date,
375 p_validation_end_date in date) is
376 --
377 l_proc varchar2(72) := g_package||'pre_insert';
378 --
379 Cursor C_Sel1 is select ben_cm_typ_s.nextval from sys.dual;
380 --
381 Begin
382 hr_utility.set_location('Entering:'||l_proc, 5);
383 --
384 --
385 -- Select the next sequence number
386 --
387 Open C_Sel1;
388 Fetch C_Sel1 Into p_rec.cm_typ_id;
389 Close C_Sel1;
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 the
402 -- 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 structre.
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 ben_cct_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) is
433 --
434 l_proc varchar2(72) := g_package||'post_insert';
435 --
436 Begin
437 hr_utility.set_location('Entering:'||l_proc, 5);
438 --
439 --
440 -- Start of API User Hook for post_insert.
441 --
442 begin
443 --
444 ben_cct_rki.after_insert
445 (p_cm_typ_id =>p_rec.cm_typ_id
446 ,p_effective_start_date =>p_rec.effective_start_date
447 ,p_effective_end_date =>p_rec.effective_end_date
448 ,p_name =>p_rec.name
449 ,p_desc_txt =>p_rec.desc_txt
450 ,p_cm_typ_rl =>p_rec.cm_typ_rl
451 ,p_cm_usg_cd =>p_rec.cm_usg_cd
452 ,p_whnvr_trgrd_flag =>p_rec.whnvr_trgrd_flag
456 ,p_mx_num_avlbl_val =>p_rec.mx_num_avlbl_val
453 ,p_shrt_name =>p_rec.shrt_name
454 ,p_pc_kit_cd =>p_rec.pc_kit_cd
455 ,p_trk_mlg_flag =>p_rec.trk_mlg_flag
457 ,p_to_be_sent_dt_cd =>p_rec.to_be_sent_dt_cd
458 ,p_to_be_sent_dt_rl =>p_rec.to_be_sent_dt_rl
459 ,p_inspn_rqd_flag =>p_rec.inspn_rqd_flag
460 ,p_inspn_rqd_rl =>p_rec.inspn_rqd_rl
461 ,p_rcpent_cd =>p_rec.rcpent_cd
462 ,p_parnt_cm_typ_id =>p_rec.parnt_cm_typ_id
463 ,p_business_group_id =>p_rec.business_group_id
464 ,p_cct_attribute_category =>p_rec.cct_attribute_category
465 ,p_cct_attribute1 =>p_rec.cct_attribute1
466 ,p_cct_attribute10 =>p_rec.cct_attribute10
467 ,p_cct_attribute11 =>p_rec.cct_attribute11
468 ,p_cct_attribute12 =>p_rec.cct_attribute12
469 ,p_cct_attribute13 =>p_rec.cct_attribute13
470 ,p_cct_attribute14 =>p_rec.cct_attribute14
471 ,p_cct_attribute15 =>p_rec.cct_attribute15
472 ,p_cct_attribute16 =>p_rec.cct_attribute16
473 ,p_cct_attribute17 =>p_rec.cct_attribute17
474 ,p_cct_attribute18 =>p_rec.cct_attribute18
475 ,p_cct_attribute19 =>p_rec.cct_attribute19
476 ,p_cct_attribute2 =>p_rec.cct_attribute2
477 ,p_cct_attribute20 =>p_rec.cct_attribute20
478 ,p_cct_attribute21 =>p_rec.cct_attribute21
479 ,p_cct_attribute22 =>p_rec.cct_attribute22
480 ,p_cct_attribute23 =>p_rec.cct_attribute23
481 ,p_cct_attribute24 =>p_rec.cct_attribute24
482 ,p_cct_attribute25 =>p_rec.cct_attribute25
483 ,p_cct_attribute26 =>p_rec.cct_attribute26
484 ,p_cct_attribute27 =>p_rec.cct_attribute27
485 ,p_cct_attribute28 =>p_rec.cct_attribute28
486 ,p_cct_attribute29 =>p_rec.cct_attribute29
487 ,p_cct_attribute3 =>p_rec.cct_attribute3
488 ,p_cct_attribute30 =>p_rec.cct_attribute30
489 ,p_cct_attribute4 =>p_rec.cct_attribute4
490 ,p_cct_attribute5 =>p_rec.cct_attribute5
491 ,p_cct_attribute6 =>p_rec.cct_attribute6
492 ,p_cct_attribute7 =>p_rec.cct_attribute7
493 ,p_cct_attribute8 =>p_rec.cct_attribute8
494 ,p_cct_attribute9 =>p_rec.cct_attribute9
495 ,p_object_version_number =>p_rec.object_version_number
496 ,p_effective_date =>p_effective_date
497 ,p_validation_start_date =>p_validation_start_date
498 ,p_validation_end_date =>p_validation_end_date);
499 --
500 exception
501 --
502 when hr_api.cannot_find_prog_unit then
503 --
504 hr_api.cannot_find_prog_unit_error
505 (p_module_name => 'ben_cm_typ_f'
506 ,p_hook_type => 'AI');
507 --
508 end;
509 --
510 -- End of API User Hook for post_insert.
511 --
512 --
513 hr_utility.set_location(' Leaving:'||l_proc, 10);
514 End post_insert;
515 --
516 -- ----------------------------------------------------------------------------
517 -- |-------------------------------< ins_lck >--------------------------------|
518 -- ----------------------------------------------------------------------------
519 -- {Start Of Comments}
520 --
521 -- Description:
522 -- The ins_lck process has one main function to perform. When inserting
523 -- a datetracked row, we must validate the DT mode.
524 -- be manipulated.
525 --
526 -- Prerequisites:
527 -- This procedure can only be called for the datetrack mode of INSERT.
528 --
529 -- In Parameters:
530 --
531 -- Post Success:
532 -- On successful completion of the ins_lck process the parental
533 -- datetracked rows will be locked providing the p_enforce_foreign_locking
534 -- argument value is TRUE.
535 -- If the p_enforce_foreign_locking argument value is FALSE then the
536 -- parential rows are not locked.
537 --
538 -- Post Failure:
539 -- The Lck process can fail for:
540 -- 1) When attempting to lock the row the row could already be locked by
541 -- another user. This will raise the HR_Api.Object_Locked exception.
542 -- 2) When attempting to the lock the parent which doesn't exist.
543 -- For the entity to be locked the parent must exist!
544 --
545 -- Developer Implementation Notes:
546 -- None.
547 --
548 -- Access Status:
549 -- Internal Row Handler Use Only.
550 --
551 -- {End Of Comments}
552 -- ----------------------------------------------------------------------------
553 Procedure ins_lck
554 (p_effective_date in date,
555 p_datetrack_mode in varchar2,
556 p_rec in ben_cct_shd.g_rec_type,
557 p_validation_start_date out nocopy date,
558 p_validation_end_date out nocopy date) is
559 --
560 l_proc varchar2(72) := g_package||'ins_lck';
561 l_validation_start_date date;
562 l_validation_end_date date;
563 --
564 Begin
565 hr_utility.set_location('Entering:'||l_proc, 5);
566 --
570 dt_api.validate_dt_mode
567 -- Validate the datetrack mode mode getting the validation start
568 -- and end dates for the specified datetrack operation.
569 --
571 (p_effective_date => p_effective_date,
572 p_datetrack_mode => p_datetrack_mode,
573 p_base_table_name => 'ben_cm_typ_f',
574 p_base_key_column => 'cm_typ_id',
575 p_base_key_value => p_rec.cm_typ_id,
576 p_parent_table_name1 => 'ben_cm_typ_f',
577 p_parent_key_column1 => 'cm_typ_id',
578 p_parent_key_value1 => p_rec.parnt_cm_typ_id,
579 p_enforce_foreign_locking => true,
580 p_validation_start_date => l_validation_start_date,
581 p_validation_end_date => l_validation_end_date);
582 --
583 -- Set the validation start and end date OUT arguments
584 --
585 p_validation_start_date := l_validation_start_date;
586 p_validation_end_date := l_validation_end_date;
587 --
588 hr_utility.set_location(' Leaving:'||l_proc, 10);
589 --
590 End ins_lck;
591 --
592 -- ----------------------------------------------------------------------------
593 -- |---------------------------------< ins >----------------------------------|
594 -- ----------------------------------------------------------------------------
595 Procedure ins
596 (
597 p_rec in out nocopy ben_cct_shd.g_rec_type,
598 p_effective_date in date
599 ) is
600 --
601 l_proc varchar2(72) := g_package||'ins';
602 l_datetrack_mode varchar2(30) := 'INSERT';
603 l_validation_start_date date;
604 l_validation_end_date date;
605 --
606 Begin
607 hr_utility.set_location('Entering:'||l_proc, 5);
608 --
609 -- Call the lock operation
610 --
611 ins_lck
612 (p_effective_date => p_effective_date,
613 p_datetrack_mode => l_datetrack_mode,
614 p_rec => p_rec,
615 p_validation_start_date => l_validation_start_date,
616 p_validation_end_date => l_validation_end_date);
617 --
618 -- Call the supporting insert validate operations
619 --
620 ben_cct_bus.insert_validate
621 (p_rec => p_rec,
622 p_effective_date => p_effective_date,
623 p_datetrack_mode => l_datetrack_mode,
624 p_validation_start_date => l_validation_start_date,
625 p_validation_end_date => l_validation_end_date);
626 --
627 -- Call the supporting pre-insert operation
628 --
629 pre_insert
630 (p_rec => p_rec,
631 p_effective_date => p_effective_date,
632 p_datetrack_mode => l_datetrack_mode,
633 p_validation_start_date => l_validation_start_date,
634 p_validation_end_date => l_validation_end_date);
635 --
636 -- Insert the row
637 --
638 insert_dml
639 (p_rec => p_rec,
640 p_effective_date => p_effective_date,
641 p_datetrack_mode => l_datetrack_mode,
642 p_validation_start_date => l_validation_start_date,
643 p_validation_end_date => l_validation_end_date);
644 --
645 -- Call the supporting post-insert operation
646 --
647 post_insert
648 (p_rec => p_rec,
649 p_effective_date => p_effective_date,
650 p_datetrack_mode => l_datetrack_mode,
651 p_validation_start_date => l_validation_start_date,
652 p_validation_end_date => l_validation_end_date);
653 end ins;
654 --
655 -- ----------------------------------------------------------------------------
656 -- |---------------------------------< ins >----------------------------------|
657 -- ----------------------------------------------------------------------------
658 Procedure ins
659 (
660 p_cm_typ_id out nocopy number,
661 p_effective_start_date out nocopy date,
662 p_effective_end_date out nocopy date,
663 p_name in varchar2,
664 p_desc_txt in varchar2 default null,
665 p_cm_typ_rl in number default null,
666 p_cm_usg_cd in varchar2 default null,
667 p_whnvr_trgrd_flag in varchar2,
668 p_shrt_name in varchar2 default null,
669 p_pc_kit_cd in varchar2 default null,
670 p_trk_mlg_flag in varchar2,
671 p_mx_num_avlbl_val in number default null,
672 p_to_be_sent_dt_cd in varchar2,
673 p_to_be_sent_dt_rl in number default null,
674 p_inspn_rqd_flag in varchar2,
675 p_inspn_rqd_rl in number default null,
676 p_rcpent_cd in varchar2 default null,
677 p_parnt_cm_typ_id in number default null,
678 p_business_group_id in number,
679 p_cct_attribute_category in varchar2 default null,
680 p_cct_attribute1 in varchar2 default null,
681 p_cct_attribute10 in varchar2 default null,
682 p_cct_attribute11 in varchar2 default null,
683 p_cct_attribute12 in varchar2 default null,
684 p_cct_attribute13 in varchar2 default null,
685 p_cct_attribute14 in varchar2 default null,
689 p_cct_attribute18 in varchar2 default null,
686 p_cct_attribute15 in varchar2 default null,
687 p_cct_attribute16 in varchar2 default null,
688 p_cct_attribute17 in varchar2 default null,
690 p_cct_attribute19 in varchar2 default null,
691 p_cct_attribute2 in varchar2 default null,
692 p_cct_attribute20 in varchar2 default null,
693 p_cct_attribute21 in varchar2 default null,
694 p_cct_attribute22 in varchar2 default null,
695 p_cct_attribute23 in varchar2 default null,
696 p_cct_attribute24 in varchar2 default null,
697 p_cct_attribute25 in varchar2 default null,
698 p_cct_attribute26 in varchar2 default null,
699 p_cct_attribute27 in varchar2 default null,
700 p_cct_attribute28 in varchar2 default null,
701 p_cct_attribute29 in varchar2 default null,
702 p_cct_attribute3 in varchar2 default null,
703 p_cct_attribute30 in varchar2 default null,
704 p_cct_attribute4 in varchar2 default null,
705 p_cct_attribute5 in varchar2 default null,
706 p_cct_attribute6 in varchar2 default null,
707 p_cct_attribute7 in varchar2 default null,
708 p_cct_attribute8 in varchar2 default null,
709 p_cct_attribute9 in varchar2 default null,
710 p_object_version_number out nocopy number,
711 p_effective_date in date
712 ) is
713 --
714 l_rec ben_cct_shd.g_rec_type;
715 l_proc varchar2(72) := g_package||'ins';
716 --
717 Begin
718 hr_utility.set_location('Entering:'||l_proc, 5);
719 --
720 -- Call conversion function to turn arguments into the
721 -- p_rec structure.
722 --
723 l_rec :=
724 ben_cct_shd.convert_args
725 (
726 null,
727 null,
728 null,
729 p_name,
730 p_desc_txt,
731 p_cm_typ_rl,
732 p_cm_usg_cd,
733 p_whnvr_trgrd_flag,
734 p_shrt_name,
735 p_pc_kit_cd,
736 p_trk_mlg_flag,
737 p_mx_num_avlbl_val,
738 p_to_be_sent_dt_cd,
739 p_to_be_sent_dt_rl,
740 p_inspn_rqd_flag,
741 p_inspn_rqd_rl,
742 p_rcpent_cd,
743 p_parnt_cm_typ_id,
744 p_business_group_id,
745 p_cct_attribute_category,
746 p_cct_attribute1,
747 p_cct_attribute10,
748 p_cct_attribute11,
749 p_cct_attribute12,
750 p_cct_attribute13,
751 p_cct_attribute14,
752 p_cct_attribute15,
753 p_cct_attribute16,
754 p_cct_attribute17,
755 p_cct_attribute18,
756 p_cct_attribute19,
757 p_cct_attribute2,
758 p_cct_attribute20,
759 p_cct_attribute21,
760 p_cct_attribute22,
761 p_cct_attribute23,
762 p_cct_attribute24,
763 p_cct_attribute25,
764 p_cct_attribute26,
765 p_cct_attribute27,
766 p_cct_attribute28,
767 p_cct_attribute29,
768 p_cct_attribute3,
769 p_cct_attribute30,
770 p_cct_attribute4,
771 p_cct_attribute5,
772 p_cct_attribute6,
773 p_cct_attribute7,
774 p_cct_attribute8,
775 p_cct_attribute9,
776 null
777 );
778 --
779 -- Having converted the arguments into the ben_cct_rec
780 -- plsql record structure we call the corresponding record
781 -- business process.
782 --
783 ins(l_rec, p_effective_date);
784 --
785 -- Set the OUT arguments.
786 --
787 p_cm_typ_id := l_rec.cm_typ_id;
788 p_effective_start_date := l_rec.effective_start_date;
789 p_effective_end_date := l_rec.effective_end_date;
790 p_object_version_number := l_rec.object_version_number;
791 --
792 --
793 hr_utility.set_location(' Leaving:'||l_proc, 10);
794 End ins;
795 --
796 end ben_cct_ins;