[Home] [Help]
PACKAGE BODY: APPS.BEN_PBM_INS
Source
1 Package Body ben_pbm_ins as
2 /* $Header: bepbmrhi.pkb 115.6 2002/12/11 11:17:16 hnarayan ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pbm_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_pbm_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_pl_r_oipl_prem_by_mo_f t
70 where t.pl_r_oipl_prem_by_mo_id = p_rec.pl_r_oipl_prem_by_mo_id
71 and t.effective_start_date =
72 ben_pbm_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_pl_r_oipl_prem_by_mo_f.created_by%TYPE;
77 l_creation_date ben_pl_r_oipl_prem_by_mo_f.creation_date%TYPE;
78 l_last_update_date ben_pl_r_oipl_prem_by_mo_f.last_update_date%TYPE;
79 l_last_updated_by ben_pl_r_oipl_prem_by_mo_f.last_updated_by%TYPE;
80 l_last_update_login ben_pl_r_oipl_prem_by_mo_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_pl_r_oipl_prem_by_mo_f',
90 p_base_key_column => 'pl_r_oipl_prem_by_mo_id',
91 p_base_key_value => p_rec.pl_r_oipl_prem_by_mo_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 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
116 fnd_message.set_token('PROCEDURE', l_proc);
117 fnd_message.set_token('STEP','10');
118 fnd_message.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_pbm_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_pl_r_oipl_prem_by_mo_f
132 --
133 insert into ben_pl_r_oipl_prem_by_mo_f
134 ( pl_r_oipl_prem_by_mo_id,
135 effective_start_date,
136 effective_end_date,
137 mnl_adj_flag,
138 mo_num,
139 yr_num,
140 val,
141 uom,
142 prtts_num,
143 actl_prem_id,
144 cost_allocation_keyflex_id,
145 business_group_id,
146 pbm_attribute_category,
147 pbm_attribute1,
148 pbm_attribute2,
149 pbm_attribute3,
150 pbm_attribute4,
151 pbm_attribute5,
152 pbm_attribute6,
153 pbm_attribute7,
154 pbm_attribute8,
155 pbm_attribute9,
156 pbm_attribute10,
157 pbm_attribute11,
158 pbm_attribute12,
159 pbm_attribute13,
160 pbm_attribute14,
161 pbm_attribute15,
162 pbm_attribute16,
163 pbm_attribute17,
164 pbm_attribute18,
165 pbm_attribute19,
166 pbm_attribute20,
167 pbm_attribute21,
168 pbm_attribute22,
169 pbm_attribute23,
170 pbm_attribute24,
171 pbm_attribute25,
172 pbm_attribute26,
173 pbm_attribute27,
174 pbm_attribute28,
175 pbm_attribute29,
176 pbm_attribute30,
177 object_version_number,
178 request_id,
179 program_id,
180 program_application_id,
181 program_update_date,
182 created_by,
183 creation_date,
184 last_update_date,
185 last_updated_by,
186 last_update_login
187 )
188 Values
189 ( p_rec.pl_r_oipl_prem_by_mo_id,
190 p_rec.effective_start_date,
191 p_rec.effective_end_date,
192 p_rec.mnl_adj_flag,
193 p_rec.mo_num,
194 p_rec.yr_num,
195 p_rec.val,
196 p_rec.uom,
197 p_rec.prtts_num,
198 p_rec.actl_prem_id,
199 p_rec.cost_allocation_keyflex_id,
200 p_rec.business_group_id,
201 p_rec.pbm_attribute_category,
202 p_rec.pbm_attribute1,
203 p_rec.pbm_attribute2,
204 p_rec.pbm_attribute3,
205 p_rec.pbm_attribute4,
206 p_rec.pbm_attribute5,
207 p_rec.pbm_attribute6,
208 p_rec.pbm_attribute7,
209 p_rec.pbm_attribute8,
210 p_rec.pbm_attribute9,
211 p_rec.pbm_attribute10,
212 p_rec.pbm_attribute11,
213 p_rec.pbm_attribute12,
214 p_rec.pbm_attribute13,
215 p_rec.pbm_attribute14,
216 p_rec.pbm_attribute15,
217 p_rec.pbm_attribute16,
218 p_rec.pbm_attribute17,
219 p_rec.pbm_attribute18,
220 p_rec.pbm_attribute19,
221 p_rec.pbm_attribute20,
222 p_rec.pbm_attribute21,
223 p_rec.pbm_attribute22,
224 p_rec.pbm_attribute23,
225 p_rec.pbm_attribute24,
226 p_rec.pbm_attribute25,
227 p_rec.pbm_attribute26,
228 p_rec.pbm_attribute27,
229 p_rec.pbm_attribute28,
230 p_rec.pbm_attribute29,
231 p_rec.pbm_attribute30,
232 p_rec.object_version_number,
233 p_rec.request_id,
234 p_rec.program_id,
235 p_rec.program_application_id,
236 p_rec.program_update_date,
237 l_created_by,
238 l_creation_date,
239 l_last_update_date,
240 l_last_updated_by,
241 l_last_update_login
242 );
243 --
244 ben_pbm_shd.g_api_dml := false; -- Unset the api dml status
245 hr_utility.set_location(' Leaving:'||l_proc, 15);
246 --
247 Exception
248 When hr_api.check_integrity_violated Then
249 -- A check constraint has been violated
250 ben_pbm_shd.g_api_dml := false; -- Unset the api dml status
251 ben_pbm_shd.constraint_error
252 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253 When hr_api.unique_integrity_violated Then
254 -- Unique integrity has been violated
255 ben_pbm_shd.g_api_dml := false; -- Unset the api dml status
256 ben_pbm_shd.constraint_error
257 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
258 When Others Then
259 ben_pbm_shd.g_api_dml := false; -- Unset the api dml status
260 Raise;
261 End dt_insert_dml;
262 --
263 -- ----------------------------------------------------------------------------
264 -- |------------------------------< insert_dml >------------------------------|
265 -- ----------------------------------------------------------------------------
266 Procedure insert_dml
267 (p_rec in out nocopy ben_pbm_shd.g_rec_type,
268 p_effective_date in date,
269 p_datetrack_mode in varchar2,
270 p_validation_start_date in date,
271 p_validation_end_date in date) is
272 --
273 l_proc varchar2(72) := g_package||'insert_dml';
274 --
275 Begin
276 hr_utility.set_location('Entering:'||l_proc, 5);
277 --
278 dt_insert_dml(p_rec => p_rec,
279 p_effective_date => p_effective_date,
280 p_datetrack_mode => p_datetrack_mode,
281 p_validation_start_date => p_validation_start_date,
282 p_validation_end_date => p_validation_end_date);
283 --
284 hr_utility.set_location(' Leaving:'||l_proc, 10);
285 End insert_dml;
286 --
287 -- ----------------------------------------------------------------------------
288 -- |------------------------------< pre_insert >------------------------------|
289 -- ----------------------------------------------------------------------------
290 -- {Start Of Comments}
291 --
292 -- Description:
293 -- This private procedure contains any processing which is required before
294 -- the insert dml. Presently, if the entity has a corresponding primary
295 -- key which is maintained by an associating sequence, the primary key for
296 -- the entity will be populated with the next sequence value in
297 -- preparation for the insert dml.
298 -- Also, if comments are defined for this entity, the comments insert
299 -- logic will also be called, generating a comment_id if required.
300 --
301 -- Prerequisites:
302 -- This is an internal procedure which is called from the ins procedure.
303 --
304 -- In Parameters:
305 -- A Pl/Sql record structre.
306 --
307 -- Post Success:
308 -- Processing continues.
309 --
310 -- Post Failure:
311 -- If an error has occurred, an error message and exception will be raised
312 -- but not handled.
313 --
314 -- Developer Implementation Notes:
315 -- Any pre-processing required before the insert dml is issued should be
316 -- coded within this procedure. As stated above, a good example is the
317 -- generation of a primary key number via a corresponding sequence.
318 -- It is important to note that any 3rd party maintenance should be reviewed
319 -- before placing in this procedure.
320 --
321 -- Access Status:
322 -- Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure pre_insert
327 (p_rec in out nocopy ben_pbm_shd.g_rec_type,
328 p_effective_date in date,
329 p_datetrack_mode in varchar2,
330 p_validation_start_date in date,
331 p_validation_end_date in date) is
332 --
333 l_proc varchar2(72) := g_package||'pre_insert';
334 --
335 cursor c1 is select ben_pl_r_oipl_prem_by_mo_f_s.nextval from sys.dual;
336 --
337 Begin
338 hr_utility.set_location('Entering:'||l_proc, 5);
339 --
340 open c1;
341 fetch c1 into p_rec.pl_r_oipl_prem_by_mo_id;
342 close c1;
343 --
344 hr_utility.set_location(' Leaving:'||l_proc, 10);
345 End pre_insert;
346 --
347 -- ----------------------------------------------------------------------------
348 -- |-----------------------------< post_insert >------------------------------|
349 -- ----------------------------------------------------------------------------
350 -- {Start Of Comments}
351 --
352 -- Description:
353 -- This private procedure contains any processing which is required after the
354 -- insert dml.
355 --
356 -- Prerequisites:
357 -- This is an internal procedure which is called from the ins procedure.
358 --
359 -- In Parameters:
360 -- A Pl/Sql record structre.
361 --
362 -- Post Success:
363 -- Processing continues.
364 --
365 -- Post Failure:
366 -- If an error has occurred, an error message and exception will be raised
367 -- but not handled.
368 --
369 -- Developer Implementation Notes:
370 -- Any post-processing required after the insert dml is issued should be
371 -- coded within this procedure. It is important to note that any 3rd party
372 -- maintenance should be reviewed before placing in this procedure.
373 --
374 -- Access Status:
375 -- Internal Row Handler Use Only.
376 --
377 -- {End Of Comments}
378 -- ----------------------------------------------------------------------------
379 Procedure post_insert
380 (p_rec in ben_pbm_shd.g_rec_type,
381 p_effective_date in date,
382 p_datetrack_mode in varchar2,
383 p_validation_start_date in date,
384 p_validation_end_date in date) is
385 --
386 l_proc varchar2(72) := g_package||'post_insert';
387 --
388 Begin
389 hr_utility.set_location('Entering:'||l_proc, 5);
390 --
391 --
392 -- Start of API User Hook for post_insert.
393 --
394 begin
395 --
396 ben_pbm_rki.after_insert
397 (
398 p_pl_r_oipl_prem_by_mo_id =>p_rec.pl_r_oipl_prem_by_mo_id
399 ,p_effective_start_date =>p_rec.effective_start_date
400 ,p_effective_end_date =>p_rec.effective_end_date
401 ,p_mnl_adj_flag =>p_rec.mnl_adj_flag
402 ,p_mo_num =>p_rec.mo_num
403 ,p_yr_num =>p_rec.yr_num
404 ,p_val =>p_rec.val
405 ,p_uom =>p_rec.uom
406 ,p_prtts_num =>p_rec.prtts_num
407 ,p_actl_prem_id =>p_rec.actl_prem_id
408 ,p_cost_allocation_keyflex_id =>p_rec.cost_allocation_keyflex_id
409 ,p_business_group_id =>p_rec.business_group_id
410 ,p_pbm_attribute_category =>p_rec.pbm_attribute_category
411 ,p_pbm_attribute1 =>p_rec.pbm_attribute1
412 ,p_pbm_attribute2 =>p_rec.pbm_attribute2
413 ,p_pbm_attribute3 =>p_rec.pbm_attribute3
414 ,p_pbm_attribute4 =>p_rec.pbm_attribute4
415 ,p_pbm_attribute5 =>p_rec.pbm_attribute5
416 ,p_pbm_attribute6 =>p_rec.pbm_attribute6
417 ,p_pbm_attribute7 =>p_rec.pbm_attribute7
418 ,p_pbm_attribute8 =>p_rec.pbm_attribute8
419 ,p_pbm_attribute9 =>p_rec.pbm_attribute9
420 ,p_pbm_attribute10 =>p_rec.pbm_attribute10
421 ,p_pbm_attribute11 =>p_rec.pbm_attribute11
422 ,p_pbm_attribute12 =>p_rec.pbm_attribute12
423 ,p_pbm_attribute13 =>p_rec.pbm_attribute13
424 ,p_pbm_attribute14 =>p_rec.pbm_attribute14
425 ,p_pbm_attribute15 =>p_rec.pbm_attribute15
426 ,p_pbm_attribute16 =>p_rec.pbm_attribute16
427 ,p_pbm_attribute17 =>p_rec.pbm_attribute17
428 ,p_pbm_attribute18 =>p_rec.pbm_attribute18
429 ,p_pbm_attribute19 =>p_rec.pbm_attribute19
430 ,p_pbm_attribute20 =>p_rec.pbm_attribute20
431 ,p_pbm_attribute21 =>p_rec.pbm_attribute21
432 ,p_pbm_attribute22 =>p_rec.pbm_attribute22
433 ,p_pbm_attribute23 =>p_rec.pbm_attribute23
434 ,p_pbm_attribute24 =>p_rec.pbm_attribute24
435 ,p_pbm_attribute25 =>p_rec.pbm_attribute25
436 ,p_pbm_attribute26 =>p_rec.pbm_attribute26
437 ,p_pbm_attribute27 =>p_rec.pbm_attribute27
438 ,p_pbm_attribute28 =>p_rec.pbm_attribute28
439 ,p_pbm_attribute29 =>p_rec.pbm_attribute29
440 ,p_pbm_attribute30 =>p_rec.pbm_attribute30
441 ,p_object_version_number =>p_rec.object_version_number
442 ,p_request_id =>p_rec.request_id
443 ,p_program_id =>p_rec.program_id
444 ,p_program_application_id =>p_rec.program_application_id
445 ,p_program_update_date =>p_rec.program_update_date
446 ,p_effective_date =>p_effective_date
447 ,p_validation_start_date =>p_validation_start_date
448 ,p_validation_end_date =>p_validation_end_date
449 );
450 --
451 exception
452 --
453 when hr_api.cannot_find_prog_unit then
454 --
455 hr_api.cannot_find_prog_unit_error
456 (p_module_name => 'ben_pl_r_oipl_prem_by_mo_f'
457 ,p_hook_type => 'AI');
458 --
459 end;
460 --
461 -- End of API User Hook for post_insert.
462 --
463 --
464 hr_utility.set_location(' Leaving:'||l_proc, 10);
465 End post_insert;
466 --
467 -- ----------------------------------------------------------------------------
468 -- |-------------------------------< ins_lck >--------------------------------|
469 -- ----------------------------------------------------------------------------
470 -- {Start Of Comments}
471 --
472 -- Description:
473 -- The ins_lck process has one main function to perform. When inserting
474 -- a datetracked row, we must validate the DT mode.
475 -- be manipulated.
476 --
477 -- Prerequisites:
478 -- This procedure can only be called for the datetrack mode of INSERT.
479 --
480 -- In Parameters:
481 --
482 -- Post Success:
483 -- On successful completion of the ins_lck process the parental
484 -- datetracked rows will be locked providing the p_enforce_foreign_locking
485 -- argument value is TRUE.
486 -- If the p_enforce_foreign_locking argument value is FALSE then the
487 -- parential rows are not locked.
488 --
489 -- Post Failure:
490 -- The Lck process can fail for:
491 -- 1) When attempting to lock the row the row could already be locked by
492 -- another user. This will raise the HR_Api.Object_Locked exception.
493 -- 2) When attempting to the lock the parent which doesn't exist.
494 -- For the entity to be locked the parent must exist!
495 --
496 -- Developer Implementation Notes:
497 -- None.
498 --
499 -- Access Status:
500 -- Internal Row Handler Use Only.
501 --
502 -- {End Of Comments}
503 -- ----------------------------------------------------------------------------
504 Procedure ins_lck
505 (p_effective_date in date,
506 p_datetrack_mode in varchar2,
507 p_rec in ben_pbm_shd.g_rec_type,
508 p_validation_start_date out nocopy date,
509 p_validation_end_date out nocopy date) is
510 --
511 l_proc varchar2(72) := g_package||'ins_lck';
512 l_validation_start_date date;
513 l_validation_end_date date;
514 --
515 Begin
516 hr_utility.set_location('Entering:'||l_proc, 5);
517 --
518 -- Validate the datetrack mode mode getting the validation start
519 -- and end dates for the specified datetrack operation.
520 --
521 dt_api.validate_dt_mode
522 (p_effective_date => p_effective_date,
523 p_datetrack_mode => p_datetrack_mode,
524 p_base_table_name => 'ben_pl_r_oipl_prem_by_mo_f',
525 p_base_key_column => 'pl_r_oipl_prem_by_mo_id',
526 p_base_key_value => p_rec.pl_r_oipl_prem_by_mo_id,
527 p_parent_table_name1 => 'ben_actl_prem_f',
528 p_parent_key_column1 => 'actl_prem_id',
529 p_parent_key_value1 => p_rec.actl_prem_id,
530 p_enforce_foreign_locking => false,
531 p_validation_start_date => l_validation_start_date,
532 p_validation_end_date => l_validation_end_date);
533 --
534 -- Set the validation start and end date OUT arguments
535 --
536 p_validation_start_date := l_validation_start_date;
537 p_validation_end_date := l_validation_end_date;
538 --
539 hr_utility.set_location(' Leaving:'||l_proc, 10);
540 --
541 End ins_lck;
542 --
543 -- ----------------------------------------------------------------------------
544 -- |---------------------------------< ins >----------------------------------|
545 -- ----------------------------------------------------------------------------
546 Procedure ins
547 (
548 p_rec in out nocopy ben_pbm_shd.g_rec_type,
549 p_effective_date in date
550 ) is
551 --
552 l_proc varchar2(72) := g_package||'ins';
553 l_datetrack_mode varchar2(30) := 'INSERT';
554 l_validation_start_date date;
555 l_validation_end_date date;
556 --
557 Begin
558 hr_utility.set_location('Entering:'||l_proc, 5);
559 --
560 -- Call the lock operation
561 --
562 ins_lck
563 (p_effective_date => p_effective_date,
564 p_datetrack_mode => l_datetrack_mode,
565 p_rec => p_rec,
566 p_validation_start_date => l_validation_start_date,
567 p_validation_end_date => l_validation_end_date);
568 --
569 -- Call the supporting insert validate operations
570 --
571 ben_pbm_bus.insert_validate
572 (p_rec => p_rec,
573 p_effective_date => p_effective_date,
574 p_datetrack_mode => l_datetrack_mode,
575 p_validation_start_date => l_validation_start_date,
576 p_validation_end_date => l_validation_end_date);
577 --
578 -- Call the supporting pre-insert operation
579 --
580 pre_insert
581 (p_rec => p_rec,
582 p_effective_date => p_effective_date,
583 p_datetrack_mode => l_datetrack_mode,
584 p_validation_start_date => l_validation_start_date,
585 p_validation_end_date => l_validation_end_date);
586 --
587 -- Insert the row
588 --
589 insert_dml
590 (p_rec => p_rec,
591 p_effective_date => p_effective_date,
592 p_datetrack_mode => l_datetrack_mode,
593 p_validation_start_date => l_validation_start_date,
594 p_validation_end_date => l_validation_end_date);
595 --
596 -- Call the supporting post-insert operation
597 --
598 post_insert
599 (p_rec => p_rec,
600 p_effective_date => p_effective_date,
601 p_datetrack_mode => l_datetrack_mode,
602 p_validation_start_date => l_validation_start_date,
603 p_validation_end_date => l_validation_end_date);
604 end ins;
605 --
606 -- ----------------------------------------------------------------------------
607 -- |---------------------------------< ins >----------------------------------|
608 -- ----------------------------------------------------------------------------
609 Procedure ins
610 (
611 p_pl_r_oipl_prem_by_mo_id out nocopy number,
612 p_effective_start_date out nocopy date,
613 p_effective_end_date out nocopy date,
614 p_mnl_adj_flag in varchar2,
615 p_mo_num in number default null,
616 p_yr_num in number default null,
617 p_val in number default null,
618 p_uom in varchar2 default null,
619 p_prtts_num in number default null,
620 p_actl_prem_id in number,
621 p_cost_allocation_keyflex_id in number default null,
622 p_business_group_id in number,
623 p_pbm_attribute_category in varchar2 default null,
624 p_pbm_attribute1 in varchar2 default null,
625 p_pbm_attribute2 in varchar2 default null,
626 p_pbm_attribute3 in varchar2 default null,
627 p_pbm_attribute4 in varchar2 default null,
628 p_pbm_attribute5 in varchar2 default null,
629 p_pbm_attribute6 in varchar2 default null,
630 p_pbm_attribute7 in varchar2 default null,
631 p_pbm_attribute8 in varchar2 default null,
632 p_pbm_attribute9 in varchar2 default null,
633 p_pbm_attribute10 in varchar2 default null,
634 p_pbm_attribute11 in varchar2 default null,
635 p_pbm_attribute12 in varchar2 default null,
636 p_pbm_attribute13 in varchar2 default null,
637 p_pbm_attribute14 in varchar2 default null,
638 p_pbm_attribute15 in varchar2 default null,
639 p_pbm_attribute16 in varchar2 default null,
640 p_pbm_attribute17 in varchar2 default null,
641 p_pbm_attribute18 in varchar2 default null,
642 p_pbm_attribute19 in varchar2 default null,
643 p_pbm_attribute20 in varchar2 default null,
644 p_pbm_attribute21 in varchar2 default null,
645 p_pbm_attribute22 in varchar2 default null,
646 p_pbm_attribute23 in varchar2 default null,
647 p_pbm_attribute24 in varchar2 default null,
648 p_pbm_attribute25 in varchar2 default null,
649 p_pbm_attribute26 in varchar2 default null,
650 p_pbm_attribute27 in varchar2 default null,
651 p_pbm_attribute28 in varchar2 default null,
652 p_pbm_attribute29 in varchar2 default null,
653 p_pbm_attribute30 in varchar2 default null,
654 p_object_version_number out nocopy number,
655 p_request_id in number default null,
656 p_program_id in number default null,
657 p_program_application_id in number default null,
658 p_program_update_date in date default null,
659 p_effective_date in date
660 ) is
661 --
662 l_rec ben_pbm_shd.g_rec_type;
663 l_proc varchar2(72) := g_package||'ins';
664 --
665 Begin
666 hr_utility.set_location('Entering:'||l_proc, 5);
667 --
668 -- Call conversion function to turn arguments into the
669 -- p_rec structure.
670 --
671 l_rec :=
672 ben_pbm_shd.convert_args
673 (
674 null,
675 null,
676 null,
677 p_mnl_adj_flag,
678 p_mo_num,
679 p_yr_num,
680 p_val,
681 p_uom,
682 p_prtts_num,
683 p_actl_prem_id,
684 p_cost_allocation_keyflex_id,
685 p_business_group_id,
686 p_pbm_attribute_category,
687 p_pbm_attribute1,
688 p_pbm_attribute2,
689 p_pbm_attribute3,
690 p_pbm_attribute4,
691 p_pbm_attribute5,
692 p_pbm_attribute6,
693 p_pbm_attribute7,
694 p_pbm_attribute8,
695 p_pbm_attribute9,
696 p_pbm_attribute10,
697 p_pbm_attribute11,
698 p_pbm_attribute12,
699 p_pbm_attribute13,
700 p_pbm_attribute14,
701 p_pbm_attribute15,
702 p_pbm_attribute16,
703 p_pbm_attribute17,
704 p_pbm_attribute18,
705 p_pbm_attribute19,
706 p_pbm_attribute20,
707 p_pbm_attribute21,
708 p_pbm_attribute22,
709 p_pbm_attribute23,
710 p_pbm_attribute24,
711 p_pbm_attribute25,
712 p_pbm_attribute26,
713 p_pbm_attribute27,
714 p_pbm_attribute28,
715 p_pbm_attribute29,
716 p_pbm_attribute30,
717 null,
718 p_request_id,
719 p_program_id,
720 p_program_application_id,
721 p_program_update_date
722 );
723 --
724 -- Having converted the arguments into the ben_pbm_rec
725 -- plsql record structure we call the corresponding record
726 -- business process.
727 --
728 ins(l_rec, p_effective_date);
729 --
730 -- Set the OUT arguments.
731 --
732 p_pl_r_oipl_prem_by_mo_id := l_rec.pl_r_oipl_prem_by_mo_id;
733 p_effective_start_date := l_rec.effective_start_date;
734 p_effective_end_date := l_rec.effective_end_date;
735 p_object_version_number := l_rec.object_version_number;
736 --
737 --
738 hr_utility.set_location(' Leaving:'||l_proc, 10);
739 End ins;
740 --
741 end ben_pbm_ins;