[Home] [Help]
PACKAGE BODY: APPS.BEN_PEP_BUS
Source
1 Package Body ben_pep_bus as
2 /* $Header: bepeprhi.pkb 120.0 2005/05/28 10:39:57 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pep_bus.'; -- Global package name
9 --
10 -- ---------------------------------------------------------------------------
11 -- |------------------------- <return_legislation_code>-----------------------|
12 -- ---------------------------------------------------------------------------
13 --
14 function return_legislation_code
15 (p_elig_per_id in number) return varchar2 is
16 --
17 --Declare cursor
18 --
19 cursor csr_leg_code is
20 select a.legislation_code
21 from per_business_groups a,
22 ben_elig_per_f b
23 where b.elig_per_id = p_elig_per_id
24 and a.business_group_id = b.business_group_id;
25 --
26 -- Declare local variables
27 --
28 l_legislation_code varchar2(150);
29 l_proc varchar2(72) := g_package||'return_legislation_code';
30 --
31 begin
32 --
33 hr_utility.set_location('Entering: '||l_proc, 10);
34 --
35 --Ensure that all the mandatory parameters are not null
36 --
37 hr_api.mandatory_arg_error(p_api_name => l_proc,
38 p_argument => 'elig_per_id',
39 p_argument_value => p_elig_per_id);
40 --
41 open csr_leg_code;
42 --
43 fetch csr_leg_code into l_legislation_code;
44 --
45 if csr_leg_code%notfound then
46 --
47 close csr_leg_code;
48 --
49 --The primary key is invalid therefore we must error
50 --
51 hr_utility.set_message (801, 'HR_7220_INVALID_PRIMARY_KEY');
52 fnd_message.raise_error;
53 --
54 end if;
55 --
56 close csr_leg_code;
57 --
58 hr_utility.set_location('Leaving :'||l_proc,20);
59 --
60 return l_legislation_code;
61 --
62 end return_legislation_code;
63 -- ----------------------------------------------------------------------------
64 -- |--------------------------<chk_elig_per_id>-------------------------------|
65 -- ---------------------------------------------------------------------------
66 --
67 -- Description
68 -- This procedure is used to check that the primary key for the table
69 -- is created properly. It should be null on insert and
70 -- should not be able to be updated.
71 --
72 -- Pre Conditions
73 --
74 -- None.
75 --
76 -- In Parameters
77 -- elig_per_id PK of record being inserted or updated
78 -- effective_date Effective Date of Session
79 -- object_version_number Object version number of record being
80 -- inserted or updated.
81 --
82 -- Post Success
83 -- Processing continues
84 --
85 -- Post Failure
86 -- Errors handled by the procedure.
87 --
88 -- Access Status
89 -- Internal table handler use only.
90 --
91 Procedure chk_elig_per_id (p_elig_per_id in number,
92 p_effective_date in date,
93 p_object_version_number in number) is
94 --
95 l_proc varchar2(72) := g_package||'chk_elig_per_id';
96 l_api_updating boolean;
97 --
98 Begin
99 --
100 hr_utility.set_location('Entering: '||l_proc,5);
101 --
102 l_api_updating := ben_pep_shd.api_updating
103 (p_effective_date => p_effective_date,
104 p_elig_per_id => p_elig_per_id,
105 p_object_version_number => p_object_version_number);
106 --
107 if (l_api_updating
108 and nvl(p_elig_per_id, hr_api.g_number)
109 <> ben_pep_shd.g_old_rec.elig_per_id) then
110 --
111 -- raise error as PK as changed
112 --
113 ben_pep_shd.constraint_error('BEN_ELIG_PER_F_PK');
114 --
115 elsif not l_api_updating then
116 --
117 --check if PK is null
118 --
119 if p_elig_per_id is not null then
120 --
121 -- raise error as PK is not null
122 --
123 ben_pep_shd.constraint_error('BEN_ELIG_PER_F_PK');
124 --
125 end if;
126 --
127 end if;
128 --
129 hr_utility.set_location('Leaving: '||l_proc,10);
130 --
131 end chk_elig_per_id;
132 --
133 -- ---------------------------------------------------------------------------
134 -- |--------------------------<chk_comp_ref_uom>------------------------------|
135 -- ---------------------------------------------------------------------------
136 --
137 -- Description:
138 -- This procedure checks that a referenced foreign key actually exists
139 -- in the referenced table.
140 --
141 -- Pre Conditions
142 -- None.
143 --
144 -- In Parameters
145 -- p_elig_per_id PK
146 -- p_comp_ref_uom ID of FK column
147 -- p_effective_date Session Date of record
148 -- p_object_version_number object version number
149 --
150 -- Post Success
151 -- Processing continues
152 --
153 -- Post Failure
154 -- Error raised
155 --
156 -- Access Status
157 -- Internal table handler use only.
158 --
159 Procedure chk_comp_ref_uom (p_elig_per_id in number,
160 p_comp_ref_val in number,
161 p_comp_ref_uom in varchar2,
162 p_rt_comp_ref_val in number,
163 p_rt_comp_ref_uom in varchar2,
164 p_effective_date in date,
165 p_object_version_number in number) is
166 --
167 l_proc varchar2(72) := g_package||'chk_comp_ref_uom';
168 l_api_updating boolean;
169 l_dummy varchar2(1);
170 --
171 cursor c1 is
172 select null
173 from fnd_currencies_vl a
174 where a.currency_code = p_comp_ref_uom;
175 --
176 cursor c2 is
177 select null
178 from fnd_currencies_vl a
179 where a.currency_code = p_rt_comp_ref_uom;
180 --
181 begin
182 --
183 hr_utility.set_location('Entering :'||l_proc,5);
184 --
185 if (p_comp_ref_val is null and p_comp_ref_uom is not null) or
186 (p_comp_ref_uom is null and p_comp_ref_val is not null) then
187 --
188 fnd_message.set_name('BEN','BEN_91277_ELIG_PER_PRD_FLD_CMP');
189 fnd_message.raise_error;
190 --
191 end if;
192 --
193 if (p_rt_comp_ref_val is null and p_rt_comp_ref_uom is not null) or
194 (p_rt_comp_ref_uom is null and p_rt_comp_ref_val is not null) then
195 --
196 fnd_message.set_name('BEN','BEN_91277_ELIG_PER_PRD_FLD_CMP');
197 fnd_message.raise_error;
198 --
199 end if;
200 --
201 l_api_updating:= ben_pep_shd.api_updating
202 (p_elig_per_id => p_elig_per_id,
203 p_effective_date => p_effective_date,
204 p_object_version_number => p_object_version_number);
205 --
206 if (l_api_updating
207 and p_comp_ref_uom
208 <> nvl(ben_pep_shd.g_old_rec.comp_ref_uom,hr_api.g_varchar2)
209 or not l_api_updating) and p_comp_ref_uom IS NOT NULL then
210 --
211 -- check if comp_ref_uom value exists in hr_lookups table
212 --
213 open c1;
214 --
215 fetch c1 into l_dummy;
216 if c1%notfound then
217 --
218 close c1;
219 --
220 --raise error as FK does not relate to PK in hr_lookups
221 --table.
222 --
223 ben_pep_shd.constraint_error('BEN_ELIG_PER_HL1');
224 --
225 end if;
226 --
227 close c1;
228 --
229 end if;
230 --
231 if (l_api_updating
232 and p_rt_comp_ref_uom
233 <> nvl(ben_pep_shd.g_old_rec.rt_comp_ref_uom,hr_api.g_varchar2)
234 or not l_api_updating) and p_rt_comp_ref_uom IS NOT NULL then
235 --
236 -- check if rt_comp_ref_uom value exists in hr_lookups table
237 --
238 open c2;
239 --
240 fetch c2 into l_dummy;
241 if c2%notfound then
242 --
243 close c2;
244 --
245 --raise error as FK does not relate to PK in hr_lookups
246 --table.
247 --
248 ben_pep_shd.constraint_error('BEN_ELIG_PER_HL1');
249 --
250 end if;
251 --
252 close c2;
253 --
254 end if;
255 --
256 hr_utility.set_location('Leaving :'||l_proc,10);
257 --
258 end chk_comp_ref_uom;
259 --
260 -- ---------------------------------------------------------------------------
261 -- |--------------------------<chk_at_least_one_fk_set>----------------------|
262 -- ---------------------------------------------------------------------------
263 --
264 -- Description:
265 -- This procedure checks that either the plan
266 -- plan and program
267 -- plan type in program
268 -- plan in program
269 -- is populated.
270 --
271 -- Pre Conditions
272 -- None.
273 --
274 -- In Parameters
275 -- p_pl_id ID of FK column
276 -- p_pgm_id ID of FK column
277 -- p_plip_id ID of FK column
278 -- p_ptip_id ID of FK column
279 --
280 -- Post Success
281 -- Processing continues
282 --
283 -- Post Failure
284 -- Error raised
285 --
286 -- Access Status
287 -- Internal table handler use only.
288 --
289 Procedure chk_at_least_one_fk_set(p_pl_id in number,
290 p_pgm_id in number,
291 p_plip_id in number,
292 p_ptip_id in number,
293 p_effective_date in date,
294 p_business_group_id in number) is
295 --
296 l_proc varchar2(72) := g_package||'chk_at_least_one_fk_set';
297 l_api_updating boolean;
298 l_dummy varchar2(1);
299 --
300 cursor c1 is
301 select pgm_id
302 from ben_plip_f plip
303 where plip.pl_id = p_pl_id
304 and business_group_id + 0 = p_business_group_id
305 and p_effective_date
306 between plip.effective_start_date
307 and plip.effective_end_date;
308 --
309 l_pgm_id ben_pgm_f.pgm_id%type;
310 --
311 begin
312 --
313 hr_utility.set_location('Entering :'||l_proc,5);
314 --
315 if p_pl_id is null and
316 p_pgm_id is null and
317 p_plip_id is null and
318 p_ptip_id is null then
319 --
320 fnd_message.set_name('BEN','BEN_91312_ELIG_PER_PL_PGM');
321 fnd_message.raise_error;
322 --
323 end if;
324 --
325 open c1;
326 --
327 fetch c1 into l_pgm_id;
328 --
329 if p_pgm_id is null and l_pgm_id is not null then
330 --
331 close c1;
332 fnd_message.set_name('BEN','BEN_92121_PL_IN_PGM');
333 fnd_message.raise_error;
334 --
335 end if;
336 --
337 close c1;
338 --
339 hr_utility.set_location('Leaving :'||l_proc,10);
340 --
341 end chk_at_least_one_fk_set;
342 --
343 -- ---------------------------------------------------------------------------
344 -- |--------------------------<chk_wv_prtn_rsn_cd>---------------------------|
345 -- ---------------------------------------------------------------------------
346 --
347 -- Description:
348 -- This procedure checks that a referenced foreign key actually exists
349 -- in the referenced table.
350 --
351 -- Pre Conditions
352 -- None.
353 --
354 -- In Parameters
355 -- p_elig_per_id PK
356 -- p_wv_prtn_rsn_cd ID of FK column
357 -- p_effective_date Session Date of record
358 -- p_object_version_number object version number
359 --
360 -- Post Success
361 -- Processing continues
362 --
363 -- Post Failure
364 -- Error raised
365 --
366 -- Access Status
367 -- Internal table handler use only.
368 --
369 Procedure chk_wv_prtn_rsn_cd(p_elig_per_id in number,
370 p_pl_wvd_flag in varchar2,
371 p_wv_prtn_rsn_cd in varchar2,
372 p_effective_date in date,
373 p_object_version_number in number) is
374 --
375 l_proc varchar2(72) := g_package||'chk_wv_prtn_rsn_cd';
376 l_api_updating boolean;
377 --
378 Begin
379 --
380 hr_utility.set_location('Entering:'||l_proc, 5);
381 --
382 if (p_pl_wvd_flag = 'N' and p_wv_prtn_rsn_cd is not null) then
383 --
384 fnd_message.set_name('BEN','BEN_91280_ELIG_PER_PRD_FLD_WV');
385 fnd_message.raise_error;
386 --
387 end if;
388 --
389 l_api_updating := ben_pep_shd.api_updating
390 (p_elig_per_id => p_elig_per_id,
391 p_effective_date => p_effective_date,
392 p_object_version_number => p_object_version_number);
393 --
394 if (l_api_updating
395 and nvl(p_wv_prtn_rsn_cd,hr_api.g_varchar2)
396 <> nvl(ben_pep_shd.g_old_rec.wv_prtn_rsn_cd,hr_api.g_varchar2)
397 or not l_api_updating) and p_wv_prtn_rsn_cd IS NOT NULL then
398 --
399 -- check if value of lookup falls within lookup type.
400 --
401 if hr_api.not_exists_in_hr_lookups
402 (p_lookup_type => 'BEN_WV_PRTN_RSN',
403 p_lookup_code => p_wv_prtn_rsn_cd,
404 p_effective_date => p_effective_date) then
405 --
406 -- raise error as does not exist as lookup
407 --
408 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
409 fnd_message.set_token('FIELD','p_wv_prtn_rsn_cd');
410 fnd_message.set_token('TYPE','BEN_WV_PRTN_RSN');
411 fnd_message.raise_error;
412 --
413 end if;
414 --
415 end if;
416 --
417 hr_utility.set_location('Leaving:'||l_proc,10);
418 --
419 end chk_wv_prtn_rsn_cd;
420 --
421 -- ---------------------------------------------------------------------------
422 -- |-------------------<chk_hrs_wkd_bndry_perd_cd>---------------------------|
423 -- ---------------------------------------------------------------------------
424 --
425 -- Description:
426 -- This procedure checks that a referenced foreign key actually exists
427 -- in the referenced table.
428 --
429 -- Pre Conditions
430 -- None.
431 --
432 -- In Parameters
433 -- p_elig_per_id PK
434 -- p_wv_prtn_rsn_cd ID of FK column
435 -- p_effective_date Session Date of record
436 -- p_object_version_number object version number
437 --
438 -- Post Success
439 -- Processing continues
440 --
441 -- Post Failure
442 -- Error raised
443 --
444 -- Access Status
445 -- Internal table handler use only.
446 --
447 Procedure chk_hrs_wkd_bndry_perd_cd (p_elig_per_id in number,
448 p_hrs_wkd_bndry_perd_cd in varchar2,
449 p_rt_hrs_wkd_bndry_perd_cd in varchar2,
450 p_effective_date in date,
451 p_object_version_number in number) is
452 --
453 l_proc varchar2(72) := g_package||'chk_hrs_wkd_bndry_perd_cd';
454 l_api_updating boolean;
455 --
456 Begin
457 --
458 hr_utility.set_location('Entering:'||l_proc, 5);
459 --
460 l_api_updating := ben_pep_shd.api_updating
461 (p_elig_per_id => p_elig_per_id,
465 if (l_api_updating
462 p_effective_date => p_effective_date,
463 p_object_version_number => p_object_version_number);
464 --
466 and nvl(p_hrs_wkd_bndry_perd_cd,hr_api.g_varchar2)
467 <> nvl(ben_pep_shd.g_old_rec.hrs_wkd_bndry_perd_cd,hr_api.g_varchar2)
468 or not l_api_updating) and p_hrs_wkd_bndry_perd_cd IS NOT NULL then
469 --
470 -- check if value of lookup falls within lookup type.
471 --
472 --
473 if hr_api.not_exists_in_hr_lookups
474 (p_lookup_type => 'BEN_BNDRY_PERD',
475 p_lookup_code => p_hrs_wkd_bndry_perd_cd,
476 p_effective_date => p_effective_date) then
477 --
478 -- raise error as does not exist as lookup
479 --
480 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
481 fnd_message.set_token('FIELD','p_hrs_wkd_bndry_perd_cd');
482 fnd_message.set_token('TYPE','BEN_BNDRY_PERD');
483 fnd_message.raise_error;
484 --
485 end if;
486 --
487 end if;
488 --
489 if (l_api_updating
490 and nvl(p_rt_hrs_wkd_bndry_perd_cd,hr_api.g_varchar2)
491 <> nvl(ben_pep_shd.g_old_rec.rt_hrs_wkd_bndry_perd_cd,hr_api.g_varchar2)
492 or not l_api_updating) and p_rt_hrs_wkd_bndry_perd_cd IS NOT NULL then
493 --
494 -- check if value of lookup falls within lookup type.
495 --
496 --
497 if hr_api.not_exists_in_hr_lookups
498 (p_lookup_type => 'BEN_BNDRY_PERD',
499 p_lookup_code => p_rt_hrs_wkd_bndry_perd_cd,
500 p_effective_date => p_effective_date) then
501 --
502 -- raise error as does not exist as lookup
503 --
504 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
505 fnd_message.set_token('FIELD','p_rt_hrs_wkd_bndry_perd_cd');
506 fnd_message.set_token('TYPE','BEN_BNDRY_PERD');
507 fnd_message.raise_error;
508 --
509 end if;
510 --
511 end if;
512 --
513 hr_utility.set_location('Leaving:'||l_proc,10);
514 --
515 end chk_hrs_wkd_bndry_perd_cd;
516 --
517 -- ---------------------------------------------------------------------------
518 -- |---------------------------------<chk_pct_val>---------------------------|
519 -- ---------------------------------------------------------------------------
520 --
521 -- Description:
522 -- This procedure checks that a percentage value is between 0 and 100
523 --
524 -- Pre Conditions
525 -- None.
526 --
527 -- In Parameters
528 -- p_pct_val percentage value to be checked
529 --
530 -- Post Success
531 -- Processing continues
532 --
533 -- Post Failure
534 -- Error raised
535 --
536 -- Access Status
537 -- Internal table handler use only.
538 --
539 Procedure chk_pct_val (p_pct_val in number,
540 p_rt_pct_val in number) is
541 --
542 l_proc varchar2(72) := g_package||'chk_chk_pct_val';
543 l_api_updating boolean;
544 --
545 Begin
546 --
547 hr_utility.set_location('Entering:'||l_proc, 5);
548 --
549 if (p_pct_val IS NOT NULL and (p_pct_val < 0 OR p_pct_val > 100)) then
550 --
551 fnd_message.set_name('BEN','BEN_91257_INV_PCT_VAL');
552 fnd_message.raise_error;
553 --
554 end if;
555 --
556 if (p_rt_pct_val IS NOT NULL and (p_rt_pct_val < 0 OR p_rt_pct_val > 100)) then
557 --
558 fnd_message.set_name('BEN','BEN_91257_INV_PCT_VAL');
559 fnd_message.raise_error;
560 --
561 end if;
562 --
563 hr_utility.set_location('Leaving:'||l_proc,10);
564 --
565 end chk_pct_val;
566 -- ---------------------------------------------------------------------------
567 -- |--------------------------<chk_wv_ctfn_typ_cd>---------------------------|
568 -- ---------------------------------------------------------------------------
569 --
570 -- Description:
571 -- This procedure checks that a referenced foreign key actually exists
572 -- in the referenced table.
573 --
574 -- Pre Conditions
575 -- None.
576 --
577 -- In Parameters
578 -- p_elig_per_id PK
579 -- p_wv_ctfn_typ_cd ID of FK column
580 -- p_effective_date Session Date of record
581 -- p_object_version_number object version number
582 --
583 -- Post Success
584 -- Processing continues
585 --
586 -- Post Failure
587 -- Error raised
588 --
589 -- Access Status
590 -- Internal table handler use only.
591 --
592 Procedure chk_wv_ctfn_typ_cd (p_elig_per_id in number,
593 p_pl_wvd_flag in varchar2,
594 p_wv_ctfn_typ_cd in varchar2,
595 p_effective_date in date,
596 p_object_version_number in number) is
597 --
598 l_proc varchar2(72) := g_package||'chk_wv_ctfn_typ_cd';
599 l_api_updating boolean;
600 --
601 Begin
602 --
603 hr_utility.set_location('Entering:'||l_proc, 5);
604 --
605 if (p_pl_wvd_flag = 'N' and p_wv_ctfn_typ_cd is not null) then
606 fnd_message.set_name('BEN','BEN_91280_ELIG_PER_PRD_FLD_WV');
607 fnd_message.raise_error;
608 end if;
609 --
613 p_object_version_number => p_object_version_number);
610 l_api_updating := ben_pep_shd.api_updating
611 (p_elig_per_id => p_elig_per_id,
612 p_effective_date => p_effective_date,
614 --
615 if (l_api_updating
616 and p_wv_ctfn_typ_cd
617 <> nvl(ben_pep_shd.g_old_rec.wv_ctfn_typ_cd,hr_api.g_varchar2)
618 or not l_api_updating) and p_wv_ctfn_typ_cd IS NOT NULL then
619 --
620 -- check if value of lookup falls within lookup type.
621 --
622 --
623 if hr_api.not_exists_in_hr_lookups
624 (p_lookup_type => 'BEN_WV_PRTN_CTFN_TYP',
625 p_lookup_code => p_wv_ctfn_typ_cd,
626 p_effective_date => p_effective_date) then
627 --
628 -- raise error as does not exist as lookup
629 --
630 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
631 fnd_message.set_token('FIELD','p_wv_ctfn_typ_cd');
632 fnd_message.set_token('TYPE','BEN_WV_PRTN_CTFN_TYP');
633 fnd_message.raise_error;
634 --
635 end if;
636 --
637 end if;
638 --
639 hr_utility.set_location('Leaving:'||l_proc,10);
640 --
641 end chk_wv_ctfn_typ_cd;
642 --
643 -- ---------------------------------------------------------------------------
644 -- |--------------------------<chk_prtn_ovridn_rsn_cd>-----------------------|
645 -- ---------------------------------------------------------------------------
646 --
647 -- Description:
648 -- This procedure checks that a referenced foreign key actually exists
649 -- in the referenced table.
650 --
651 -- Pre Conditions
652 -- None.
653 --
654 -- In Parameters
655 -- p_elig_per_id PK
656 -- p_prtn_ovridn_rsn_cd ID of FK column
657 -- p_effective_date Session Date of record
658 -- p_object_version_number object version number
659 --
660 -- Post Success
661 -- Processing continues
662 --
663 -- Post Failure
664 -- Error raised
665 --
666 -- Access Status
667 -- Internal table handler use only.
668 --
669 Procedure chk_prtn_ovridn_rsn_cd (p_elig_per_id in number,
670 p_prtn_ovridn_thru_dt in date,
671 p_prtn_ovridn_flag in varchar2,
672 p_prtn_ovridn_rsn_cd in varchar2,
673 p_effective_date in date,
674 p_object_version_number in number) is
675 --
676 l_proc varchar2(72) := g_package||'chk_prtn_ovridn_rsn_cd';
677 l_api_updating boolean;
678 --
679 Begin
680 --
681 hr_utility.set_location('Entering:'||l_proc, 5);
682 --
683 /*if (p_prtn_ovridn_flag = 'N' and p_prtn_ovridn_rsn_cd is not null) or
684 (p_prtn_ovridn_flag = 'N' and p_prtn_ovridn_thru_dt is not null) then
685 fnd_message.set_name('BEN','BEN_91279_ELIG_PER_PRD_FLD_OVR');
686 fnd_message.raise_error;
687 end if;*/
688 --
689 l_api_updating := ben_pep_shd.api_updating
690 (p_elig_per_id => p_elig_per_id,
691 p_effective_date => p_effective_date,
692 p_object_version_number => p_object_version_number);
693 --
694 if (l_api_updating
695 and p_prtn_ovridn_rsn_cd
696 <> nvl(ben_pep_shd.g_old_rec.prtn_ovridn_rsn_cd,hr_api.g_varchar2)
697 or not l_api_updating) and p_prtn_ovridn_rsn_cd IS NOT NULL then
698 --
699 -- check if value of lookup falls within lookup type.
700 --
701 if hr_api.not_exists_in_hr_lookups
702 (p_lookup_type => 'BEN_OVRID_RSN',
703 p_lookup_code => p_prtn_ovridn_rsn_cd,
704 p_effective_date => p_effective_date) then
705 --
706 -- raise error as does not exist as lookup
707 --
708 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
709 fnd_message.set_token('FIELD','p_prtn_ovridn_rsn_cd');
710 fnd_message.set_token('TYPE','BEN_OVRID_RSN');
711 fnd_message.raise_error;
712 --
713 end if;
714 --
715 end if;
716 --
717 hr_utility.set_location('Leaving:'||l_proc,10);
718 --
719 end chk_prtn_ovridn_rsn_cd;
720 --
721 -- ---------------------------------------------------------------------------
722 -- |--------------------------<chk_age_uom>----------------------------------|
723 -- ---------------------------------------------------------------------------
724 --
725 -- Description:
726 -- This procedure checks that a referenced foreign key actually exists
727 -- in the referenced table.
728 --
729 -- Pre Conditions
730 -- None.
731 --
732 -- In Parameters
733 -- p_elig_per_id PK
734 -- p_age_uom ID of FK column
735 -- p_effective_date Session Date of record
736 -- p_object_version_number object version number
737 --
738 -- Post Success
739 -- Processing continues
740 --
741 -- Post Failure
742 -- Error raised
743 --
744 -- Access Status
745 -- Internal table handler use only.
746 --
747 Procedure chk_age_uom (p_elig_per_id in number,
748 p_age_val in number,
749 p_age_uom in varchar2,
753 p_object_version_number in number) is
750 p_rt_age_val in number,
751 p_rt_age_uom in varchar2,
752 p_effective_date in date,
754 --
755 l_proc varchar2(72) := g_package||'chk_age_uom';
756 l_api_updating boolean;
757 --
758 Begin
759 --
760 hr_utility.set_location('Entering:'||l_proc, 5);
761 --
762 if (p_age_val is null and p_age_uom is not null) or
763 (p_age_uom is null and p_age_val is not null) then
764 --
765 fnd_message.set_name('BEN','BEN_91276_ELIG_PER_PRD_FLD_AGE');
766 fnd_message.raise_error;
767 --
768 end if;
769 --
770 if (p_rt_age_val is null and p_rt_age_uom is not null) or
771 (p_rt_age_uom is null and p_rt_age_val is not null) then
772 --
773 fnd_message.set_name('BEN','BEN_91276_ELIG_PER_PRD_FLD_AGE');
774 fnd_message.raise_error;
775 --
776 end if;
777 --
778 l_api_updating := ben_pep_shd.api_updating
779 (p_elig_per_id => p_elig_per_id,
780 p_effective_date => p_effective_date,
781 p_object_version_number => p_object_version_number);
782 --
783 if (l_api_updating
784 and p_age_uom
785 <> nvl(ben_pep_shd.g_old_rec.age_uom,hr_api.g_varchar2)
786 or not l_api_updating) and p_age_uom IS NOT NULL then
787 --
788 -- check if value of lookup falls within lookup type.
789 --
790 if hr_api.not_exists_in_hr_lookups
791 (p_lookup_type => 'BEN_TM_UOM',
792 p_lookup_code => p_age_uom,
793 p_effective_date => p_effective_date) then
794 --
795 -- raise error as does not exist as lookup
796 --
797 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
798 fnd_message.set_token('FIELD','p_age_uom');
799 fnd_message.set_token('TYPE','BEN_TM_UOM');
800 fnd_message.raise_error;
801 --
802 end if;
803 --
804 end if;
805 --
806 if (l_api_updating
807 and p_rt_age_uom
808 <> nvl(ben_pep_shd.g_old_rec.rt_age_uom,hr_api.g_varchar2)
809 or not l_api_updating) and p_rt_age_uom IS NOT NULL then
810 --
811 -- check if value of lookup falls within lookup type.
812 --
813 if hr_api.not_exists_in_hr_lookups
814 (p_lookup_type => 'BEN_TM_UOM',
815 p_lookup_code => p_rt_age_uom,
816 p_effective_date => p_effective_date) then
817 --
818 -- raise error as does not exist as lookup
819 --
820 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
821 fnd_message.set_token('FIELD','p_rt_age_uom');
822 fnd_message.set_token('TYPE','BEN_TM_UOM');
823 fnd_message.raise_error;
824 --
825 end if;
826 --
827 end if;
828 --
829 hr_utility.set_location('Leaving:'||l_proc,10);
830 --
831 end chk_age_uom;
832 --
833 -- ---------------------------------------------------------------------------
834 -- |--------------------------<chk_los_uom>----------------------------------|
835 -- ---------------------------------------------------------------------------
836 --
837 -- Description:
838 -- This procedure checks that a referenced foreign key actually exists
839 -- in the referenced table.
840 --
841 -- Pre Conditions
842 -- None.
843 --
844 -- In Parameters
845 -- p_elig_per_id PK
846 -- p_los_uom ID of FK column
847 -- p_effective_date Session Date of record
848 -- p_object_version_number object version number
849 --
850 -- Post Success
851 -- Processing continues
852 --
853 -- Post Failure
854 -- Error raised
855 --
856 -- Access Status
857 -- Internal table handler use only.
858 --
859 Procedure chk_los_uom (p_elig_per_id in number,
860 p_los_val in number,
861 p_los_uom in varchar2,
862 p_rt_los_val in number,
863 p_rt_los_uom in varchar2,
864 p_effective_date in date,
865 p_object_version_number in number) is
866 --
867 l_proc varchar2(72) := g_package||'chk_los_uom';
868 l_api_updating boolean;
869 --
870 Begin
871 --
872 hr_utility.set_location('Entering:'||l_proc, 5);
873 --
874 if (p_los_val is null and p_los_uom is not null) or
875 (p_los_uom is null and p_los_val is not null) then
876 --
877 fnd_message.set_name('BEN','BEN_91278_ELIG_PER_PRD_FLD_LOS');
878 fnd_message.raise_error;
879 --
880 end if;
881 --
882 if (p_rt_los_val is null and p_rt_los_uom is not null) or
883 (p_rt_los_uom is null and p_rt_los_val is not null) then
884 --
885 fnd_message.set_name('BEN','BEN_91278_ELIG_PER_PRD_FLD_LOS');
886 fnd_message.raise_error;
887 --
888 end if;
889 --
890 l_api_updating := ben_pep_shd.api_updating
891 (p_elig_per_id => p_elig_per_id,
892 p_effective_date => p_effective_date,
896 and p_los_uom
893 p_object_version_number => p_object_version_number);
894 --
895 if (l_api_updating
897 <> nvl(ben_pep_shd.g_old_rec.los_uom,hr_api.g_varchar2)
898 or not l_api_updating) and p_los_uom IS NOT NULL then
899 --
900 -- check if value of lookup falls within lookup type.
901 --
902 if hr_api.not_exists_in_hr_lookups
903 (p_lookup_type => 'BEN_TM_UOM',
904 p_lookup_code => p_los_uom,
905 p_effective_date => p_effective_date) then
906 --
907 -- raise error as does not exist as lookup
908 --
909 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
910 fnd_message.set_token('FIELD','p_los_uom');
911 fnd_message.set_token('TYPE','BEN_TM_UOM');
912 fnd_message.raise_error;
913 --
914 end if;
915 --
916 end if;
917 --
918 if (l_api_updating
919 and p_rt_los_uom
920 <> nvl(ben_pep_shd.g_old_rec.rt_los_uom,hr_api.g_varchar2)
921 or not l_api_updating) and p_rt_los_uom IS NOT NULL then
922 --
923 -- check if value of lookup falls within lookup type.
924 --
925 if hr_api.not_exists_in_hr_lookups
926 (p_lookup_type => 'BEN_TM_UOM',
927 p_lookup_code => p_rt_los_uom,
928 p_effective_date => p_effective_date) then
929 --
930 -- raise error as does not exist as lookup
931 --
932 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
933 fnd_message.set_token('FIELD','p_rt_los_uom');
934 fnd_message.set_token('TYPE','BEN_TM_UOM');
935 fnd_message.raise_error;
936 --
937 end if;
938 --
939 end if;
940 --
941 hr_utility.set_location('Leaving:'||l_proc,10);
942 --
943 end chk_los_uom;
944 --
945 -- ----------------------------------------------------------------------------
946 -- |--------------------------<chk_once_r_cntug_cd>---------------------------|
947 -- ----------------------------------------------------------------------------
948 -- {Start Of Comments}
949 --
950 -- Description:
951 -- This procedure is used to check that the Flags are valid.
952 --
953 -- Pre Conditions
954 -- None.
955 --
956 -- In Parameters
957 -- <primarykey>PK of record being inserted into or updated.
958 -- <code name> Name of the flag column.
959 -- <effective date> effective date
960 -- <object version number> Object version number of record being inserted
961 -- or updated.
962 --
963 -- Post Success
964 -- Process conintues
965 --
966 -- Post Failure
967 -- Error handled by procedure
968 --
969 -- Access Status
970 -- Internal table handler use only.
971 --
972 Procedure chk_once_r_cntug_cd
973 (p_elig_per_id in number,
974 p_once_r_cntug_cd in varchar2,
975 p_effective_date in date,
976 p_object_version_number in number) is
977 --
978 l_proc varchar2(72) := g_package||'chk_once_r_cntug_cd';
979 l_api_updating boolean;
980 --
981 begin
982 --
983 hr_utility.set_location('Entering: '||l_proc,5);
984 --
985 l_api_updating := ben_pep_shd.api_updating
986 (p_elig_per_id => p_elig_per_id,
987 p_effective_date => p_effective_date,
988 p_object_version_number => p_object_version_number);
989 --
990 if (l_api_updating and p_once_r_cntug_cd
991 <> nvl(ben_pep_shd.g_old_rec.once_r_cntug_cd,hr_api.g_varchar2)
992 or not l_api_updating)
993 and p_once_r_cntug_cd is not null then
994 --
995 -- check if value of lookup falls within lookup type.
996 --
997 if hr_api.not_exists_in_hr_lookups
998 (p_lookup_type => 'BEN_ONCE_R_CNTNG',
999 p_lookup_code => p_once_r_cntug_cd,
1000 p_effective_date => p_effective_date) then
1001 --
1002 -- raise error as does not exist as lookup
1003 --
1004 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1005 fnd_message.set_token('FIELD','p_once_r_cntug_cd');
1006 fnd_message.set_token('TYPE','BEN_ONCE_R_CNTNG');
1007 fnd_message.raise_error;
1008 --
1009 end if;
1010 --
1011 end if;
1012 --
1013 hr_utility.set_location('Leaving: '||l_proc, 10);
1014 --
1015 end chk_once_r_cntug_cd;
1016 -- ----------------------------------------------------------------------------
1017 -- |--------------------------<chk_no_mx_prtn_ovrid_thru_flag>----------------|
1018 -- ---------------------------------------------------------------------------
1019 -- {Start Of Comments}
1020 --
1021 -- Description:
1022 -- This procedure is used to check that the Flags are valid.
1023 --
1024 -- Pre Conditions
1025 -- None.
1026 --
1027 -- In Parameters
1028 -- <primarykey>PK of record being inserted into or updated.
1029 -- <flag name> Name of the flag column.
1030 -- <effective date> effective date
1031 -- <object version number> Object version number of record being inserted
1032 -- or updated.
1033 --
1034 -- Post Success
1035 -- Process conintues
1039 --
1036 --
1037 -- Post Failure
1038 -- Error handled by procedure
1040 -- Access Status
1041 -- Internal table handler use only.
1042 --
1043 Procedure chk_no_mx_prtn_ovrid_thru_flag
1044 (p_elig_per_id in number,
1045 p_no_mx_prtn_ovrid_thru_flag in varchar2,
1046 p_effective_date in date,
1047 p_object_version_number in number) is
1048 --
1049 l_proc varchar2(72) := g_package||'chk_no_mx_prtn_ovrid_thru_flag';
1050 l_api_updating boolean;
1051 --
1052 begin
1053 --
1054 hr_utility.set_location('Entering: '||l_proc,5);
1055 --
1056 l_api_updating := ben_pep_shd.api_updating
1057 (p_elig_per_id => p_elig_per_id,
1058 p_effective_date => p_effective_date,
1059 p_object_version_number => p_object_version_number);
1060 --
1061 if (l_api_updating and p_no_mx_prtn_ovrid_thru_flag
1062 <> nvl(ben_pep_shd.g_old_rec.no_mx_prtn_ovrid_thru_flag,hr_api.g_varchar2)
1063 or not l_api_updating)
1064 and p_no_mx_prtn_ovrid_thru_flag is not null then
1065 --
1066 -- check if value of lookup falls within lookup type.
1067 --
1068 if hr_api.not_exists_in_hr_lookups
1069 (p_lookup_type => 'YES_NO',
1070 p_lookup_code => p_no_mx_prtn_ovrid_thru_flag,
1071 p_effective_date => p_effective_date) then
1072 --
1073 -- raise error as does not exist as lookup
1074 --
1075 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1076 fnd_message.set_token('FIELD','p_no_mx_prtn_ovrid_thru_flag');
1077 fnd_message.set_token('TYPE','YES_NO');
1078 fnd_message.raise_error;
1079 --
1080 end if;
1081 --
1082 end if;
1083 --
1084 hr_utility.set_location('Leaving: '||l_proc, 10);
1085 --
1086 end chk_no_mx_prtn_ovrid_thru_flag;
1087 --
1088 -- ---------------------------------------------------------------------------
1089 -- |--------------------------<chk_frz_comb_age_and_los_flag>----------------|
1090 -- ---------------------------------------------------------------------------
1091 -- {Start Of Comments}
1092 --
1093 -- Description:
1094 -- This procedure is used to check that the Flags are valid.
1095 --
1096 -- Pre Conditions
1097 -- None.
1098 --
1099 -- In Parameters
1100 -- <primarykey>PK of record being inserted into or updated.
1101 -- <flag name> Name of the flag column.
1102 -- <effective date> effective date
1103 -- <object version number> Object version number of record being inserted
1104 -- or updated.
1105 --
1106 -- Post Success
1107 -- Process conintues
1108 --
1109 -- Post Failure
1110 -- Error handled by procedure
1111 --
1112 -- Access Status
1113 -- Internal table handler use only.
1114 --
1115 Procedure chk_frz_comb_age_and_los_flag
1116 (p_elig_per_id in number,
1117 p_frz_comb_age_and_los_flag in varchar2,
1118 p_rt_frz_comb_age_and_los_flag in varchar2,
1119 p_effective_date in date,
1120 p_object_version_number in number) is
1121 --
1122 l_proc varchar2(72) := g_package||'chk_frz_comb_age_and_los_flag';
1123 l_api_updating boolean;
1124 --
1125 begin
1126 --
1127 /*
1128 hr_utility.set_location('Entering: '||l_proc,5);
1129 */
1130 --
1131 l_api_updating := ben_pep_shd.api_updating
1132 (p_elig_per_id => p_elig_per_id,
1133 p_effective_date => p_effective_date,
1134 p_object_version_number => p_object_version_number);
1135 --
1136 if (l_api_updating and p_frz_comb_age_and_los_flag
1137 <> nvl(ben_pep_shd.g_old_rec.frz_comb_age_and_los_flag,hr_api.g_varchar2)
1138 or not l_api_updating)
1139 and p_frz_comb_age_and_los_flag is not null then
1140 --
1141 -- check if value of lookup falls within lookup type.
1142 --
1143 /*
1144 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1145 */
1146 if hr_api.not_exists_in_hr_lookups
1147 (p_lookup_type => 'YES_NO',
1148 p_lookup_code => p_frz_comb_age_and_los_flag,
1149 p_effective_date => p_effective_date) then
1150 --
1151 -- raise error as does not exist as lookup
1152 --
1153 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1154 fnd_message.set_token('FIELD','p_frz_comb_age_and_los_flag');
1155 fnd_message.set_token('TYPE','YES_NO');
1156 fnd_message.raise_error;
1157 --
1158 end if;
1159 /*
1160 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1161 */
1162 --
1163 end if;
1164 --
1165 if (l_api_updating and p_rt_frz_comb_age_and_los_flag
1166 <> nvl(ben_pep_shd.g_old_rec.rt_frz_comb_age_and_los_flag,hr_api.g_varchar2)
1167 or not l_api_updating)
1168 and p_rt_frz_comb_age_and_los_flag is not null then
1169 --
1170 -- check if value of lookup falls within lookup type.
1171 --
1172 /*
1173 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1174 */
1175 if hr_api.not_exists_in_hr_lookups
1176 (p_lookup_type => 'YES_NO',
1180 -- raise error as does not exist as lookup
1177 p_lookup_code => p_rt_frz_comb_age_and_los_flag,
1178 p_effective_date => p_effective_date) then
1179 --
1181 --
1182 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1183 fnd_message.set_token('FIELD','p_rt_frz_comb_age_and_los_flag');
1184 fnd_message.set_token('TYPE','YES_NO');
1185 fnd_message.raise_error;
1186 --
1187 end if;
1188 /*
1189 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1190 */
1191 --
1192 end if;
1193 --
1194 /*
1195 hr_utility.set_location('Leaving: '||l_proc, 10);
1196 */
1197 --
1198 end chk_frz_comb_age_and_los_flag;
1199 --
1200 -- ----------------------------------------------------------------------------
1201 -- |--------------------------<chk_dpnt_othr_pl_cvrd_rl_flag>----------------|
1202 -- ---------------------------------------------------------------------------
1203 -- {Start Of Comments}
1204 --
1205 -- Description:
1206 -- This procedure is used to check that the Flags are valid.
1207 --
1208 -- Pre Conditions
1209 -- None.
1210 --
1211 -- In Parameters
1212 -- <primarykey>PK of record being inserted into or updated.
1213 -- <flag name> Name of the flag column.
1214 -- <effective date> effective date
1215 -- <object version number> Object version number of record being inserted
1216 -- or updated.
1217 --
1218 -- Post Success
1219 -- Process conintues
1220 --
1221 -- Post Failure
1222 -- Error handled by procedure
1223 --
1224 -- Access Status
1225 -- Internal table handler use only.
1226 --
1227 Procedure chk_dpnt_othr_pl_cvrd_rl_flag
1228 (p_elig_per_id in number,
1229 p_dpnt_othr_pl_cvrd_rl_flag in varchar2,
1230 p_effective_date in date,
1231 p_object_version_number in number) is
1232 --
1233 l_proc varchar2(72) := g_package||'chk_dpnt_othr_pl_cvrd_rl_flag';
1234 l_api_updating boolean;
1235 l_dummy varchar2(1);
1236 --
1237 Begin
1238 --
1239 /*
1240 hr_utility.set_location('Entering: '||l_proc,5);
1241 */
1242 --
1243 l_api_updating := ben_pep_shd.api_updating
1244 (p_elig_per_id => p_elig_per_id,
1245 p_effective_date => p_effective_date,
1246 p_object_version_number => p_object_version_number);
1247 --
1248 if (l_api_updating and p_dpnt_othr_pl_cvrd_rl_flag
1249 <> nvl(ben_pep_shd.g_old_rec.dpnt_othr_pl_cvrd_rl_flag,hr_api.g_varchar2)
1250 or not l_api_updating)
1251 and p_dpnt_othr_pl_cvrd_rl_flag is not null then
1252 --
1253 -- check if value of lookup falls within lookup type.
1254 --
1255 if hr_api.not_exists_in_hr_lookups
1256 (p_lookup_type => 'YES_NO',
1257 p_lookup_code => p_dpnt_othr_pl_cvrd_rl_flag,
1258 p_effective_date => p_effective_date) then
1259 --
1260 -- raise error as does not exist as lookup
1261 --
1262 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1263 fnd_message.set_token('FIELD','p_dpnt_othr_pl_cvrd_rl_flag');
1264 fnd_message.set_token('TYPE','YES_NO');
1265 fnd_message.raise_error;
1266 --
1267 end if;
1268 --
1269 end if;
1270 --
1271 hr_utility.set_location('Leaving: '||l_proc, 10);
1272 --
1273 end chk_dpnt_othr_pl_cvrd_rl_flag;
1274 --
1275 -- ----------------------------------------------------------------------------
1276 -- |--------------------------<chk_pl_key_ee_flag>---------------------------|
1277 -- ---------------------------------------------------------------------------
1278 -- {Start Of Comments}
1279 --
1280 -- Description:
1281 -- This procedure is used to check that the Flags are valid.
1282 --
1283 -- Pre Conditions
1284 -- None.
1285 --
1286 -- In Parameters
1287 -- <primarykey>PK of record being inserted into or updated.
1288 -- <flag name> Name of the flag column.
1289 -- <effective date> effective date
1290 -- <object version number> Object version number of record being inserted
1291 -- or updated.
1292 --
1293 -- Post Success
1294 -- Process conintues
1295 --
1296 -- Post Failure
1297 -- Error handled by procedure
1298 --
1299 -- Access Status
1300 -- Internal table handler use only.
1301 --
1302 Procedure chk_pl_key_ee_flag(p_elig_per_id in number,
1303 p_pl_key_ee_flag in varchar2,
1304 p_effective_date in date,
1305 p_object_version_number in number) is
1306 --
1307 l_proc varchar2(72) := g_package||'chk_pl_key_ee_flag';
1308 l_api_updating boolean;
1309 l_dummy varchar2(1);
1310 --
1311 Begin
1312 --
1313 hr_utility.set_location('Entering: '||l_proc,5);
1314 --
1315 l_api_updating := ben_pep_shd.api_updating
1316 (p_elig_per_id => p_elig_per_id,
1317 p_effective_date => p_effective_date,
1318 p_object_version_number => p_object_version_number);
1319 --
1320 if (l_api_updating and p_pl_key_ee_flag
1321 <> nvl(ben_pep_shd.g_old_rec.pl_key_ee_flag, hr_api.g_varchar2)
1322 or not l_api_updating)
1323 and p_pl_key_ee_flag is not null then
1327 if hr_api.not_exists_in_hr_lookups
1324 --
1325 -- check if value of lookup falls within lookup type.
1326 --
1328 (p_lookup_type => 'YES_NO',
1329 p_lookup_code => p_pl_key_ee_flag,
1330 p_effective_date => p_effective_date) then
1331 --
1332 -- raise error as does not exist as lookup
1333 --
1334 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1335 fnd_message.set_token('FIELD','p_pl_key_ee_flag');
1336 fnd_message.set_token('TYPE','YES_NO');
1337 fnd_message.raise_error;
1338 --
1339 end if;
1340 --
1341 end if;
1342 --
1343 hr_utility.set_location('Leaving: '||l_proc, 10);
1344 --
1345 end chk_pl_key_ee_flag;
1346 --
1347 -- ----------------------------------------------------------------------------
1348 -- |--------------------------<chk_prtn_ovridn_flag>-------------------------|
1349 -- ---------------------------------------------------------------------------
1350 -- {Start Of Comments}
1351 --
1352 -- Description:
1353 -- This procedure is used to check that the Flags are valid.
1354 --
1355 -- Pre Conditions
1356 -- None.
1357 --
1358 -- In Parameters
1359 -- <primarykey>PK of record being inserted into or updated.
1360 -- <flag name> Name of the flag column.
1361 -- <effective date> effective date
1362 -- <object version number> Object version number of record being inserted
1363 -- or updated.
1364 --
1365 -- Post Success
1366 -- Process conintues
1367 --
1368 -- Post Failure
1369 -- Error handled by procedure
1370 --
1371 -- Access Status
1372 -- Internal table handler use only.
1373 --
1374 Procedure chk_prtn_ovridn_flag(p_elig_per_id in number,
1375 p_prtn_ovridn_flag in varchar2,
1376 p_effective_date in date,
1377 p_object_version_number in number) is
1378 --
1379 l_proc varchar2(72) := g_package||'chk_prtn_ovridn_flag';
1380 l_api_updating boolean;
1381 l_dummy varchar2(1);
1382 --
1383 Begin
1384 --
1385 hr_utility.set_location('Entering: '||l_proc,5);
1386 --
1387 l_api_updating := ben_pep_shd.api_updating
1388 (p_elig_per_id => p_elig_per_id,
1389 p_effective_date => p_effective_date,
1390 p_object_version_number => p_object_version_number);
1391 --
1392 if (l_api_updating and p_prtn_ovridn_flag
1393 <> nvl(ben_pep_shd.g_old_rec.prtn_ovridn_flag,hr_api.g_varchar2)
1394 or not l_api_updating)
1395 and p_prtn_ovridn_flag is not null then
1396 --
1397 -- check if value of lookup falls within lookup type.
1398 --
1399 if hr_api.not_exists_in_hr_lookups
1400 (p_lookup_type => 'YES_NO',
1401 p_lookup_code => p_prtn_ovridn_flag,
1402 p_effective_date => p_effective_date) then
1403 --
1404 -- raise error as does not exist as lookup
1405 --
1406 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1407 fnd_message.set_token('FIELD','p_prtn_ovridn_flag');
1408 fnd_message.set_token('TYPE','YES_NO');
1409 fnd_message.raise_error;
1410 --
1411 end if;
1412 --
1413 end if;
1414 --
1415 hr_utility.set_location('Leaving: '||l_proc, 10);
1416 --
1417 end chk_prtn_ovridn_flag;
1418 --
1419 -- ----------------------------------------------------------------------------
1420 -- |--------------------------<chk_pl_hghly_compd_flag>-----------------------|
1421 -- ---------------------------------------------------------------------------
1422 -- {Start Of Comments}
1423 --
1424 -- Description:
1425 -- This procedure is used to check that the Flags are valid.
1426 --
1427 -- Pre Conditions
1428 -- None.
1429 --
1430 -- In Parameters
1431 -- <primarykey>PK of record being inserted into or updated.
1432 -- <flag name> Name of the flag column.
1433 -- <effective date> effective date
1434 -- <object version number> Object version number of record being inserted
1435 -- or updated.
1436 --
1437 -- Post Success
1438 -- Process conintues
1439 --
1440 -- Post Failure
1441 -- Error handled by procedure
1442 --
1443 -- Access Status
1444 -- Internal table handler use only.
1445 --
1446 Procedure chk_pl_hghly_compd_flag(p_elig_per_id in number,
1447 p_pl_hghly_compd_flag in varchar2,
1448 p_effective_date in date,
1449 p_object_version_number in number) is
1450 --
1451 l_proc varchar2(72) := g_package||'chk_pl_hghly_compd_flag';
1452 l_api_updating boolean;
1453 l_dummy varchar2(1);
1454 --
1455 Begin
1456 --
1457 hr_utility.set_location('Entering: '||l_proc,5);
1458 --
1459 l_api_updating := ben_pep_shd.api_updating
1460 (p_elig_per_id => p_elig_per_id,
1461 p_effective_date => p_effective_date,
1462 p_object_version_number => p_object_version_number);
1463 --
1464 if (l_api_updating and p_pl_hghly_compd_flag
1465 <> nvl(ben_pep_shd.g_old_rec.pl_hghly_compd_flag,hr_api.g_varchar2)
1466 or not l_api_updating)
1470 --
1467 and p_pl_hghly_compd_flag is not null then
1468 --
1469 -- check if value of lookup falls within lookup type.
1471 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1472 if hr_api.not_exists_in_hr_lookups
1473 (p_lookup_type => 'YES_NO',
1474 p_lookup_code => p_pl_hghly_compd_flag,
1475 p_effective_date => p_effective_date) then
1476 --
1477 -- raise error as does not exist as lookup
1478 --
1479 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1480 fnd_message.set_token('FIELD','p_pl_hghly_compd_flag');
1481 fnd_message.set_token('TYPE','YES_NO');
1482 fnd_message.raise_error;
1483 --
1484 end if;
1485 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1486 --
1487 end if;
1488 --
1489 hr_utility.set_location('Leaving: '||l_proc, 10);
1490 --
1491 end chk_pl_hghly_compd_flag;
1492 --
1493 -- ----------------------------------------------------------------------------
1494 -- |--------------------------<chk_frz_los_flag>------------------------------|
1495 -- ---------------------------------------------------------------------------
1496 -- {Start Of Comments}
1497 --
1498 -- Description:
1499 -- This procedure is used to check that the Flags are valid.
1500 --
1501 -- Pre Conditions
1502 -- None.
1503 --
1504 -- In Parameters
1505 -- <primarykey>PK of record being inserted into or updated.
1506 -- <flag name> Name of the flag column.
1507 -- <effective date> effective date
1508 -- <object version number> Object version number of record being inserted
1509 -- or updated.
1510 --
1511 -- Post Success
1512 -- Process conintues
1513 --
1514 -- Post Failure
1515 -- Error handled by procedure
1516 --
1517 -- Access Status
1518 -- Internal table handler use only.
1519 --
1520 Procedure chk_frz_los_flag(p_elig_per_id in number,
1521 p_frz_los_flag in varchar2,
1522 p_rt_frz_los_flag in varchar2,
1523 p_effective_date in date,
1524 p_object_version_number in number) is
1525 --
1526 l_proc varchar2(72) := g_package||'chk_frz_los_flag';
1527 l_api_updating boolean;
1528 l_dummy varchar2(1);
1529 --
1530 Begin
1531 --
1532 /*
1533 hr_utility.set_location('Entering: '||l_proc,5);
1534 */
1535 --
1536 l_api_updating := ben_pep_shd.api_updating
1537 (p_elig_per_id => p_elig_per_id,
1538 p_effective_date => p_effective_date,
1539 p_object_version_number => p_object_version_number);
1540 --
1541 if (l_api_updating and p_frz_los_flag
1542 <> nvl(ben_pep_shd.g_old_rec.frz_los_flag,hr_api.g_varchar2)
1543 or not l_api_updating)
1544 and p_frz_los_flag is not null then
1545 --
1546 -- check if value of lookup falls within lookup type.
1547 --
1548 /*
1549 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1550 */
1551 if hr_api.not_exists_in_hr_lookups
1552 (p_lookup_type => 'YES_NO',
1553 p_lookup_code => p_frz_los_flag,
1554 p_effective_date => p_effective_date) then
1555 --
1556 -- raise error as does not exist as lookup
1557 --
1558 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1559 fnd_message.set_token('FIELD','p_frz_los_flag');
1560 fnd_message.set_token('TYPE','YES_NO');
1561 fnd_message.raise_error;
1562 --
1563 end if;
1564 /*
1565 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1566 */
1567 --
1568 end if;
1569 --
1570 if (l_api_updating and p_rt_frz_los_flag
1571 <> nvl(ben_pep_shd.g_old_rec.rt_frz_los_flag,hr_api.g_varchar2)
1572 or not l_api_updating)
1573 and p_rt_frz_los_flag is not null then
1574 --
1575 -- check if value of lookup falls within lookup type.
1576 --
1577 /*
1578 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1579 */
1580 if hr_api.not_exists_in_hr_lookups
1581 (p_lookup_type => 'YES_NO',
1582 p_lookup_code => p_rt_frz_los_flag,
1583 p_effective_date => p_effective_date) then
1584 --
1585 -- raise error as does not exist as lookup
1586 --
1587 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1588 fnd_message.set_token('FIELD','p_rt_frz_los_flag');
1589 fnd_message.set_token('TYPE','YES_NO');
1590 fnd_message.raise_error;
1591 --
1592 end if;
1593 /*
1594 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1595 */
1596 --
1597 end if;
1598 --
1599 /*
1600 hr_utility.set_location('Leaving: '||l_proc, 10);
1601 */
1602 --
1603 end chk_frz_los_flag;
1604 --
1605 -- ----------------------------------------------------------------------------
1606 -- |--------------------------<chk_frz_age_flag>------------------------------|
1607 -- ---------------------------------------------------------------------------
1608 -- {Start Of Comments}
1609 --
1610 -- Description:
1611 -- This procedure is used to check that the Flags are valid.
1612 --
1616 -- In Parameters
1613 -- Pre Conditions
1614 -- None.
1615 --
1617 -- <primarykey>PK of record being inserted into or updated.
1618 -- <flag name> Name of the flag column.
1619 -- <effective date> effective date
1620 -- <object version number> Object version number of record being inserted
1621 -- or updated.
1622 --
1623 -- Post Success
1624 -- Process conintues
1625 --
1626 -- Post Failure
1627 -- Error handled by procedure
1628 --
1629 -- Access Status
1630 -- Internal table handler use only.
1631 --
1632 Procedure chk_frz_age_flag(p_elig_per_id in number,
1633 p_frz_age_flag in varchar2,
1634 p_rt_frz_age_flag in varchar2,
1635 p_effective_date in date,
1636 p_object_version_number in number) is
1637 --
1638 l_proc varchar2(72) := g_package||'chk_frz_age_flag';
1639 l_api_updating boolean;
1640 l_dummy varchar2(1);
1641 --
1642 Begin
1643 --
1644 /*
1645 hr_utility.set_location('Entering: '||l_proc,5);
1646 */
1647 --
1648 l_api_updating := ben_pep_shd.api_updating
1649 (p_elig_per_id => p_elig_per_id,
1650 p_effective_date => p_effective_date,
1651 p_object_version_number => p_object_version_number);
1652 --
1653 if (l_api_updating and p_frz_age_flag
1654 <> nvl(ben_pep_shd.g_old_rec.frz_age_flag,hr_api.g_varchar2)
1655 or not l_api_updating)
1656 and p_frz_age_flag is not null then
1657 --
1658 -- check if value of lookup falls within lookup type.
1659 --
1660 /*
1661 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1662 */
1663 if hr_api.not_exists_in_hr_lookups
1664 (p_lookup_type => 'YES_NO',
1665 p_lookup_code => p_frz_age_flag,
1666 p_effective_date => p_effective_date) then
1667 --
1668 -- raise error as does not exist as lookup
1669 --
1670 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1671 fnd_message.set_token('FIELD','p_frz_age_flag');
1672 fnd_message.set_token('TYPE','YES_NO');
1673 fnd_message.raise_error;
1674 --
1675 end if;
1676 /*
1677 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1678 */
1679 --
1680 end if;
1681 --
1682 if (l_api_updating and p_rt_frz_age_flag
1683 <> nvl(ben_pep_shd.g_old_rec.rt_frz_age_flag,hr_api.g_varchar2)
1684 or not l_api_updating)
1685 and p_rt_frz_age_flag is not null then
1686 --
1687 -- check if value of lookup falls within lookup type.
1688 --
1689 /*
1690 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1691 */
1692 if hr_api.not_exists_in_hr_lookups
1693 (p_lookup_type => 'YES_NO',
1694 p_lookup_code => p_rt_frz_age_flag,
1695 p_effective_date => p_effective_date) then
1696 --
1697 -- raise error as does not exist as lookup
1698 --
1699 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1700 fnd_message.set_token('FIELD','p_rt_frz_age_flag');
1701 fnd_message.set_token('TYPE','YES_NO');
1702 fnd_message.raise_error;
1703 --
1704 end if;
1705 /*
1706 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1707 */
1708 --
1709 end if;
1710 --
1711 /*
1712 hr_utility.set_location('Leaving: '||l_proc, 10);
1713 */
1714 --
1715 end chk_frz_age_flag;
1716 --
1717 -- ---------------------------------------------------------------------------
1718 -- |---------------------<chk_frz_cmp_lvl_flag>------------------------------|
1719 -- ---------------------------------------------------------------------------
1720 -- {Start Of Comments}
1721 --
1722 -- Description:
1723 -- This procedure is used to check that the Flags are valid.
1724 --
1725 -- Pre Conditions
1726 -- None.
1727 --
1728 -- In Parameters
1729 -- <primarykey>PK of record being inserted into or updated.
1730 -- <flag name> Name of the flag column.
1731 -- <effective date> effective date
1732 -- <object version number> Object version number of record being inserted
1733 -- or updated.
1734 --
1735 -- Post Success
1736 -- Process conintues
1737 --
1738 -- Post Failure
1739 -- Error handled by procedure
1740 --
1741 -- Access Status
1742 -- Internal table handler use only.
1743 --
1744 Procedure chk_frz_cmp_lvl_flag(p_elig_per_id in number,
1745 p_frz_cmp_lvl_flag in varchar2,
1746 p_rt_frz_cmp_lvl_flag in varchar2,
1747 p_effective_date in date,
1748 p_object_version_number in number) is
1749 --
1750 l_proc varchar2(72) := g_package||'chk_frz_cmp_lvl_flag';
1751 l_api_updating boolean;
1752 l_dummy varchar2(1);
1753 --
1754 Begin
1755 --
1756 /*
1757 hr_utility.set_location('Entering: '||l_proc,5);
1758 */
1759 --
1760 l_api_updating := ben_pep_shd.api_updating
1761 (p_elig_per_id => p_elig_per_id,
1762 p_effective_date => p_effective_date,
1763 p_object_version_number => p_object_version_number);
1767 or not l_api_updating)
1764 --
1765 if (l_api_updating and p_frz_cmp_lvl_flag
1766 <> nvl(ben_pep_shd.g_old_rec.frz_cmp_lvl_flag,hr_api.g_varchar2)
1768 and p_frz_cmp_lvl_flag is not null then
1769 --
1770 -- check if value of lookup falls within lookup type.
1771 --
1772 /*
1773 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1774 */
1775 if hr_api.not_exists_in_hr_lookups
1776 (p_lookup_type => 'YES_NO',
1777 p_lookup_code => p_frz_cmp_lvl_flag,
1778 p_effective_date => p_effective_date) then
1779 --
1780 -- raise error as does not exist as lookup
1781 --
1782 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1783 fnd_message.set_token('FIELD','p_frz_cmp_lvl_flag');
1784 fnd_message.set_token('TYPE','YES_NO');
1785 fnd_message.raise_error;
1786 --
1787 end if;
1788 /*
1789 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1790 */
1791 --
1792 end if;
1793 --
1794 if (l_api_updating and p_rt_frz_cmp_lvl_flag
1795 <> nvl(ben_pep_shd.g_old_rec.rt_frz_cmp_lvl_flag,hr_api.g_varchar2)
1796 or not l_api_updating)
1797 and p_rt_frz_cmp_lvl_flag is not null then
1798 --
1799 -- check if value of lookup falls within lookup type.
1800 --
1801 /*
1802 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1803 */
1804 if hr_api.not_exists_in_hr_lookups
1805 (p_lookup_type => 'YES_NO',
1806 p_lookup_code => p_rt_frz_cmp_lvl_flag,
1807 p_effective_date => p_effective_date) then
1808 --
1809 -- raise error as does not exist as lookup
1810 --
1811 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1812 fnd_message.set_token('FIELD','p_rt_frz_cmp_lvl_flag');
1813 fnd_message.set_token('TYPE','YES_NO');
1814 fnd_message.raise_error;
1815 --
1816 end if;
1817 /*
1818 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1819 */
1820 --
1821 end if;
1822 --
1823 /*
1824 hr_utility.set_location('Leaving: '||l_proc, 10);
1825 */
1826 --
1827 end chk_frz_cmp_lvl_flag;
1828 --
1829 -- ---------------------------------------------------------------------------
1830 -- |-------------------<chk_frz_pct_fl_tm_flag>------------------------------|
1831 -- ---------------------------------------------------------------------------
1832 -- {Start Of Comments}
1833 --
1834 -- Description:
1835 -- This procedure is used to check that the Flags are valid.
1836 --
1837 -- Pre Conditions
1838 -- None.
1839 --
1840 -- In Parameters
1841 -- <primarykey>PK of record being inserted into or updated.
1842 -- <flag name> Name of the flag column.
1843 -- <effective date> effective date
1844 -- <object version number> Object version number of record being inserted
1845 -- or updated.
1846 --
1847 -- Post Success
1848 -- Process conintues
1849 --
1850 -- Post Failure
1851 -- Error handled by procedure
1852 --
1853 -- Access Status
1854 -- Internal table handler use only.
1855 --
1856 Procedure chk_frz_pct_fl_tm_flag(p_elig_per_id in number,
1857 p_frz_pct_fl_tm_flag in varchar2,
1858 p_rt_frz_pct_fl_tm_flag in varchar2,
1859 p_effective_date in date,
1860 p_object_version_number in number) is
1861 --
1862 l_proc varchar2(72) := g_package||'chk_frz_pct_fl_tm_flag';
1863 l_api_updating boolean;
1864 l_dummy varchar2(1);
1865 --
1866 Begin
1867 --
1868 /*
1869 hr_utility.set_location('Entering: '||l_proc,5);
1870 */
1871 --
1872 l_api_updating := ben_pep_shd.api_updating
1873 (p_elig_per_id => p_elig_per_id,
1874 p_effective_date => p_effective_date,
1875 p_object_version_number => p_object_version_number);
1876 --
1877 if (l_api_updating and p_frz_pct_fl_tm_flag
1878 <> nvl(ben_pep_shd.g_old_rec.frz_pct_fl_tm_flag,hr_api.g_varchar2)
1879 or not l_api_updating)
1880 and p_frz_pct_fl_tm_flag is not null then
1881 --
1882 -- check if value of lookup falls within lookup type.
1883 --
1884 /*
1885 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1886 */
1887 if hr_api.not_exists_in_hr_lookups
1888 (p_lookup_type => 'YES_NO',
1889 p_lookup_code => p_frz_pct_fl_tm_flag,
1890 p_effective_date => p_effective_date) then
1891 --
1892 -- raise error as does not exist as lookup
1893 --
1894 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1895 fnd_message.set_token('FIELD','p_frz_pct_fl_tm_flag');
1896 fnd_message.set_token('TYPE','YES_NO');
1897 fnd_message.raise_error;
1898 --
1899 end if;
1900 /*
1901 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1902 */
1903 --
1904 end if;
1905 --
1906 if (l_api_updating and p_rt_frz_pct_fl_tm_flag
1907 <> nvl(ben_pep_shd.g_old_rec.rt_frz_pct_fl_tm_flag,hr_api.g_varchar2)
1908 or not l_api_updating)
1909 and p_rt_frz_pct_fl_tm_flag is not null then
1910 --
1914 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1911 -- check if value of lookup falls within lookup type.
1912 --
1913 /*
1915 */
1916 if hr_api.not_exists_in_hr_lookups
1917 (p_lookup_type => 'YES_NO',
1918 p_lookup_code => p_rt_frz_pct_fl_tm_flag,
1919 p_effective_date => p_effective_date) then
1920 --
1921 -- raise error as does not exist as lookup
1922 --
1923 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1924 fnd_message.set_token('FIELD','p_rt_frz_pct_fl_tm_flag');
1925 fnd_message.set_token('TYPE','YES_NO');
1926 fnd_message.raise_error;
1927 --
1928 end if;
1929 /*
1930 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
1931 */
1932 --
1933 end if;
1934 --
1935 /*
1936 hr_utility.set_location('Leaving: '||l_proc, 10);
1937 */
1938 --
1939 end chk_frz_pct_fl_tm_flag;
1940 --
1941 -- ---------------------------------------------------------------------------
1942 -- |---------------------<chk_frz_hrs_wkd_flag>------------------------------|
1943 -- ---------------------------------------------------------------------------
1944 -- {Start Of Comments}
1945 --
1946 -- Description:
1947 -- This procedure is used to check that the Flags are valid.
1948 --
1949 -- Pre Conditions
1950 -- None.
1951 --
1952 -- In Parameters
1953 -- <primarykey>PK of record being inserted into or updated.
1954 -- <flag name> Name of the flag column.
1955 -- <effective date> effective date
1956 -- <object version number> Object version number of record being inserted
1957 -- or updated.
1958 --
1959 -- Post Success
1960 -- Process conintues
1961 --
1962 -- Post Failure
1963 -- Error handled by procedure
1964 --
1965 -- Access Status
1966 -- Internal table handler use only.
1967 --
1968 Procedure chk_frz_hrs_wkd_flag(p_elig_per_id in number,
1969 p_frz_hrs_wkd_flag in varchar2,
1970 p_rt_frz_hrs_wkd_flag in varchar2,
1971 p_effective_date in date,
1972 p_object_version_number in number) is
1973 --
1974 l_proc varchar2(72) := g_package||'chk_frz_hrs_wkd_flag';
1975 l_api_updating boolean;
1976 l_dummy varchar2(1);
1977 --
1978 Begin
1979 --
1980 hr_utility.set_location('Entering: '||l_proc,5);
1981 --
1982 l_api_updating := ben_pep_shd.api_updating
1983 (p_elig_per_id => p_elig_per_id,
1984 p_effective_date => p_effective_date,
1985 p_object_version_number => p_object_version_number);
1986 --
1987 if (l_api_updating and p_frz_hrs_wkd_flag
1988 <> nvl(ben_pep_shd.g_old_rec.frz_hrs_wkd_flag,hr_api.g_varchar2)
1989 or not l_api_updating)
1990 and p_frz_hrs_wkd_flag is not null then
1991 --
1992 -- check if value of lookup falls within lookup type.
1993 --
1994 hr_utility.set_location('HRAPI_NEIHL:'||l_proc, 5);
1995 if hr_api.not_exists_in_hr_lookups
1996 (p_lookup_type => 'YES_NO',
1997 p_lookup_code => p_frz_hrs_wkd_flag,
1998 p_effective_date => p_effective_date) then
1999 --
2000 -- raise error as does not exist as lookup
2001 --
2002 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2003 fnd_message.set_token('FIELD','p_frz_hrs_wkd_flag');
2004 fnd_message.set_token('TYPE','YES_NO');
2005 fnd_message.raise_error;
2006 --
2007 end if;
2008 hr_utility.set_location('Dn HRAPI_NEIHL:'||l_proc, 5);
2009 --
2010 end if;
2011 --
2012 if (l_api_updating and p_rt_frz_hrs_wkd_flag
2013 <> nvl(ben_pep_shd.g_old_rec.rt_frz_hrs_wkd_flag,hr_api.g_varchar2)
2014 or not l_api_updating)
2015 and p_rt_frz_hrs_wkd_flag is not null then
2016 --
2017 -- check if value of lookup falls within lookup type.
2018 --
2019 if hr_api.not_exists_in_hr_lookups
2020 (p_lookup_type => 'YES_NO',
2021 p_lookup_code => p_rt_frz_hrs_wkd_flag,
2022 p_effective_date => p_effective_date) then
2023 --
2024 -- raise error as does not exist as lookup
2025 --
2026 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2027 fnd_message.set_token('FIELD','p_rt_frz_hrs_wkd_flag');
2028 fnd_message.set_token('TYPE','YES_NO');
2029 fnd_message.raise_error;
2030 --
2031 end if;
2032 --
2033 end if;
2034 --
2035 hr_utility.set_location('Leaving: '||l_proc, 10);
2036 --
2037 end chk_frz_hrs_wkd_flag;
2038 --
2039 -- ---------------------------------------------------------------------------
2040 -- |----------------------<chk_dstr_rstcn_flag>------------------------------|
2041 -- ---------------------------------------------------------------------------
2042 -- {Start Of Comments}
2043 --
2044 -- Description:
2045 -- This procedure is used to check that the Flags are valid.
2046 --
2047 -- Pre Conditions
2048 -- None.
2049 --
2050 -- In Parameters
2051 -- <primarykey>PK of record being inserted into or updated.
2052 -- <flag name> Name of the flag column.
2053 -- <effective date> effective date
2057 -- Post Success
2054 -- <object version number> Object version number of record being inserted
2055 -- or updated.
2056 --
2058 -- Process conintues
2059 --
2060 -- Post Failure
2061 -- Error handled by procedure
2062 --
2063 -- Access Status
2064 -- Internal table handler use only.
2065 --
2066 Procedure chk_dstr_rstcn_flag(p_elig_per_id in number,
2067 p_dstr_rstcn_flag in varchar2,
2068 p_effective_date in date,
2069 p_object_version_number in number) is
2070 --
2071 l_proc varchar2(72) := g_package||'chk_dstr_rstcn_flag';
2072 l_api_updating boolean;
2073 l_dummy varchar2(1);
2074 --
2075 Begin
2076 --
2077 hr_utility.set_location('Entering: '||l_proc,5);
2078 --
2079 l_api_updating := ben_pep_shd.api_updating
2080 (p_elig_per_id => p_elig_per_id,
2081 p_effective_date => p_effective_date,
2082 p_object_version_number => p_object_version_number);
2083 --
2084 if (l_api_updating and p_dstr_rstcn_flag
2085 <> nvl(ben_pep_shd.g_old_rec.dstr_rstcn_flag,hr_api.g_varchar2)
2086 or not l_api_updating)
2087 and p_dstr_rstcn_flag is not null then
2088 --
2089 -- check if value of lookup falls within lookup type.
2090 --
2091 if hr_api.not_exists_in_hr_lookups
2092 (p_lookup_type => 'YES_NO',
2093 p_lookup_code => p_dstr_rstcn_flag,
2094 p_effective_date => p_effective_date) then
2095 --
2096 -- raise error as does not exist as lookup
2097 --
2098 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2099 fnd_message.set_token('FIELD','p_dstr_rstrn_flag');
2100 fnd_message.set_token('TYPE','YES_NO');
2101 fnd_message.raise_error;
2102 --
2103 end if;
2104 --
2105 end if;
2106 --
2107 hr_utility.set_location('Leaving: '||l_proc, 10);
2108 --
2109 end chk_dstr_rstcn_flag;
2110 --
2111 -- ---------------------------------------------------------------------------
2112 -- |----------------------------<chk_elig_flag>------------------------------|
2113 -- ---------------------------------------------------------------------------
2114 -- {Start Of Comments}
2115 --
2116 -- Description:
2117 -- This procedure is used to check that the Flags are valid.
2118 --
2119 -- Pre Conditions
2120 -- None.
2121 --
2122 -- In Parameters
2123 -- <primarykey>PK of record being inserted into or updated.
2124 -- <flag name> Name of the flag column.
2125 -- <effective date> effective date
2126 -- <object version number> Object version number of record being inserted
2127 -- or updated.
2128 --
2129 -- Post Success
2130 -- Process conintues
2131 --
2132 -- Post Failure
2133 -- Error handled by procedure
2134 --
2135 -- Access Status
2136 -- Internal table handler use only.
2137 --
2138 Procedure chk_elig_flag(p_elig_per_id in number,
2139 p_elig_flag in varchar2,
2140 p_effective_date in date,
2141 p_object_version_number in number) is
2142 --
2143 l_proc varchar2(72) := g_package||'chk_elig_flag';
2144 l_api_updating boolean;
2145 l_dummy varchar2(1);
2146 --
2147 Begin
2148 --
2149 hr_utility.set_location('Entering: '||l_proc,5);
2150 --
2151 l_api_updating := ben_pep_shd.api_updating
2152 (p_elig_per_id => p_elig_per_id,
2153 p_effective_date => p_effective_date,
2154 p_object_version_number => p_object_version_number);
2155 --
2156 if (l_api_updating and p_elig_flag
2157 <> nvl(ben_pep_shd.g_old_rec.elig_flag,hr_api.g_varchar2)
2158 or not l_api_updating)
2159 and p_elig_flag is not null then
2160 --
2161 -- check if value of lookup falls within lookup type.
2162 --
2163 if hr_api.not_exists_in_hr_lookups
2164 (p_lookup_type => 'YES_NO',
2165 p_lookup_code => p_elig_flag,
2166 p_effective_date => p_effective_date) then
2167 --
2168 -- raise error as does not exist as lookup
2169 --
2170 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2171 fnd_message.set_token('FIELD','p_elig_flag');
2172 fnd_message.set_token('TYPE','YES_NO');
2173 fnd_message.raise_error;
2174 --
2175 end if;
2176 --
2177 end if;
2178 --
2179 hr_utility.set_location('Leaving: '||l_proc, 10);
2180 --
2181 end chk_elig_flag;
2182 --
2183 -- ---------------------------------------------------------------------------
2184 -- |----------------------------<chk_inelg_rsn_cd>---------------------------|
2185 -- ---------------------------------------------------------------------------
2186 -- {Start Of Comments}
2187 --
2188 -- Description:
2189 -- This procedure is used to check that the Flags are valid.
2190 --
2191 -- Pre Conditions
2192 -- None.
2193 --
2194 -- In Parameters
2195 -- <primarykey>PK of record being inserted into or updated.
2196 -- <inelg_rdn_cd> Name of the lookup column.
2197 -- <effective date> effective date
2198 -- <object version number> Object version number of record being inserted
2199 -- or updated.
2203 --
2200 --
2201 -- Post Success
2202 -- Process conintues
2204 -- Post Failure
2205 -- Error handled by procedure
2206 --
2207 -- Access Status
2208 -- Internal table handler use only.
2209 --
2210 Procedure chk_inelg_rsn_cd(p_elig_per_id in number,
2211 p_inelg_rsn_cd in varchar2,
2212 p_effective_date in date,
2213 p_object_version_number in number) is
2214 --
2215 l_proc varchar2(72) := g_package||'chk_inelg_rsn_cd';
2216 l_api_updating boolean;
2217 l_dummy varchar2(1);
2218 --
2219 Begin
2220 --
2221 hr_utility.set_location('Entering: '||l_proc,5);
2222 --
2223 l_api_updating := ben_pep_shd.api_updating
2224 (p_elig_per_id => p_elig_per_id,
2225 p_effective_date => p_effective_date,
2226 p_object_version_number => p_object_version_number);
2227 --
2228 if (l_api_updating and p_inelg_rsn_cd
2229 <> nvl(ben_pep_shd.g_old_rec.inelg_rsn_cd,hr_api.g_varchar2)
2230 or not l_api_updating)
2231 and p_inelg_rsn_cd is not null then
2232 --
2233 -- check if value of lookup falls within lookup type.
2234 --
2235 if hr_api.not_exists_in_hr_lookups
2236 (p_lookup_type => 'BEN_INELG_RSN',
2237 p_lookup_code => p_inelg_rsn_cd,
2238 p_effective_date => p_effective_date) then
2239 --
2240 -- raise error as does not exist as lookup
2241 --
2242 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2243 fnd_message.set_token('FIELD','p_inelg_rsn_cd');
2244 fnd_message.set_token('TYPE','BEN_INELG_RSN');
2245 fnd_message.raise_error;
2246 --
2247 end if;
2248 --
2249 end if;
2250 --
2251 hr_utility.set_location('Leaving: '||l_proc, 10);
2252 --
2253 end chk_inelg_rsn_cd;
2254 --
2255 -- ---------------------------------------------------------------------------
2256 -- |--------------------------<chk_pl_wvd_flag>------------------------------|
2257 -- ---------------------------------------------------------------------------
2258 -- {Start Of Comments}
2259 --
2260 -- Description:
2261 -- This procedure is used to check that the Flags are valid.
2262 --
2263 -- Pre Conditions
2264 -- None.
2265 --
2266 -- In Parameters
2267 -- <primarykey>PK of record being inserted into or updated.
2268 -- <flag name> Name of the flag column.
2269 -- <effective date> effective date
2270 -- <object version number> Object version number of record being inserted
2271 -- or updated.
2272 --
2273 -- Post Success
2274 -- Process conintues
2275 --
2276 -- Post Failure
2277 -- Error handled by procedure
2278 --
2279 -- Access Status
2280 -- Internal table handler use only.
2281 --
2282 Procedure chk_pl_wvd_flag(p_elig_per_id in number,
2283 p_pl_wvd_flag in varchar2,
2284 p_effective_date in date,
2285 p_object_version_number in number) is
2286 --
2287 l_proc varchar2(72) := g_package||'chk_pl_wvd_flag';
2288 l_api_updating boolean;
2289 l_dummy varchar2(1);
2290 --
2291 Begin
2292 --
2293 hr_utility.set_location('Entering: '||l_proc,5);
2294 --
2295 l_api_updating := ben_pep_shd.api_updating
2296 (p_elig_per_id => p_elig_per_id,
2297 p_effective_date => p_effective_date,
2298 p_object_version_number => p_object_version_number);
2299 --
2300 if (l_api_updating and p_pl_wvd_flag
2301 <> nvl(ben_pep_shd.g_old_rec.pl_wvd_flag,hr_api.g_varchar2)
2302 or not l_api_updating)
2303 and p_pl_wvd_flag is not null then
2304 --
2305 -- check if value of lookup falls within lookup type.
2306 --
2307 if hr_api.not_exists_in_hr_lookups
2308 (p_lookup_type => 'YES_NO',
2309 p_lookup_code => p_pl_wvd_flag,
2310 p_effective_date => p_effective_date) then
2311 --
2312 -- raise error as does not exist as lookup
2313 --
2314 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
2315 fnd_message.set_token('FIELD','p_pl_wvd_flag');
2316 fnd_message.set_token('TYPE','YES_NO');
2317 fnd_message.raise_error;
2318 --
2319 end if;
2320 --
2321 end if;
2322 --
2323 hr_utility.set_location('Leaving: '||l_proc, 10);
2324 --
2325 end chk_pl_wvd_flag;
2326 --
2327 -- ----------------------------------------------------------------------------
2328 -- |--------------------------< dt_update_validate >--------------------------|
2329 -- ----------------------------------------------------------------------------
2330 -- {Start Of Comments}
2331 --
2332 -- Description:
2333 -- This procedure is used for referential integrity of datetracked
2334 -- parent entities when a datetrack update operation is taking place
2335 -- and where there is no cascading of update defined for this entity.
2336 --
2337 -- Prerequisites:
2338 -- This procedure is called from the update_validate.
2339 --
2340 -- In Parameters:
2341 --
2342 -- Post Success:
2343 -- Processing continues.
2344 --
2345 -- Post Failure:
2346 --
2350 --
2347 -- Developer Implementation Notes:
2348 -- This procedure should not need maintenance unless the HR Schema model
2349 -- changes.
2351 -- Access Status:
2352 -- Internal Row Handler Use Only.
2353 --
2354 -- {End Of Comments}
2355 -- ----------------------------------------------------------------------------
2356 Procedure dt_update_validate
2357 (p_ler_id in number default hr_api.g_number,
2358 p_pgm_id in number default hr_api.g_number,
2359 p_plip_id in number default hr_api.g_number,
2360 p_ptip_id in number default hr_api.g_number,
2361 p_pl_id in number default hr_api.g_number,
2362 p_datetrack_mode in varchar2,
2363 p_validation_start_date in date,
2364 p_validation_end_date in date) Is
2365 --
2366 l_proc varchar2(72) := g_package||'dt_update_validate';
2367 l_integrity_error Exception;
2368 l_table_name all_tables.table_name%TYPE;
2369 --
2370 Begin
2371 hr_utility.set_location('Entering:'||l_proc, 5);
2372 --
2373 -- Ensure that the p_datetrack_mode argument is not null
2374 --
2375 hr_api.mandatory_arg_error
2376 (p_api_name => l_proc,
2377 p_argument => 'datetrack_mode',
2378 p_argument_value => p_datetrack_mode);
2379 --
2380 -- Only perform the validation if the datetrack update mode is valid
2381 --
2382 If (dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode)) then
2383 --
2384 --
2385 -- Ensure the arguments are not null
2386 --
2387 hr_api.mandatory_arg_error
2388 (p_api_name => l_proc,
2389 p_argument => 'validation_start_date',
2390 p_argument_value => p_validation_start_date);
2391 --
2392 hr_api.mandatory_arg_error
2393 (p_api_name => l_proc,
2394 p_argument => 'validation_end_date',
2395 p_argument_value => p_validation_end_date);
2396 --
2397 If ((nvl(p_ler_id, hr_api.g_number) <> hr_api.g_number) and
2398 NOT (dt_api.check_min_max_dates
2399 (p_base_table_name => 'ben_ler_f',
2400 p_base_key_column => 'ler_id',
2401 p_base_key_value => p_ler_id,
2402 p_from_date => p_validation_start_date,
2403 p_to_date => p_validation_end_date))) Then
2404 l_table_name := 'ben_ler_f';
2405 Raise l_integrity_error;
2406 End If;
2407 If ((nvl(p_pgm_id, hr_api.g_number) <> hr_api.g_number) and
2408 NOT (dt_api.check_min_max_dates
2409 (p_base_table_name => 'ben_pgm_f',
2410 p_base_key_column => 'pgm_id',
2411 p_base_key_value => p_pgm_id,
2412 p_from_date => p_validation_start_date,
2413 p_to_date => p_validation_end_date))) Then
2414 l_table_name := 'ben_pgm_f';
2415 Raise l_integrity_error;
2416 End If;
2417 If ((nvl(p_pl_id, hr_api.g_number) <> hr_api.g_number) and
2418 NOT (dt_api.check_min_max_dates
2419 (p_base_table_name => 'ben_pl_f',
2420 p_base_key_column => 'pl_id',
2421 p_base_key_value => p_pl_id,
2422 p_from_date => p_validation_start_date,
2423 p_to_date => p_validation_end_date))) Then
2424 l_table_name := 'ben_pl_f';
2425 Raise l_integrity_error;
2426 End If;
2427 If ((nvl(p_plip_id, hr_api.g_number) <> hr_api.g_number) and
2428 NOT (dt_api.check_min_max_dates
2429 (p_base_table_name => 'ben_plip_f',
2430 p_base_key_column => 'plip_id',
2431 p_base_key_value => p_plip_id,
2432 p_from_date => p_validation_start_date,
2433 p_to_date => p_validation_end_date))) Then
2434 l_table_name := 'ben_plip_f';
2435 Raise l_integrity_error;
2436 End If;
2437 If ((nvl(p_ptip_id, hr_api.g_number) <> hr_api.g_number) and
2438 NOT (dt_api.check_min_max_dates
2439 (p_base_table_name => 'ben_ptip_f',
2440 p_base_key_column => 'ptip_id',
2441 p_base_key_value => p_ptip_id,
2442 p_from_date => p_validation_start_date,
2443 p_to_date => p_validation_end_date))) Then
2444 l_table_name := 'ben_ptip_f';
2445 Raise l_integrity_error;
2446 End If;
2447 --
2448 End If;
2449 --
2450 hr_utility.set_location(' Leaving:'||l_proc, 10);
2451 Exception
2452 When l_integrity_error Then
2453 --
2454 -- A referential integrity check was violated therefore
2455 -- we must error
2456 --
2457 fnd_message.set_name('PAY', 'HR_7216_DT_UPD_INTEGRITY_ERR');
2458 fnd_message.set_token('TABLE_NAME', l_table_name);
2459 fnd_message.raise_error;
2460 When Others Then
2461 --
2462 -- An unhandled or unexpected error has occurred which
2463 -- we must report
2464 --
2465 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2466 fnd_message.set_token('PROCEDURE', l_proc);
2467 fnd_message.set_token('STEP','15');
2468 fnd_message.raise_error;
2469 End dt_update_validate;
2470 --
2474 -- {Start Of Comments}
2471 -- ----------------------------------------------------------------------------
2472 -- |--------------------------< dt_delete_validate >--------------------------|
2473 -- ----------------------------------------------------------------------------
2475 --
2476 -- Description:
2477 -- This procedure is used for referential integrity of datetracked
2478 -- child entities when either a datetrack DELETE or ZAP is in operation
2479 -- and where there is no cascading of delete defined for this entity.
2480 -- For the datetrack mode of DELETE or ZAP we must ensure that no
2481 -- datetracked child rows exist between the validation start and end
2482 -- dates.
2483 --
2484 -- Prerequisites:
2485 -- This procedure is called from the delete_validate.
2486 --
2487 -- In Parameters:
2488 --
2489 -- Post Success:
2490 -- Processing continues.
2491 --
2492 -- Post Failure:
2493 -- If a row exists by determining the returning Boolean value from the
2494 -- generic dt_api.rows_exist function then we must supply an error via
2495 -- the use of the local exception handler l_rows_exist.
2496 --
2497 -- Developer Implementation Notes:
2498 -- This procedure should not need maintenance unless the HR Schema model
2499 -- changes.
2500 --
2501 -- Access Status:
2502 -- Internal Row Handler Use Only.
2503 --
2504 -- {End Of Comments}
2505 -- ----------------------------------------------------------------------------
2506 Procedure dt_delete_validate
2507 (p_elig_per_id in number,
2508 p_datetrack_mode in varchar2,
2509 p_validation_start_date in date,
2510 p_validation_end_date in date) Is
2511 --
2512 l_proc varchar2(72) := g_package||'dt_delete_validate';
2513 l_rows_exist Exception;
2514 l_table_name all_tables.table_name%TYPE;
2515 --
2516 Begin
2517 hr_utility.set_location('Entering:'||l_proc, 5);
2518 --
2519 -- Ensure that the p_datetrack_mode argument is not null
2520 --
2521 hr_api.mandatory_arg_error
2522 (p_api_name => l_proc,
2523 p_argument => 'datetrack_mode',
2524 p_argument_value => p_datetrack_mode);
2525 --
2526 -- Only perform the validation if the datetrack mode is either
2527 -- DELETE or ZAP
2528 --
2529 If (p_datetrack_mode = 'DELETE' or
2530 p_datetrack_mode = 'ZAP') then
2531 --
2532 --
2533 -- Ensure the arguments are not null
2534 --
2535 hr_api.mandatory_arg_error
2536 (p_api_name => l_proc,
2537 p_argument => 'validation_start_date',
2538 p_argument_value => p_validation_start_date);
2539 --
2540 hr_api.mandatory_arg_error
2541 (p_api_name => l_proc,
2542 p_argument => 'validation_end_date',
2543 p_argument_value => p_validation_end_date);
2544 --
2545 hr_api.mandatory_arg_error
2546 (p_api_name => l_proc,
2547 p_argument => 'elig_per_id',
2548 p_argument_value => p_elig_per_id);
2549 --
2550 If (dt_api.rows_exist
2551 (p_base_table_name => 'ben_elig_per_opt_f',
2552 p_base_key_column => 'elig_per_id',
2553 p_base_key_value => p_elig_per_id,
2554 p_from_date => p_validation_start_date,
2555 p_to_date => p_validation_end_date)) Then
2556 l_table_name := 'ben_elig_per_opt_f';
2557 Raise l_rows_exist;
2558 End If;
2559 --
2560 End If;
2561 --
2562 hr_utility.set_location(' Leaving:'||l_proc, 10);
2563 Exception
2564 When l_rows_exist Then
2565 --
2566 -- A referential integrity check was violated therefore
2567 -- we must error
2568 --
2569 fnd_message.set_name('PAY', 'HR_7215_DT_CHILD_EXISTS');
2570 fnd_message.set_token('TABLE_NAME', l_table_name);
2571 fnd_message.raise_error;
2572 When Others Then
2573 --
2574 -- An unhandled or unexpected error has occurred which
2575 -- we must report
2576 --
2577 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2578 fnd_message.set_token('PROCEDURE', l_proc);
2579 fnd_message.set_token('STEP','15');
2580 fnd_message.raise_error;
2581 End dt_delete_validate;
2582 --
2583 -- ----------------------------------------------------------------------------
2584 -- |---------------------------< insert_validate >----------------------------|
2585 -- ----------------------------------------------------------------------------
2586 Procedure insert_validate
2587 (p_rec in ben_pep_shd.g_rec_type,
2588 p_effective_date in date,
2589 p_datetrack_mode in varchar2,
2590 p_validation_start_date in date,
2591 p_validation_end_date in date) is
2592 --
2593 l_proc varchar2(72) := g_package||'insert_validate';
2594 --
2595 Begin
2596 hr_utility.set_location('Entering:'||l_proc, 5);
2597 --
2598 -- Call all supporting business operations
2599 --
2600 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2601 --
2602 chk_elig_per_id
2603 (p_elig_per_id => p_rec.elig_per_id,
2604 p_effective_date => p_effective_date,
2605 p_object_version_number => p_rec.object_version_number);
2606 --
2610 p_comp_ref_uom => p_rec.comp_ref_uom,
2607 chk_comp_ref_uom
2608 (p_elig_per_id => p_rec.elig_per_id,
2609 p_comp_ref_val => p_rec.comp_ref_amt,
2611 p_rt_comp_ref_val => p_rec.rt_comp_ref_amt,
2612 p_rt_comp_ref_uom => p_rec.rt_comp_ref_uom,
2613 p_effective_date => p_effective_date,
2614 p_object_version_number => p_rec.object_version_number);
2615 --
2616 chk_at_least_one_fk_set
2617 (p_pl_id => p_rec.pl_id,
2618 p_pgm_id => p_rec.pgm_id,
2619 p_plip_id => p_rec.plip_id,
2620 p_ptip_id => p_rec.ptip_id,
2621 p_effective_date => p_effective_date,
2622 p_business_group_id => p_rec.business_group_id);
2623 --
2624 chk_wv_prtn_rsn_cd
2625 (p_elig_per_id => p_rec.elig_per_id,
2626 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2627 p_wv_prtn_rsn_cd => p_rec.wv_prtn_rsn_cd,
2628 p_effective_date => p_effective_date,
2629 p_object_version_number => p_rec.object_version_number);
2630 --
2631 chk_hrs_wkd_bndry_perd_cd
2632 (p_elig_per_id => p_rec.elig_per_id,
2633 p_hrs_wkd_bndry_perd_cd => p_rec.hrs_wkd_bndry_perd_cd,
2634 p_rt_hrs_wkd_bndry_perd_cd => p_rec.rt_hrs_wkd_bndry_perd_cd,
2635 p_effective_date => p_effective_date,
2636 p_object_version_number => p_rec.object_version_number);
2637 --
2638 chk_pct_val
2639 (p_pct_val => p_rec.pct_fl_tm_val,
2640 p_rt_pct_val => p_rec.rt_pct_fl_tm_val);
2641 --
2642 chk_wv_ctfn_typ_cd
2643 (p_elig_per_id => p_rec.elig_per_id,
2644 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2645 p_wv_ctfn_typ_cd => p_rec.wv_ctfn_typ_cd,
2646 p_effective_date => p_effective_date,
2647 p_object_version_number => p_rec.object_version_number);
2648 --
2649 chk_prtn_ovridn_rsn_cd
2650 (p_elig_per_id => p_rec.elig_per_id,
2651 p_prtn_ovridn_thru_dt => p_rec.prtn_ovridn_thru_dt,
2652 p_prtn_ovridn_flag => p_rec.prtn_ovridn_flag,
2653 p_prtn_ovridn_rsn_cd => p_rec.prtn_ovridn_rsn_cd,
2654 p_effective_date => p_effective_date,
2655 p_object_version_number => p_rec.object_version_number);
2656 --
2657 chk_age_uom
2658 (p_elig_per_id => p_rec.elig_per_id,
2659 p_age_val => p_rec.age_val,
2660 p_age_uom => p_rec.age_uom,
2661 p_rt_age_val => p_rec.rt_age_val,
2662 p_rt_age_uom => p_rec.rt_age_uom,
2663 p_effective_date => p_effective_date,
2664 p_object_version_number => p_rec.object_version_number);
2665 --
2666 chk_los_uom
2667 (p_elig_per_id => p_rec.elig_per_id,
2668 p_los_val => p_rec.los_val,
2669 p_los_uom => p_rec.los_uom,
2670 p_rt_los_val => p_rec.rt_los_val,
2671 p_rt_los_uom => p_rec.rt_los_uom,
2672 p_effective_date => p_effective_date,
2673 p_object_version_number => p_rec.object_version_number);
2674 --
2675 chk_no_mx_prtn_ovrid_thru_flag
2676 (p_elig_per_id => p_rec.elig_per_id,
2677 p_no_mx_prtn_ovrid_thru_flag => p_rec.no_mx_prtn_ovrid_thru_flag,
2678 p_effective_date => p_effective_date,
2679 p_object_version_number => p_rec.object_version_number);
2680 --
2681 chk_once_r_cntug_cd
2682 (p_elig_per_id => p_rec.elig_per_id,
2683 p_once_r_cntug_cd => p_rec.once_r_cntug_cd,
2684 p_effective_date => p_effective_date,
2685 p_object_version_number => p_rec.object_version_number);
2686 --
2687 chk_frz_comb_age_and_los_flag
2688 (p_elig_per_id => p_rec.elig_per_id,
2689 p_frz_comb_age_and_los_flag => p_rec.frz_comb_age_and_los_flag,
2690 p_rt_frz_comb_age_and_los_flag => p_rec.rt_frz_comb_age_and_los_flag,
2691 p_effective_date => p_effective_date,
2692 p_object_version_number => p_rec.object_version_number);
2693 --
2694 chk_dpnt_othr_pl_cvrd_rl_flag
2695 (p_elig_per_id => p_rec.elig_per_id,
2696 p_dpnt_othr_pl_cvrd_rl_flag => p_rec.dpnt_othr_pl_cvrd_rl_flag,
2697 p_effective_date => p_effective_date,
2698 p_object_version_number => p_rec.object_version_number);
2699 --
2700 chk_pl_key_ee_flag
2701 (p_elig_per_id => p_rec.elig_per_id,
2702 p_pl_key_ee_flag => p_rec.pl_key_ee_flag,
2703 p_effective_date => p_effective_date,
2704 p_object_version_number => p_rec.object_version_number);
2705 --
2706 chk_inelg_rsn_cd
2707 (p_elig_per_id => p_rec.elig_per_id,
2708 p_inelg_rsn_cd => p_rec.inelg_rsn_cd,
2709 p_effective_date => p_effective_date,
2710 p_object_version_number => p_rec.object_version_number);
2711 --
2712 chk_prtn_ovridn_flag
2713 (p_elig_per_id => p_rec.elig_per_id,
2714 p_prtn_ovridn_flag => p_rec.prtn_ovridn_flag,
2715 p_effective_date => p_effective_date,
2716 p_object_version_number => p_rec.object_version_number);
2717 --
2718 chk_pl_hghly_compd_flag
2719 (p_elig_per_id => p_rec.elig_per_id,
2723 --
2720 p_pl_hghly_compd_flag => p_rec.pl_hghly_compd_flag,
2721 p_effective_date => p_effective_date,
2722 p_object_version_number => p_rec.object_version_number);
2724 chk_frz_los_flag
2725 (p_elig_per_id => p_rec.elig_per_id,
2726 p_frz_los_flag => p_rec.frz_los_flag,
2727 p_rt_frz_los_flag => p_rec.rt_frz_los_flag,
2728 p_effective_date => p_effective_date,
2729 p_object_version_number => p_rec.object_version_number);
2730 --
2731 chk_frz_age_flag
2732 (p_elig_per_id => p_rec.elig_per_id,
2733 p_frz_age_flag => p_rec.frz_age_flag,
2734 p_rt_frz_age_flag => p_rec.rt_frz_age_flag,
2735 p_effective_date => p_effective_date,
2736 p_object_version_number => p_rec.object_version_number);
2737 --
2738 chk_frz_cmp_lvl_flag
2739 (p_elig_per_id => p_rec.elig_per_id,
2740 p_frz_cmp_lvl_flag => p_rec.frz_cmp_lvl_flag,
2741 p_rt_frz_cmp_lvl_flag => p_rec.rt_frz_cmp_lvl_flag,
2742 p_effective_date => p_effective_date,
2743 p_object_version_number => p_rec.object_version_number);
2744 --
2745 chk_frz_pct_fl_tm_flag
2746 (p_elig_per_id => p_rec.elig_per_id,
2747 p_frz_pct_fl_tm_flag => p_rec.frz_pct_fl_tm_flag,
2748 p_rt_frz_pct_fl_tm_flag => p_rec.rt_frz_pct_fl_tm_flag,
2749 p_effective_date => p_effective_date,
2750 p_object_version_number => p_rec.object_version_number);
2751 --
2752 chk_frz_hrs_wkd_flag
2753 (p_elig_per_id => p_rec.elig_per_id,
2754 p_frz_hrs_wkd_flag => p_rec.frz_hrs_wkd_flag,
2755 p_rt_frz_hrs_wkd_flag => p_rec.rt_frz_hrs_wkd_flag,
2756 p_effective_date => p_effective_date,
2757 p_object_version_number => p_rec.object_version_number);
2758 --
2759 chk_dstr_rstcn_flag
2760 (p_elig_per_id => p_rec.elig_per_id,
2761 p_dstr_rstcn_flag => p_rec.dstr_rstcn_flag,
2762 p_effective_date => p_effective_date,
2763 p_object_version_number => p_rec.object_version_number);
2764 --
2765 chk_elig_flag
2766 (p_elig_per_id => p_rec.elig_per_id,
2767 p_elig_flag => p_rec.elig_flag,
2768 p_effective_date => p_effective_date,
2769 p_object_version_number => p_rec.object_version_number);
2770 --
2771 chk_pl_wvd_flag
2772 (p_elig_per_id => p_rec.elig_per_id,
2773 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2774 p_effective_date => p_effective_date,
2775 p_object_version_number => p_rec.object_version_number);
2776 --
2777 hr_utility.set_location(' Leaving:'||l_proc, 10);
2778 End insert_validate;
2779 --
2780 -- ----------------------------------------------------------------------------
2781 -- |---------------------------< update_validate >----------------------------|
2782 -- ----------------------------------------------------------------------------
2783 Procedure update_validate
2784 (p_rec in ben_pep_shd.g_rec_type,
2785 p_effective_date in date,
2786 p_datetrack_mode in varchar2,
2787 p_validation_start_date in date,
2788 p_validation_end_date in date) is
2789 --
2790 l_proc varchar2(72) := g_package||'update_validate';
2791 --
2792 Begin
2793 hr_utility.set_location('Entering:'||l_proc, 5);
2794 --
2795 -- Call all supporting business operations
2796 --
2797 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
2798 --
2799 chk_elig_per_id
2800 (p_elig_per_id => p_rec.elig_per_id,
2801 p_effective_date => p_effective_date,
2802 p_object_version_number => p_rec.object_version_number);
2803 --
2804 chk_comp_ref_uom
2805 (p_elig_per_id => p_rec.elig_per_id,
2806 p_comp_ref_val => p_rec.comp_ref_amt,
2807 p_comp_ref_uom => p_rec.comp_ref_uom,
2808 p_rt_comp_ref_val => p_rec.rt_comp_ref_amt,
2809 p_rt_comp_ref_uom => p_rec.rt_comp_ref_uom,
2810 p_effective_date => p_effective_date,
2811 p_object_version_number => p_rec.object_version_number);
2812 --
2813 chk_at_least_one_fk_set
2814 (p_pl_id => p_rec.pl_id,
2815 p_pgm_id => p_rec.pgm_id,
2816 p_plip_id => p_rec.plip_id,
2817 p_ptip_id => p_rec.ptip_id,
2818 p_effective_date => p_effective_date,
2819 p_business_group_id => p_rec.business_group_id);
2820 --
2821 chk_wv_prtn_rsn_cd
2822 (p_elig_per_id => p_rec.elig_per_id,
2823 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2824 p_wv_prtn_rsn_cd => p_rec.wv_prtn_rsn_cd,
2825 p_effective_date => p_effective_date,
2826 p_object_version_number => p_rec.object_version_number);
2827 --
2828 chk_hrs_wkd_bndry_perd_cd
2829 (p_elig_per_id => p_rec.elig_per_id,
2830 p_hrs_wkd_bndry_perd_cd => p_rec.hrs_wkd_bndry_perd_cd,
2831 p_rt_hrs_wkd_bndry_perd_cd => p_rec.rt_hrs_wkd_bndry_perd_cd,
2832 p_effective_date => p_effective_date,
2833 p_object_version_number => p_rec.object_version_number);
2837 p_rt_pct_val => p_rec.rt_pct_fl_tm_val);
2834 --
2835 chk_pct_val
2836 (p_pct_val => p_rec.pct_fl_tm_val,
2838 --
2839 chk_wv_ctfn_typ_cd
2840 (p_elig_per_id => p_rec.elig_per_id,
2841 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2842 p_wv_ctfn_typ_cd => p_rec.wv_ctfn_typ_cd,
2843 p_effective_date => p_effective_date,
2844 p_object_version_number => p_rec.object_version_number);
2845 --
2846 chk_prtn_ovridn_rsn_cd
2847 (p_elig_per_id => p_rec.elig_per_id,
2848 p_prtn_ovridn_thru_dt => p_rec.prtn_ovridn_thru_dt,
2849 p_prtn_ovridn_flag => p_rec.prtn_ovridn_flag,
2850 p_prtn_ovridn_rsn_cd => p_rec.prtn_ovridn_rsn_cd,
2851 p_effective_date => p_effective_date,
2852 p_object_version_number => p_rec.object_version_number);
2853 --
2854 chk_age_uom
2855 (p_elig_per_id => p_rec.elig_per_id,
2856 p_age_val => p_rec.age_val,
2857 p_age_uom => p_rec.age_uom,
2858 p_rt_age_val => p_rec.rt_age_val,
2859 p_rt_age_uom => p_rec.rt_age_uom,
2860 p_effective_date => p_effective_date,
2861 p_object_version_number => p_rec.object_version_number);
2862 --
2863 chk_los_uom
2864 (p_elig_per_id => p_rec.elig_per_id,
2865 p_los_val => p_rec.los_val,
2866 p_los_uom => p_rec.los_uom,
2867 p_rt_los_val => p_rec.rt_los_val,
2868 p_rt_los_uom => p_rec.rt_los_uom,
2869 p_effective_date => p_effective_date,
2870 p_object_version_number => p_rec.object_version_number);
2871 --
2872 chk_no_mx_prtn_ovrid_thru_flag
2873 (p_elig_per_id => p_rec.elig_per_id,
2874 p_no_mx_prtn_ovrid_thru_flag => p_rec.no_mx_prtn_ovrid_thru_flag,
2875 p_effective_date => p_effective_date,
2876 p_object_version_number => p_rec.object_version_number);
2877 --
2878 chk_once_r_cntug_cd
2879 (p_elig_per_id => p_rec.elig_per_id,
2880 p_once_r_cntug_cd => p_rec.once_r_cntug_cd,
2881 p_effective_date => p_effective_date,
2882 p_object_version_number => p_rec.object_version_number);
2883 --
2884 chk_frz_comb_age_and_los_flag
2885 (p_elig_per_id => p_rec.elig_per_id,
2886 p_frz_comb_age_and_los_flag => p_rec.frz_comb_age_and_los_flag,
2887 p_rt_frz_comb_age_and_los_flag => p_rec.rt_frz_comb_age_and_los_flag,
2888 p_effective_date => p_effective_date,
2889 p_object_version_number => p_rec.object_version_number);
2890 --
2891 chk_dpnt_othr_pl_cvrd_rl_flag
2892 (p_elig_per_id => p_rec.elig_per_id,
2893 p_dpnt_othr_pl_cvrd_rl_flag => p_rec.dpnt_othr_pl_cvrd_rl_flag,
2894 p_effective_date => p_effective_date,
2895 p_object_version_number => p_rec.object_version_number);
2896 --
2897 chk_pl_key_ee_flag
2898 (p_elig_per_id => p_rec.elig_per_id,
2899 p_pl_key_ee_flag => p_rec.pl_key_ee_flag,
2900 p_effective_date => p_effective_date,
2901 p_object_version_number => p_rec.object_version_number);
2902 --
2903 chk_inelg_rsn_cd
2904 (p_elig_per_id => p_rec.elig_per_id,
2905 p_inelg_rsn_cd => p_rec.inelg_rsn_cd,
2906 p_effective_date => p_effective_date,
2907 p_object_version_number => p_rec.object_version_number);
2908 --
2909 chk_prtn_ovridn_flag
2910 (p_elig_per_id => p_rec.elig_per_id,
2911 p_prtn_ovridn_flag => p_rec.prtn_ovridn_flag,
2912 p_effective_date => p_effective_date,
2913 p_object_version_number => p_rec.object_version_number);
2914 --
2915 chk_pl_hghly_compd_flag
2916 (p_elig_per_id => p_rec.elig_per_id,
2917 p_pl_hghly_compd_flag => p_rec.pl_hghly_compd_flag,
2918 p_effective_date => p_effective_date,
2919 p_object_version_number => p_rec.object_version_number);
2920 --
2921 chk_frz_los_flag
2922 (p_elig_per_id => p_rec.elig_per_id,
2923 p_frz_los_flag => p_rec.frz_los_flag,
2924 p_rt_frz_los_flag => p_rec.rt_frz_los_flag,
2925 p_effective_date => p_effective_date,
2926 p_object_version_number => p_rec.object_version_number);
2927 --
2928 chk_frz_age_flag
2929 (p_elig_per_id => p_rec.elig_per_id,
2930 p_frz_age_flag => p_rec.frz_age_flag,
2931 p_rt_frz_age_flag => p_rec.rt_frz_age_flag,
2932 p_effective_date => p_effective_date,
2933 p_object_version_number => p_rec.object_version_number);
2934 --
2935 chk_frz_cmp_lvl_flag
2936 (p_elig_per_id => p_rec.elig_per_id,
2937 p_frz_cmp_lvl_flag => p_rec.frz_cmp_lvl_flag,
2938 p_rt_frz_cmp_lvl_flag => p_rec.rt_frz_cmp_lvl_flag,
2939 p_effective_date => p_effective_date,
2940 p_object_version_number => p_rec.object_version_number);
2941 --
2942 chk_frz_pct_fl_tm_flag
2943 (p_elig_per_id => p_rec.elig_per_id,
2944 p_frz_pct_fl_tm_flag => p_rec.frz_pct_fl_tm_flag,
2948 --
2945 p_rt_frz_pct_fl_tm_flag => p_rec.rt_frz_pct_fl_tm_flag,
2946 p_effective_date => p_effective_date,
2947 p_object_version_number => p_rec.object_version_number);
2949 chk_frz_hrs_wkd_flag
2950 (p_elig_per_id => p_rec.elig_per_id,
2951 p_frz_hrs_wkd_flag => p_rec.frz_hrs_wkd_flag,
2952 p_rt_frz_hrs_wkd_flag => p_rec.rt_frz_hrs_wkd_flag,
2953 p_effective_date => p_effective_date,
2954 p_object_version_number => p_rec.object_version_number);
2955 --
2956 chk_dstr_rstcn_flag
2957 (p_elig_per_id => p_rec.elig_per_id,
2958 p_dstr_rstcn_flag => p_rec.dstr_rstcn_flag,
2959 p_effective_date => p_effective_date,
2960 p_object_version_number => p_rec.object_version_number);
2961 --
2962 chk_elig_flag
2963 (p_elig_per_id => p_rec.elig_per_id,
2964 p_elig_flag => p_rec.elig_flag,
2965 p_effective_date => p_effective_date,
2966 p_object_version_number => p_rec.object_version_number);
2967 --
2968 chk_pl_wvd_flag
2969 (p_elig_per_id => p_rec.elig_per_id,
2970 p_pl_wvd_flag => p_rec.pl_wvd_flag,
2971 p_effective_date => p_effective_date,
2972 p_object_version_number => p_rec.object_version_number);
2973 --
2974 -- Call the datetrack update integrity operation
2975 --
2976 dt_update_validate
2977 (p_ler_id => p_rec.ler_id,
2978 p_pgm_id => p_rec.pgm_id,
2979 p_pl_id => p_rec.pl_id,
2980 p_plip_id => p_rec.plip_id,
2981 p_ptip_id => p_rec.ptip_id,
2982 p_datetrack_mode => p_datetrack_mode,
2983 p_validation_start_date => p_validation_start_date,
2984 p_validation_end_date => p_validation_end_date);
2985 --
2986 hr_utility.set_location(' Leaving:'||l_proc, 10);
2987 End update_validate;
2988 --
2989 -- ----------------------------------------------------------------------------
2990 -- |---------------------------< delete_validate >----------------------------|
2991 -- ----------------------------------------------------------------------------
2992 Procedure delete_validate
2993 (p_rec in ben_pep_shd.g_rec_type,
2994 p_effective_date in date,
2995 p_datetrack_mode in varchar2,
2996 p_validation_start_date in date,
2997 p_validation_end_date in date) is
2998 --
2999 l_proc varchar2(72) := g_package||'delete_validate';
3000 --
3001 Begin
3002 hr_utility.set_location('Entering:'||l_proc, 5);
3003 --
3004 -- Call all supporting business operations
3005 --
3006 dt_delete_validate
3007 (p_datetrack_mode => p_datetrack_mode,
3008 p_validation_start_date => p_validation_start_date,
3009 p_validation_end_date => p_validation_end_date,
3010 p_elig_per_id => p_rec.elig_per_id);
3011 --
3012 hr_utility.set_location(' Leaving:'||l_proc, 10);
3013 End delete_validate;
3014 --
3015 end ben_pep_bus;