[Home] [Help]
PACKAGE BODY: APPS.BEN_CPP_INS
Source
1 Package Body ben_cpp_ins as
2 /* $Header: becpprhi.pkb 120.0 2005/05/28 01:16:55 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_cpp_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_cpp_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_plip_f t
70 where t.plip_id = p_rec.plip_id
71 and t.effective_start_date =
72 ben_cpp_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_plip_f.created_by%TYPE;
77 l_creation_date ben_plip_f.creation_date%TYPE;
78 l_last_update_date ben_plip_f.last_update_date%TYPE;
79 l_last_updated_by ben_plip_f.last_updated_by%TYPE;
80 l_last_update_login ben_plip_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_plip_f',
90 p_base_key_column => 'plip_id',
91 p_base_key_value => p_rec.plip_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_cpp_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_plip_f
132 --
133 insert into ben_plip_f
134 ( plip_id,
135 effective_start_date,
136 effective_end_date,
137 business_group_id,
138 pgm_id,
139 pl_id,
140 cmbn_plip_id,
141 dflt_flag,
142 plip_stat_cd,
143 dflt_enrt_cd,
144 dflt_enrt_det_rl,
145 ordr_num,
146 alws_unrstrctd_enrt_flag,
147 auto_enrt_mthd_rl,
148 enrt_cd,
149 enrt_mthd_cd,
150 enrt_rl,
151 ivr_ident,
152 url_ref_name,
153 enrt_cvg_strt_dt_cd,
154 enrt_cvg_strt_dt_rl,
155 enrt_cvg_end_dt_cd,
156 enrt_cvg_end_dt_rl,
157 rt_strt_dt_cd,
158 rt_strt_dt_rl,
159 rt_end_dt_cd,
160 rt_end_dt_rl,
161 drvbl_fctr_apls_rts_flag,
162 drvbl_fctr_prtn_elig_flag,
163 elig_apls_flag,
164 prtn_elig_ovrid_alwd_flag,
165 trk_inelig_per_flag,
166 postelcn_edit_rl,
167 dflt_to_asn_pndg_ctfn_cd,
168 dflt_to_asn_pndg_ctfn_rl,
169 mn_cvg_amt,
170 mn_cvg_rl,
171 mx_cvg_alwd_amt,
172 mx_cvg_incr_alwd_amt,
173 mx_cvg_incr_wcf_alwd_amt,
174 mx_cvg_mlt_incr_num,
175 mx_cvg_mlt_incr_wcf_num,
176 mx_cvg_rl,
177 mx_cvg_wcfn_amt,
178 mx_cvg_wcfn_mlt_num,
179 no_mn_cvg_amt_apls_flag,
180 no_mn_cvg_incr_apls_flag,
181 no_mx_cvg_amt_apls_flag,
182 no_mx_cvg_incr_apls_flag,
183 unsspnd_enrt_cd,
184 prort_prtl_yr_cvg_rstrn_cd,
185 prort_prtl_yr_cvg_rstrn_rl,
186 cvg_incr_r_decr_only_cd,
187 bnft_or_option_rstrctn_cd,
188 per_cvrd_cd ,
189 short_name ,
190 short_code ,
191 legislation_code ,
192 legislation_subgroup ,
193 vrfy_fmly_mmbr_rl,
194 vrfy_fmly_mmbr_cd,
195 use_csd_rsd_prccng_cd,
196 cpp_attribute_category,
197 cpp_attribute1,
198 cpp_attribute2,
199 cpp_attribute3,
200 cpp_attribute4,
201 cpp_attribute5,
202 cpp_attribute6,
203 cpp_attribute7,
204 cpp_attribute8,
205 cpp_attribute9,
206 cpp_attribute10,
207 cpp_attribute11,
208 cpp_attribute12,
209 cpp_attribute13,
210 cpp_attribute14,
211 cpp_attribute15,
212 cpp_attribute16,
213 cpp_attribute17,
214 cpp_attribute18,
215 cpp_attribute19,
216 cpp_attribute20,
217 cpp_attribute21,
218 cpp_attribute22,
219 cpp_attribute23,
220 cpp_attribute24,
221 cpp_attribute25,
222 cpp_attribute26,
223 cpp_attribute27,
224 cpp_attribute28,
225 cpp_attribute29,
226 cpp_attribute30,
227 object_version_number
228 , created_by,
229 creation_date,
230 last_update_date,
231 last_updated_by,
232 last_update_login
233 )
234 Values
235 ( p_rec.plip_id,
236 p_rec.effective_start_date,
237 p_rec.effective_end_date,
238 p_rec.business_group_id,
239 p_rec.pgm_id,
240 p_rec.pl_id,
241 p_rec.cmbn_plip_id,
242 p_rec.dflt_flag,
243 p_rec.plip_stat_cd,
244 p_rec.dflt_enrt_cd,
245 p_rec.dflt_enrt_det_rl,
246 p_rec.ordr_num,
247 p_rec.alws_unrstrctd_enrt_flag,
248 p_rec.auto_enrt_mthd_rl,
249 p_rec.enrt_cd,
250 p_rec.enrt_mthd_cd,
251 p_rec.enrt_rl,
252 p_rec.ivr_ident,
253 p_rec.url_ref_name,
254 p_rec.enrt_cvg_strt_dt_cd,
255 p_rec.enrt_cvg_strt_dt_rl,
256 p_rec.enrt_cvg_end_dt_cd,
257 p_rec.enrt_cvg_end_dt_rl,
258 p_rec.rt_strt_dt_cd,
259 p_rec.rt_strt_dt_rl,
260 p_rec.rt_end_dt_cd,
261 p_rec.rt_end_dt_rl,
262 p_rec.drvbl_fctr_apls_rts_flag,
263 p_rec.drvbl_fctr_prtn_elig_flag,
264 p_rec.elig_apls_flag,
265 p_rec.prtn_elig_ovrid_alwd_flag,
266 p_rec.trk_inelig_per_flag,
267 p_rec.postelcn_edit_rl,
268 p_rec.dflt_to_asn_pndg_ctfn_cd,
269 p_rec.dflt_to_asn_pndg_ctfn_rl,
270 p_rec.mn_cvg_amt,
271 p_rec.mn_cvg_rl,
272 p_rec.mx_cvg_alwd_amt,
273 p_rec.mx_cvg_incr_alwd_amt,
274 p_rec.mx_cvg_incr_wcf_alwd_amt,
275 p_rec.mx_cvg_mlt_incr_num,
276 p_rec.mx_cvg_mlt_incr_wcf_num,
277 p_rec.mx_cvg_rl,
278 p_rec.mx_cvg_wcfn_amt,
279 p_rec.mx_cvg_wcfn_mlt_num,
280 p_rec.no_mn_cvg_amt_apls_flag,
281 p_rec.no_mn_cvg_incr_apls_flag,
282 p_rec.no_mx_cvg_amt_apls_flag,
283 p_rec.no_mx_cvg_incr_apls_flag,
284 p_rec.unsspnd_enrt_cd,
285 p_rec.prort_prtl_yr_cvg_rstrn_cd,
286 p_rec.prort_prtl_yr_cvg_rstrn_rl,
287 p_rec.cvg_incr_r_decr_only_cd,
288 p_rec.bnft_or_option_rstrctn_cd,
289 P_rec.per_cvrd_cd ,
290 P_rec.short_name ,
291 P_rec.short_code ,
292 P_rec.legislation_code ,
293 P_rec.legislation_subgroup ,
294 P_rec.vrfy_fmly_mmbr_rl,
295 P_rec.vrfy_fmly_mmbr_cd,
296 P_rec.use_csd_rsd_prccng_cd,
297 p_rec.cpp_attribute_category,
298 p_rec.cpp_attribute1,
299 p_rec.cpp_attribute2,
300 p_rec.cpp_attribute3,
301 p_rec.cpp_attribute4,
302 p_rec.cpp_attribute5,
303 p_rec.cpp_attribute6,
304 p_rec.cpp_attribute7,
305 p_rec.cpp_attribute8,
306 p_rec.cpp_attribute9,
307 p_rec.cpp_attribute10,
308 p_rec.cpp_attribute11,
309 p_rec.cpp_attribute12,
310 p_rec.cpp_attribute13,
311 p_rec.cpp_attribute14,
312 p_rec.cpp_attribute15,
313 p_rec.cpp_attribute16,
314 p_rec.cpp_attribute17,
315 p_rec.cpp_attribute18,
316 p_rec.cpp_attribute19,
317 p_rec.cpp_attribute20,
318 p_rec.cpp_attribute21,
319 p_rec.cpp_attribute22,
320 p_rec.cpp_attribute23,
321 p_rec.cpp_attribute24,
322 p_rec.cpp_attribute25,
323 p_rec.cpp_attribute26,
324 p_rec.cpp_attribute27,
325 p_rec.cpp_attribute28,
326 p_rec.cpp_attribute29,
327 p_rec.cpp_attribute30,
328 p_rec.object_version_number
329 , l_created_by,
330 l_creation_date,
331 l_last_update_date,
332 l_last_updated_by,
333 l_last_update_login
334 );
335 --
336 ben_cpp_shd.g_api_dml := false; -- Unset the api dml status
337 hr_utility.set_location(' Leaving:'||l_proc, 15);
338 --
339 Exception
340 When hr_api.check_integrity_violated Then
341 -- A check constraint has been violated
342 ben_cpp_shd.g_api_dml := false; -- Unset the api dml status
343 ben_cpp_shd.constraint_error
344 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
345 When hr_api.unique_integrity_violated Then
346 -- Unique integrity has been violated
347 ben_cpp_shd.g_api_dml := false; -- Unset the api dml status
348 ben_cpp_shd.constraint_error
349 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
350 When Others Then
351 ben_cpp_shd.g_api_dml := false; -- Unset the api dml status
352 Raise;
353 End dt_insert_dml;
354 --
355 -- ----------------------------------------------------------------------------
356 -- |------------------------------< insert_dml >------------------------------|
357 -- ----------------------------------------------------------------------------
358 Procedure insert_dml
359 (p_rec in out nocopy ben_cpp_shd.g_rec_type,
360 p_effective_date in date,
361 p_datetrack_mode in varchar2,
362 p_validation_start_date in date,
363 p_validation_end_date in date) is
364 --
365 l_proc varchar2(72) := g_package||'insert_dml';
366 --
367 Begin
368 hr_utility.set_location('Entering:'||l_proc, 5);
369 --
370 dt_insert_dml(p_rec => p_rec,
371 p_effective_date => p_effective_date,
372 p_datetrack_mode => p_datetrack_mode,
373 p_validation_start_date => p_validation_start_date,
374 p_validation_end_date => p_validation_end_date);
375 --
376 hr_utility.set_location(' Leaving:'||l_proc, 10);
377 End insert_dml;
378 --
379 -- ----------------------------------------------------------------------------
380 -- |------------------------------< pre_insert >------------------------------|
381 -- ----------------------------------------------------------------------------
382 -- {Start Of Comments}
383 --
384 -- Description:
385 -- This private procedure contains any processing which is required before
386 -- the insert dml. Presently, if the entity has a corresponding primary
387 -- key which is maintained by an associating sequence, the for
388 -- the entity will be populated with the next sequence value in
389 -- preparation for the insert dml.
390 -- Also, if comments are defined for this entity, the comments insert
391 -- logic will also be called, generating a comment_id if required.
392 --
393 -- Prerequisites:
394 -- This is an internal procedure which is called from the ins procedure.
395 --
396 -- In Parameters:
397 -- A Pl/Sql record structre.
398 --
399 -- Post Success:
400 -- Processing continues.
401 --
402 -- Post Failure:
403 -- If an error has occurred, an error message and exception will be raised
404 -- but not handled.
405 --
406 -- Developer Implementation Notes:
407 -- Any pre-processing required before the insert dml is issued should be
408 -- coded within this procedure. As stated above, a good example is the
409 -- generation of a primary key number via a corresponding sequence.
410 -- It is important to note that any 3rd party maintenance should be reviewed
411 -- before placing in this procedure.
412 --
413 -- Access Status:
414 -- Internal Row Handler Use Only.
415 --
416 -- {End Of Comments}
417 -- ----------------------------------------------------------------------------
418 Procedure pre_insert
419 (p_rec in out nocopy ben_cpp_shd.g_rec_type,
420 p_effective_date in date,
421 p_datetrack_mode in varchar2,
422 p_validation_start_date in date,
423 p_validation_end_date in date) is
424 --
425 l_proc varchar2(72) := g_package||'pre_insert';
426 --
427 --
428 cursor c1 is
429 select ben_plip_f_s.nextval
430 from sys.dual;
431 --
432 Begin
433 hr_utility.set_location('Entering:'||l_proc, 5);
434 --
435 --
436 open c1;
437 --
438 fetch c1 into p_rec.plip_id;
439 --
440 close c1;
441 --
442 --
443 hr_utility.set_location(' Leaving:'||l_proc, 10);
444 End pre_insert;
445 --
446 -- ----------------------------------------------------------------------------
450 --
447 -- |-----------------------------< post_insert >------------------------------|
448 -- ----------------------------------------------------------------------------
449 -- {Start Of Comments}
451 -- Description:
452 -- This private procedure contains any processing which is required after the
453 -- insert dml.
454 --
455 -- Prerequisites:
456 -- This is an internal procedure which is called from the ins procedure.
457 --
458 -- In Parameters:
459 -- A Pl/Sql record structre.
460 --
461 -- Post Success:
462 -- Processing continues.
463 --
464 -- Post Failure:
465 -- If an error has occurred, an error message and exception will be raised
466 -- but not handled.
467 --
468 -- Developer Implementation Notes:
469 -- Any post-processing required after the insert dml is issued should be
470 -- coded within this procedure. It is important to note that any 3rd party
471 -- maintenance should be reviewed before placing in this procedure.
472 --
473 -- Access Status:
474 -- Internal Row Handler Use Only.
475 --
476 -- {End Of Comments}
477 -- ----------------------------------------------------------------------------
478 Procedure post_insert
479 (p_rec in ben_cpp_shd.g_rec_type,
480 p_effective_date in date,
481 p_datetrack_mode in varchar2,
482 p_validation_start_date in date,
483 p_validation_end_date in date) is
484 --
485 l_proc varchar2(72) := g_package||'post_insert';
486 --
487 Begin
488 hr_utility.set_location('Entering:'||l_proc, 5);
489 --
490 -- Added for GSP validations
491 pqh_gsp_ben_validations.plip_validations
492 ( p_plip_id => p_rec.plip_id
493 , p_effective_date => p_effective_date
494 , p_dml_operation => 'I'
495 , p_business_group_id => p_rec.business_group_id
496 , p_Plip_Stat_Cd => p_rec.Plip_Stat_Cd
497 );
498
499 --
500 -- Start of API User Hook for post_insert.
501 --
502 begin
503 --
504 ben_cpp_rki.after_insert
505 (
506 p_plip_id =>p_rec.plip_id
507 ,p_effective_start_date =>p_rec.effective_start_date
508 ,p_effective_end_date =>p_rec.effective_end_date
509 ,p_business_group_id =>p_rec.business_group_id
510 ,p_pgm_id =>p_rec.pgm_id
511 ,p_pl_id =>p_rec.pl_id
512 ,p_cmbn_plip_id =>p_rec.cmbn_plip_id
513 ,p_dflt_flag =>p_rec.dflt_flag
514 ,p_plip_stat_cd =>p_rec.plip_stat_cd
515 ,p_dflt_enrt_cd =>p_rec.dflt_enrt_cd
516 ,p_dflt_enrt_det_rl =>p_rec.dflt_enrt_det_rl
517 ,p_ordr_num =>p_rec.ordr_num
518 ,p_alws_unrstrctd_enrt_flag =>p_rec.alws_unrstrctd_enrt_flag
519 ,p_auto_enrt_mthd_rl =>p_rec.auto_enrt_mthd_rl
520 ,p_enrt_cd =>p_rec.enrt_cd
521 ,p_enrt_mthd_cd =>p_rec.enrt_mthd_cd
522 ,p_enrt_rl =>p_rec.enrt_rl
523 ,p_ivr_ident =>p_rec.ivr_ident
524 ,p_url_ref_name =>p_rec.url_ref_name
525 ,p_enrt_cvg_strt_dt_cd =>p_rec.enrt_cvg_strt_dt_cd
526 ,p_enrt_cvg_strt_dt_rl =>p_rec.enrt_cvg_strt_dt_rl
527 ,p_enrt_cvg_end_dt_cd =>p_rec.enrt_cvg_end_dt_cd
528 ,p_enrt_cvg_end_dt_rl =>p_rec.enrt_cvg_end_dt_rl
529 ,p_rt_strt_dt_cd =>p_rec.rt_strt_dt_cd
530 ,p_rt_strt_dt_rl =>p_rec.rt_strt_dt_rl
531 ,p_rt_end_dt_cd =>p_rec.rt_end_dt_cd
532 ,p_rt_end_dt_rl =>p_rec.rt_end_dt_rl
533 ,p_drvbl_fctr_apls_rts_flag =>p_rec.drvbl_fctr_apls_rts_flag
534 ,p_drvbl_fctr_prtn_elig_flag =>p_rec.drvbl_fctr_prtn_elig_flag
535 ,p_elig_apls_flag =>p_rec.elig_apls_flag
536 ,p_prtn_elig_ovrid_alwd_flag =>p_rec.prtn_elig_ovrid_alwd_flag
537 ,p_trk_inelig_per_flag =>p_rec.trk_inelig_per_flag
538 ,p_postelcn_edit_rl =>p_rec.postelcn_edit_rl
539 ,p_dflt_to_asn_pndg_ctfn_cd =>p_rec.dflt_to_asn_pndg_ctfn_cd
540 ,p_dflt_to_asn_pndg_ctfn_rl =>p_rec.dflt_to_asn_pndg_ctfn_rl
541 ,p_mn_cvg_amt =>p_rec.mn_cvg_amt
542 ,p_mn_cvg_rl => p_rec.mn_cvg_rl
543 ,p_mx_cvg_alwd_amt => p_rec.mx_cvg_alwd_amt
544 ,p_mx_cvg_incr_alwd_amt =>p_rec.mx_cvg_incr_alwd_amt
545 ,p_mx_cvg_incr_wcf_alwd_amt =>p_rec.mx_cvg_incr_wcf_alwd_amt
546 ,p_mx_cvg_mlt_incr_num =>p_rec.mx_cvg_mlt_incr_num
547 ,p_mx_cvg_mlt_incr_wcf_num =>p_rec.mx_cvg_mlt_incr_wcf_num
548 ,p_mx_cvg_rl =>p_rec.mx_cvg_rl
549 ,p_mx_cvg_wcfn_amt =>p_rec.mx_cvg_wcfn_amt
550 ,p_mx_cvg_wcfn_mlt_num =>p_rec.mx_cvg_wcfn_mlt_num
551 ,p_no_mn_cvg_amt_apls_flag =>p_rec.no_mn_cvg_amt_apls_flag
552 ,p_no_mn_cvg_incr_apls_flag =>p_rec.no_mn_cvg_incr_apls_flag
553 ,p_no_mx_cvg_amt_apls_flag =>p_rec.no_mx_cvg_amt_apls_flag
554 ,p_no_mx_cvg_incr_apls_flag =>p_rec.no_mx_cvg_incr_apls_flag
555 ,p_unsspnd_enrt_cd =>p_rec.unsspnd_enrt_cd
556 ,p_prort_prtl_yr_cvg_rstrn_cd =>p_rec.prort_prtl_yr_cvg_rstrn_cd
557 ,p_prort_prtl_yr_cvg_rstrn_rl =>p_rec.prort_prtl_yr_cvg_rstrn_rl
558 ,p_cvg_incr_r_decr_only_cd =>p_rec.cvg_incr_r_decr_only_cd
559 ,p_bnft_or_option_rstrctn_cd =>p_rec.bnft_or_option_rstrctn_cd
560 ,p_per_cvrd_cd =>p_rec.per_cvrd_cd
561 ,p_short_name =>p_rec.short_name
565 ,p_vrfy_fmly_mmbr_rl =>p_rec.vrfy_fmly_mmbr_rl
562 ,p_short_code =>p_rec.short_code
563 ,p_legislation_code =>p_rec.legislation_code
564 ,p_legislation_subgroup =>p_rec.legislation_subgroup
566 ,p_vrfy_fmly_mmbr_cd =>p_rec.vrfy_fmly_mmbr_cd
567 ,p_use_csd_rsd_prccng_cd =>p_rec.use_csd_rsd_prccng_cd
568 ,p_cpp_attribute_category =>p_rec.cpp_attribute_category
569 ,p_cpp_attribute1 =>p_rec.cpp_attribute1
570 ,p_cpp_attribute2 =>p_rec.cpp_attribute2
571 ,p_cpp_attribute3 =>p_rec.cpp_attribute3
572 ,p_cpp_attribute4 =>p_rec.cpp_attribute4
573 ,p_cpp_attribute5 =>p_rec.cpp_attribute5
574 ,p_cpp_attribute6 =>p_rec.cpp_attribute6
575 ,p_cpp_attribute7 =>p_rec.cpp_attribute7
576 ,p_cpp_attribute8 =>p_rec.cpp_attribute8
577 ,p_cpp_attribute9 =>p_rec.cpp_attribute9
578 ,p_cpp_attribute10 =>p_rec.cpp_attribute10
579 ,p_cpp_attribute11 =>p_rec.cpp_attribute11
580 ,p_cpp_attribute12 =>p_rec.cpp_attribute12
581 ,p_cpp_attribute13 =>p_rec.cpp_attribute13
582 ,p_cpp_attribute14 =>p_rec.cpp_attribute14
583 ,p_cpp_attribute15 =>p_rec.cpp_attribute15
584 ,p_cpp_attribute16 =>p_rec.cpp_attribute16
585 ,p_cpp_attribute17 =>p_rec.cpp_attribute17
586 ,p_cpp_attribute18 =>p_rec.cpp_attribute18
587 ,p_cpp_attribute19 =>p_rec.cpp_attribute19
588 ,p_cpp_attribute20 =>p_rec.cpp_attribute20
589 ,p_cpp_attribute21 =>p_rec.cpp_attribute21
590 ,p_cpp_attribute22 =>p_rec.cpp_attribute22
591 ,p_cpp_attribute23 =>p_rec.cpp_attribute23
592 ,p_cpp_attribute24 =>p_rec.cpp_attribute24
593 ,p_cpp_attribute25 =>p_rec.cpp_attribute25
594 ,p_cpp_attribute26 =>p_rec.cpp_attribute26
595 ,p_cpp_attribute27 =>p_rec.cpp_attribute27
596 ,p_cpp_attribute28 =>p_rec.cpp_attribute28
597 ,p_cpp_attribute29 =>p_rec.cpp_attribute29
598 ,p_cpp_attribute30 =>p_rec.cpp_attribute30
599 ,p_object_version_number =>p_rec.object_version_number
600 ,p_effective_date =>p_effective_date
601 ,p_validation_start_date =>p_validation_start_date
602 ,p_validation_end_date =>p_validation_end_date
603 );
604 --
605 exception
606 --
607 when hr_api.cannot_find_prog_unit then
608 --
609 hr_api.cannot_find_prog_unit_error
610 (p_module_name => 'ben_plip_f'
611 ,p_hook_type => 'AI');
612 --
613 end;
614 --
615 -- End of API User Hook for post_insert.
616 --
617 --
618 hr_utility.set_location(' Leaving:'||l_proc, 10);
619 End post_insert;
620 --
621 -- ----------------------------------------------------------------------------
622 -- |-------------------------------< ins_lck >--------------------------------|
623 -- ----------------------------------------------------------------------------
624 -- {Start Of Comments}
625 --
626 -- Description:
627 -- The ins_lck process has one main function to perform. When inserting
628 -- a datetracked row, we must validate the DT mode.
629 -- be manipulated.
630 --
631 -- Prerequisites:
632 -- This procedure can only be called for the datetrack mode of INSERT.
633 --
634 -- In Parameters:
635 --
636 -- Post Success:
637 -- On successful completion of the ins_lck process the parental
638 -- datetracked rows will be locked providing the p_enforce_foreign_locking
639 -- argument value is TRUE.
640 -- If the p_enforce_foreign_locking argument value is FALSE then the
641 -- parential rows are not locked.
642 --
643 -- Post Failure:
644 -- The Lck process can fail for:
645 -- 1) When attempting to lock the row the row could already be locked by
646 -- another user. This will raise the HR_Api.Object_Locked exception.
647 -- 2) When attempting to the lock the parent which doesn't exist.
648 -- For the entity to be locked the parent must exist!
649 --
650 -- Developer Implementation Notes:
651 -- None.
652 --
653 -- Access Status:
654 -- Internal Row Handler Use Only.
655 --
656 -- {End Of Comments}
657 -- ----------------------------------------------------------------------------
658 Procedure ins_lck
659 (p_effective_date in date,
660 p_datetrack_mode in varchar2,
661 p_rec in ben_cpp_shd.g_rec_type,
662 p_validation_start_date out nocopy date,
663 p_validation_end_date out nocopy date) is
664 --
665 l_proc varchar2(72) := g_package||'ins_lck';
666 l_validation_start_date date;
667 l_validation_end_date date;
668 --
669 Begin
670 hr_utility.set_location('Entering:'||l_proc, 5);
671 --
672 -- Validate the datetrack mode mode getting the validation start
673 -- and end dates for the specified datetrack operation.
674 --
675 dt_api.validate_dt_mode
676 (p_effective_date => p_effective_date,
677 p_datetrack_mode => p_datetrack_mode,
678 p_base_table_name => 'ben_plip_f',
679 p_base_key_column => 'plip_id',
680 p_base_key_value => p_rec.plip_id,
684 p_parent_table_name2 => 'ben_pl_f',
681 p_parent_table_name1 => 'ff_formulas_f',
682 p_parent_key_column1 => 'formula_id',
683 p_parent_key_value1 => p_rec.dflt_enrt_det_rl,
685 p_parent_key_column2 => 'pl_id',
686 p_parent_key_value2 => p_rec.pl_id,
687 p_parent_table_name3 => 'ben_pgm_f',
688 p_parent_key_column3 => 'pgm_id',
689 p_parent_key_value3 => p_rec.pgm_id,
690 p_parent_table_name4 => 'ben_cmbn_plip_f',
691 p_parent_key_column4 => 'cmbn_plip_id',
692 p_parent_key_value4 => p_rec.cmbn_plip_id,
693 p_enforce_foreign_locking => true,
694 p_validation_start_date => l_validation_start_date,
695 p_validation_end_date => l_validation_end_date);
696 --
697 -- Set the validation start and end date OUT arguments
698 --
699 p_validation_start_date := l_validation_start_date;
700 p_validation_end_date := l_validation_end_date;
701 --
702 hr_utility.set_location(' Leaving:'||l_proc, 10);
703 --
704 End ins_lck;
705 --
706 -- ----------------------------------------------------------------------------
707 -- |---------------------------------< ins >----------------------------------|
708 -- ----------------------------------------------------------------------------
709 Procedure ins
710 (
711 p_rec in out nocopy ben_cpp_shd.g_rec_type,
712 p_effective_date in date
713 ) is
714 --
715 l_proc varchar2(72) := g_package||'ins';
716 l_datetrack_mode varchar2(30) := 'INSERT';
717 l_validation_start_date date;
718 l_validation_end_date date;
719 --
720 Begin
721 hr_utility.set_location('Entering:'||l_proc, 5);
722 --
723 -- Call the lock operation
724 --
725 ins_lck
726 (p_effective_date => p_effective_date,
727 p_datetrack_mode => l_datetrack_mode,
728 p_rec => p_rec,
729 p_validation_start_date => l_validation_start_date,
730 p_validation_end_date => l_validation_end_date);
731 --
732 -- Call the supporting insert validate operations
733 --
734 ben_cpp_bus.insert_validate
735 (p_rec => p_rec,
736 p_effective_date => p_effective_date,
737 p_datetrack_mode => l_datetrack_mode,
738 p_validation_start_date => l_validation_start_date,
739 p_validation_end_date => l_validation_end_date);
740 --
741 -- Call the supporting pre-insert operation
742 --
743 pre_insert
744 (p_rec => p_rec,
745 p_effective_date => p_effective_date,
746 p_datetrack_mode => l_datetrack_mode,
747 p_validation_start_date => l_validation_start_date,
748 p_validation_end_date => l_validation_end_date);
749 --
750 -- Insert the row
751 --
752 insert_dml
753 (p_rec => p_rec,
754 p_effective_date => p_effective_date,
755 p_datetrack_mode => l_datetrack_mode,
756 p_validation_start_date => l_validation_start_date,
757 p_validation_end_date => l_validation_end_date);
758 --
759 -- Call the supporting post-insert operation
760 --
761 post_insert
762 (p_rec => p_rec,
763 p_effective_date => p_effective_date,
764 p_datetrack_mode => l_datetrack_mode,
765 p_validation_start_date => l_validation_start_date,
766 p_validation_end_date => l_validation_end_date);
767 end ins;
768 --
769 -- ----------------------------------------------------------------------------
770 -- |---------------------------------< ins >----------------------------------|
771 -- ----------------------------------------------------------------------------
772 Procedure ins
773 (
774 p_plip_id out nocopy number,
775 p_effective_start_date out nocopy date,
776 p_effective_end_date out nocopy date,
777 p_business_group_id in number,
778 p_pgm_id in number,
779 p_pl_id in number,
780 p_cmbn_plip_id in number,
781 p_dflt_flag in varchar2,
782 p_plip_stat_cd in varchar2,
783 p_dflt_enrt_cd in varchar2,
784 p_dflt_enrt_det_rl in number ,
785 p_ordr_num in number ,
786 p_alws_unrstrctd_enrt_flag in varchar2,
787 p_auto_enrt_mthd_rl in number ,
788 p_enrt_cd in varchar2,
789 p_enrt_mthd_cd in varchar2,
790 p_enrt_rl in number ,
791 p_ivr_ident in varchar2,
792 p_url_ref_name in varchar2,
793 p_enrt_cvg_strt_dt_cd in varchar2,
794 p_enrt_cvg_strt_dt_rl in number ,
795 p_enrt_cvg_end_dt_cd in varchar2,
796 p_enrt_cvg_end_dt_rl in number ,
797 p_rt_strt_dt_cd in varchar2,
798 p_rt_strt_dt_rl in number ,
799 p_rt_end_dt_cd in varchar2,
800 p_rt_end_dt_rl in number ,
801 p_drvbl_fctr_apls_rts_flag in varchar2,
802 p_drvbl_fctr_prtn_elig_flag in varchar2,
803 p_elig_apls_flag in varchar2,
804 p_prtn_elig_ovrid_alwd_flag in varchar2,
805 p_trk_inelig_per_flag in varchar2,
806 p_postelcn_edit_rl in number ,
810 p_mn_cvg_rl in number ,
807 p_dflt_to_asn_pndg_ctfn_cd in varchar2,
808 p_dflt_to_asn_pndg_ctfn_rl in number ,
809 p_mn_cvg_amt in number ,
811 p_mx_cvg_alwd_amt in number ,
812 p_mx_cvg_incr_alwd_amt in number ,
813 p_mx_cvg_incr_wcf_alwd_amt in number ,
814 p_mx_cvg_mlt_incr_num in number ,
815 p_mx_cvg_mlt_incr_wcf_num in number ,
816 p_mx_cvg_rl in number ,
817 p_mx_cvg_wcfn_amt in number ,
818 p_mx_cvg_wcfn_mlt_num in number ,
819 p_no_mn_cvg_amt_apls_flag in varchar2,
820 p_no_mn_cvg_incr_apls_flag in varchar2,
821 p_no_mx_cvg_amt_apls_flag in varchar2,
822 p_no_mx_cvg_incr_apls_flag in varchar2,
823 p_unsspnd_enrt_cd in varchar2,
824 p_prort_prtl_yr_cvg_rstrn_cd in varchar2,
825 p_prort_prtl_yr_cvg_rstrn_rl in number ,
826 p_cvg_incr_r_decr_only_cd in varchar2 ,
827 p_bnft_or_option_rstrctn_cd in varchar2 ,
828 p_per_cvrd_cd in varchar2 ,
829 p_short_name in varchar2 ,
830 p_short_code in varchar2 ,
831 p_legislation_code in varchar2 ,
832 p_legislation_subgroup in varchar2 ,
833 P_vrfy_fmly_mmbr_rl in number ,
834 P_vrfy_fmly_mmbr_cd in varchar2 ,
835 P_use_csd_rsd_prccng_cd in varchar2 ,
836 p_cpp_attribute_category in varchar2,
837 p_cpp_attribute1 in varchar2,
838 p_cpp_attribute2 in varchar2,
839 p_cpp_attribute3 in varchar2,
840 p_cpp_attribute4 in varchar2,
841 p_cpp_attribute5 in varchar2,
842 p_cpp_attribute6 in varchar2,
843 p_cpp_attribute7 in varchar2,
844 p_cpp_attribute8 in varchar2,
845 p_cpp_attribute9 in varchar2,
846 p_cpp_attribute10 in varchar2,
847 p_cpp_attribute11 in varchar2,
848 p_cpp_attribute12 in varchar2,
849 p_cpp_attribute13 in varchar2,
850 p_cpp_attribute14 in varchar2,
851 p_cpp_attribute15 in varchar2,
852 p_cpp_attribute16 in varchar2,
853 p_cpp_attribute17 in varchar2,
854 p_cpp_attribute18 in varchar2,
855 p_cpp_attribute19 in varchar2,
856 p_cpp_attribute20 in varchar2,
857 p_cpp_attribute21 in varchar2,
858 p_cpp_attribute22 in varchar2,
859 p_cpp_attribute23 in varchar2,
860 p_cpp_attribute24 in varchar2,
861 p_cpp_attribute25 in varchar2,
862 p_cpp_attribute26 in varchar2,
863 p_cpp_attribute27 in varchar2,
864 p_cpp_attribute28 in varchar2,
865 p_cpp_attribute29 in varchar2,
866 p_cpp_attribute30 in varchar2,
867 p_object_version_number out nocopy number,
868 p_effective_date in date
869 ) is
870 --
871 l_rec ben_cpp_shd.g_rec_type;
872 l_proc varchar2(72) := g_package||'ins';
873 --
874 Begin
875 hr_utility.set_location('Entering:'||l_proc, 5);
876 --
877 -- Call conversion function to turn arguments into the
878 -- p_rec structure.
879 --
880 l_rec :=
881 ben_cpp_shd.convert_args
882 (
883 null,
884 null,
885 null,
886 p_business_group_id,
887 p_pgm_id,
888 p_pl_id,
889 p_cmbn_plip_id,
890 p_dflt_flag,
891 p_plip_stat_cd,
892 p_dflt_enrt_cd,
893 p_dflt_enrt_det_rl,
894 p_ordr_num,
895 p_alws_unrstrctd_enrt_flag,
896 p_auto_enrt_mthd_rl,
897 p_enrt_cd,
898 p_enrt_mthd_cd,
899 p_enrt_rl,
900 p_ivr_ident,
901 p_url_ref_name,
902 p_enrt_cvg_strt_dt_cd,
903 p_enrt_cvg_strt_dt_rl,
904 p_enrt_cvg_end_dt_cd,
905 p_enrt_cvg_end_dt_rl,
906 p_rt_strt_dt_cd,
907 p_rt_strt_dt_rl,
908 p_rt_end_dt_cd,
909 p_rt_end_dt_rl,
910 p_drvbl_fctr_apls_rts_flag,
911 p_drvbl_fctr_prtn_elig_flag,
912 p_elig_apls_flag,
913 p_prtn_elig_ovrid_alwd_flag,
914 p_trk_inelig_per_flag,
915 p_postelcn_edit_rl,
916 p_dflt_to_asn_pndg_ctfn_cd,
917 p_dflt_to_asn_pndg_ctfn_rl,
918 p_mn_cvg_amt,
919 p_mn_cvg_rl,
920 p_mx_cvg_alwd_amt,
921 p_mx_cvg_incr_alwd_amt,
922 p_mx_cvg_incr_wcf_alwd_amt,
923 p_mx_cvg_mlt_incr_num,
924 p_mx_cvg_mlt_incr_wcf_num,
925 p_mx_cvg_rl,
926 p_mx_cvg_wcfn_amt,
927 p_mx_cvg_wcfn_mlt_num,
928 p_no_mn_cvg_amt_apls_flag,
929 p_no_mn_cvg_incr_apls_flag,
930 p_no_mx_cvg_amt_apls_flag,
931 p_no_mx_cvg_incr_apls_flag,
932 p_unsspnd_enrt_cd,
933 p_prort_prtl_yr_cvg_rstrn_cd,
934 p_prort_prtl_yr_cvg_rstrn_rl,
935 p_cvg_incr_r_decr_only_cd,
936 p_bnft_or_option_rstrctn_cd,
937 p_per_cvrd_cd,
938 p_short_name,
939 p_short_code,
940 p_legislation_code,
941 p_legislation_subgroup,
942 P_vrfy_fmly_mmbr_rl,
943 P_vrfy_fmly_mmbr_cd,
944 P_use_csd_rsd_prccng_cd,
945 p_cpp_attribute_category,
946 p_cpp_attribute1,
947 p_cpp_attribute2,
948 p_cpp_attribute3,
949 p_cpp_attribute4,
953 p_cpp_attribute8,
950 p_cpp_attribute5,
951 p_cpp_attribute6,
952 p_cpp_attribute7,
954 p_cpp_attribute9,
955 p_cpp_attribute10,
956 p_cpp_attribute11,
957 p_cpp_attribute12,
958 p_cpp_attribute13,
959 p_cpp_attribute14,
960 p_cpp_attribute15,
961 p_cpp_attribute16,
962 p_cpp_attribute17,
963 p_cpp_attribute18,
964 p_cpp_attribute19,
965 p_cpp_attribute20,
966 p_cpp_attribute21,
967 p_cpp_attribute22,
968 p_cpp_attribute23,
969 p_cpp_attribute24,
970 p_cpp_attribute25,
971 p_cpp_attribute26,
972 p_cpp_attribute27,
973 p_cpp_attribute28,
974 p_cpp_attribute29,
975 p_cpp_attribute30,
976 null
977 );
978 --
979 -- Having converted the arguments into the ben_cpp_rec
980 -- plsql record structure we call the corresponding record
981 -- business process.
982 --
983 ins(l_rec, p_effective_date);
984 --
985 -- Set the OUT arguments.
986 --
987 p_plip_id := l_rec.plip_id;
988 p_effective_start_date := l_rec.effective_start_date;
989 p_effective_end_date := l_rec.effective_end_date;
990 p_object_version_number := l_rec.object_version_number;
991 --
992 --
993 hr_utility.set_location(' Leaving:'||l_proc, 10);
994 End ins;
995 --
996 end ben_cpp_ins;