[Home] [Help]
PACKAGE BODY: APPS.BEN_PPV_INS
Source
1 Package Body ben_ppv_ins as
2 /* $Header: beppvrhi.pkb 120.6 2008/02/05 09:48:37 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_ppv_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_ppv_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_prtl_mo_rt_prtn_val_f t
70 where t.prtl_mo_rt_prtn_val_id = p_rec.prtl_mo_rt_prtn_val_id
71 and t.effective_start_date =
72 ben_ppv_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_prtl_mo_rt_prtn_val_f.created_by%TYPE;
77 l_creation_date ben_prtl_mo_rt_prtn_val_f.creation_date%TYPE;
78 l_last_update_date ben_prtl_mo_rt_prtn_val_f.last_update_date%TYPE;
79 l_last_updated_by ben_prtl_mo_rt_prtn_val_f.last_updated_by%TYPE;
80 l_last_update_login ben_prtl_mo_rt_prtn_val_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_prtl_mo_rt_prtn_val_f',
90 p_base_key_column => 'prtl_mo_rt_prtn_val_id',
91 p_base_key_value => p_rec.prtl_mo_rt_prtn_val_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('PAY', '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_ppv_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_prtl_mo_rt_prtn_val_f
132 --
133 insert into ben_prtl_mo_rt_prtn_val_f
134 ( prtl_mo_rt_prtn_val_id,
135 effective_end_date,
136 effective_start_date,
137 business_group_id,
138 rndg_cd,
139 to_dy_mo_num,
140 from_dy_mo_num,
141 pct_val,
142 acty_base_rt_id,
143 strt_r_stp_cvg_cd,
144 rndg_rl,
145 prtl_mo_prortn_rl,
146 actl_prem_id,
147 cvg_amt_calc_mthd_id,
148 num_days_month,
149 prorate_by_day_to_mon_flag,
150 pmrpv_attribute_category,
151 pmrpv_attribute1,
152 pmrpv_attribute2,
153 pmrpv_attribute3,
154 pmrpv_attribute4,
155 pmrpv_attribute5,
156 pmrpv_attribute6,
157 pmrpv_attribute7,
158 pmrpv_attribute8,
159 pmrpv_attribute9,
160 pmrpv_attribute10,
161 pmrpv_attribute11,
162 pmrpv_attribute12,
163 pmrpv_attribute13,
164 pmrpv_attribute14,
165 pmrpv_attribute15,
166 pmrpv_attribute16,
167 pmrpv_attribute17,
168 pmrpv_attribute18,
169 pmrpv_attribute19,
170 pmrpv_attribute20,
171 pmrpv_attribute21,
172 pmrpv_attribute22,
173 pmrpv_attribute23,
174 pmrpv_attribute24,
175 pmrpv_attribute25,
176 pmrpv_attribute26,
177 pmrpv_attribute27,
178 pmrpv_attribute28,
179 pmrpv_attribute29,
180 pmrpv_attribute30,
181 object_version_number
182 , created_by,
183 creation_date,
184 last_update_date,
185 last_updated_by,
186 last_update_login
187 )
188 Values
189 ( p_rec.prtl_mo_rt_prtn_val_id,
190 p_rec.effective_end_date,
191 p_rec.effective_start_date,
195 p_rec.from_dy_mo_num,
192 p_rec.business_group_id,
193 p_rec.rndg_cd,
194 p_rec.to_dy_mo_num,
196 p_rec.pct_val,
197 p_rec.acty_base_rt_id,
198 p_rec.strt_r_stp_cvg_cd,
199 p_rec.rndg_rl,
200 p_rec.prtl_mo_prortn_rl,
201 p_rec.actl_prem_id,
202 p_rec.cvg_amt_calc_mthd_id,
203 p_rec.num_days_month,
204 p_rec.prorate_by_day_to_mon_flag,
205 p_rec.pmrpv_attribute_category,
206 p_rec.pmrpv_attribute1,
207 p_rec.pmrpv_attribute2,
208 p_rec.pmrpv_attribute3,
209 p_rec.pmrpv_attribute4,
210 p_rec.pmrpv_attribute5,
211 p_rec.pmrpv_attribute6,
212 p_rec.pmrpv_attribute7,
213 p_rec.pmrpv_attribute8,
214 p_rec.pmrpv_attribute9,
215 p_rec.pmrpv_attribute10,
216 p_rec.pmrpv_attribute11,
217 p_rec.pmrpv_attribute12,
218 p_rec.pmrpv_attribute13,
219 p_rec.pmrpv_attribute14,
220 p_rec.pmrpv_attribute15,
221 p_rec.pmrpv_attribute16,
222 p_rec.pmrpv_attribute17,
223 p_rec.pmrpv_attribute18,
224 p_rec.pmrpv_attribute19,
225 p_rec.pmrpv_attribute20,
226 p_rec.pmrpv_attribute21,
227 p_rec.pmrpv_attribute22,
228 p_rec.pmrpv_attribute23,
229 p_rec.pmrpv_attribute24,
230 p_rec.pmrpv_attribute25,
231 p_rec.pmrpv_attribute26,
232 p_rec.pmrpv_attribute27,
233 p_rec.pmrpv_attribute28,
234 p_rec.pmrpv_attribute29,
235 p_rec.pmrpv_attribute30,
236 p_rec.object_version_number
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_ppv_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_ppv_shd.g_api_dml := false; -- Unset the api dml status
251 ben_ppv_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_ppv_shd.g_api_dml := false; -- Unset the api dml status
256 ben_ppv_shd.constraint_error
257 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
258 When Others Then
259 ben_ppv_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_ppv_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_ppv_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 cursor c1 is select ben_prtl_mo_rt_prtn_val_f_s.nextval from sys.dual;
335 --
336 --
337 --
338 Begin
339 hr_utility.set_location('Entering:'||l_proc, 5);
340 --
341 open c1;
342 fetch c1 into p_rec.prtl_mo_rt_prtn_val_id;
343 close c1;
344 --
345 --
346 --
347 hr_utility.set_location(' Leaving:'||l_proc, 10);
348 End pre_insert;
349 --
350 -- ----------------------------------------------------------------------------
351 -- |-----------------------------< post_insert >------------------------------|
352 -- ----------------------------------------------------------------------------
353 -- {Start Of Comments}
354 --
355 -- Description:
356 -- This private procedure contains any processing which is required after the
357 -- insert dml.
358 --
359 -- Prerequisites:
360 -- This is an internal procedure which is called from the ins procedure.
361 --
362 -- In Parameters:
363 -- A Pl/Sql record structre.
364 --
365 -- Post Success:
366 -- Processing continues.
367 --
368 -- Post Failure:
369 -- If an error has occurred, an error message and exception will be raised
370 -- but not handled.
371 --
372 -- Developer Implementation Notes:
373 -- Any post-processing required after the insert dml is issued should be
374 -- coded within this procedure. It is important to note that any 3rd party
375 -- maintenance should be reviewed before placing in this procedure.
376 --
377 -- Access Status:
378 -- Internal Row Handler Use Only.
379 --
380 -- {End Of Comments}
381 -- ----------------------------------------------------------------------------
382 Procedure post_insert
383 (p_rec in ben_ppv_shd.g_rec_type,
384 p_effective_date in date,
385 p_datetrack_mode in varchar2,
386 p_validation_start_date in date,
387 p_validation_end_date in date) is
388 --
389 l_proc varchar2(72) := g_package||'post_insert';
390 --
391 Begin
392 hr_utility.set_location('Entering:'||l_proc, 5);
393 --
394 --
395 -- Start of API User Hook for post_insert.
396 --
397 begin
398 --
399 ben_ppv_rki.after_insert
400 (
401 p_prtl_mo_rt_prtn_val_id =>p_rec.prtl_mo_rt_prtn_val_id
402 ,p_effective_end_date =>p_rec.effective_end_date
403 ,p_effective_start_date =>p_rec.effective_start_date
404 ,p_business_group_id =>p_rec.business_group_id
405 ,p_rndg_cd =>p_rec.rndg_cd
406 ,p_to_dy_mo_num =>p_rec.to_dy_mo_num
407 ,p_from_dy_mo_num =>p_rec.from_dy_mo_num
408 ,p_pct_val =>p_rec.pct_val
409 ,p_acty_base_rt_id =>p_rec.acty_base_rt_id
410 ,p_strt_r_stp_cvg_cd =>p_rec.strt_r_stp_cvg_cd
411 ,p_rndg_rl =>p_rec.rndg_rl
412 ,p_prtl_mo_prortn_rl =>p_rec.prtl_mo_prortn_rl
413 ,p_actl_prem_id =>p_rec.actl_prem_id
414 ,p_cvg_amt_calc_mthd_id =>p_rec.cvg_amt_calc_mthd_id
415 ,p_num_days_month =>p_rec.num_days_month
416 ,p_prorate_by_day_to_mon_flag =>p_rec.prorate_by_day_to_mon_flag
417 ,p_pmrpv_attribute_category =>p_rec.pmrpv_attribute_category
418 ,p_pmrpv_attribute1 =>p_rec.pmrpv_attribute1
419 ,p_pmrpv_attribute2 =>p_rec.pmrpv_attribute2
420 ,p_pmrpv_attribute3 =>p_rec.pmrpv_attribute3
421 ,p_pmrpv_attribute4 =>p_rec.pmrpv_attribute4
422 ,p_pmrpv_attribute5 =>p_rec.pmrpv_attribute5
423 ,p_pmrpv_attribute6 =>p_rec.pmrpv_attribute6
424 ,p_pmrpv_attribute7 =>p_rec.pmrpv_attribute7
425 ,p_pmrpv_attribute8 =>p_rec.pmrpv_attribute8
426 ,p_pmrpv_attribute9 =>p_rec.pmrpv_attribute9
427 ,p_pmrpv_attribute10 =>p_rec.pmrpv_attribute10
428 ,p_pmrpv_attribute11 =>p_rec.pmrpv_attribute11
429 ,p_pmrpv_attribute12 =>p_rec.pmrpv_attribute12
430 ,p_pmrpv_attribute13 =>p_rec.pmrpv_attribute13
431 ,p_pmrpv_attribute14 =>p_rec.pmrpv_attribute14
432 ,p_pmrpv_attribute15 =>p_rec.pmrpv_attribute15
433 ,p_pmrpv_attribute16 =>p_rec.pmrpv_attribute16
434 ,p_pmrpv_attribute17 =>p_rec.pmrpv_attribute17
435 ,p_pmrpv_attribute18 =>p_rec.pmrpv_attribute18
436 ,p_pmrpv_attribute19 =>p_rec.pmrpv_attribute19
437 ,p_pmrpv_attribute20 =>p_rec.pmrpv_attribute20
438 ,p_pmrpv_attribute21 =>p_rec.pmrpv_attribute21
439 ,p_pmrpv_attribute22 =>p_rec.pmrpv_attribute22
440 ,p_pmrpv_attribute23 =>p_rec.pmrpv_attribute23
441 ,p_pmrpv_attribute24 =>p_rec.pmrpv_attribute24
442 ,p_pmrpv_attribute25 =>p_rec.pmrpv_attribute25
446 ,p_pmrpv_attribute29 =>p_rec.pmrpv_attribute29
443 ,p_pmrpv_attribute26 =>p_rec.pmrpv_attribute26
444 ,p_pmrpv_attribute27 =>p_rec.pmrpv_attribute27
445 ,p_pmrpv_attribute28 =>p_rec.pmrpv_attribute28
447 ,p_pmrpv_attribute30 =>p_rec.pmrpv_attribute30
448 ,p_object_version_number =>p_rec.object_version_number
449 ,p_effective_date =>p_effective_date
450 ,p_validation_start_date =>p_validation_start_date
451 ,p_validation_end_date =>p_validation_end_date
452 );
453 --
454 exception
455 --
456 when hr_api.cannot_find_prog_unit then
457 --
458 hr_api.cannot_find_prog_unit_error
459 (p_module_name => 'ben_prtl_mo_rt_prtn_val_f'
460 ,p_hook_type => 'AI');
461 --
462 end;
463 --
464 -- End of API User Hook for post_insert.
465 --
466 --
467 hr_utility.set_location(' Leaving:'||l_proc, 10);
468 End post_insert;
469 --
470 -- ----------------------------------------------------------------------------
471 -- |-------------------------------< ins_lck >--------------------------------|
472 -- ----------------------------------------------------------------------------
473 -- {Start Of Comments}
474 --
475 -- Description:
476 -- The ins_lck process has one main function to perform. When inserting
477 -- a datetracked row, we must validate the DT mode.
478 -- be manipulated.
479 --
480 -- Prerequisites:
481 -- This procedure can only be called for the datetrack mode of INSERT.
482 --
483 -- In Parameters:
484 --
485 -- Post Success:
486 -- On successful completion of the ins_lck process the parental
487 -- datetracked rows will be locked providing the p_enforce_foreign_locking
488 -- argument value is TRUE.
489 -- If the p_enforce_foreign_locking argument value is FALSE then the
490 -- parential rows are not locked.
491 --
492 -- Post Failure:
493 -- The Lck process can fail for:
494 -- 1) When attempting to lock the row the row could already be locked by
495 -- another user. This will raise the HR_Api.Object_Locked exception.
496 -- 2) When attempting to the lock the parent which doesn't exist.
497 -- For the entity to be locked the parent must exist!
498 --
499 -- Developer Implementation Notes:
500 -- None.
501 --
502 -- Access Status:
503 -- Internal Row Handler Use Only.
504 --
505 -- {End Of Comments}
506 -- ----------------------------------------------------------------------------
507 Procedure ins_lck
508 (p_effective_date in date,
509 p_datetrack_mode in varchar2,
510 p_rec in ben_ppv_shd.g_rec_type,
511 p_validation_start_date out nocopy date,
512 p_validation_end_date out nocopy date) is
513 --
514 l_proc varchar2(72) := g_package||'ins_lck';
515 l_validation_start_date date;
516 l_validation_end_date date;
517 --
518 Begin
519 hr_utility.set_location('Entering:'||l_proc, 5);
520 --
521 -- Validate the datetrack mode mode getting the validation start
522 -- and end dates for the specified datetrack operation.
523 --
524 dt_api.validate_dt_mode
525 (p_effective_date => p_effective_date,
526 p_datetrack_mode => p_datetrack_mode,
527 p_base_table_name => 'ben_prtl_mo_rt_prtn_val_f',
528 p_base_key_column => 'prtl_mo_rt_prtn_val_id',
529 p_base_key_value => p_rec.prtl_mo_rt_prtn_val_id,
530 p_parent_table_name1 => 'ben_actl_prem_f',
531 p_parent_key_column1 => 'actl_prem_id',
532 p_parent_key_value1 => p_rec.actl_prem_id,
533 p_parent_table_name2 => 'ben_cvg_amt_calc_mthd_f',
534 p_parent_key_column2 => 'cvg_amt_calc_mthd_id',
535 p_parent_key_value2 => p_rec.cvg_amt_calc_mthd_id,
536 p_parent_table_name3 => 'ben_acty_base_rt_f',
537 p_parent_key_column3 => 'acty_base_rt_id',
538 p_parent_key_value3 => p_rec.acty_base_rt_id,
539 p_enforce_foreign_locking => true,
540 p_validation_start_date => l_validation_start_date,
541 p_validation_end_date => l_validation_end_date);
542 --
543 -- Set the validation start and end date OUT arguments
544 --
545 p_validation_start_date := l_validation_start_date;
546 p_validation_end_date := l_validation_end_date;
547 --
548 hr_utility.set_location(' Leaving:'||l_proc, 10);
549 --
550 End ins_lck;
551 --
552 -- ----------------------------------------------------------------------------
553 -- |---------------------------------< ins >----------------------------------|
554 -- ----------------------------------------------------------------------------
555 Procedure ins
556 (
557 p_rec in out nocopy ben_ppv_shd.g_rec_type,
558 p_effective_date in date
559 ) is
560 --
561 l_proc varchar2(72) := g_package||'ins';
562 l_datetrack_mode varchar2(30) := 'INSERT';
563 l_validation_start_date date;
564 l_validation_end_date date;
565 --
566 Begin
567 hr_utility.set_location('Entering:'||l_proc, 5);
568 --
569 -- Call the lock operation
570 --
571 ins_lck
572 (p_effective_date => p_effective_date,
573 p_datetrack_mode => l_datetrack_mode,
574 p_rec => p_rec,
575 p_validation_start_date => l_validation_start_date,
576 p_validation_end_date => l_validation_end_date);
577 --
578 -- Call the supporting insert validate operations
579 --
580 ben_ppv_bus.insert_validate
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,
588 --
585 p_validation_end_date => l_validation_end_date);
586 --
587 -- Call the supporting pre-insert operation
589 pre_insert
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 -- Insert the row
597 --
598 insert_dml
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 --
605 -- Call the supporting post-insert operation
606 --
607 post_insert
608 (p_rec => p_rec,
609 p_effective_date => p_effective_date,
610 p_datetrack_mode => l_datetrack_mode,
611 p_validation_start_date => l_validation_start_date,
612 p_validation_end_date => l_validation_end_date);
613 end ins;
614 --
615 -- ----------------------------------------------------------------------------
616 -- |---------------------------------< ins >----------------------------------|
617 -- ----------------------------------------------------------------------------
618 Procedure ins
619 (
620 p_prtl_mo_rt_prtn_val_id out nocopy number,
621 p_effective_end_date out nocopy date,
622 p_effective_start_date out nocopy date,
623 p_business_group_id in number,
624 p_rndg_cd in varchar2 default null,
625 p_to_dy_mo_num in number default null,
626 p_from_dy_mo_num in number default null,
627 p_pct_val in number default null,
628 p_acty_base_rt_id in number default null,
629 p_strt_r_stp_cvg_cd in varchar2 default null,
630 p_rndg_rl in number default null,
631 p_prtl_mo_prortn_rl in number default null,
632 p_actl_prem_id in number default null,
633 p_cvg_amt_calc_mthd_id in number default null,
634 p_num_days_month in number,
635 p_prorate_by_day_to_mon_flag in varchar2,
636 p_pmrpv_attribute_category in varchar2 default null,
637 p_pmrpv_attribute1 in varchar2 default null,
638 p_pmrpv_attribute2 in varchar2 default null,
639 p_pmrpv_attribute3 in varchar2 default null,
640 p_pmrpv_attribute4 in varchar2 default null,
641 p_pmrpv_attribute5 in varchar2 default null,
642 p_pmrpv_attribute6 in varchar2 default null,
643 p_pmrpv_attribute7 in varchar2 default null,
644 p_pmrpv_attribute8 in varchar2 default null,
645 p_pmrpv_attribute9 in varchar2 default null,
646 p_pmrpv_attribute10 in varchar2 default null,
647 p_pmrpv_attribute11 in varchar2 default null,
648 p_pmrpv_attribute12 in varchar2 default null,
649 p_pmrpv_attribute13 in varchar2 default null,
650 p_pmrpv_attribute14 in varchar2 default null,
651 p_pmrpv_attribute15 in varchar2 default null,
652 p_pmrpv_attribute16 in varchar2 default null,
653 p_pmrpv_attribute17 in varchar2 default null,
654 p_pmrpv_attribute18 in varchar2 default null,
655 p_pmrpv_attribute19 in varchar2 default null,
656 p_pmrpv_attribute20 in varchar2 default null,
657 p_pmrpv_attribute21 in varchar2 default null,
658 p_pmrpv_attribute22 in varchar2 default null,
659 p_pmrpv_attribute23 in varchar2 default null,
660 p_pmrpv_attribute24 in varchar2 default null,
661 p_pmrpv_attribute25 in varchar2 default null,
662 p_pmrpv_attribute26 in varchar2 default null,
663 p_pmrpv_attribute27 in varchar2 default null,
664 p_pmrpv_attribute28 in varchar2 default null,
665 p_pmrpv_attribute29 in varchar2 default null,
666 p_pmrpv_attribute30 in varchar2 default null,
667 p_object_version_number out nocopy number,
668 p_effective_date in date
669 ) is
670 --
671 l_rec ben_ppv_shd.g_rec_type;
672 l_proc varchar2(72) := g_package||'ins';
673 --
674 Begin
675 hr_utility.set_location('Entering:'||l_proc, 5);
676 --
677 -- Call conversion function to turn arguments into the
678 -- p_rec structure.
679 --
680 l_rec :=
681 ben_ppv_shd.convert_args
682 (
683 null,
684 null,
685 null,
686 p_business_group_id,
687 p_rndg_cd,
688 p_to_dy_mo_num,
689 p_from_dy_mo_num,
690 p_pct_val,
691 p_acty_base_rt_id,
692 p_strt_r_stp_cvg_cd,
693 p_rndg_rl,
694 p_prtl_mo_prortn_rl,
695 p_actl_prem_id,
696 p_cvg_amt_calc_mthd_id,
697 p_num_days_month ,
698 p_prorate_by_day_to_mon_flag,
699 p_pmrpv_attribute_category,
700 p_pmrpv_attribute1,
701 p_pmrpv_attribute2,
702 p_pmrpv_attribute3,
703 p_pmrpv_attribute4,
704 p_pmrpv_attribute5,
705 p_pmrpv_attribute6,
706 p_pmrpv_attribute7,
707 p_pmrpv_attribute8,
708 p_pmrpv_attribute9,
709 p_pmrpv_attribute10,
710 p_pmrpv_attribute11,
711 p_pmrpv_attribute12,
712 p_pmrpv_attribute13,
713 p_pmrpv_attribute14,
714 p_pmrpv_attribute15,
715 p_pmrpv_attribute16,
716 p_pmrpv_attribute17,
717 p_pmrpv_attribute18,
718 p_pmrpv_attribute19,
719 p_pmrpv_attribute20,
720 p_pmrpv_attribute21,
721 p_pmrpv_attribute22,
722 p_pmrpv_attribute23,
723 p_pmrpv_attribute24,
724 p_pmrpv_attribute25,
725 p_pmrpv_attribute26,
726 p_pmrpv_attribute27,
727 p_pmrpv_attribute28,
728 p_pmrpv_attribute29,
729 p_pmrpv_attribute30,
730 null
731 );
732 --
733 -- Having converted the arguments into the ben_ppv_rec
734 -- plsql record structure we call the corresponding record
735 -- business process.
736 --
737 ins(l_rec, p_effective_date);
738 --
739 -- Set the OUT arguments.
740 --
741 p_prtl_mo_rt_prtn_val_id := l_rec.prtl_mo_rt_prtn_val_id;
742 p_effective_start_date := l_rec.effective_start_date;
743 p_effective_end_date := l_rec.effective_end_date;
744 p_object_version_number := l_rec.object_version_number;
745 --
746 --
747 hr_utility.set_location(' Leaving:'||l_proc, 10);
748 End ins;
749 --
750 end ben_ppv_ins;