1 Package Body ben_bep_ins as
2 /* $Header: bebeprhi.pkb 120.0.12010000.2 2008/08/05 14:07:52 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_bep_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_elig_obj_elig_prfl_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_elig_obj_elig_prfl_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_bep_ins.g_elig_obj_elig_prfl_id_i := p_elig_obj_elig_prfl_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_bep_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_elig_obj_elig_profl_f t
92 where t.elig_obj_elig_prfl_id = p_rec.elig_obj_elig_prfl_id
93 and t.effective_start_date =
94 ben_bep_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_elig_obj_elig_profl_f.created_by%TYPE;
99 l_creation_date ben_elig_obj_elig_profl_f.creation_date%TYPE;
100 l_last_update_date ben_elig_obj_elig_profl_f.last_update_date%TYPE;
101 l_last_updated_by ben_elig_obj_elig_profl_f.last_updated_by%TYPE;
102 l_last_update_login ben_elig_obj_elig_profl_f.last_update_login%TYPE;
103 --
104 Begin
105 hr_utility.set_location('Entering:'||l_proc, 5);
106 --
107 -- Set the effective start and end dates to the corresponding
108 -- validation start and end dates
109 --
110 p_rec.effective_start_date := p_validation_start_date;
111 p_rec.effective_end_date := p_validation_end_date;
112 --
113 -- If the datetrack_mode is not INSERT then we must populate the WHO
114 -- columns with the 'old' creation values and 'new' updated values.
115 --
116 If (p_datetrack_mode <> hr_api.g_insert) then
117 hr_utility.set_location(l_proc, 10);
118 --
119 -- Get the object version number for the insert
120 --
121 p_rec.object_version_number :=
122 dt_api.get_object_version_number
123 (p_base_table_name => 'ben_elig_obj_elig_profl_f'
124 ,p_base_key_column => 'elig_obj_elig_prfl_id'
125 ,p_base_key_value => p_rec.elig_obj_elig_prfl_id
126 );
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 Else
151 p_rec.object_version_number := 1; -- Initialise the object version
152 End If;
153 --
154 --
155 --
156 -- Insert the row into: ben_elig_obj_elig_profl_f
157 --
158 insert into ben_elig_obj_elig_profl_f
159 (elig_obj_elig_prfl_id
160 ,effective_start_date
161 ,effective_end_date
162 ,elig_obj_id
163 ,elig_prfl_id
164 ,mndtry_flag
165 ,business_group_id
166 ,bep_attribute_category
167 ,bep_attribute1
168 ,bep_attribute2
169 ,bep_attribute3
170 ,bep_attribute4
171 ,bep_attribute5
172 ,bep_attribute6
173 ,bep_attribute7
174 ,bep_attribute8
175 ,bep_attribute9
176 ,bep_attribute10
177 ,bep_attribute11
178 ,bep_attribute12
179 ,bep_attribute13
180 ,bep_attribute14
181 ,bep_attribute15
182 ,bep_attribute16
183 ,bep_attribute17
184 ,bep_attribute18
185 ,bep_attribute19
186 ,bep_attribute20
187 ,object_version_number
188 ,created_by
189 ,creation_date
190 ,last_update_date
191 ,last_updated_by
192 ,last_update_login
193 )
194 Values
195 (p_rec.elig_obj_elig_prfl_id
196 ,p_rec.effective_start_date
197 ,p_rec.effective_end_date
198 ,p_rec.elig_obj_id
199 ,p_rec.elig_prfl_id
200 ,p_rec.mndtry_flag
201 ,p_rec.business_group_id
202 ,p_rec.bep_attribute_category
203 ,p_rec.bep_attribute1
204 ,p_rec.bep_attribute2
205 ,p_rec.bep_attribute3
206 ,p_rec.bep_attribute4
207 ,p_rec.bep_attribute5
208 ,p_rec.bep_attribute6
209 ,p_rec.bep_attribute7
210 ,p_rec.bep_attribute8
211 ,p_rec.bep_attribute9
212 ,p_rec.bep_attribute10
213 ,p_rec.bep_attribute11
214 ,p_rec.bep_attribute12
215 ,p_rec.bep_attribute13
216 ,p_rec.bep_attribute14
217 ,p_rec.bep_attribute15
218 ,p_rec.bep_attribute16
219 ,p_rec.bep_attribute17
220 ,p_rec.bep_attribute18
221 ,p_rec.bep_attribute19
222 ,p_rec.bep_attribute20
223 ,p_rec.object_version_number
224 ,l_created_by
225 ,l_creation_date
226 ,l_last_update_date
227 ,l_last_updated_by
228 ,l_last_update_login
229 );
230 --
231 --
232 hr_utility.set_location(' Leaving:'||l_proc, 15);
233 --
234 Exception
235 When hr_api.check_integrity_violated Then
236 -- A check constraint has been violated
237 --
238 ben_bep_shd.constraint_error
239 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
240 When hr_api.unique_integrity_violated Then
241 -- Unique integrity has been violated
242 --
243 ben_bep_shd.constraint_error
244 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
245 When Others Then
246 --
247 Raise;
248 End dt_insert_dml;
249 --
250 -- ----------------------------------------------------------------------------
251 -- |------------------------------< insert_dml >------------------------------|
252 -- ----------------------------------------------------------------------------
253 Procedure insert_dml
254 (p_rec in out nocopy ben_bep_shd.g_rec_type
255 ,p_effective_date in date
256 ,p_datetrack_mode in varchar2
257 ,p_validation_start_date in date
258 ,p_validation_end_date in date
259 ) is
260 --
261 l_proc varchar2(72) := g_package||'insert_dml';
262 --
263 Begin
264 hr_utility.set_location('Entering:'||l_proc, 5);
265 --
266 ben_bep_ins.dt_insert_dml
267 (p_rec => p_rec
268 ,p_effective_date => p_effective_date
269 ,p_datetrack_mode => p_datetrack_mode
270 ,p_validation_start_date => p_validation_start_date
271 ,p_validation_end_date => p_validation_end_date
272 );
273 --
274 hr_utility.set_location(' Leaving:'||l_proc, 10);
275 End insert_dml;
276 --
277 -- ----------------------------------------------------------------------------
278 -- |------------------------------< pre_insert >------------------------------|
279 -- ----------------------------------------------------------------------------
280 -- {Start Of Comments}
281 --
282 -- Description:
283 -- This private procedure contains any processing which is required before
284 -- the insert dml. Presently, if the entity has a corresponding primary
285 -- key which is maintained by an associating sequence, the primary key for
286 -- the entity will be populated with the next sequence value in
287 -- preparation for the insert dml.
288 -- Also, if comments are defined for this entity, the comments insert
289 -- logic will also be called, generating a comment_id if required.
290 --
291 -- Prerequisites:
292 -- This is an internal procedure which is called from the ins procedure.
293 --
294 -- In Parameters:
295 -- A Pl/Sql record structure.
296 --
297 -- Post Success:
298 -- Processing continues.
299 --
300 -- Post Failure:
301 -- If an error has occurred, an error message and exception will be raised
302 -- but not handled.
303 --
304 -- Developer Implementation Notes:
305 -- Any pre-processing required before the insert dml is issued should be
306 -- coded within this procedure. As stated above, a good example is the
307 -- generation of a primary key number via a corresponding sequence.
308 -- It is important to note that any 3rd party maintenance should be reviewed
309 -- before placing in this procedure.
310 --
311 -- Access Status:
312 -- Internal Row Handler Use Only.
313 --
314 -- {End Of Comments}
315 -- ----------------------------------------------------------------------------
316 Procedure pre_insert
317 (p_rec in out nocopy ben_bep_shd.g_rec_type
318 ,p_effective_date in date
319 ,p_datetrack_mode in varchar2
320 ,p_validation_start_date in date
321 ,p_validation_end_date in date
322 ) is
323 --
324 Cursor C_Sel1 is select ben_elig_obj_elig_profl_s.nextval from sys.dual;
325 --
326 Cursor C_Sel2 is
327 Select null
328 from ben_elig_obj_elig_profl_f
329 where elig_obj_elig_prfl_id =
330 ben_bep_ins.g_elig_obj_elig_prfl_id_i;
331 --
332 l_proc varchar2(72) := g_package||'pre_insert';
333 l_exists varchar2(1);
334 --
335 Begin
336 hr_utility.set_location('Entering:'||l_proc, 5);
337 --
338 If (ben_bep_ins.g_elig_obj_elig_prfl_id_i is not null) Then
339 --
340 -- Verify registered primary key values not already in use
341 --
342 Open C_Sel2;
343 Fetch C_Sel2 into l_exists;
344 If C_Sel2%found Then
345 Close C_Sel2;
346 --
347 -- The primary key values are already in use.
348 --
349 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
350 fnd_message.set_token('TABLE_NAME','ben_elig_obj_elig_profl_f');
351 fnd_message.raise_error;
352 End If;
353 Close C_Sel2;
354 --
355 -- Use registered key values and clear globals
356 --
357 p_rec.elig_obj_elig_prfl_id :=
358 ben_bep_ins.g_elig_obj_elig_prfl_id_i;
359 ben_bep_ins.g_elig_obj_elig_prfl_id_i := null;
360 Else
361 --
362 -- No registerd key values, so select the next sequence number
363 --
364 --
365 -- Select the next sequence number
366 --
367 Open C_Sel1;
368 Fetch C_Sel1 Into p_rec.elig_obj_elig_prfl_id;
369 Close C_Sel1;
370 End If;
371 --
372 --
373 hr_utility.set_location(' Leaving:'||l_proc, 10);
374 End pre_insert;
375 --
376 -- ----------------------------------------------------------------------------
377 -- |----------------------------< post_insert >-------------------------------|
378 -- ----------------------------------------------------------------------------
379 -- {Start Of Comments}
380 --
381 -- Description:
382 -- This private procedure contains any processing which is required after
383 -- the insert dml.
384 --
385 -- Prerequisites:
386 -- This is an internal procedure which is called from the ins procedure.
387 --
388 -- In Parameters:
389 -- A Pl/Sql record structure.
390 --
391 -- Post Success:
392 -- Processing continues.
393 --
394 -- Post Failure:
395 -- If an error has occurred, an error message and exception will be raised
396 -- but not handled.
397 --
398 -- Developer Implementation Notes:
399 -- Any post-processing required after the insert dml is issued should be
400 -- coded within this procedure. It is important to note that any 3rd party
401 -- maintenance should be reviewed before placing in this procedure.
402 --
403 -- Access Status:
404 -- Internal Row Handler Use Only.
405 --
406 -- {End Of Comments}
407 -- ----------------------------------------------------------------------------
408 Procedure post_insert
409 (p_rec in ben_bep_shd.g_rec_type
410 ,p_effective_date in date
411 ,p_datetrack_mode in varchar2
412 ,p_validation_start_date in date
413 ,p_validation_end_date in date
414 ) is
415 --
416 l_proc varchar2(72) := g_package||'post_insert';
417 --
418 Begin
419 hr_utility.set_location('Entering:'||l_proc, 5);
423 (p_effective_date
420 begin
421 --
422 ben_bep_rki.after_insert
424 => p_effective_date
425 ,p_validation_start_date
426 => p_validation_start_date
427 ,p_validation_end_date
428 => p_validation_end_date
429 ,p_elig_obj_elig_prfl_id
430 => p_rec.elig_obj_elig_prfl_id
431 ,p_effective_start_date
432 => p_rec.effective_start_date
433 ,p_effective_end_date
434 => p_rec.effective_end_date
435 ,p_elig_obj_id
436 => p_rec.elig_obj_id
437 ,p_elig_prfl_id
438 => p_rec.elig_prfl_id
439 ,p_mndtry_flag
440 => p_rec.mndtry_flag
441 ,p_business_group_id
442 => p_rec.business_group_id
443 ,p_bep_attribute_category
444 => p_rec.bep_attribute_category
445 ,p_bep_attribute1
446 => p_rec.bep_attribute1
447 ,p_bep_attribute2
448 => p_rec.bep_attribute2
449 ,p_bep_attribute3
450 => p_rec.bep_attribute3
451 ,p_bep_attribute4
452 => p_rec.bep_attribute4
453 ,p_bep_attribute5
454 => p_rec.bep_attribute5
455 ,p_bep_attribute6
456 => p_rec.bep_attribute6
457 ,p_bep_attribute7
458 => p_rec.bep_attribute7
459 ,p_bep_attribute8
460 => p_rec.bep_attribute8
461 ,p_bep_attribute9
462 => p_rec.bep_attribute9
463 ,p_bep_attribute10
464 => p_rec.bep_attribute10
465 ,p_bep_attribute11
466 => p_rec.bep_attribute11
467 ,p_bep_attribute12
468 => p_rec.bep_attribute12
469 ,p_bep_attribute13
470 => p_rec.bep_attribute13
471 ,p_bep_attribute14
472 => p_rec.bep_attribute14
473 ,p_bep_attribute15
474 => p_rec.bep_attribute15
475 ,p_bep_attribute16
476 => p_rec.bep_attribute16
477 ,p_bep_attribute17
478 => p_rec.bep_attribute17
479 ,p_bep_attribute18
480 => p_rec.bep_attribute18
481 ,p_bep_attribute19
482 => p_rec.bep_attribute19
483 ,p_bep_attribute20
484 => p_rec.bep_attribute20
485 ,p_object_version_number
486 => p_rec.object_version_number
487 );
488 --
489 exception
490 --
491 when hr_api.cannot_find_prog_unit then
492 --
493 hr_api.cannot_find_prog_unit_error
494 (p_module_name => 'BEN_ELIG_OBJ_ELIG_PROFL_F'
495 ,p_hook_type => 'AI');
496 --
497 end;
498 --
499 hr_utility.set_location(' Leaving:'||l_proc, 10);
500 End post_insert;
501 --
502 -- ----------------------------------------------------------------------------
503 -- |-------------------------------< ins_lck >--------------------------------|
504 -- ----------------------------------------------------------------------------
505 -- {Start Of Comments}
506 --
507 -- Description:
508 -- The ins_lck process has one main function to perform. When inserting
509 -- a datetracked row, we must validate the DT mode.
510 --
511 -- Prerequisites:
512 -- This procedure can only be called for the datetrack mode of INSERT.
513 --
514 -- In Parameters:
515 --
516 -- Post Success:
517 -- On successful completion of the ins_lck process the parental
518 -- datetracked rows will be locked providing the p_enforce_foreign_locking
519 -- argument value is TRUE.
520 -- If the p_enforce_foreign_locking argument value is FALSE then the
521 -- parential rows are not locked.
522 --
523 -- Post Failure:
524 -- The Lck process can fail for:
525 -- 1) When attempting to lock the row the row could already be locked by
526 -- another user. This will raise the HR_Api.Object_Locked exception.
527 -- 2) When attempting to the lock the parent which doesn't exist.
528 -- For the entity to be locked the parent must exist!
529 --
530 -- Developer Implementation Notes:
531 -- None.
532 --
533 -- Access Status:
534 -- Internal Row Handler Use Only.
535 --
536 -- {End Of Comments}
537 -- ----------------------------------------------------------------------------
538 Procedure ins_lck
539 (p_effective_date in date
540 ,p_datetrack_mode in varchar2
541 ,p_rec in ben_bep_shd.g_rec_type
542 ,p_validation_start_date out nocopy date
543 ,p_validation_end_date out nocopy date
544 ) is
545 --
546 l_proc varchar2(72) := g_package||'ins_lck';
547 l_validation_start_date date;
548 l_validation_end_date date;
549 --
550 Begin
551 hr_utility.set_location('Entering:'||l_proc, 5);
552 --
553 -- Validate the datetrack mode mode getting the validation start
554 -- and end dates for the specified datetrack operation.
555 --
556 dt_api.validate_dt_mode
557 (p_effective_date => p_effective_date
558 ,p_datetrack_mode => p_datetrack_mode
559 ,p_base_table_name => 'ben_elig_obj_elig_profl_f'
560 ,p_base_key_column => 'elig_obj_elig_prfl_id'
561 ,p_base_key_value => p_rec.elig_obj_elig_prfl_id
562 ,p_parent_table_name1 => 'ben_eligy_prfl_f'
566 ,p_parent_key_column2 => 'elig_obj_id'
563 ,p_parent_key_column1 => 'eligy_prfl_id'
564 ,p_parent_key_value1 => p_rec.elig_prfl_id
565 ,p_parent_table_name2 => 'ben_elig_obj_f'
567 ,p_parent_key_value2 => p_rec.elig_obj_id
568 ,p_enforce_foreign_locking => false --true
569 ,p_validation_start_date => l_validation_start_date
570 ,p_validation_end_date => l_validation_end_date
571 );
572 --
573 -- Set the validation start and end date OUT arguments
574 --
575 p_validation_start_date := l_validation_start_date;
576 p_validation_end_date := l_validation_end_date;
577 --
578 hr_utility.set_location(' Leaving:'||l_proc, 10);
579 --
580 End ins_lck;
581 --
582 -- ----------------------------------------------------------------------------
583 -- |---------------------------------< ins >----------------------------------|
584 -- ----------------------------------------------------------------------------
585 Procedure ins
586 (p_effective_date in date
587 ,p_rec in out nocopy ben_bep_shd.g_rec_type
588 ) is
589 --
590 l_proc varchar2(72) := g_package||'ins';
591 l_datetrack_mode varchar2(30) := hr_api.g_insert;
592 l_validation_start_date date;
593 l_validation_end_date date;
594 --
595 Begin
596 hr_utility.set_location('Entering:'||l_proc, 5);
597 --
598 -- Call the lock operation
599 --
600 ben_bep_ins.ins_lck
601 (p_effective_date => p_effective_date
602 ,p_datetrack_mode => l_datetrack_mode
603 ,p_rec => p_rec
604 ,p_validation_start_date => l_validation_start_date
605 ,p_validation_end_date => l_validation_end_date
606 );
607 --
608 -- Call the supporting insert validate operations
609 --
610 ben_bep_bus.insert_validate
611 (p_rec => p_rec
612 ,p_effective_date => p_effective_date
613 ,p_datetrack_mode => l_datetrack_mode
614 ,p_validation_start_date => l_validation_start_date
615 ,p_validation_end_date => l_validation_end_date
616 );
617 --
618 -- Call to raise any errors on multi-message list
619 hr_multi_message.end_validation_set;
620 --
621 -- Call the supporting pre-insert operation
622 --
623 ben_bep_ins.pre_insert
624 (p_rec => p_rec
625 ,p_effective_date => p_effective_date
626 ,p_datetrack_mode => l_datetrack_mode
627 ,p_validation_start_date => l_validation_start_date
628 ,p_validation_end_date => l_validation_end_date
629 );
630 --
631 -- Insert the row
632 --
633 ben_bep_ins.insert_dml
634 (p_rec => p_rec
635 ,p_effective_date => p_effective_date
636 ,p_datetrack_mode => l_datetrack_mode
637 ,p_validation_start_date => l_validation_start_date
638 ,p_validation_end_date => l_validation_end_date
639 );
640 --
641 -- Call the supporting post-insert operation
642 --
643 ben_bep_ins.post_insert
644 (p_rec => p_rec
645 ,p_effective_date => p_effective_date
646 ,p_datetrack_mode => l_datetrack_mode
647 ,p_validation_start_date => l_validation_start_date
648 ,p_validation_end_date => l_validation_end_date
649 );
650 --
651 -- Call to raise any errors on multi-message list
652 hr_multi_message.end_validation_set;
653 --
654 hr_utility.set_location('Leaving:'||l_proc,10);
655 end ins;
656 --
657 -- ----------------------------------------------------------------------------
658 -- |---------------------------------< ins >----------------------------------|
659 -- ----------------------------------------------------------------------------
660 Procedure ins
661 (p_effective_date in date
662 ,p_elig_obj_id in number
663 ,p_elig_prfl_id in number
664 ,p_mndtry_flag in varchar2
665 ,p_business_group_id in number
666 ,p_bep_attribute_category in varchar2 default null
667 ,p_bep_attribute1 in varchar2 default null
668 ,p_bep_attribute2 in varchar2 default null
669 ,p_bep_attribute3 in varchar2 default null
670 ,p_bep_attribute4 in varchar2 default null
671 ,p_bep_attribute5 in varchar2 default null
672 ,p_bep_attribute6 in varchar2 default null
673 ,p_bep_attribute7 in varchar2 default null
674 ,p_bep_attribute8 in varchar2 default null
675 ,p_bep_attribute9 in varchar2 default null
676 ,p_bep_attribute10 in varchar2 default null
677 ,p_bep_attribute11 in varchar2 default null
678 ,p_bep_attribute12 in varchar2 default null
679 ,p_bep_attribute13 in varchar2 default null
680 ,p_bep_attribute14 in varchar2 default null
681 ,p_bep_attribute15 in varchar2 default null
682 ,p_bep_attribute16 in varchar2 default null
683 ,p_bep_attribute17 in varchar2 default null
684 ,p_bep_attribute18 in varchar2 default null
685 ,p_bep_attribute19 in varchar2 default null
686 ,p_bep_attribute20 in varchar2 default null
687 ,p_elig_obj_elig_prfl_id out nocopy number
688 ,p_object_version_number out nocopy number
689 ,p_effective_start_date out nocopy date
690 ,p_effective_end_date out nocopy date
691 ) is
692 --
693 l_rec ben_bep_shd.g_rec_type;
694 l_proc varchar2(72) := g_package||'ins';
695 --
696 Begin
697 hr_utility.set_location('Entering:'||l_proc, 5);
698 --
699 -- Call conversion function to turn arguments into the
700 -- p_rec structure.
701 --
702 l_rec :=
703 ben_bep_shd.convert_args
704 (null
705 ,null
706 ,null
707 ,p_elig_obj_id
708 ,p_elig_prfl_id
709 ,p_mndtry_flag
713 ,p_bep_attribute2
710 ,p_business_group_id
711 ,p_bep_attribute_category
712 ,p_bep_attribute1
714 ,p_bep_attribute3
715 ,p_bep_attribute4
716 ,p_bep_attribute5
717 ,p_bep_attribute6
718 ,p_bep_attribute7
719 ,p_bep_attribute8
720 ,p_bep_attribute9
721 ,p_bep_attribute10
722 ,p_bep_attribute11
723 ,p_bep_attribute12
724 ,p_bep_attribute13
725 ,p_bep_attribute14
726 ,p_bep_attribute15
727 ,p_bep_attribute16
728 ,p_bep_attribute17
729 ,p_bep_attribute18
730 ,p_bep_attribute19
731 ,p_bep_attribute20
732 ,null
733 );
734 --
735 -- Having converted the arguments into the ben_bep_rec
736 -- plsql record structure we call the corresponding record
737 -- business process.
738 --
739 ben_bep_ins.ins
740 (p_effective_date
741 ,l_rec
742 );
743 --
744 -- Set the OUT arguments.
745 --
746 p_elig_obj_elig_prfl_id := l_rec.elig_obj_elig_prfl_id;
747 p_effective_start_date := l_rec.effective_start_date;
748 p_effective_end_date := l_rec.effective_end_date;
749 p_object_version_number := l_rec.object_version_number;
750 --
751 --
752 hr_utility.set_location(' Leaving:'||l_proc, 10);
753 End ins;
754 --
755 end ben_bep_ins;