[Home] [Help]
PACKAGE BODY: APPS.BEN_ELP_INS
Source
1 Package Body ben_elp_ins as
2 /* $Header: beelprhi.pkb 120.5 2007/01/24 05:18:55 rgajula ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_elp_ins.'; -- Global package name
9 --
10 g_eligy_prfl_id_i number default null;
11
12 --
13 --|------------------------< set_base_key_value >----------------------------|
14 -- Description:
15 -- This procedure is called to register the next ID value from the database
16 -- sequence.
17 --
18 -- Prerequisites:
19 --
20 -- In Parameters:
21 -- Primary Key
22 --
23 -- Post Success:
24 --
25 -- Post Failure:
26 --
27 -- Developer Implementation Notes:
28 -- None.
29 --
30 -- Access Status:
31 -- Internal Development Use Only.
32 --
33 procedure set_base_key_value (p_eligy_prfl_id in number) is
34 --
35 l_proc varchar2(72) := g_package||'set_base_key_value';
36 --
37 Begin
38 hr_utility.set_location('Entering:'||l_proc, 10);
39 --
40 ben_elp_ins.g_eligy_prfl_id_i := p_eligy_prfl_id;
41 --
42 hr_utility.set_location(' Leaving:'||l_proc, 20);
43 End set_base_key_value;
44
45 -- ----------------------------------------------------------------------------
46 -- |----------------------------< dt_insert_dml >-----------------------------|
47 -- ----------------------------------------------------------------------------
48 -- {Start Of Comments}
49 --
50 -- Description:
51 -- This procedure controls the actual dml insert logic for datetrack. The
52 -- functions of this procedure are as follows:
53 -- 1) Get the object_version_number.
54 -- 2) To set the effective start and end dates to the corresponding
55 -- validation start and end dates. Also, the object version number
56 -- record attribute is set.
57 -- 3) To set and unset the g_api_dml status as required (as we are about to
58 -- perform dml).
59 -- 4) To insert the row into the schema with the derived effective start
60 -- and end dates and the object version number.
61 -- 5) To trap any constraint violations that may have occurred.
62 -- 6) To raise any other errors.
63 --
64 -- Prerequisites:
65 -- This is an internal private procedure which must be called from the
66 -- insert_dml and pre_update (logic permitting) procedure and must have
67 -- all mandatory arguments set.
68 --
69 -- In Parameters:
70 -- A Pl/Sql record structre.
71 --
72 -- Post Success:
73 -- The specified row will be inserted into the schema.
74 --
75 -- Post Failure:
76 -- On the insert dml failure it is important to note that we always reset the
77 -- g_api_dml status to false.
78 -- If a check or unique integrity constraint violation is raised the
79 -- constraint_error procedure will be called.
80 -- If any other error is reported, the error will be raised after the
81 -- g_api_dml status is reset.
82 --
83 -- Developer Implementation Notes:
84 -- This is an internal datetrack maintenance procedure which should
85 -- not be modified in anyway.
86 --
87 -- Access Status:
88 -- Internal Row Handler Use Only.
89 --
90 -- {End Of Comments}
91 -- ----------------------------------------------------------------------------
92 Procedure dt_insert_dml
93 (p_rec in out nocopy ben_elp_shd.g_rec_type,
94 p_effective_date in date,
95 p_datetrack_mode in varchar2,
96 p_validation_start_date in date,
97 p_validation_end_date in date) is
98 --
99 -- Cursor to select 'old' created AOL who column values
100 --
101 Cursor C_Sel1 Is
102 select t.created_by,
103 t.creation_date
104 from ben_eligy_prfl_f t
105 where t.eligy_prfl_id = p_rec.eligy_prfl_id
106 and t.effective_start_date =
107 ben_elp_shd.g_old_rec.effective_start_date
108 and t.effective_end_date = (p_validation_start_date - 1);
109 --
110 l_proc varchar2(72) := g_package||'dt_insert_dml';
111 l_created_by ben_eligy_prfl_f.created_by%TYPE;
112 l_creation_date ben_eligy_prfl_f.creation_date%TYPE;
113 l_last_update_date ben_eligy_prfl_f.last_update_date%TYPE;
114 l_last_updated_by ben_eligy_prfl_f.last_updated_by%TYPE;
115 l_last_update_login ben_eligy_prfl_f.last_update_login%TYPE;
116 --
117 Begin
118 hr_utility.set_location('Entering:'||l_proc, 5);
119 --
120 -- Get the object version number for the insert
121 --
122 p_rec.object_version_number :=
123 dt_api.get_object_version_number
124 (p_base_table_name => 'ben_eligy_prfl_f',
125 p_base_key_column => 'eligy_prfl_id',
126 p_base_key_value => p_rec.eligy_prfl_id);
127 --
128 -- Set the effective start and end dates to the corresponding
129 -- validation start and end dates
130 --
131 p_rec.effective_start_date := p_validation_start_date;
132 p_rec.effective_end_date := p_validation_end_date;
133 --
134 -- If the datetrack_mode is not INSERT then we must populate the WHO
135 -- columns with the 'old' creation values and 'new' updated values.
136 --
137 If (p_datetrack_mode <> 'INSERT') then
138 hr_utility.set_location(l_proc, 10);
139 --
140 -- Select the 'old' created values
141 --
142 Open C_Sel1;
143 Fetch C_Sel1 Into l_created_by, l_creation_date;
144 If C_Sel1%notfound Then
145 --
146 -- The previous 'old' created row has not been found. We need
147 -- to error as an internal datetrack problem exists.
148 --
149 Close C_Sel1;
150 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
151 fnd_message.set_token('PROCEDURE', l_proc);
152 fnd_message.set_token('STEP','10');
153 fnd_message.raise_error;
154 End If;
155 Close C_Sel1;
156 --
157 -- Set the AOL updated WHO values
158 --
159 l_last_update_date := sysdate;
160 l_last_updated_by := fnd_global.user_id;
161 l_last_update_login := fnd_global.login_id;
162 End If;
163 --
164 ben_elp_shd.g_api_dml := true; -- Set the api dml status
165 --
166 -- Insert the row into: ben_eligy_prfl_f
167 --
168 insert into ben_eligy_prfl_f
169 ( eligy_prfl_id,
170 effective_start_date,
171 effective_end_date,
172 name,
173 description,
174 stat_cd,
175 asmt_to_use_cd,
176 elig_enrld_plip_flag,
177 elig_cbr_quald_bnf_flag,
178 elig_enrld_ptip_flag,
179 elig_dpnt_cvrd_plip_flag,
180 elig_dpnt_cvrd_ptip_flag,
181 elig_dpnt_cvrd_pgm_flag,
182 elig_job_flag,
183 elig_hrly_slrd_flag,
184 elig_pstl_cd_flag,
185 elig_lbr_mmbr_flag,
186 elig_lgl_enty_flag,
187 elig_benfts_grp_flag,
188 elig_wk_loc_flag,
189 elig_brgng_unit_flag,
190 elig_age_flag,
191 elig_los_flag,
192 elig_per_typ_flag,
193 elig_fl_tm_pt_tm_flag,
194 elig_ee_stat_flag,
195 elig_grd_flag,
196 elig_pct_fl_tm_flag,
197 elig_asnt_set_flag,
198 elig_hrs_wkd_flag,
199 elig_comp_lvl_flag,
200 elig_org_unit_flag,
201 elig_loa_rsn_flag,
202 elig_pyrl_flag,
203 elig_schedd_hrs_flag,
204 elig_py_bss_flag,
205 eligy_prfl_rl_flag,
206 elig_cmbn_age_los_flag,
207 cntng_prtn_elig_prfl_flag,
208 elig_prtt_pl_flag,
209 elig_ppl_grp_flag,
210 elig_svc_area_flag,
211 elig_ptip_prte_flag,
212 elig_no_othr_cvg_flag,
213 elig_enrld_pl_flag,
214 elig_enrld_oipl_flag,
215 elig_enrld_pgm_flag,
216 elig_dpnt_cvrd_pl_flag,
217 elig_lvg_rsn_flag,
218 elig_optd_mdcr_flag,
219 elig_tbco_use_flag,
220 elig_dpnt_othr_ptip_flag,
221 business_group_id,
222 elp_attribute_category,
223 elp_attribute1,
224 elp_attribute2,
225 elp_attribute3,
226 elp_attribute4,
227 elp_attribute5,
228 elp_attribute6,
229 elp_attribute7,
230 elp_attribute8,
231 elp_attribute9,
232 elp_attribute10,
233 elp_attribute11,
234 elp_attribute12,
235 elp_attribute13,
236 elp_attribute14,
237 elp_attribute15,
238 elp_attribute16,
239 elp_attribute17,
240 elp_attribute18,
241 elp_attribute19,
242 elp_attribute20,
243 elp_attribute21,
244 elp_attribute22,
245 elp_attribute23,
246 elp_attribute24,
247 elp_attribute25,
248 elp_attribute26,
249 elp_attribute27,
250 elp_attribute28,
251 elp_attribute29,
252 elp_attribute30,
253 elig_mrtl_sts_flag ,
254 elig_gndr_flag ,
255 elig_dsblty_ctg_flag ,
256 elig_dsblty_rsn_flag ,
257 elig_dsblty_dgr_flag ,
258 elig_suppl_role_flag ,
259 elig_qual_titl_flag ,
260 elig_pstn_flag ,
261 elig_prbtn_perd_flag ,
262 elig_sp_clng_prg_pt_flag ,
263 bnft_cagr_prtn_cd ,
264 elig_dsbld_flag ,
265 elig_ttl_cvg_vol_flag ,
266 elig_ttl_prtt_flag ,
267 elig_comptncy_flag ,
268 elig_hlth_cvg_flag,
269 elig_anthr_pl_flag,
270 elig_qua_in_gr_flag,
271 elig_perf_rtng_flag,
272 elig_crit_values_flag, /* RBC */
273 object_version_number,
274 created_by ,
275 creation_date ,
276 last_update_date ,
277 last_updated_by ,
278 last_update_login
279 )
280 Values
281 ( p_rec.eligy_prfl_id,
282 p_rec.effective_start_date,
283 p_rec.effective_end_date,
284 p_rec.name,
285 p_rec.description,
286 p_rec.stat_cd,
287 p_rec.asmt_to_use_cd,
288 p_rec.elig_enrld_plip_flag,
289 p_rec.elig_cbr_quald_bnf_flag,
290 p_rec.elig_enrld_ptip_flag,
291 p_rec.elig_dpnt_cvrd_plip_flag,
292 p_rec.elig_dpnt_cvrd_ptip_flag,
293 p_rec.elig_dpnt_cvrd_pgm_flag,
294 p_rec.elig_job_flag,
295 p_rec.elig_hrly_slrd_flag,
296 p_rec.elig_pstl_cd_flag,
297 p_rec.elig_lbr_mmbr_flag,
298 p_rec.elig_lgl_enty_flag,
299 p_rec.elig_benfts_grp_flag,
300 p_rec.elig_wk_loc_flag,
301 p_rec.elig_brgng_unit_flag,
302 p_rec.elig_age_flag,
303 p_rec.elig_los_flag,
304 p_rec.elig_per_typ_flag,
305 p_rec.elig_fl_tm_pt_tm_flag,
306 p_rec.elig_ee_stat_flag,
307 p_rec.elig_grd_flag,
308 p_rec.elig_pct_fl_tm_flag,
309 p_rec.elig_asnt_set_flag,
310 p_rec.elig_hrs_wkd_flag,
311 p_rec.elig_comp_lvl_flag,
312 p_rec.elig_org_unit_flag,
313 p_rec.elig_loa_rsn_flag,
314 p_rec.elig_pyrl_flag,
315 p_rec.elig_schedd_hrs_flag,
316 p_rec.elig_py_bss_flag,
317 p_rec.eligy_prfl_rl_flag,
318 p_rec.elig_cmbn_age_los_flag,
319 p_rec.cntng_prtn_elig_prfl_flag,
320 p_rec.elig_prtt_pl_flag,
321 p_rec.elig_ppl_grp_flag,
322 p_rec.elig_svc_area_flag,
323 p_rec.elig_ptip_prte_flag,
324 p_rec.elig_no_othr_cvg_flag,
325 p_rec.elig_enrld_pl_flag,
326 p_rec.elig_enrld_oipl_flag,
327 p_rec.elig_enrld_pgm_flag,
328 p_rec.elig_dpnt_cvrd_pl_flag,
329 p_rec.elig_lvg_rsn_flag,
330 p_rec.elig_optd_mdcr_flag,
331 p_rec.elig_tbco_use_flag,
332 p_rec.elig_dpnt_othr_ptip_flag,
333 p_rec.business_group_id,
334 p_rec.elp_attribute_category,
335 p_rec.elp_attribute1,
336 p_rec.elp_attribute2,
337 p_rec.elp_attribute3,
338 p_rec.elp_attribute4,
339 p_rec.elp_attribute5,
340 p_rec.elp_attribute6,
341 p_rec.elp_attribute7,
342 p_rec.elp_attribute8,
343 p_rec.elp_attribute9,
344 p_rec.elp_attribute10,
345 p_rec.elp_attribute11,
346 p_rec.elp_attribute12,
347 p_rec.elp_attribute13,
348 p_rec.elp_attribute14,
349 p_rec.elp_attribute15,
350 p_rec.elp_attribute16,
351 p_rec.elp_attribute17,
352 p_rec.elp_attribute18,
353 p_rec.elp_attribute19,
354 p_rec.elp_attribute20,
355 p_rec.elp_attribute21,
356 p_rec.elp_attribute22,
357 p_rec.elp_attribute23,
358 p_rec.elp_attribute24,
359 p_rec.elp_attribute25,
360 p_rec.elp_attribute26,
361 p_rec.elp_attribute27,
362 p_rec.elp_attribute28,
363 p_rec.elp_attribute29,
364 p_rec.elp_attribute30,
365 p_rec.elig_mrtl_sts_flag ,
366 p_rec.elig_gndr_flag ,
367 p_rec.elig_dsblty_ctg_flag ,
368 p_rec.elig_dsblty_rsn_flag ,
369 p_rec.elig_dsblty_dgr_flag ,
370 p_rec.elig_suppl_role_flag ,
371 p_rec.elig_qual_titl_flag ,
372 p_rec.elig_pstn_flag ,
373 p_rec.elig_prbtn_perd_flag ,
374 p_rec.elig_sp_clng_prg_pt_flag ,
375 p_rec.bnft_cagr_prtn_cd ,
376 p_rec.elig_dsbld_flag ,
377 p_rec.elig_ttl_cvg_vol_flag ,
378 p_rec.elig_ttl_prtt_flag ,
379 p_rec.elig_comptncy_flag ,
380 p_rec.elig_hlth_cvg_flag,
381 p_rec.elig_anthr_pl_flag,
382 p_rec.elig_qua_in_gr_flag,
383 p_rec.elig_perf_rtng_flag,
384 p_rec.elig_crit_values_flag, /* RBC */
385 p_rec.object_version_number ,
386 l_created_by,
387 l_creation_date,
388 l_last_update_date,
389 l_last_updated_by,
390 l_last_update_login
391 );
392 --
393 ben_elp_shd.g_api_dml := false; -- Unset the api dml status
394 hr_utility.set_location(' Leaving:'||l_proc, 15);
395 --
396 Exception
397 When hr_api.check_integrity_violated Then
398 -- A check constraint has been violated
399 ben_elp_shd.g_api_dml := false; -- Unset the api dml status
400 ben_elp_shd.constraint_error
401 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
402 When hr_api.unique_integrity_violated Then
403 -- Unique integrity has been violated
404 ben_elp_shd.g_api_dml := false; -- Unset the api dml status
405 ben_elp_shd.constraint_error
406 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
407 When Others Then
408 ben_elp_shd.g_api_dml := false; -- Unset the api dml status
409 Raise;
410 End dt_insert_dml;
411 --
412 -- ----------------------------------------------------------------------------
413 -- |------------------------------< insert_dml >------------------------------|
414 -- ----------------------------------------------------------------------------
415 Procedure insert_dml
416 (p_rec in out nocopy ben_elp_shd.g_rec_type,
417 p_effective_date in date,
418 p_datetrack_mode in varchar2,
419 p_validation_start_date in date,
420 p_validation_end_date in date) is
421 --
422 l_proc varchar2(72) := g_package||'insert_dml';
423 --
424 Begin
425 hr_utility.set_location('Entering:'||l_proc, 5);
426 --
427 dt_insert_dml(p_rec => p_rec,
428 p_effective_date => p_effective_date,
429 p_datetrack_mode => p_datetrack_mode,
430 p_validation_start_date => p_validation_start_date,
431 p_validation_end_date => p_validation_end_date);
432 --
433 hr_utility.set_location(' Leaving:'||l_proc, 10);
434 End insert_dml;
435 --
436 -- ----------------------------------------------------------------------------
437 -- |------------------------------< pre_insert >------------------------------|
438 -- ----------------------------------------------------------------------------
439 -- {Start Of Comments}
440 --
441 -- Description:
445 -- the entity will be populated with the next sequence value in
442 -- This private procedure contains any processing which is required before
443 -- the insert dml. Presently, if the entity has a corresponding primary
444 -- key which is maintained by an associating sequence, the primary key for
446 -- preparation for the insert dml.
447 -- Also, if comments are defined for this entity, the comments insert
448 -- logic will also be called, generating a comment_id if required.
449 --
450 -- Prerequisites:
451 -- This is an internal procedure which is called from the ins procedure.
452 --
453 -- In Parameters:
454 -- A Pl/Sql record structre.
455 --
456 -- Post Success:
457 -- Processing continues.
458 --
459 -- Post Failure:
460 -- If an error has occurred, an error message and exception will be raised
461 -- but not handled.
462 --
463 -- Developer Implementation Notes:
464 -- Any pre-processing required before the insert dml is issued should be
465 -- coded within this procedure. As stated above, a good example is the
466 -- generation of a primary key number via a corresponding sequence.
467 -- It is important to note that any 3rd party maintenance should be reviewed
468 -- before placing in this procedure.
469 --
470 -- Access Status:
471 -- Internal Row Handler Use Only.
472 --
473 -- {End Of Comments}
474 -- ----------------------------------------------------------------------------
475 Procedure pre_insert
476 (p_rec in out nocopy ben_elp_shd.g_rec_type,
477 p_effective_date in date,
478 p_datetrack_mode in varchar2,
479 p_validation_start_date in date,
480 p_validation_end_date in date) is
481 --
482 l_proc varchar2(72) := g_package||'pre_insert';
483 l_exists varchar2(1);
484 --
485 cursor c1 is
486 select ben_eligy_prfl_f_s.nextval
487 from sys.dual;
488 --
489 --
490 Cursor C_Sel2 is
491 Select null
492 from ben_eligy_prfl_f
493 where eligy_prfl_id =
494 ben_elp_ins.g_eligy_prfl_id_i;
495 Begin
496 hr_utility.set_location('Entering:'||l_proc, 5);
497 --
498 --
499 --
500 If (ben_elp_ins.g_eligy_prfl_id_i is not null) Then
501 --
502 -- Verify registered primary key values not already in use
503 --
504 Open C_Sel2;
505 Fetch C_Sel2 into l_exists;
506 If C_Sel2%found Then
507 Close C_Sel2;
508 --
509 -- The primary key values are already in use.
510 --
511 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
512 fnd_message.set_token('TABLE_NAME','ben_eligy_prfl_f');
513 fnd_message.raise_error;
514 End if;
515 Close C_Sel2;
516 p_rec.eligy_prfl_id:=ben_elp_ins.g_eligy_prfl_id_i;
517 ben_elp_ins.g_eligy_prfl_id_i:=null;
518 ELSE
519 open c1;
520 fetch c1 into p_rec.eligy_prfl_id;
521 close c1;
522 END IF;
523 --
524 --
525 hr_utility.set_location(' Leaving:'||l_proc, 10);
526 End pre_insert;
527 --
528 -- ----------------------------------------------------------------------------
529 -- |-----------------------------< post_insert >------------------------------|
530 -- ----------------------------------------------------------------------------
531 -- {Start Of Comments}
532 --
533 -- Description:
534 -- This private procedure contains any processing which is required after the
535 -- insert dml.
536 --
537 -- Prerequisites:
538 -- This is an internal procedure which is called from the ins procedure.
539 --
540 -- In Parameters:
541 -- A Pl/Sql record structre.
542 --
543 -- Post Success:
544 -- Processing continues.
545 --
546 -- Post Failure:
547 -- If an error has occurred, an error message and exception will be raised
548 -- but not handled.
549 --
550 -- Developer Implementation Notes:
551 -- Any post-processing required after the insert dml is issued should be
552 -- coded within this procedure. It is important to note that any 3rd party
553 -- maintenance should be reviewed before placing in this procedure.
554 --
555 -- Access Status:
556 -- Internal Row Handler Use Only.
557 --
558 -- {End Of Comments}
559 -- ----------------------------------------------------------------------------
560 Procedure post_insert
561 (p_rec in ben_elp_shd.g_rec_type,
562 p_effective_date in date,
563 p_datetrack_mode in varchar2,
564 p_validation_start_date in date,
565 p_validation_end_date in date) is
566 --
567 l_proc varchar2(72) := g_package||'post_insert';
568 --
569 Begin
570 hr_utility.set_location('Entering:'||l_proc, 5);
571 --
572 -- Start of API User Hook for post_insert.
573 --
574 begin
575 --
576 ben_elp_rki.after_insert
577 (p_eligy_prfl_id =>p_rec.eligy_prfl_id
578 ,p_effective_start_date =>p_rec.effective_start_date
579 ,p_effective_end_date =>p_rec.effective_end_date
580 ,p_name =>p_rec.name
581 ,p_description =>p_rec.description
582 ,p_stat_cd =>p_rec.stat_cd
583 ,p_asmt_to_use_cd =>p_rec.asmt_to_use_cd
584 ,p_elig_enrld_plip_flag =>p_rec.elig_enrld_plip_flag
585 ,p_elig_cbr_quald_bnf_flag =>p_rec.elig_cbr_quald_bnf_flag
586 ,p_elig_enrld_ptip_flag =>p_rec.elig_enrld_ptip_flag
587 ,p_elig_dpnt_cvrd_plip_flag =>p_rec.elig_dpnt_cvrd_plip_flag
591 ,p_elig_hrly_slrd_flag =>p_rec.elig_hrly_slrd_flag
588 ,p_elig_dpnt_cvrd_ptip_flag =>p_rec.elig_dpnt_cvrd_ptip_flag
589 ,p_elig_dpnt_cvrd_pgm_flag =>p_rec.elig_dpnt_cvrd_pgm_flag
590 ,p_elig_job_flag =>p_rec.elig_job_flag
592 ,p_elig_pstl_cd_flag =>p_rec.elig_pstl_cd_flag
593 ,p_elig_lbr_mmbr_flag =>p_rec.elig_lbr_mmbr_flag
594 ,p_elig_lgl_enty_flag =>p_rec.elig_lgl_enty_flag
595 ,p_elig_benfts_grp_flag =>p_rec.elig_benfts_grp_flag
596 ,p_elig_wk_loc_flag =>p_rec.elig_wk_loc_flag
597 ,p_elig_brgng_unit_flag =>p_rec.elig_brgng_unit_flag
598 ,p_elig_age_flag =>p_rec.elig_age_flag
599 ,p_elig_los_flag =>p_rec.elig_los_flag
600 ,p_elig_per_typ_flag =>p_rec.elig_per_typ_flag
601 ,p_elig_fl_tm_pt_tm_flag =>p_rec.elig_fl_tm_pt_tm_flag
602 ,p_elig_ee_stat_flag =>p_rec.elig_ee_stat_flag
603 ,p_elig_grd_flag =>p_rec.elig_grd_flag
604 ,p_elig_pct_fl_tm_flag =>p_rec.elig_pct_fl_tm_flag
605 ,p_elig_asnt_set_flag =>p_rec.elig_asnt_set_flag
606 ,p_elig_hrs_wkd_flag =>p_rec.elig_hrs_wkd_flag
607 ,p_elig_comp_lvl_flag =>p_rec.elig_comp_lvl_flag
608 ,p_elig_org_unit_flag =>p_rec.elig_org_unit_flag
609 ,p_elig_loa_rsn_flag =>p_rec.elig_loa_rsn_flag
610 ,p_elig_pyrl_flag =>p_rec.elig_pyrl_flag
611 ,p_elig_schedd_hrs_flag =>p_rec.elig_schedd_hrs_flag
612 ,p_elig_py_bss_flag =>p_rec.elig_py_bss_flag
613 ,p_eligy_prfl_rl_flag =>p_rec.eligy_prfl_rl_flag
614 ,p_elig_cmbn_age_los_flag =>p_rec.elig_cmbn_age_los_flag
615 ,p_cntng_prtn_elig_prfl_flag =>p_rec.cntng_prtn_elig_prfl_flag
616 ,p_elig_prtt_pl_flag =>p_rec.elig_prtt_pl_flag
617 ,p_elig_ppl_grp_flag =>p_rec.elig_ppl_grp_flag
618 ,p_elig_svc_area_flag =>p_rec.elig_svc_area_flag
619 ,p_elig_ptip_prte_flag =>p_rec.elig_ptip_prte_flag
620 ,p_elig_no_othr_cvg_flag =>p_rec.elig_no_othr_cvg_flag
621 ,p_elig_enrld_pl_flag =>p_rec.elig_enrld_pl_flag
622 ,p_elig_enrld_oipl_flag =>p_rec.elig_enrld_oipl_flag
623 ,p_elig_enrld_pgm_flag =>p_rec.elig_enrld_pgm_flag
624 ,p_elig_dpnt_cvrd_pl_flag =>p_rec.elig_dpnt_cvrd_pl_flag
625 ,p_elig_lvg_rsn_flag =>p_rec.elig_lvg_rsn_flag
626 ,p_elig_optd_mdcr_flag =>p_rec.elig_optd_mdcr_flag
627 ,p_elig_tbco_use_flag =>p_rec.elig_tbco_use_flag
628 ,p_elig_dpnt_othr_ptip_flag =>p_rec.elig_dpnt_othr_ptip_flag
629 ,p_business_group_id =>p_rec.business_group_id
630 ,p_elp_attribute_category =>p_rec.elp_attribute_category
631 ,p_elp_attribute1 =>p_rec.elp_attribute1
632 ,p_elp_attribute2 =>p_rec.elp_attribute2
633 ,p_elp_attribute3 =>p_rec.elp_attribute3
634 ,p_elp_attribute4 =>p_rec.elp_attribute4
635 ,p_elp_attribute5 =>p_rec.elp_attribute5
636 ,p_elp_attribute6 =>p_rec.elp_attribute6
637 ,p_elp_attribute7 =>p_rec.elp_attribute7
638 ,p_elp_attribute8 =>p_rec.elp_attribute8
639 ,p_elp_attribute9 =>p_rec.elp_attribute9
640 ,p_elp_attribute10 =>p_rec.elp_attribute10
641 ,p_elp_attribute11 =>p_rec.elp_attribute11
642 ,p_elp_attribute12 =>p_rec.elp_attribute12
643 ,p_elp_attribute13 =>p_rec.elp_attribute13
644 ,p_elp_attribute14 =>p_rec.elp_attribute14
645 ,p_elp_attribute15 =>p_rec.elp_attribute15
646 ,p_elp_attribute16 =>p_rec.elp_attribute16
647 ,p_elp_attribute17 =>p_rec.elp_attribute17
648 ,p_elp_attribute18 =>p_rec.elp_attribute18
649 ,p_elp_attribute19 =>p_rec.elp_attribute19
650 ,p_elp_attribute20 =>p_rec.elp_attribute20
651 ,p_elp_attribute21 =>p_rec.elp_attribute21
652 ,p_elp_attribute22 =>p_rec.elp_attribute22
653 ,p_elp_attribute23 =>p_rec.elp_attribute23
654 ,p_elp_attribute24 =>p_rec.elp_attribute24
655 ,p_elp_attribute25 =>p_rec.elp_attribute25
656 ,p_elp_attribute26 =>p_rec.elp_attribute26
657 ,p_elp_attribute27 =>p_rec.elp_attribute27
658 ,p_elp_attribute28 =>p_rec.elp_attribute28
659 ,p_elp_attribute29 =>p_rec.elp_attribute29
660 ,p_elp_attribute30 =>p_rec.elp_attribute30
661 ,p_elig_mrtl_sts_flag =>p_rec.elig_mrtl_sts_flag
662 ,p_elig_gndr_flag =>p_rec.elig_gndr_flag
663 ,p_elig_dsblty_ctg_flag =>p_rec.elig_dsblty_ctg_flag
664 ,p_elig_dsblty_rsn_flag =>p_rec.elig_dsblty_rsn_flag
665 ,p_elig_dsblty_dgr_flag =>p_rec.elig_dsblty_dgr_flag
666 ,p_elig_suppl_role_flag =>p_rec.elig_suppl_role_flag
667 ,p_elig_qual_titl_flag =>p_rec.elig_qual_titl_flag
668 ,p_elig_pstn_flag =>p_rec.elig_pstn_flag
669 ,p_elig_prbtn_perd_flag =>p_rec.elig_prbtn_perd_flag
670 ,p_elig_sp_clng_prg_pt_flag =>p_rec.elig_sp_clng_prg_pt_flag
671 ,p_bnft_cagr_prtn_cd =>p_rec.bnft_cagr_prtn_cd
675 ,p_elig_comptncy_flag =>p_rec.elig_comptncy_flag
672 ,p_elig_dsbld_flag =>p_rec.elig_dsbld_flag
673 ,p_elig_ttl_cvg_vol_flag =>p_rec.elig_ttl_cvg_vol_flag
674 ,p_elig_ttl_prtt_flag =>p_rec.elig_ttl_prtt_flag
676 ,p_elig_hlth_cvg_flag =>p_rec.elig_hlth_cvg_flag
677 ,p_elig_anthr_pl_flag =>p_rec.elig_anthr_pl_flag
678 ,p_elig_qua_in_gr_flag =>p_rec.elig_qua_in_gr_flag
679 ,p_elig_perf_rtng_flag =>p_rec.elig_perf_rtng_flag
680 ,p_elig_crit_values_flag =>p_rec.elig_crit_values_flag /* RBC */
681 ,p_object_version_number =>p_rec.object_version_number
682 ,p_effective_date =>p_effective_date
683 ,p_validation_start_date =>p_validation_start_date
684 ,p_validation_end_date =>p_validation_end_date);
685 --
686 exception
687 --
688 when hr_api.cannot_find_prog_unit then
689 --
690 hr_api.cannot_find_prog_unit_error
691 (p_module_name => 'ben_eligy_prfl_f'
692 ,p_hook_type => 'AI');
693 --
694 end;
695 --
696 -- End of API User Hook for post_insert.
697 --
698 --
699 hr_utility.set_location(' Leaving:'||l_proc, 10);
700 End post_insert;
701 --
702 -- ----------------------------------------------------------------------------
703 -- |-------------------------------< ins_lck >--------------------------------|
704 -- ----------------------------------------------------------------------------
705 -- {Start Of Comments}
706 --
707 -- Description:
708 -- The ins_lck process has one main function to perform. When inserting
709 -- a datetracked row, we must validate the DT mode.
710 -- be manipulated.
711 --
712 -- Prerequisites:
713 -- This procedure can only be called for the datetrack mode of INSERT.
714 --
715 -- In Parameters:
716 --
717 -- Post Success:
718 -- On successful completion of the ins_lck process the parental
719 -- datetracked rows will be locked providing the p_enforce_foreign_locking
720 -- argument value is TRUE.
721 -- If the p_enforce_foreign_locking argument value is FALSE then the
722 -- parential rows are not locked.
723 --
724 -- Post Failure:
725 -- The Lck process can fail for:
726 -- 1) When attempting to lock the row the row could already be locked by
727 -- another user. This will raise the HR_Api.Object_Locked exception.
728 -- 2) When attempting to the lock the parent which doesn't exist.
729 -- For the entity to be locked the parent must exist!
730 --
731 -- Developer Implementation Notes:
732 -- None.
733 --
734 -- Access Status:
735 -- Internal Row Handler Use Only.
736 --
737 -- {End Of Comments}
738 -- ----------------------------------------------------------------------------
739 Procedure ins_lck
740 (p_effective_date in date,
741 p_datetrack_mode in varchar2,
742 p_rec in ben_elp_shd.g_rec_type,
743 p_validation_start_date out nocopy date,
744 p_validation_end_date out nocopy date) is
745 --
746 l_proc varchar2(72) := g_package||'ins_lck';
747 l_validation_start_date date;
748 l_validation_end_date date;
749 --
750 Begin
751 hr_utility.set_location('Entering:'||l_proc, 5);
752 --
753 -- Validate the datetrack mode mode getting the validation start
754 -- and end dates for the specified datetrack operation.
755 --
756 dt_api.validate_dt_mode
757 (p_effective_date => p_effective_date,
758 p_datetrack_mode => p_datetrack_mode,
759 p_base_table_name => 'ben_eligy_prfl_f',
760 p_base_key_column => 'eligy_prfl_id',
761 p_base_key_value => p_rec.eligy_prfl_id,
762 p_enforce_foreign_locking => true,
763 p_validation_start_date => l_validation_start_date,
764 p_validation_end_date => l_validation_end_date);
765 --
766 -- Set the validation start and end date OUT arguments
767 --
768 p_validation_start_date := l_validation_start_date;
769 p_validation_end_date := l_validation_end_date;
770 --
771 hr_utility.set_location(' Leaving:'||l_proc, 10);
772 --
773 End ins_lck;
774 --
775 -- ----------------------------------------------------------------------------
776 -- |---------------------------------< ins >----------------------------------|
777 -- ----------------------------------------------------------------------------
778 Procedure ins
779 (
780 p_rec in out nocopy ben_elp_shd.g_rec_type,
781 p_effective_date in date
782 ) is
783 --
784 l_proc varchar2(72) := g_package||'ins';
785 l_datetrack_mode varchar2(30) := 'INSERT';
786 l_validation_start_date date;
787 l_validation_end_date date;
788 --
789 Begin
790 hr_utility.set_location('Entering:'||l_proc, 5);
791 --
792 -- Call the lock operation
793 --
794 ins_lck
795 (p_effective_date => p_effective_date,
796 p_datetrack_mode => l_datetrack_mode,
797 p_rec => p_rec,
798 p_validation_start_date => l_validation_start_date,
799 p_validation_end_date => l_validation_end_date);
800 --
801 -- Call the supporting insert validate operations
802 --
803 ben_elp_bus.insert_validate
804 (p_rec => p_rec,
805 p_effective_date => p_effective_date,
806 p_datetrack_mode => l_datetrack_mode,
807 p_validation_start_date => l_validation_start_date,
811 --
808 p_validation_end_date => l_validation_end_date);
809 --
810 -- Call the supporting pre-insert operation
812 pre_insert
813 (p_rec => p_rec,
814 p_effective_date => p_effective_date,
815 p_datetrack_mode => l_datetrack_mode,
816 p_validation_start_date => l_validation_start_date,
817 p_validation_end_date => l_validation_end_date);
818 --
819 -- Insert the row
820 --
821 insert_dml
822 (p_rec => p_rec,
823 p_effective_date => p_effective_date,
824 p_datetrack_mode => l_datetrack_mode,
825 p_validation_start_date => l_validation_start_date,
826 p_validation_end_date => l_validation_end_date);
827 --
828 -- Call the supporting post-insert operation
829 --
830 post_insert
831 (p_rec => p_rec,
832 p_effective_date => p_effective_date,
833 p_datetrack_mode => l_datetrack_mode,
834 p_validation_start_date => l_validation_start_date,
835 p_validation_end_date => l_validation_end_date);
836 end ins;
837 --
838 -- ----------------------------------------------------------------------------
839 -- |---------------------------------< ins >----------------------------------|
840 -- ----------------------------------------------------------------------------
841 Procedure ins
842 (
843 p_eligy_prfl_id out nocopy number,
844 p_effective_start_date out nocopy date,
845 p_effective_end_date out nocopy date,
846 p_name in varchar2,
847 p_description in varchar2 default null,
848 p_stat_cd in varchar2,
849 p_asmt_to_use_cd in varchar2,
850 p_elig_enrld_plip_flag in varchar2,
851 p_elig_cbr_quald_bnf_flag in varchar2,
852 p_elig_enrld_ptip_flag in varchar2,
853 p_elig_dpnt_cvrd_plip_flag in varchar2,
854 p_elig_dpnt_cvrd_ptip_flag in varchar2,
855 p_elig_dpnt_cvrd_pgm_flag in varchar2,
856 p_elig_job_flag in varchar2,
857 p_elig_hrly_slrd_flag in varchar2,
858 p_elig_pstl_cd_flag in varchar2,
859 p_elig_lbr_mmbr_flag in varchar2,
860 p_elig_lgl_enty_flag in varchar2,
861 p_elig_benfts_grp_flag in varchar2,
862 p_elig_wk_loc_flag in varchar2,
863 p_elig_brgng_unit_flag in varchar2,
864 p_elig_age_flag in varchar2,
865 p_elig_los_flag in varchar2,
866 p_elig_per_typ_flag in varchar2,
867 p_elig_fl_tm_pt_tm_flag in varchar2,
868 p_elig_ee_stat_flag in varchar2,
869 p_elig_grd_flag in varchar2,
870 p_elig_pct_fl_tm_flag in varchar2,
871 p_elig_asnt_set_flag in varchar2,
872 p_elig_hrs_wkd_flag in varchar2,
873 p_elig_comp_lvl_flag in varchar2,
874 p_elig_org_unit_flag in varchar2,
875 p_elig_loa_rsn_flag in varchar2,
876 p_elig_pyrl_flag in varchar2,
877 p_elig_schedd_hrs_flag in varchar2,
878 p_elig_py_bss_flag in varchar2,
879 p_eligy_prfl_rl_flag in varchar2,
880 p_elig_cmbn_age_los_flag in varchar2,
881 p_cntng_prtn_elig_prfl_flag in varchar2,
882 p_elig_prtt_pl_flag in varchar2,
883 p_elig_ppl_grp_flag in varchar2,
884 p_elig_svc_area_flag in varchar2,
885 p_elig_ptip_prte_flag in varchar2,
886 p_elig_no_othr_cvg_flag in varchar2,
887 p_elig_enrld_pl_flag in varchar2,
888 p_elig_enrld_oipl_flag in varchar2,
889 p_elig_enrld_pgm_flag in varchar2,
890 p_elig_dpnt_cvrd_pl_flag in varchar2,
891 p_elig_lvg_rsn_flag in varchar2,
892 p_elig_optd_mdcr_flag in varchar2,
893 p_elig_tbco_use_flag in varchar2,
894 p_elig_dpnt_othr_ptip_flag in varchar2,
895 p_business_group_id in number,
896 p_elp_attribute_category in varchar2 default null,
897 p_elp_attribute1 in varchar2 default null,
898 p_elp_attribute2 in varchar2 default null,
899 p_elp_attribute3 in varchar2 default null,
900 p_elp_attribute4 in varchar2 default null,
901 p_elp_attribute5 in varchar2 default null,
902 p_elp_attribute6 in varchar2 default null,
903 p_elp_attribute7 in varchar2 default null,
904 p_elp_attribute8 in varchar2 default null,
905 p_elp_attribute9 in varchar2 default null,
906 p_elp_attribute10 in varchar2 default null,
907 p_elp_attribute11 in varchar2 default null,
908 p_elp_attribute12 in varchar2 default null,
909 p_elp_attribute13 in varchar2 default null,
910 p_elp_attribute14 in varchar2 default null,
911 p_elp_attribute15 in varchar2 default null,
912 p_elp_attribute16 in varchar2 default null,
913 p_elp_attribute17 in varchar2 default null,
914 p_elp_attribute18 in varchar2 default null,
915 p_elp_attribute19 in varchar2 default null,
916 p_elp_attribute20 in varchar2 default null,
917 p_elp_attribute21 in varchar2 default null,
921 p_elp_attribute25 in varchar2 default null,
918 p_elp_attribute22 in varchar2 default null,
919 p_elp_attribute23 in varchar2 default null,
920 p_elp_attribute24 in varchar2 default null,
922 p_elp_attribute26 in varchar2 default null,
923 p_elp_attribute27 in varchar2 default null,
924 p_elp_attribute28 in varchar2 default null,
925 p_elp_attribute29 in varchar2 default null,
926 p_elp_attribute30 in varchar2 default null,
927 p_elig_mrtl_sts_flag in varchar2,
928 p_elig_gndr_flag in varchar2,
929 p_elig_dsblty_ctg_flag in varchar2,
930 p_elig_dsblty_rsn_flag in varchar2,
931 p_elig_dsblty_dgr_flag in varchar2,
932 p_elig_suppl_role_flag in varchar2,
933 p_elig_qual_titl_flag in varchar2,
934 p_elig_pstn_flag in varchar2,
935 p_elig_prbtn_perd_flag in varchar2,
936 p_elig_sp_clng_prg_pt_flag in varchar2,
937 p_bnft_cagr_prtn_cd in varchar2,
938 p_elig_dsbld_flag in varchar2,
939 p_elig_ttl_cvg_vol_flag in varchar2,
940 p_elig_ttl_prtt_flag in varchar2,
941 p_elig_comptncy_flag in varchar2,
942 p_elig_hlth_cvg_flag in varchar2,
943 p_elig_anthr_pl_flag in varchar2,
944 p_elig_qua_in_gr_flag in varchar2,
945 p_elig_perf_rtng_flag in varchar2,
946 p_elig_crit_values_flag in varchar2, /* RBC */
947 p_object_version_number out nocopy number,
948 p_effective_date in date
949 ) is
950 --
951 l_rec ben_elp_shd.g_rec_type;
952 l_proc varchar2(72) := g_package||'ins';
953 --
954 Begin
955 hr_utility.set_location('Entering:'||l_proc, 5);
956 --
957 -- Call conversion function to turn arguments into the
958 -- p_rec structure.
959 --
960 l_rec :=
961 ben_elp_shd.convert_args
962 (
963 null,
964 null,
965 null,
966 p_name,
967 p_description,
968 p_stat_cd,
969 p_asmt_to_use_cd,
970 p_elig_enrld_plip_flag,
971 p_elig_cbr_quald_bnf_flag,
972 p_elig_enrld_ptip_flag,
973 p_elig_dpnt_cvrd_plip_flag,
974 p_elig_dpnt_cvrd_ptip_flag,
975 p_elig_dpnt_cvrd_pgm_flag,
976 p_elig_job_flag,
977 p_elig_hrly_slrd_flag,
978 p_elig_pstl_cd_flag,
979 p_elig_lbr_mmbr_flag,
980 p_elig_lgl_enty_flag,
981 p_elig_benfts_grp_flag,
982 p_elig_wk_loc_flag,
983 p_elig_brgng_unit_flag,
984 p_elig_age_flag,
985 p_elig_los_flag,
986 p_elig_per_typ_flag,
987 p_elig_fl_tm_pt_tm_flag,
988 p_elig_ee_stat_flag,
989 p_elig_grd_flag,
990 p_elig_pct_fl_tm_flag,
991 p_elig_asnt_set_flag,
992 p_elig_hrs_wkd_flag,
993 p_elig_comp_lvl_flag,
994 p_elig_org_unit_flag,
995 p_elig_loa_rsn_flag,
996 p_elig_pyrl_flag,
997 p_elig_schedd_hrs_flag,
998 p_elig_py_bss_flag,
999 p_eligy_prfl_rl_flag,
1000 p_elig_cmbn_age_los_flag,
1001 p_cntng_prtn_elig_prfl_flag,
1002 p_elig_prtt_pl_flag,
1003 p_elig_ppl_grp_flag,
1004 p_elig_svc_area_flag,
1005 p_elig_ptip_prte_flag,
1006 p_elig_no_othr_cvg_flag,
1007 p_elig_enrld_pl_flag,
1008 p_elig_enrld_oipl_flag,
1009 p_elig_enrld_pgm_flag,
1010 p_elig_dpnt_cvrd_pl_flag,
1011 p_elig_lvg_rsn_flag,
1012 p_elig_optd_mdcr_flag,
1013 p_elig_tbco_use_flag,
1014 p_elig_dpnt_othr_ptip_flag,
1015 p_business_group_id,
1016 p_elp_attribute_category,
1017 p_elp_attribute1,
1018 p_elp_attribute2,
1019 p_elp_attribute3,
1020 p_elp_attribute4,
1021 p_elp_attribute5,
1022 p_elp_attribute6,
1023 p_elp_attribute7,
1024 p_elp_attribute8,
1025 p_elp_attribute9,
1026 p_elp_attribute10,
1027 p_elp_attribute11,
1028 p_elp_attribute12,
1029 p_elp_attribute13,
1030 p_elp_attribute14,
1031 p_elp_attribute15,
1032 p_elp_attribute16,
1033 p_elp_attribute17,
1034 p_elp_attribute18,
1035 p_elp_attribute19,
1036 p_elp_attribute20,
1037 p_elp_attribute21,
1038 p_elp_attribute22,
1039 p_elp_attribute23,
1040 p_elp_attribute24,
1041 p_elp_attribute25,
1042 p_elp_attribute26,
1043 p_elp_attribute27,
1044 p_elp_attribute28,
1045 p_elp_attribute29,
1046 p_elp_attribute30,
1047 p_elig_mrtl_sts_flag ,
1048 p_elig_gndr_flag,
1049 p_elig_dsblty_ctg_flag,
1050 p_elig_dsblty_rsn_flag ,
1051 p_elig_dsblty_dgr_flag ,
1052 p_elig_suppl_role_flag,
1053 p_elig_qual_titl_flag ,
1054 p_elig_pstn_flag ,
1055 p_elig_prbtn_perd_flag ,
1056 p_elig_sp_clng_prg_pt_flag ,
1057 p_bnft_cagr_prtn_cd ,
1058 p_elig_dsbld_flag ,
1059 p_elig_ttl_cvg_vol_flag ,
1060 p_elig_ttl_prtt_flag ,
1061 p_elig_comptncy_flag ,
1062 p_elig_hlth_cvg_flag,
1063 p_elig_anthr_pl_flag,
1064 p_elig_qua_in_gr_flag,
1065 p_elig_perf_rtng_flag,
1066 p_elig_crit_values_flag, /* RBC */
1067 null
1068 );
1069 --
1070 -- Having converted the arguments into the ben_elp_rec
1071 -- plsql record structure we call the corresponding record
1072 -- business process.
1073 --
1074 ins(l_rec, p_effective_date);
1075 --
1076 -- Set the OUT arguments.
1077 --
1078 p_eligy_prfl_id := l_rec.eligy_prfl_id;
1079 p_effective_start_date := l_rec.effective_start_date;
1080 p_effective_end_date := l_rec.effective_end_date;
1081 p_object_version_number := l_rec.object_version_number;
1082 --
1083 --
1084 hr_utility.set_location(' Leaving:'||l_proc, 10);
1085 End ins;
1086 --
1087 end ben_elp_ins;