[Home] [Help]
PACKAGE BODY: APPS.BEN_OTP_INS
Source
1 Package Body ben_otp_ins as
2 /* $Header: beotprhi.pkb 115.3 2003/09/25 00:30:57 rpgupta noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_otp_ins.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml insert logic for datetrack. The
17 -- functions of this procedure are as follows:
18 -- 1) Get the object_version_number.
19 -- 2) To set the effective start and end dates to the corresponding
20 -- validation start and end dates. Also, the object version number
21 -- record attribute is set.
22 -- 3) To set and unset the g_api_dml status as required (as we are about to
23 -- perform dml).
24 -- 4) To insert the row into the schema with the derived effective start
25 -- and end dates and the object version number.
26 -- 5) To trap any constraint violations that may have occurred.
27 -- 6) To raise any other errors.
28 --
29 -- Prerequisites:
30 -- This is an internal private procedure which must be called from the
31 -- insert_dml and pre_update (logic permitting) procedure and must have
32 -- all mandatory arguments set.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structure.
36 --
37 -- Post Success:
38 -- The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 -- On the insert dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- This is an internal datetrack maintenance procedure which should
50 -- not be modified in anyway.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58 (p_rec in out nocopy ben_otp_shd.g_rec_type
59 ,p_effective_date in date
60 ,p_datetrack_mode in varchar2
61 ,p_validation_start_date in date
62 ,p_validation_end_date in date
63 ) is
64 -- Cursor to select 'old' created AOL who column values
65 --
66 Cursor C_Sel1 Is
67 select t.created_by,
68 t.creation_date
69 from ben_optip_f t
70 where t.optip_id = p_rec.optip_id
71 and t.effective_start_date =
72 ben_otp_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_optip_f.created_by%TYPE;
77 l_creation_date ben_optip_f.creation_date%TYPE;
78 l_last_update_date ben_optip_f.last_update_date%TYPE;
79 l_last_updated_by ben_optip_f.last_updated_by%TYPE;
80 l_last_update_login ben_optip_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_optip_f'
90 ,p_base_key_column => 'optip_id'
91 ,p_base_key_value => p_rec.optip_id
92 );
93 --
94 -- Set the effective start and end dates to the corresponding
95 -- validation start and end dates
96 --
97 p_rec.effective_start_date := p_validation_start_date;
98 p_rec.effective_end_date := p_validation_end_date;
99 --
100 -- If the datetrack_mode is not INSERT then we must populate the WHO
101 -- columns with the 'old' creation values and 'new' updated values.
102 --
103 If (p_datetrack_mode <> hr_api.g_insert) then
104 hr_utility.set_location(l_proc, 10);
105 --
106 -- Select the 'old' created values
107 --
108 Open C_Sel1;
109 Fetch C_Sel1 Into l_created_by, l_creation_date;
110 If C_Sel1%notfound Then
111 --
112 -- The previous 'old' created row has not been found. We need
113 -- to error as an internal datetrack problem exists.
114 --
115 Close C_Sel1;
116 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
117 fnd_message.set_token('PROCEDURE', l_proc);
118 fnd_message.set_token('STEP','10');
119 fnd_message.raise_error;
120 End If;
121 Close C_Sel1;
122 --
123 -- Set the AOL updated WHO values
124 --
125 l_last_update_date := sysdate;
126 l_last_updated_by := fnd_global.user_id;
127 l_last_update_login := fnd_global.login_id;
128 End If;
129 --
130 ben_otp_shd.g_api_dml := true; -- Set the api dml status
131 --
132 -- Insert the row into: ben_optip_f
133 --
134 insert into ben_optip_f
135 (optip_id
136 ,effective_start_date
137 ,effective_end_date
138 ,business_group_id
139 ,pgm_id
140 ,ptip_id
141 ,pl_typ_id
142 ,opt_id
143 ,cmbn_ptip_opt_id
144 ,legislation_code
145 ,legislation_subgroup
146 ,otp_attribute_category
147 ,otp_attribute1
148 ,otp_attribute2
149 ,otp_attribute3
150 ,otp_attribute4
151 ,otp_attribute5
152 ,otp_attribute6
153 ,otp_attribute7
154 ,otp_attribute8
155 ,otp_attribute9
156 ,otp_attribute10
157 ,otp_attribute11
158 ,otp_attribute12
159 ,otp_attribute13
160 ,otp_attribute14
161 ,otp_attribute15
162 ,otp_attribute16
163 ,otp_attribute17
164 ,otp_attribute18
165 ,otp_attribute19
166 ,otp_attribute20
167 ,otp_attribute21
168 ,otp_attribute22
169 ,otp_attribute23
170 ,otp_attribute24
171 ,otp_attribute25
172 ,otp_attribute26
173 ,otp_attribute27
174 ,otp_attribute28
175 ,otp_attribute29
176 ,otp_attribute30
177 ,object_version_number
178 ,created_by
179 ,creation_date
180 ,last_update_date
181 ,last_updated_by
182 ,last_update_login
183 )
184 Values
185 (p_rec.optip_id
186 ,p_rec.effective_start_date
187 ,p_rec.effective_end_date
188 ,p_rec.business_group_id
189 ,p_rec.pgm_id
190 ,p_rec.ptip_id
191 ,p_rec.pl_typ_id
192 ,p_rec.opt_id
193 ,p_rec.cmbn_ptip_opt_id
194 ,p_rec.legislation_code
195 ,p_rec.legislation_subgroup
196 ,p_rec.otp_attribute_category
197 ,p_rec.otp_attribute1
198 ,p_rec.otp_attribute2
199 ,p_rec.otp_attribute3
200 ,p_rec.otp_attribute4
201 ,p_rec.otp_attribute5
202 ,p_rec.otp_attribute6
203 ,p_rec.otp_attribute7
204 ,p_rec.otp_attribute8
205 ,p_rec.otp_attribute9
206 ,p_rec.otp_attribute10
207 ,p_rec.otp_attribute11
208 ,p_rec.otp_attribute12
209 ,p_rec.otp_attribute13
210 ,p_rec.otp_attribute14
211 ,p_rec.otp_attribute15
212 ,p_rec.otp_attribute16
213 ,p_rec.otp_attribute17
214 ,p_rec.otp_attribute18
215 ,p_rec.otp_attribute19
216 ,p_rec.otp_attribute20
217 ,p_rec.otp_attribute21
218 ,p_rec.otp_attribute22
219 ,p_rec.otp_attribute23
220 ,p_rec.otp_attribute24
221 ,p_rec.otp_attribute25
222 ,p_rec.otp_attribute26
223 ,p_rec.otp_attribute27
224 ,p_rec.otp_attribute28
225 ,p_rec.otp_attribute29
226 ,p_rec.otp_attribute30
227 ,p_rec.object_version_number
228 ,l_created_by
229 ,l_creation_date
230 ,l_last_update_date
231 ,l_last_updated_by
232 ,l_last_update_login
233 );
234 --
235 ben_otp_shd.g_api_dml := false; -- Unset the api dml status
236 hr_utility.set_location(' Leaving:'||l_proc, 15);
237 --
238 Exception
239 When hr_api.check_integrity_violated Then
240 -- A check constraint has been violated
241 ben_otp_shd.g_api_dml := false; -- Unset the api dml status
242 ben_otp_shd.constraint_error
243 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
244 When hr_api.unique_integrity_violated Then
245 -- Unique integrity has been violated
246 ben_otp_shd.g_api_dml := false; -- Unset the api dml status
247 ben_otp_shd.constraint_error
248 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
249 When Others Then
250 ben_otp_shd.g_api_dml := false; -- Unset the api dml status
251 Raise;
252 End dt_insert_dml;
253 --
254 -- ----------------------------------------------------------------------------
255 -- |------------------------------< insert_dml >------------------------------|
256 -- ----------------------------------------------------------------------------
257 Procedure insert_dml
258 (p_rec in out nocopy ben_otp_shd.g_rec_type
259 ,p_effective_date in date
260 ,p_datetrack_mode in varchar2
261 ,p_validation_start_date in date
262 ,p_validation_end_date in date
263 ) is
264 --
265 l_proc varchar2(72) := g_package||'insert_dml';
266 --
267 Begin
268 hr_utility.set_location('Entering:'||l_proc, 5);
269 --
270 ben_otp_ins.dt_insert_dml
271 (p_rec => p_rec
272 ,p_effective_date => p_effective_date
273 ,p_datetrack_mode => p_datetrack_mode
274 ,p_validation_start_date => p_validation_start_date
275 ,p_validation_end_date => p_validation_end_date
276 );
277 --
278 hr_utility.set_location(' Leaving:'||l_proc, 10);
279 End insert_dml;
280 --
281 -- ----------------------------------------------------------------------------
282 -- |------------------------------< pre_insert >------------------------------|
283 -- ----------------------------------------------------------------------------
284 -- {Start Of Comments}
285 --
286 -- Description:
287 -- This private procedure contains any processing which is required before
288 -- the insert dml. Presently, if the entity has a corresponding primary
289 -- key which is maintained by an associating sequence, the primary key for
290 -- the entity will be populated with the next sequence value in
291 -- preparation for the insert dml.
292 -- Also, if comments are defined for this entity, the comments insert
293 -- logic will also be called, generating a comment_id if required.
294 --
295 -- Prerequisites:
296 -- This is an internal procedure which is called from the ins procedure.
297 --
298 -- In Parameters:
299 -- A Pl/Sql record structure.
300 --
301 -- Post Success:
302 -- Processing continues.
303 --
304 -- Post Failure:
305 -- If an error has occurred, an error message and exception will be raised
306 -- but not handled.
307 --
308 -- Developer Implementation Notes:
309 -- Any pre-processing required before the insert dml is issued should be
310 -- coded within this procedure. As stated above, a good example is the
311 -- generation of a primary key number via a corresponding sequence.
312 -- It is important to note that any 3rd party maintenance should be reviewed
313 -- before placing in this procedure.
314 --
315 -- Access Status:
316 -- Internal Row Handler Use Only.
317 --
318 -- {End Of Comments}
319 -- ----------------------------------------------------------------------------
320 Procedure pre_insert
321 (p_rec in out nocopy ben_otp_shd.g_rec_type
322 ,p_effective_date in date
323 ,p_datetrack_mode in varchar2
324 ,p_validation_start_date in date
325 ,p_validation_end_date in date
326 ) is
327 --
328 l_proc varchar2(72) := g_package||'pre_insert';
329 --
330 Cursor C_Sel1 is select ben_optip_s.nextval from sys.dual;
331 --
332 Begin
333 hr_utility.set_location('Entering:'||l_proc, 5);
334 --
335 --
336 -- Select the next sequence number
337 --
338 Open C_Sel1;
339 Fetch C_Sel1 Into p_rec.optip_id;
340 Close C_Sel1;
341 --
342 --
343 hr_utility.set_location(' Leaving:'||l_proc, 10);
344 End pre_insert;
345 --
346 -- ----------------------------------------------------------------------------
347 -- |----------------------------< post_insert >-------------------------------|
348 -- ----------------------------------------------------------------------------
349 -- {Start Of Comments}
350 --
351 -- Description:
352 -- This private procedure contains any processing which is required after the
353 -- insert dml.
354 --
355 -- Prerequisites:
356 -- This is an internal procedure which is called from the ins procedure.
357 --
358 -- In Parameters:
359 -- A Pl/Sql record structure.
360 --
361 -- Post Success:
362 -- Processing continues.
363 --
364 -- Post Failure:
365 -- If an error has occurred, an error message and exception will be raised
366 -- but not handled.
367 --
368 -- Developer Implementation Notes:
369 -- Any post-processing required after the insert dml is issued should be
370 -- coded within this procedure. It is important to note that any 3rd party
371 -- maintenance should be reviewed before placing in this procedure.
372 --
373 -- Access Status:
374 -- Internal Row Handler Use Only.
375 --
376 -- {End Of Comments}
377 -- ----------------------------------------------------------------------------
378 Procedure post_insert
379 (p_rec in ben_otp_shd.g_rec_type
380 ,p_effective_date in date
381 ,p_datetrack_mode in varchar2
382 ,p_validation_start_date in date
383 ,p_validation_end_date in date
384 ) is
385 --
386 l_proc varchar2(72) := g_package||'post_insert';
387 --
388 Begin
389 hr_utility.set_location('Entering:'||l_proc, 5);
390 begin
391 --
392 ben_otp_rki.after_insert
393 (p_effective_date
394 => p_effective_date
395 ,p_validation_start_date
396 => p_validation_start_date
397 ,p_validation_end_date
398 => p_validation_end_date
399 ,p_optip_id
400 => p_rec.optip_id
401 ,p_effective_start_date
402 => p_rec.effective_start_date
403 ,p_effective_end_date
404 => p_rec.effective_end_date
405 ,p_business_group_id
406 => p_rec.business_group_id
407 ,p_pgm_id
408 => p_rec.pgm_id
409 ,p_ptip_id
410 => p_rec.ptip_id
411 ,p_pl_typ_id
412 => p_rec.pl_typ_id
413 ,p_opt_id
414 => p_rec.opt_id
415 ,p_cmbn_ptip_opt_id
416 => p_rec.cmbn_ptip_opt_id
417 ,p_legislation_code
418 => p_rec.legislation_code
419 ,p_legislation_subgroup
420 => p_rec.legislation_subgroup
421 ,p_otp_attribute_category
422 => p_rec.otp_attribute_category
423 ,p_otp_attribute1
424 => p_rec.otp_attribute1
425 ,p_otp_attribute2
426 => p_rec.otp_attribute2
427 ,p_otp_attribute3
428 => p_rec.otp_attribute3
429 ,p_otp_attribute4
430 => p_rec.otp_attribute4
431 ,p_otp_attribute5
432 => p_rec.otp_attribute5
433 ,p_otp_attribute6
434 => p_rec.otp_attribute6
435 ,p_otp_attribute7
436 => p_rec.otp_attribute7
437 ,p_otp_attribute8
438 => p_rec.otp_attribute8
439 ,p_otp_attribute9
440 => p_rec.otp_attribute9
441 ,p_otp_attribute10
442 => p_rec.otp_attribute10
443 ,p_otp_attribute11
444 => p_rec.otp_attribute11
445 ,p_otp_attribute12
446 => p_rec.otp_attribute12
447 ,p_otp_attribute13
448 => p_rec.otp_attribute13
449 ,p_otp_attribute14
450 => p_rec.otp_attribute14
451 ,p_otp_attribute15
452 => p_rec.otp_attribute15
453 ,p_otp_attribute16
454 => p_rec.otp_attribute16
455 ,p_otp_attribute17
456 => p_rec.otp_attribute17
457 ,p_otp_attribute18
458 => p_rec.otp_attribute18
459 ,p_otp_attribute19
460 => p_rec.otp_attribute19
461 ,p_otp_attribute20
462 => p_rec.otp_attribute20
463 ,p_otp_attribute21
464 => p_rec.otp_attribute21
465 ,p_otp_attribute22
466 => p_rec.otp_attribute22
467 ,p_otp_attribute23
468 => p_rec.otp_attribute23
469 ,p_otp_attribute24
470 => p_rec.otp_attribute24
471 ,p_otp_attribute25
472 => p_rec.otp_attribute25
473 ,p_otp_attribute26
474 => p_rec.otp_attribute26
475 ,p_otp_attribute27
476 => p_rec.otp_attribute27
477 ,p_otp_attribute28
478 => p_rec.otp_attribute28
479 ,p_otp_attribute29
480 => p_rec.otp_attribute29
481 ,p_otp_attribute30
482 => p_rec.otp_attribute30
483 ,p_object_version_number
484 => p_rec.object_version_number
485 );
486 --
487 exception
488 --
489 when hr_api.cannot_find_prog_unit then
490 --
491 hr_api.cannot_find_prog_unit_error
492 (p_module_name => 'BEN_OPTIP_F'
493 ,p_hook_type => 'AI');
494 --
495 end;
496 --
497 hr_utility.set_location(' Leaving:'||l_proc, 10);
498 End post_insert;
499 --
500 -- ----------------------------------------------------------------------------
501 -- |-------------------------------< ins_lck >--------------------------------|
502 -- ----------------------------------------------------------------------------
503 -- {Start Of Comments}
504 --
505 -- Description:
506 -- The ins_lck process has one main function to perform. When inserting
507 -- a datetracked row, we must validate the DT mode.
508 --
509 -- Prerequisites:
510 -- This procedure can only be called for the datetrack mode of INSERT.
511 --
512 -- In Parameters:
513 --
514 -- Post Success:
515 -- On successful completion of the ins_lck process the parental
516 -- datetracked rows will be locked providing the p_enforce_foreign_locking
517 -- argument value is TRUE.
518 -- If the p_enforce_foreign_locking argument value is FALSE then the
519 -- parential rows are not locked.
520 --
521 -- Post Failure:
522 -- The Lck process can fail for:
523 -- 1) When attempting to lock the row the row could already be locked by
524 -- another user. This will raise the HR_Api.Object_Locked exception.
525 -- 2) When attempting to the lock the parent which doesn't exist.
526 -- For the entity to be locked the parent must exist!
527 --
528 -- Developer Implementation Notes:
529 -- None.
530 --
531 -- Access Status:
532 -- Internal Row Handler Use Only.
533 --
534 -- {End Of Comments}
535 -- ----------------------------------------------------------------------------
536 Procedure ins_lck
537 (p_effective_date in date
538 ,p_datetrack_mode in varchar2
539 ,p_rec in ben_otp_shd.g_rec_type
540 ,p_validation_start_date out nocopy date
541 ,p_validation_end_date out nocopy date
542 ) is
543 --
544 l_proc varchar2(72) := g_package||'ins_lck';
545 l_validation_start_date date;
546 l_validation_end_date date;
547 --
548 Begin
549 hr_utility.set_location('Entering:'||l_proc, 5);
550 --
551 -- Validate the datetrack mode mode getting the validation start
552 -- and end dates for the specified datetrack operation.
553 --
554 dt_api.validate_dt_mode
555 (p_effective_date => p_effective_date
556 ,p_datetrack_mode => p_datetrack_mode
557 ,p_base_table_name => 'ben_optip_f'
558 ,p_base_key_column => 'optip_id'
559 ,p_base_key_value => p_rec.optip_id
560 ,p_parent_table_name1 => 'ben_pgm_f'
561 ,p_parent_key_column1 => 'pgm_id'
562 ,p_parent_key_value1 => p_rec.pgm_id
563 ,p_parent_table_name2 => 'ben_ptip_f'
564 ,p_parent_key_column2 => 'ptip_id'
565 ,p_parent_key_value2 => p_rec.ptip_id
566 ,p_parent_table_name3 => 'ben_opt_f'
567 ,p_parent_key_column3 => 'opt_id'
568 ,p_parent_key_value3 => p_rec.opt_id
569 ,p_enforce_foreign_locking => true
570 ,p_validation_start_date => l_validation_start_date
571 ,p_validation_end_date => l_validation_end_date
572 );
573 --
574 -- Set the validation start and end date OUT arguments
575 --
576 p_validation_start_date := l_validation_start_date;
577 p_validation_end_date := l_validation_end_date;
578 --
579 hr_utility.set_location(' Leaving:'||l_proc, 10);
580 --
581 End ins_lck;
582 --
583 -- ----------------------------------------------------------------------------
584 -- |---------------------------------< ins >----------------------------------|
585 -- ----------------------------------------------------------------------------
586 Procedure ins
587 (p_effective_date in date
588 ,p_rec in out nocopy ben_otp_shd.g_rec_type
589 ) is
590 --
591 l_proc varchar2(72) := g_package||'ins';
592 l_datetrack_mode varchar2(30) := hr_api.g_insert;
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 -- Call the lock operation
600 --
601 ben_otp_ins.ins_lck
602 (p_effective_date => p_effective_date
603 ,p_datetrack_mode => l_datetrack_mode
604 ,p_rec => p_rec
605 ,p_validation_start_date => l_validation_start_date
606 ,p_validation_end_date => l_validation_end_date
607 );
608 --
609 -- Call the supporting insert validate operations
610 --
611 ben_otp_bus.insert_validate
612 (p_rec => p_rec
613 ,p_effective_date => p_effective_date
614 ,p_datetrack_mode => l_datetrack_mode
615 ,p_validation_start_date => l_validation_start_date
616 ,p_validation_end_date => l_validation_end_date
617 );
618 --
619 -- Call the supporting pre-insert operation
620 --
621 ben_otp_ins.pre_insert
622 (p_rec => p_rec
623 ,p_effective_date => p_effective_date
624 ,p_datetrack_mode => l_datetrack_mode
625 ,p_validation_start_date => l_validation_start_date
626 ,p_validation_end_date => l_validation_end_date
627 );
628 --
629 -- Insert the row
630 --
631 ben_otp_ins.insert_dml
632 (p_rec => p_rec
633 ,p_effective_date => p_effective_date
634 ,p_datetrack_mode => l_datetrack_mode
635 ,p_validation_start_date => l_validation_start_date
636 ,p_validation_end_date => l_validation_end_date
637 );
638 --
639 -- Call the supporting post-insert operation
640 --
641 ben_otp_ins.post_insert
642 (p_rec => p_rec
643 ,p_effective_date => p_effective_date
644 ,p_datetrack_mode => l_datetrack_mode
645 ,p_validation_start_date => l_validation_start_date
646 ,p_validation_end_date => l_validation_end_date
647 );
648 --
649 hr_utility.set_location('Leaving:'||l_proc,10);
650 end ins;
651 --
652 -- ----------------------------------------------------------------------------
653 -- |---------------------------------< ins >----------------------------------|
654 -- ----------------------------------------------------------------------------
655 Procedure ins
656 (p_effective_date in date
657 ,p_business_group_id in number
658 ,p_pgm_id in number
659 ,p_ptip_id in number
660 ,p_pl_typ_id in number
661 ,p_opt_id in number
662 ,p_cmbn_ptip_opt_id in number default null
663 ,p_legislation_code in varchar2 default null
664 ,p_legislation_subgroup in varchar2 default null
665 ,p_otp_attribute_category in varchar2 default null
666 ,p_otp_attribute1 in varchar2 default null
667 ,p_otp_attribute2 in varchar2 default null
668 ,p_otp_attribute3 in varchar2 default null
669 ,p_otp_attribute4 in varchar2 default null
670 ,p_otp_attribute5 in varchar2 default null
671 ,p_otp_attribute6 in varchar2 default null
672 ,p_otp_attribute7 in varchar2 default null
673 ,p_otp_attribute8 in varchar2 default null
674 ,p_otp_attribute9 in varchar2 default null
675 ,p_otp_attribute10 in varchar2 default null
676 ,p_otp_attribute11 in varchar2 default null
677 ,p_otp_attribute12 in varchar2 default null
678 ,p_otp_attribute13 in varchar2 default null
679 ,p_otp_attribute14 in varchar2 default null
680 ,p_otp_attribute15 in varchar2 default null
681 ,p_otp_attribute16 in varchar2 default null
682 ,p_otp_attribute17 in varchar2 default null
683 ,p_otp_attribute18 in varchar2 default null
684 ,p_otp_attribute19 in varchar2 default null
685 ,p_otp_attribute20 in varchar2 default null
686 ,p_otp_attribute21 in varchar2 default null
687 ,p_otp_attribute22 in varchar2 default null
688 ,p_otp_attribute23 in varchar2 default null
689 ,p_otp_attribute24 in varchar2 default null
690 ,p_otp_attribute25 in varchar2 default null
691 ,p_otp_attribute26 in varchar2 default null
692 ,p_otp_attribute27 in varchar2 default null
693 ,p_otp_attribute28 in varchar2 default null
694 ,p_otp_attribute29 in varchar2 default null
695 ,p_otp_attribute30 in varchar2 default null
696 ,p_optip_id out nocopy number
697 ,p_object_version_number out nocopy number
698 ,p_effective_start_date out nocopy date
699 ,p_effective_end_date out nocopy date
700 ) is
701 --
702 l_rec ben_otp_shd.g_rec_type;
703 l_proc varchar2(72) := g_package||'ins';
704 --
705 Begin
706 hr_utility.set_location('Entering:'||l_proc, 5);
707 --
708 -- Call conversion function to turn arguments into the
709 -- p_rec structure.
710 --
711 l_rec :=
712 ben_otp_shd.convert_args
713 (null
714 ,null
715 ,null
716 ,p_business_group_id
717 ,p_pgm_id
718 ,p_ptip_id
719 ,p_pl_typ_id
720 ,p_opt_id
721 ,p_cmbn_ptip_opt_id
722 ,p_legislation_code
723 ,p_legislation_subgroup
724 ,p_otp_attribute_category
725 ,p_otp_attribute1
726 ,p_otp_attribute2
727 ,p_otp_attribute3
728 ,p_otp_attribute4
729 ,p_otp_attribute5
730 ,p_otp_attribute6
731 ,p_otp_attribute7
732 ,p_otp_attribute8
733 ,p_otp_attribute9
734 ,p_otp_attribute10
735 ,p_otp_attribute11
736 ,p_otp_attribute12
737 ,p_otp_attribute13
738 ,p_otp_attribute14
739 ,p_otp_attribute15
740 ,p_otp_attribute16
741 ,p_otp_attribute17
742 ,p_otp_attribute18
743 ,p_otp_attribute19
744 ,p_otp_attribute20
745 ,p_otp_attribute21
746 ,p_otp_attribute22
747 ,p_otp_attribute23
748 ,p_otp_attribute24
749 ,p_otp_attribute25
750 ,p_otp_attribute26
751 ,p_otp_attribute27
752 ,p_otp_attribute28
753 ,p_otp_attribute29
754 ,p_otp_attribute30
755 ,null
756 );
757 --
758 -- Having converted the arguments into the ben_otp_rec
759 -- plsql record structure we call the corresponding record
760 -- business process.
761 --
762 ben_otp_ins.ins
763 (p_effective_date
764 ,l_rec
765 );
766 --
767 -- Set the OUT arguments.
768 --
769 p_optip_id := l_rec.optip_id;
770 p_effective_start_date := l_rec.effective_start_date;
771 p_effective_end_date := l_rec.effective_end_date;
772 p_object_version_number := l_rec.object_version_number;
773 --
774 --
775 hr_utility.set_location(' Leaving:'||l_proc, 10);
776 End ins;
777 --
778 end ben_otp_ins;