1 Package Body ben_clp_bus as
2 /* $Header: beclprhi.pkb 120.0.12010000.2 2008/08/05 14:17:49 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_clp_bus.'; -- Global package name
9 --
10 -- ---------------------------------------------------------------------------
11 -- |---------------------< return_legislation_code >-------------------------|
12 -- ---------------------------------------------------------------------------
13 --
14 function return_legislation_code
15 (p_clpse_lf_evt_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_clpse_lf_evt_f b
23 where b.clpse_lf_evt_id = p_clpse_lf_evt_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 parameter are not null
36 --
37 hr_api.mandatory_arg_error(p_api_name => l_proc,
38 p_argument => 'clpse_lf_evt_id',
39 p_argument_value => p_clpse_lf_evt_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 fnd_message.set_name('PAY','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 -- ----------------------------------------------------------------------------
65 -- |---------------------------------< chk_clpse_lf_evt_id >------------------|
66 -- ----------------------------------------------------------------------------
67 --
68 -- Description
69 -- This procedure is used to check that the primary key for the table
70 -- is created properly. It should be null on insert and
71 -- should not be able to be updated.
72 --
73 -- Pre Conditions
74 -- None.
75 --
76 -- In Parameters
77 -- clpse_lf_evt_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_clpse_lf_evt_id(p_clpse_lf_evt_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_clpse_lf_evt_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_clp_shd.api_updating
103 (p_effective_date => p_effective_date,
104 p_clpse_lf_evt_id => p_clpse_lf_evt_id,
105 p_object_version_number => p_object_version_number);
106 --
107 if (l_api_updating
108 and nvl(p_clpse_lf_evt_id,hr_api.g_number)
109 <> ben_clp_shd.g_old_rec.clpse_lf_evt_id) then
110 --
111 -- raise error as PK has changed
112 --
113 ben_clp_shd.constraint_error('BEN_CLPSE_LF_EVT_F_PK');
114 --
115 elsif not l_api_updating then
116 --
117 -- check if PK is null
118 --
119 if p_clpse_lf_evt_id is not null then
120 --
121 -- raise error as PK is not null
122 --
123 ben_clp_shd.constraint_error('BEN_CLPSE_LF_EVT_F_PK');
124 --
125 end if;
126 --
127 end if;
128 --
129 hr_utility.set_location('Leaving:'||l_proc, 10);
130 --
131 End chk_clpse_lf_evt_id;
132 --
133 -- ----------------------------------------------------------------------------
134 -- |-----------------------------< chk_seq >----------------------------------|
135 -- ----------------------------------------------------------------------------
136 --
137 -- Description
138 -- This procedure is used to check that the sequence is unique.
139 -- within the business group for the effective date.
140 --
141 -- Pre Conditions
142 -- None.
143 --
144 -- In Parameters
145 -- clpse_lf_evt_id PK of record being inserted or updated.
146 -- effective_date Effective Date of session
147 -- seq Sequence Number
148 -- object_version_number Object version number of record being
149 -- inserted or updated.
150 --
151 -- Post Success
152 -- Processing continues
153 --
154 -- Post Failure
155 -- Errors handled by the procedure
156 --
157 -- Access Status
158 -- Internal table handler use only.
159 --
160 Procedure chk_seq(p_clpse_lf_evt_id in number,
161 p_seq in number,
162 p_effective_date in date,
163 p_business_group_id in number,
164 p_object_version_number in number,
165 p_validation_start_date in date, -- 5951251 : Added these two Parameters
166 p_validation_end_date in date) is
167 --
168 l_proc varchar2(72) := g_package||'chk_seq';
169 l_api_updating boolean;
170 l_dummy varchar2(1);
171 --
172 cursor c1 is
173 select null
174 from ben_clpse_lf_evt_f clp
175 where clp.clpse_lf_evt_id <> nvl(p_clpse_lf_evt_id,-1)
176 and clp.business_group_id+0 = p_business_group_id
177 and clp.seq = p_seq
178 and ((p_effective_date between clp.effective_start_date
179 and clp.effective_end_date)
180 or
181 -- 5951251: Added validation date Check
182 not ((p_validation_end_date<clp.effective_start_date)
183 or (p_validation_start_date>clp.effective_end_date)));
184
185 Begin
186 --
187 hr_utility.set_location('Entering:'||l_proc, 5);
188 --
189 l_api_updating := ben_clp_shd.api_updating
190 (p_effective_date => p_effective_date,
191 p_clpse_lf_evt_id => p_clpse_lf_evt_id,
192 p_object_version_number => p_object_version_number);
193 --
194 if (l_api_updating
195 and nvl(p_seq,hr_api.g_number)
196 <> ben_clp_shd.g_old_rec.seq)
197 or not l_api_updating then
198 --
199 -- Check if sequence is unique within this business group.
200 --
201 open c1;
202 --
203 fetch c1 into l_dummy;
204 if c1%found then
205 --
206 close c1;
207 fnd_message.set_name('BEN','BEN_92124_CLP_SEQ_NOT_UNIQUE');
208 fnd_message.raise_error;
209 --
210 end if;
211 --
212 close c1;
213 --
214 end if;
215 --
216 hr_utility.set_location('Leaving:'||l_proc, 10);
217 --
218 End chk_seq;
219 -- ----------------------------------------------------------------------------
220 -- |------------------------< chk_ler1_id >-----------------------------------|
221 -- ----------------------------------------------------------------------------
222 --
223 -- Description
224 -- This procedure is used to check that the sequence is unique.
225 -- within the business group for the effective date.
226 --
227 -- Pre Conditions
228 -- None.
229 --
230 -- In Parameters
231 -- clpse_lf_evt_id PK of record being inserted or updated.
232 -- effective_date Effective Date of session
233 -- ler1_id Primary Life Event
234 -- object_version_number Object version number of record being
235 -- inserted or updated.
236 --
237 -- Post Success
238 -- Processing continues
239 --
240 -- Post Failure
241 -- Errors handled by the procedure
242 --
243 -- Access Status
244 -- Internal table handler use only.
245 --
246 Procedure chk_ler1_id(p_clpse_lf_evt_id in number,
247 p_ler1_id in number,
248 p_effective_date in date,
249 p_object_version_number in number) is
250 --
251 l_proc varchar2(72) := g_package||'chk_ler1_id';
252 l_api_updating boolean;
253 --
254 Begin
255 --
256 hr_utility.set_location('Entering:'||l_proc, 5);
257 --
258 l_api_updating := ben_clp_shd.api_updating
259 (p_effective_date => p_effective_date,
260 p_clpse_lf_evt_id => p_clpse_lf_evt_id,
261 p_object_version_number => p_object_version_number);
262 --
263 if p_ler1_id is null then
264 --
265 fnd_message.set_name('BEN','BEN_92125_PRMRY_LER_ID');
266 fnd_message.raise_error;
267 --
268 end if;
269 --
270 hr_utility.set_location('Leaving:'||l_proc, 10);
271 --
272 End chk_ler1_id;
273 -- ----------------------------------------------------------------------------
274 -- |------------------------< chk_eval_ler_id >-------------------------------|
275 -- ----------------------------------------------------------------------------
276 --
277 -- Description
278 -- This procedure is used to check that the sequence is unique.
279 -- within the business group for the effective date.
280 --
281 -- Pre Conditions
282 -- None.
283 --
284 -- In Parameters
285 -- clpse_lf_evt_id PK of record being inserted or updated.
286 -- effective_date Effective Date of session
287 -- eval_ler_id Evaluated Life Event
288 -- object_version_number Object version number of record being
289 -- inserted or updated.
290 --
291 -- Post Success
292 -- Processing continues
293 --
294 -- Post Failure
295 -- Errors handled by the procedure
296 --
297 -- Access Status
298 -- Internal table handler use only.
299 --
300 Procedure chk_eval_ler_id(p_clpse_lf_evt_id in number,
301 p_eval_ler_id in number,
302 p_effective_date in date,
303 p_object_version_number in number) is
304 --
305 l_proc varchar2(72) := g_package||'chk_eval_ler_id';
306 l_api_updating boolean;
307 --
308 Begin
309 --
310 hr_utility.set_location('Entering:'||l_proc, 5);
311 --
312 if p_eval_ler_id is null then
313 --
314 fnd_message.set_name('BEN','BEN_92126_EVAL_LER_ID');
315 fnd_message.raise_error;
316 --
317 end if;
318 --
319 hr_utility.set_location('Leaving:'||l_proc, 10);
320 --
321 End chk_eval_ler_id;
322 -- ----------------------------------------------------------------------------
323 -- |------------------------< chk_tlrnc_dys_num >-----------------------------|
324 -- ----------------------------------------------------------------------------
325 --
326 -- Description
327 -- This procedure is used to check that the tolerance days number is greater
328 -- or equal to 0.
329 --
330 -- Pre Conditions
331 -- None.
332 --
333 -- In Parameters
334 -- clpse_lf_evt_id PK of record being inserted or updated.
335 -- effective_date Effective Date of session
336 -- tlrnc_dys_num Number of tolerance days
337 -- object_version_number Object version number of record being
338 -- inserted or updated.
339 --
340 -- Post Success
341 -- Processing continues
342 --
343 -- Post Failure
344 -- Errors handled by the procedure
345 --
346 -- Access Status
347 -- Internal table handler use only.
348 --
349 Procedure chk_tlrnc_dys_num(p_clpse_lf_evt_id in number,
350 p_tlrnc_dys_num in number,
351 p_effective_date in date,
352 p_object_version_number in number) is
353 --
354 l_proc varchar2(72) := g_package||'chk_tlrnc_dys_num';
355 l_api_updating boolean;
356 --
357 Begin
358 --
359 hr_utility.set_location('Entering:'||l_proc, 5);
360 --
361 if nvl(p_tlrnc_dys_num,0) < 0 then
362 --
363 fnd_message.set_name('BEN','BEN_92127_TLRNC_DYS_NUM');
364 fnd_message.raise_error;
365 --
366 end if;
367 --
368 hr_utility.set_location('Leaving:'||l_proc, 10);
369 --
370 End chk_tlrnc_dys_num;
371 -- ----------------------------------------------------------------------------
372 -- |----------------------------< chk_ler_bool_seq >--------------------------|
373 -- ----------------------------------------------------------------------------
374 --
375 -- Description
376 -- This procedure is used to check that the boolean expression are compatible
377 -- with the sequence of life events. In other words the life event should
378 -- encapsulate the boolean expressions and viceversa.
379 --
380 -- Pre Conditions
381 -- None.
382 --
383 -- In Parameters
384 -- clpse_lf_evt_id PK of record being inserted or updated.
385 -- ler1_id Life Event Reason.
386 -- bool1_cd Value of lookup code.
387 -- ler2_id Life Event Reason.
388 -- bool2_cd Value of lookup code.
389 -- ler3_id Life Event Reason.
390 -- bool3_cd Value of lookup code.
391 -- ler4_id Life Event Reason.
392 -- bool4_cd Value of lookup code.
393 -- ler5_id Life Event Reason.
394 -- bool5_cd Value of lookup code.
395 -- ler6_id Life Event Reason.
396 -- bool6_cd Value of lookup code.
397 -- ler7_id Life Event Reason.
398 -- bool7_cd Value of lookup code.
399 -- ler8_id Life Event Reason.
400 -- bool8_cd Value of lookup code.
401 -- ler9_id Life Event Reason.
402 -- bool9_cd Value of lookup code.
403 -- ler10_id Life Event Reason.
404 -- effective_date effective date
405 -- object_version_number Object version number of record being
406 -- inserted or updated.
407 --
408 -- Post Success
409 -- Processing continues
410 --
411 -- Post Failure
412 -- Error handled by procedure
413 --
414 -- Access Status
415 -- Internal table handler use only.
416 --
417 Procedure chk_ler_bool_seq(p_clpse_lf_evt_id in number,
418 p_ler1_id in number,
419 p_bool1_cd in varchar2,
420 p_ler2_id in number,
421 p_bool2_cd in varchar2,
422 p_ler3_id in number,
423 p_bool3_cd in varchar2,
424 p_ler4_id in number,
428 p_ler6_id in number,
425 p_bool4_cd in varchar2,
426 p_ler5_id in number,
427 p_bool5_cd in varchar2,
429 p_bool6_cd in varchar2,
430 p_ler7_id in number,
431 p_bool7_cd in varchar2,
432 p_ler8_id in number,
433 p_bool8_cd in varchar2,
434 p_ler9_id in number,
435 p_bool9_cd in varchar2,
436 p_ler10_id in number,
437 p_effective_date in date,
438 p_object_version_number in number) is
439 --
440 l_proc varchar2(72) := g_package||'chk_ler_bool_seq';
441 l_api_updating boolean;
442 l_error boolean := false;
443 --
444 Begin
445 --
446 hr_utility.set_location('Entering:'||l_proc, 5);
447 --
448 l_api_updating := ben_clp_shd.api_updating
449 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
450 p_effective_date => p_effective_date,
451 p_object_version_number => p_object_version_number);
452 --
453 if (l_api_updating
454 and p_ler1_id
455 <> nvl(ben_clp_shd.g_old_rec.ler1_id,hr_api.g_number)
456 or p_bool1_cd
457 <> nvl(ben_clp_shd.g_old_rec.bool1_cd,hr_api.g_varchar2)
458 or p_ler2_id
459 <> nvl(ben_clp_shd.g_old_rec.ler2_id,hr_api.g_number)
460 or p_bool2_cd
461 <> nvl(ben_clp_shd.g_old_rec.bool2_cd,hr_api.g_varchar2)
462 or p_ler3_id
463 <> nvl(ben_clp_shd.g_old_rec.ler3_id,hr_api.g_number)
464 or p_bool3_cd
465 <> nvl(ben_clp_shd.g_old_rec.bool3_cd,hr_api.g_varchar2)
466 or p_ler4_id
467 <> nvl(ben_clp_shd.g_old_rec.ler4_id,hr_api.g_number)
468 or p_bool4_cd
469 <> nvl(ben_clp_shd.g_old_rec.bool4_cd,hr_api.g_varchar2)
470 or p_ler5_id
471 <> nvl(ben_clp_shd.g_old_rec.ler5_id,hr_api.g_number)
472 or p_bool5_cd
473 <> nvl(ben_clp_shd.g_old_rec.bool5_cd,hr_api.g_varchar2)
474 or p_ler6_id
475 <> nvl(ben_clp_shd.g_old_rec.ler6_id,hr_api.g_number)
476 or p_bool6_cd
477 <> nvl(ben_clp_shd.g_old_rec.bool6_cd,hr_api.g_varchar2)
478 or p_ler7_id
479 <> nvl(ben_clp_shd.g_old_rec.ler7_id,hr_api.g_number)
480 or p_bool7_cd
481 <> nvl(ben_clp_shd.g_old_rec.bool7_cd,hr_api.g_varchar2)
482 or p_ler8_id
483 <> nvl(ben_clp_shd.g_old_rec.ler8_id,hr_api.g_number)
484 or p_bool8_cd
485 <> nvl(ben_clp_shd.g_old_rec.bool8_cd,hr_api.g_varchar2)
486 or p_ler9_id
487 <> nvl(ben_clp_shd.g_old_rec.ler9_id,hr_api.g_number)
488 or p_bool9_cd
489 <> nvl(ben_clp_shd.g_old_rec.bool9_cd,hr_api.g_varchar2)
490 or p_ler10_id
491 <> nvl(ben_clp_shd.g_old_rec.ler10_id,hr_api.g_number))
492 or not l_api_updating then
493 --
494 -- We need to check that any bool_cd that has a value is surrounded by
495 -- its adjacent life event reasons
496 --
497 if p_bool1_cd is not null and
498 (p_ler1_id is null or p_ler2_id is null) then
499 --
500 l_error := true;
501 --
502 elsif p_bool2_cd is not null and
503 (p_ler2_id is null or p_ler3_id is null) then
504 --
505 l_error := true;
506 --
507 elsif p_bool3_cd is not null and
508 (p_ler3_id is null or p_ler4_id is null) then
509 --
510 l_error := true;
511 --
512 elsif p_bool4_cd is not null and
513 (p_ler4_id is null or p_ler5_id is null) then
514 --
515 l_error := true;
516 --
517 elsif p_bool5_cd is not null and
518 (p_ler5_id is null or p_ler6_id is null) then
519 --
520 l_error := true;
521 --
522 elsif p_bool6_cd is not null and
523 (p_ler6_id is null or p_ler7_id is null) then
524 --
525 l_error := true;
526 --
527 elsif p_bool7_cd is not null and
528 (p_ler7_id is null or p_ler8_id is null) then
529 --
530 l_error := true;
531 --
532 elsif p_bool8_cd is not null and
533 (p_ler8_id is null or p_ler9_id is null) then
534 --
535 l_error := true;
536 --
537 elsif p_bool9_cd is not null and
538 (p_ler9_id is null or p_ler10_id is null) then
539 --
540 l_error := true;
541 --
542 -- Now lets check for the life event reasons not being encapsulated by
543 -- the boolean codes
544 --
545 elsif p_ler2_id is not null and
546 (p_bool1_cd is null) then
547 --
548 l_error := true;
549 --
550 elsif p_ler3_id is not null and
551 (p_bool2_cd is null) then
552 --
553 l_error := true;
554 --
555 elsif p_ler4_id is not null and
556 (p_bool3_cd is null) then
557 --
558 l_error := true;
559 --
563 l_error := true;
560 elsif p_ler5_id is not null and
561 (p_bool4_cd is null) then
562 --
564 --
565 elsif p_ler6_id is not null and
566 (p_bool5_cd is null) then
567 --
568 l_error := true;
569 --
570 elsif p_ler7_id is not null and
571 (p_bool6_cd is null) then
572 --
573 l_error := true;
574 --
575 elsif p_ler8_id is not null and
576 (p_bool7_cd is null) then
577 --
578 l_error := true;
579 --
580 elsif p_ler9_id is not null and
581 (p_bool8_cd is null) then
582 --
583 l_error := true;
584 --
585 elsif p_ler10_id is not null and
586 (p_bool9_cd is null) then
587 --
588 l_error := true;
589 --
590 end if;
591 --
592 if l_error then
593 --
594 -- We have an encapsulation problem on either life events or boolean
595 -- codes. This must be fixed as otherwise we can not parse the
596 --
597 fnd_message.set_name('BEN','BEN_92140_LER_BOOL_SEQ');
598 fnd_message.raise_error;
599 --
600 end if;
601 --
602 end if;
603 --
604 hr_utility.set_location('Entering:'||l_proc, 5);
605 --
606 end chk_ler_bool_seq;
607 -- ----------------------------------------------------------------------------
608 -- |----------------------------< chk_bool_cd >-------------------------------|
609 -- ----------------------------------------------------------------------------
610 --
611 -- Description
612 -- This procedure is used to check that the bool lookup values are valid.
613 --
614 -- Pre Conditions
615 -- None.
616 --
617 -- In Parameters
618 -- clpse_lf_evt_id PK of record being inserted or updated.
619 -- bool1_cd Value of lookup code.
620 -- bool2_cd Value of lookup code.
621 -- bool3_cd Value of lookup code.
622 -- bool4_cd Value of lookup code.
623 -- bool5_cd Value of lookup code.
624 -- bool6_cd Value of lookup code.
625 -- bool7_cd Value of lookup code.
626 -- bool8_cd Value of lookup code.
627 -- bool9_cd Value of lookup code.
628 -- effective_date effective date
629 -- object_version_number Object version number of record being
630 -- inserted or updated.
631 --
632 -- Post Success
633 -- Processing continues
634 --
635 -- Post Failure
636 -- Error handled by procedure
637 --
638 -- Access Status
639 -- Internal table handler use only.
640 --
641 Procedure chk_bool_cd(p_clpse_lf_evt_id in number,
642 p_bool1_cd in varchar2,
643 p_bool2_cd in varchar2,
644 p_bool3_cd in varchar2,
645 p_bool4_cd in varchar2,
646 p_bool5_cd in varchar2,
647 p_bool6_cd in varchar2,
648 p_bool7_cd in varchar2,
649 p_bool8_cd in varchar2,
650 p_bool9_cd in varchar2,
651 p_effective_date in date,
652 p_object_version_number in number) is
653 --
654 l_proc varchar2(72) := g_package||'chk_bool_cd';
655 l_api_updating boolean;
656 --
657 Begin
658 --
659 hr_utility.set_location('Entering:'||l_proc, 5);
660 --
661 l_api_updating := ben_clp_shd.api_updating
662 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
663 p_effective_date => p_effective_date,
664 p_object_version_number => p_object_version_number);
665 --
666 if (l_api_updating
667 and p_bool1_cd
668 <> nvl(ben_clp_shd.g_old_rec.bool1_cd,hr_api.g_varchar2)
669 or not l_api_updating)
670 and p_bool1_cd is not null then
671 --
672 -- check if value of lookup falls within lookup type.
673 --
674 if hr_api.not_exists_in_hr_lookups
675 (p_lookup_type => 'BEN_BOOL',
676 p_lookup_code => p_bool1_cd,
677 p_effective_date => p_effective_date) then
678 --
679 -- raise error as does not exist as lookup
680 --
681 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
682 fnd_message.set_token('FIELD','p_bool1_cd');
683 fnd_message.set_token('TYPE','BEN_BOOL');
684 fnd_message.raise_error;
685 --
686 end if;
687 --
688 end if;
689 --
690 if (l_api_updating
691 and p_bool2_cd
692 <> nvl(ben_clp_shd.g_old_rec.bool2_cd,hr_api.g_varchar2)
693 or not l_api_updating)
694 and p_bool2_cd is not null then
695 --
696 -- check if value of lookup falls within lookup type.
697 --
698 if hr_api.not_exists_in_hr_lookups
699 (p_lookup_type => 'BEN_BOOL',
700 p_lookup_code => p_bool2_cd,
704 --
701 p_effective_date => p_effective_date) then
702 --
703 -- raise error as does not exist as lookup
705 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
706 fnd_message.set_token('FIELD','p_bool2_cd');
707 fnd_message.set_token('TYPE','BEN_BOOL');
708 fnd_message.raise_error;
709 --
710 end if;
711 --
712 end if;
713 --
714 if (l_api_updating
715 and p_bool3_cd
716 <> nvl(ben_clp_shd.g_old_rec.bool3_cd,hr_api.g_varchar2)
717 or not l_api_updating)
718 and p_bool3_cd is not null then
719 --
720 -- check if value of lookup falls within lookup type.
721 --
722 if hr_api.not_exists_in_hr_lookups
723 (p_lookup_type => 'BEN_BOOL',
724 p_lookup_code => p_bool3_cd,
725 p_effective_date => p_effective_date) then
726 --
727 -- raise error as does not exist as lookup
728 --
729 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
730 fnd_message.set_token('FIELD','p_bool3_cd');
731 fnd_message.set_token('TYPE','BEN_BOOL');
732 fnd_message.raise_error;
733 --
734 end if;
735 --
736 end if;
737 --
738 if (l_api_updating
739 and p_bool4_cd
740 <> nvl(ben_clp_shd.g_old_rec.bool4_cd,hr_api.g_varchar2)
741 or not l_api_updating)
742 and p_bool4_cd is not null then
743 --
744 -- check if value of lookup falls within lookup type.
745 --
746 if hr_api.not_exists_in_hr_lookups
747 (p_lookup_type => 'BEN_BOOL',
748 p_lookup_code => p_bool4_cd,
749 p_effective_date => p_effective_date) then
750 --
751 -- raise error as does not exist as lookup
752 --
753 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
754 fnd_message.set_token('FIELD','p_bool4_cd');
755 fnd_message.set_token('TYPE','BEN_BOOL');
756 fnd_message.raise_error;
757 --
758 end if;
759 --
760 end if;
761 --
762 if (l_api_updating
763 and p_bool5_cd
764 <> nvl(ben_clp_shd.g_old_rec.bool5_cd,hr_api.g_varchar2)
765 or not l_api_updating)
766 and p_bool5_cd is not null then
767 --
768 -- check if value of lookup falls within lookup type.
769 --
770 if hr_api.not_exists_in_hr_lookups
771 (p_lookup_type => 'BEN_BOOL',
772 p_lookup_code => p_bool5_cd,
773 p_effective_date => p_effective_date) then
774 --
775 -- raise error as does not exist as lookup
776 --
777 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
778 fnd_message.set_token('FIELD','p_bool5_cd');
779 fnd_message.set_token('TYPE','BEN_BOOL');
780 fnd_message.raise_error;
781 --
782 end if;
783 --
784 end if;
785 --
786 if (l_api_updating
787 and p_bool6_cd
788 <> nvl(ben_clp_shd.g_old_rec.bool6_cd,hr_api.g_varchar2)
789 or not l_api_updating)
790 and p_bool6_cd is not null then
791 --
792 -- check if value of lookup falls within lookup type.
793 --
794 if hr_api.not_exists_in_hr_lookups
795 (p_lookup_type => 'BEN_BOOL',
796 p_lookup_code => p_bool6_cd,
797 p_effective_date => p_effective_date) then
798 --
799 -- raise error as does not exist as lookup
800 --
801 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
802 fnd_message.set_token('FIELD','p_bool6_cd');
803 fnd_message.set_token('TYPE','BEN_BOOL');
804 fnd_message.raise_error;
805 --
806 end if;
807 --
808 end if;
809 --
810 if (l_api_updating
811 and p_bool7_cd
812 <> nvl(ben_clp_shd.g_old_rec.bool7_cd,hr_api.g_varchar2)
813 or not l_api_updating)
814 and p_bool7_cd is not null then
815 --
816 -- check if value of lookup falls within lookup type.
817 --
818 if hr_api.not_exists_in_hr_lookups
819 (p_lookup_type => 'BEN_BOOL',
820 p_lookup_code => p_bool7_cd,
821 p_effective_date => p_effective_date) then
822 --
823 -- raise error as does not exist as lookup
824 --
825 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
826 fnd_message.set_token('FIELD','p_bool7_cd');
827 fnd_message.set_token('TYPE','BEN_BOOL');
828 fnd_message.raise_error;
829 --
830 end if;
831 --
832 end if;
833 --
834 if (l_api_updating
835 and p_bool8_cd
836 <> nvl(ben_clp_shd.g_old_rec.bool8_cd,hr_api.g_varchar2)
837 or not l_api_updating)
838 and p_bool8_cd is not null then
839 --
840 -- check if value of lookup falls within lookup type.
841 --
842 if hr_api.not_exists_in_hr_lookups
843 (p_lookup_type => 'BEN_BOOL',
844 p_lookup_code => p_bool8_cd,
845 p_effective_date => p_effective_date) then
846 --
847 -- raise error as does not exist as lookup
851 fnd_message.set_token('TYPE','BEN_BOOL');
848 --
849 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
850 fnd_message.set_token('FIELD','p_bool8_cd');
852 fnd_message.raise_error;
853 --
854 end if;
855 --
856 end if;
857 --
858 if (l_api_updating
859 and p_bool9_cd
860 <> nvl(ben_clp_shd.g_old_rec.bool9_cd,hr_api.g_varchar2)
861 or not l_api_updating)
862 and p_bool9_cd is not null then
863 --
864 -- check if value of lookup falls within lookup type.
865 --
866 if hr_api.not_exists_in_hr_lookups
867 (p_lookup_type => 'BEN_BOOL',
868 p_lookup_code => p_bool9_cd,
869 p_effective_date => p_effective_date) then
870 --
871 -- raise error as does not exist as lookup
872 --
873 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
874 fnd_message.set_token('FIELD','p_bool9_cd');
875 fnd_message.set_token('TYPE','BEN_BOOL');
876 fnd_message.raise_error;
877 --
878 end if;
879 --
880 end if;
881 --
882 hr_utility.set_location('Leaving:'||l_proc,10);
883 --
884 end chk_bool_cd;
885 --
886 -- ----------------------------------------------------------------------------
887 -- |------------------------------< chk_eval_rl >-----------------------------|
888 -- ----------------------------------------------------------------------------
889 --
890 -- Description
891 -- This procedure is used to check that the Formula Rule is valid.
892 --
893 -- Pre Conditions
894 -- None.
895 --
896 -- In Parameters
897 -- clpse_lf_evt_id PK of record being inserted or updated.
898 -- eval_rl Value of formula rule id.
899 -- business_group_id Value of business group id.
900 -- effective_date effective date
901 -- object_version_number Object version number of record being
902 -- inserted or updated.
903 --
904 -- Post Success
905 -- Processing continues
906 --
907 -- Post Failure
908 -- Error handled by procedure
909 --
910 -- Access Status
911 -- Internal table handler use only.
912 --
913 Procedure chk_eval_rl(p_clpse_lf_evt_id in number,
914 p_eval_rl in number,
915 p_business_group_id in number,
916 p_effective_date in date,
917 p_object_version_number in number) is
918 --
919 l_proc varchar2(72) := g_package||'chk_eval_rl';
920 l_api_updating boolean;
921 --
922 Begin
923 --
924 hr_utility.set_location('Entering:'||l_proc, 5);
925 --
926 l_api_updating := ben_clp_shd.api_updating
927 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
928 p_effective_date => p_effective_date,
929 p_object_version_number => p_object_version_number);
930 --
931 if (l_api_updating
932 and nvl(p_eval_rl,hr_api.g_number)
933 <> ben_clp_shd.g_old_rec.eval_rl
934 or not l_api_updating)
935 and p_eval_rl is not null then
936 --
937 -- check if value of formula rule is valid.
938 --
939 if not benutils.formula_exists
940 (p_formula_id => p_eval_rl,
941 p_formula_type_id => -506,
942 p_business_group_id => p_business_group_id,
943 p_effective_date => p_effective_date) then
944 --
945 -- raise error
946 --
947 fnd_message.set_name('BEN','BEN_91471_FORMULA_NOT_FOUND');
948 fnd_message.set_token('ID',p_eval_rl);
949 fnd_message.set_token('TYPE_ID',-506);
950 fnd_message.raise_error;
951 --
952 end if;
953 --
954 end if;
955 --
956 hr_utility.set_location('Leaving:'||l_proc,10);
957 --
958 end chk_eval_rl;
959 -- ----------------------------------------------------------------------------
960 -- |-------------------------< chk_eval_ler_det_rl >--------------------------|
961 -- ----------------------------------------------------------------------------
962 --
963 -- Description
964 -- This procedure is used to check that the Formula Rule is valid.
965 --
966 -- Pre Conditions
967 -- None.
968 --
969 -- In Parameters
970 -- clpse_lf_evt_id PK of record being inserted or updated.
971 -- eval_ler_det_rl Value of formula rule id.
972 -- business_group_id Value of business group id.
973 -- effective_date effective date
974 -- object_version_number Object version number of record being
975 -- inserted or updated.
976 --
977 -- Post Success
978 -- Processing continues
979 --
980 -- Post Failure
981 -- Error handled by procedure
982 --
983 -- Access Status
984 -- Internal table handler use only.
985 --
986 Procedure chk_eval_ler_det_rl(p_clpse_lf_evt_id in number,
987 p_eval_ler_det_rl in number,
988 p_business_group_id in number,
989 p_effective_date in date,
993 l_api_updating boolean;
990 p_object_version_number in number) is
991 --
992 l_proc varchar2(72) := g_package||'chk_eval_ler_det_rl';
994 --
995 Begin
996 --
997 hr_utility.set_location('Entering:'||l_proc, 5);
998 --
999 l_api_updating := ben_clp_shd.api_updating
1000 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
1001 p_effective_date => p_effective_date,
1002 p_object_version_number => p_object_version_number);
1003 --
1004 if (l_api_updating
1005 and nvl(p_eval_ler_det_rl,hr_api.g_number)
1006 <> ben_clp_shd.g_old_rec.eval_ler_det_rl
1007 or not l_api_updating)
1008 and p_eval_ler_det_rl is not null then
1009 --
1010 -- check if value of formula rule is valid.
1011 --
1012 if not benutils.formula_exists
1013 (p_formula_id => p_eval_ler_det_rl,
1014 p_formula_type_id => -505,
1015 p_business_group_id => p_business_group_id,
1016 p_effective_date => p_effective_date) then
1017 --
1018 -- raise error
1019 --
1020 fnd_message.set_name('BEN','BEN_91471_FORMULA_NOT_FOUND');
1021 fnd_message.set_token('ID',p_eval_ler_det_rl);
1022 fnd_message.set_token('TYPE_ID',-505);
1023 fnd_message.raise_error;
1024 --
1025 end if;
1026 --
1027 end if;
1028 --
1029 hr_utility.set_location('Leaving:'||l_proc,10);
1030 --
1031 end chk_eval_ler_det_rl;
1032 --
1033 -- ----------------------------------------------------------------------------
1034 -- |---------------------< chk_consecutive_bool_cd >--------------------------|
1035 -- ----------------------------------------------------------------------------
1036 --
1037 -- Description
1038 -- This procedure is used to check that the bool codes are consecutive. This
1039 -- is needed for evaluation of life events.
1040 --
1041 -- Pre Conditions
1042 -- None.
1043 --
1044 -- In Parameters
1045 -- bool1_cd Value of lookup code.
1046 -- bool2_cd Value of lookup code.
1047 -- bool3_cd Value of lookup code.
1048 -- bool4_cd Value of lookup code.
1049 -- bool5_cd Value of lookup code.
1050 -- bool6_cd Value of lookup code.
1051 -- bool7_cd Value of lookup code.
1052 -- bool8_cd Value of lookup code.
1053 -- bool9_cd Value of lookup code.
1054 --
1055 -- Post Success
1056 -- Processing continues
1057 --
1058 -- Post Failure
1059 -- Error handled by procedure
1060 --
1061 -- Access Status
1062 -- Internal table handler use only.
1063 --
1064 Procedure chk_consecutive_bool_cd(p_bool1_cd in varchar2,
1065 p_bool2_cd in varchar2,
1066 p_bool3_cd in varchar2,
1067 p_bool4_cd in varchar2,
1068 p_bool5_cd in varchar2,
1069 p_bool6_cd in varchar2,
1070 p_bool7_cd in varchar2,
1071 p_bool8_cd in varchar2,
1072 p_bool9_cd in varchar2) is
1073 --
1074 l_proc varchar2(72) := g_package||'chk_consecutive_bool_cd';
1075 l_found boolean := false;
1076 --
1077 Begin
1078 --
1079 hr_utility.set_location('Entering:'||l_proc, 5);
1080 --
1081 if p_bool1_cd is null and
1082 (p_bool2_cd is not null or
1083 p_bool3_cd is not null or
1084 p_bool4_cd is not null or
1085 p_bool5_cd is not null or
1086 p_bool6_cd is not null or
1087 p_bool7_cd is not null or
1088 p_bool8_cd is not null or
1089 p_bool9_cd is not null) then
1090 --
1091 l_found := true;
1092 --
1093 elsif p_bool2_cd is null and
1094 (p_bool3_cd is not null or
1095 p_bool4_cd is not null or
1096 p_bool5_cd is not null or
1097 p_bool6_cd is not null or
1098 p_bool7_cd is not null or
1099 p_bool8_cd is not null or
1100 p_bool9_cd is not null) then
1101 --
1102 l_found := true;
1103 --
1104 elsif p_bool3_cd is null and
1105 (p_bool4_cd is not null or
1106 p_bool5_cd is not null or
1107 p_bool6_cd is not null or
1108 p_bool7_cd is not null or
1109 p_bool8_cd is not null or
1110 p_bool9_cd is not null) then
1111 --
1112 l_found := true;
1113 --
1114 elsif p_bool4_cd is null and
1115 (p_bool5_cd is not null or
1116 p_bool6_cd is not null or
1117 p_bool7_cd is not null or
1118 p_bool8_cd is not null or
1119 p_bool9_cd is not null) then
1120 --
1121 l_found := true;
1122 --
1123 elsif p_bool5_cd is null and
1124 (p_bool6_cd is not null or
1125 p_bool7_cd is not null or
1126 p_bool8_cd is not null or
1127 p_bool9_cd is not null) then
1128 --
1129 l_found := true;
1130 --
1131 elsif p_bool6_cd is null and
1132 (p_bool7_cd is not null or
1136 l_found := true;
1133 p_bool8_cd is not null or
1134 p_bool9_cd is not null) then
1135 --
1137 --
1138 elsif p_bool7_cd is null and
1139 (p_bool8_cd is not null or
1140 p_bool9_cd is not null) then
1141 --
1142 l_found := true;
1143 --
1144 elsif p_bool8_cd is null and
1145 (p_bool9_cd is not null) then
1146 --
1147 l_found := true;
1148 --
1149 end if;
1150 --
1151 if l_found then
1152 --
1153 -- Raise error as user must use consecutive boolean codes as otherwise
1154 -- the parsing becomes more complex.
1155 --
1156 fnd_message.set_name('BEN','BEN_92128_CONSEC_BOOLEAN');
1157 fnd_message.raise_error;
1158 --
1159 end if;
1160 --
1161 hr_utility.set_location('Entering:'||l_proc, 5);
1162 --
1163 end chk_consecutive_bool_cd;
1164 -- ----------------------------------------------------------------------------
1165 -- |---------------------< chk_consecutive_ler_id >---------------------------|
1166 -- ----------------------------------------------------------------------------
1167 --
1168 -- Description
1169 -- This procedure is used to check that the ler id codes are consecutive. This
1170 -- is needed for evaluation of life events.
1171 --
1172 -- Pre Conditions
1173 -- None.
1174 --
1175 -- In Parameters
1176 -- ler1_id ID of life event.
1177 -- ler2_id ID of life event.
1178 -- ler3_id ID of life event.
1179 -- ler4_id ID of life event.
1180 -- ler5_id ID of life event.
1181 -- ler6_id ID of life event.
1182 -- ler7_id ID of life event.
1183 -- ler8_id ID of life event.
1184 -- ler9_id ID of life event.
1185 -- ler10_id ID of life event.
1186 --
1187 -- Post Success
1188 -- Processing continues
1189 --
1190 -- Post Failure
1191 -- Error handled by procedure
1192 --
1193 -- Access Status
1194 -- Internal table handler use only.
1195 --
1196 Procedure chk_consecutive_ler_id(p_ler1_id in number,
1197 p_ler2_id in number,
1198 p_ler3_id in number,
1199 p_ler4_id in number,
1200 p_ler5_id in number,
1201 p_ler6_id in number,
1202 p_ler7_id in number,
1203 p_ler8_id in number,
1204 p_ler9_id in number,
1205 p_ler10_id in number) is
1206 --
1207 l_proc varchar2(72) := g_package||'chk_consecutive_ler_id';
1208 l_found boolean := false;
1209 --
1210 Begin
1211 --
1212 hr_utility.set_location('Entering:'||l_proc, 5);
1213 --
1214 if p_ler1_id is null and
1215 (p_ler2_id is not null or
1216 p_ler3_id is not null or
1217 p_ler4_id is not null or
1218 p_ler5_id is not null or
1219 p_ler6_id is not null or
1220 p_ler7_id is not null or
1221 p_ler8_id is not null or
1222 p_ler9_id is not null or
1223 p_ler10_id is not null) then
1224 --
1225 l_found := true;
1226 --
1227 elsif p_ler2_id is null and
1228 (p_ler3_id is not null or
1229 p_ler4_id is not null or
1230 p_ler5_id is not null or
1231 p_ler6_id is not null or
1232 p_ler7_id is not null or
1233 p_ler8_id is not null or
1234 p_ler9_id is not null or
1235 p_ler10_id is not null) then
1236 --
1237 l_found := true;
1238 --
1239 elsif p_ler3_id is null and
1240 (p_ler4_id is not null or
1241 p_ler5_id is not null or
1242 p_ler6_id is not null or
1243 p_ler7_id is not null or
1244 p_ler8_id is not null or
1245 p_ler9_id is not null or
1246 p_ler10_id is not null) then
1247 --
1248 l_found := true;
1249 --
1250 elsif p_ler4_id is null and
1251 (p_ler5_id is not null or
1252 p_ler6_id is not null or
1253 p_ler7_id is not null or
1254 p_ler8_id is not null or
1255 p_ler9_id is not null or
1256 p_ler10_id is not null) then
1257 --
1258 l_found := true;
1259 --
1260 elsif p_ler5_id is null and
1261 (p_ler6_id is not null or
1262 p_ler7_id is not null or
1263 p_ler8_id is not null or
1264 p_ler9_id is not null or
1265 p_ler10_id is not null) then
1266 --
1267 l_found := true;
1268 --
1269 elsif p_ler6_id is null and
1270 (p_ler7_id is not null or
1271 p_ler8_id is not null or
1272 p_ler9_id is not null or
1273 p_ler10_id is not null) then
1274 --
1275 l_found := true;
1276 --
1277 elsif p_ler7_id is null and
1278 (p_ler8_id is not null or
1279 p_ler9_id is not null or
1280 p_ler10_id is not null) then
1281 --
1282 l_found := true;
1283 --
1284 elsif p_ler8_id is null and
1288 l_found := true;
1285 (p_ler9_id is not null or
1286 p_ler10_id is not null) then
1287 --
1289 --
1290 elsif p_ler9_id is null and
1291 (p_ler10_id is not null) then
1292 --
1293 l_found := true;
1294 --
1295 end if;
1296 --
1297 if l_found then
1298 --
1299 -- Raise error as user must use consecutive boolean codes as otherwise
1300 -- the parsing becomes more complex.
1301 --
1302 fnd_message.set_name('BEN','BEN_92129_CONSEC_LER');
1303 fnd_message.raise_error;
1304 --
1305 end if;
1306 --
1307 hr_utility.set_location('Entering:'||l_proc, 5);
1308 --
1309 end chk_consecutive_ler_id;
1310 -- ----------------------------------------------------------------------------
1311 -- |----------------------------< chk_eval_cd >-------------------------------|
1312 -- ----------------------------------------------------------------------------
1313 --
1314 -- Description
1315 -- This procedure is used to check that the Evaluation code is in the lookup
1316 -- for the code.
1317 --
1318 -- Pre Conditions
1319 -- None.
1320 --
1321 -- In Parameters
1322 -- clpse_lf_evt_id PK of record being inserted or updated.
1323 -- eval_cd Code for lookup
1324 -- effective_date effective date
1325 -- object_version_number Object version number of record being
1326 -- inserted or updated.
1327 --
1328 -- Post Success
1329 -- Processing continues
1330 --
1331 -- Post Failure
1332 -- Error handled by procedure
1333 --
1334 -- Access Status
1335 -- Internal table handler use only.
1336 --
1337 Procedure chk_eval_cd(p_clpse_lf_evt_id in number,
1338 p_eval_cd in varchar2,
1339 p_effective_date in date,
1340 p_object_version_number in number) is
1341 --
1342 l_proc varchar2(72) := g_package||'chk_eval_cd';
1343 l_api_updating boolean;
1344 l_dummy varchar2(1);
1345 --
1346 Begin
1347 --
1348 hr_utility.set_location('Entering:'||l_proc, 5);
1349 --
1350 l_api_updating := ben_clp_shd.api_updating
1351 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
1352 p_effective_date => p_effective_date,
1353 p_object_version_number => p_object_version_number);
1354 --
1355 if (l_api_updating
1356 and p_eval_cd
1357 <> nvl(ben_clp_shd.g_old_rec.eval_cd,hr_api.g_varchar2)
1358 or not l_api_updating) then
1359 --
1360 -- check if value of lookup falls within lookup type.
1361 --
1362 if hr_api.not_exists_in_hr_lookups
1363 (p_lookup_type => 'BEN_EVAL',
1364 p_lookup_code => p_eval_cd,
1365 p_effective_date => p_effective_date) then
1366 --
1367 -- raise error as does not exist as lookup
1368 --
1369 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1370 fnd_message.set_token('FIELD','p_eval_cd');
1371 fnd_message.set_token('TYPE','BEN_EVAL');
1372 fnd_message.raise_error;
1373 --
1374 end if;
1375 --
1376 end if;
1377 --
1378 hr_utility.set_location('Leaving:'||l_proc,10);
1379 --
1380 end chk_eval_cd;
1381 -- ----------------------------------------------------------------------------
1382 -- |------------------------< chk_eval_ler_det_cd >---------------------------|
1383 -- ----------------------------------------------------------------------------
1384 --
1385 -- Description
1386 -- This procedure is used to check that the Evaluation ler det code is in
1387 -- the lookup for the code.
1388 --
1389 -- Pre Conditions
1390 -- None.
1391 --
1392 -- In Parameters
1393 -- clpse_lf_evt_id PK of record being inserted or updated.
1394 -- eval_ler_det_cd Code for lookup
1395 -- effective_date effective date
1396 -- object_version_number Object version number of record being
1397 -- inserted or updated.
1398 --
1399 -- Post Success
1400 -- Processing continues
1401 --
1402 -- Post Failure
1403 -- Error handled by procedure
1404 --
1405 -- Access Status
1406 -- Internal table handler use only.
1407 --
1408 Procedure chk_eval_ler_det_cd(p_clpse_lf_evt_id in number,
1409 p_eval_ler_det_cd in varchar2,
1410 p_effective_date in date,
1411 p_object_version_number in number) is
1412 --
1413 l_proc varchar2(72) := g_package||'chk_eval_ler_det_cd';
1414 l_api_updating boolean;
1415 l_dummy varchar2(1);
1416 --
1417 Begin
1418 --
1419 hr_utility.set_location('Entering:'||l_proc, 5);
1420 --
1421 l_api_updating := ben_clp_shd.api_updating
1422 (p_clpse_lf_evt_id => p_clpse_lf_evt_id,
1423 p_effective_date => p_effective_date,
1424 p_object_version_number => p_object_version_number);
1425 --
1426 if (l_api_updating
1427 and p_eval_ler_det_cd
1428 <> nvl(ben_clp_shd.g_old_rec.eval_cd,hr_api.g_varchar2)
1432 --
1429 or not l_api_updating) then
1430 --
1431 -- check if value of lookup falls within lookup type.
1433 if hr_api.not_exists_in_hr_lookups
1434 (p_lookup_type => 'BEN_EVAL_DET',
1435 p_lookup_code => p_eval_ler_det_cd,
1436 p_effective_date => p_effective_date) then
1437 --
1438 -- raise error as does not exist as lookup
1439 --
1440 fnd_message.set_name('BEN','BEN_91628_LOOKUP_TYPE_GENERIC');
1441 fnd_message.set_token('FIELD','p_eval_ler_det_cd');
1442 fnd_message.set_token('TYPE','BEN_EVAL_DET');
1443 fnd_message.raise_error;
1444 --
1445 end if;
1446 --
1447 end if;
1448 --
1449 hr_utility.set_location('Leaving:'||l_proc,10);
1450 --
1451 end chk_eval_ler_det_cd;
1452 -- ----------------------------------------------------------------------------
1453 -- |--------------------------< dt_update_validate >--------------------------|
1454 -- ----------------------------------------------------------------------------
1455 -- {Start Of Comments}
1456 --
1457 -- Description:
1458 -- This procedure is used for referential integrity of datetracked
1459 -- parent entities when a datetrack update operation is taking place
1460 -- and where there is no cascading of update defined for this entity.
1461 --
1462 -- Prerequisites:
1463 -- This procedure is called from the update_validate.
1464 --
1465 -- In Parameters:
1466 --
1467 -- Post Success:
1468 -- Processing continues.
1469 --
1470 -- Post Failure:
1471 --
1472 -- Developer Implementation Notes:
1473 -- This procedure should not need maintenance unless the HR Schema model
1474 -- changes.
1475 --
1476 -- Access Status:
1477 -- Internal Row Handler Use Only.
1478 --
1479 -- {End Of Comments}
1480 -- ----------------------------------------------------------------------------
1481 Procedure dt_update_validate
1482 (p_ler1_id in number default hr_api.g_number,
1483 p_ler2_id in number default hr_api.g_number,
1484 p_ler3_id in number default hr_api.g_number,
1485 p_ler4_id in number default hr_api.g_number,
1486 p_ler5_id in number default hr_api.g_number,
1487 p_ler6_id in number default hr_api.g_number,
1488 p_ler7_id in number default hr_api.g_number,
1489 p_ler8_id in number default hr_api.g_number,
1490 p_ler9_id in number default hr_api.g_number,
1491 p_ler10_id in number default hr_api.g_number,
1492 p_eval_ler_id in number default hr_api.g_number,
1493 p_datetrack_mode in varchar2,
1494 p_validation_start_date in date,
1495 p_validation_end_date in date) Is
1496 --
1497 l_proc varchar2(72) := g_package||'dt_update_validate';
1498 l_integrity_error Exception;
1499 l_table_name all_tables.table_name%TYPE;
1500 --
1501 Begin
1502 hr_utility.set_location('Entering:'||l_proc, 5);
1503 --
1504 -- Ensure that the p_datetrack_mode argument is not null
1505 --
1506 hr_api.mandatory_arg_error
1507 (p_api_name => l_proc,
1508 p_argument => 'datetrack_mode',
1509 p_argument_value => p_datetrack_mode);
1510 --
1511 -- Only perform the validation if the datetrack update mode is valid
1512 --
1513 If (dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode)) then
1514 --
1515 --
1516 -- Ensure the arguments are not null
1517 --
1518 hr_api.mandatory_arg_error
1519 (p_api_name => l_proc,
1520 p_argument => 'validation_start_date',
1521 p_argument_value => p_validation_start_date);
1522 --
1523 hr_api.mandatory_arg_error
1524 (p_api_name => l_proc,
1525 p_argument => 'validation_end_date',
1526 p_argument_value => p_validation_end_date);
1527 --
1528 If ((nvl(p_ler1_id, hr_api.g_number) <> hr_api.g_number) and
1529 NOT (dt_api.check_min_max_dates
1530 (p_base_table_name => 'ben_ler_f',
1531 p_base_key_column => 'ler_id',
1532 p_base_key_value => p_ler1_id,
1533 p_from_date => p_validation_start_date,
1534 p_to_date => p_validation_end_date))) Then
1535 l_table_name := 'ben_ler_f';
1536 Raise l_integrity_error;
1537 End If;
1538 If ((nvl(p_ler2_id, hr_api.g_number) <> hr_api.g_number) and
1539 NOT (dt_api.check_min_max_dates
1540 (p_base_table_name => 'ben_ler_f',
1541 p_base_key_column => 'ler_id',
1542 p_base_key_value => p_ler2_id,
1543 p_from_date => p_validation_start_date,
1544 p_to_date => p_validation_end_date))) Then
1545 l_table_name := 'ben_ler_f';
1546 Raise l_integrity_error;
1547 End If;
1548 If ((nvl(p_ler3_id, hr_api.g_number) <> hr_api.g_number) and
1549 NOT (dt_api.check_min_max_dates
1550 (p_base_table_name => 'ben_ler_f',
1551 p_base_key_column => 'ler_id',
1552 p_base_key_value => p_ler3_id,
1556 Raise l_integrity_error;
1553 p_from_date => p_validation_start_date,
1554 p_to_date => p_validation_end_date))) Then
1555 l_table_name := 'ben_ler_f';
1557 End If;
1558 If ((nvl(p_ler4_id, hr_api.g_number) <> hr_api.g_number) and
1559 NOT (dt_api.check_min_max_dates
1560 (p_base_table_name => 'ben_ler_f',
1561 p_base_key_column => 'ler_id',
1562 p_base_key_value => p_ler4_id,
1563 p_from_date => p_validation_start_date,
1564 p_to_date => p_validation_end_date))) Then
1565 l_table_name := 'ben_ler_f';
1566 Raise l_integrity_error;
1567 End If;
1568 If ((nvl(p_ler5_id, hr_api.g_number) <> hr_api.g_number) and
1569 NOT (dt_api.check_min_max_dates
1570 (p_base_table_name => 'ben_ler_f',
1571 p_base_key_column => 'ler_id',
1572 p_base_key_value => p_ler5_id,
1573 p_from_date => p_validation_start_date,
1574 p_to_date => p_validation_end_date))) Then
1575 l_table_name := 'ben_ler_f';
1576 Raise l_integrity_error;
1577 End If;
1578 If ((nvl(p_ler6_id, hr_api.g_number) <> hr_api.g_number) and
1579 NOT (dt_api.check_min_max_dates
1580 (p_base_table_name => 'ben_ler_f',
1581 p_base_key_column => 'ler_id',
1582 p_base_key_value => p_ler6_id,
1583 p_from_date => p_validation_start_date,
1584 p_to_date => p_validation_end_date))) Then
1585 l_table_name := 'ben_ler_f';
1586 Raise l_integrity_error;
1587 End If;
1588 If ((nvl(p_ler7_id, hr_api.g_number) <> hr_api.g_number) and
1589 NOT (dt_api.check_min_max_dates
1590 (p_base_table_name => 'ben_ler_f',
1591 p_base_key_column => 'ler_id',
1592 p_base_key_value => p_ler7_id,
1593 p_from_date => p_validation_start_date,
1594 p_to_date => p_validation_end_date))) Then
1595 l_table_name := 'ben_ler_f';
1596 Raise l_integrity_error;
1597 End If;
1598 If ((nvl(p_ler8_id, hr_api.g_number) <> hr_api.g_number) and
1599 NOT (dt_api.check_min_max_dates
1600 (p_base_table_name => 'ben_ler_f',
1601 p_base_key_column => 'ler_id',
1602 p_base_key_value => p_ler8_id,
1603 p_from_date => p_validation_start_date,
1604 p_to_date => p_validation_end_date))) Then
1605 l_table_name := 'ben_ler_f';
1606 Raise l_integrity_error;
1607 End If;
1608 If ((nvl(p_ler9_id, hr_api.g_number) <> hr_api.g_number) and
1609 NOT (dt_api.check_min_max_dates
1610 (p_base_table_name => 'ben_ler_f',
1611 p_base_key_column => 'ler_id',
1612 p_base_key_value => p_ler9_id,
1613 p_from_date => p_validation_start_date,
1614 p_to_date => p_validation_end_date))) Then
1615 l_table_name := 'ben_ler_f';
1616 Raise l_integrity_error;
1617 End If;
1618 If ((nvl(p_ler10_id, hr_api.g_number) <> hr_api.g_number) and
1619 NOT (dt_api.check_min_max_dates
1620 (p_base_table_name => 'ben_ler_f',
1621 p_base_key_column => 'ler_id',
1622 p_base_key_value => p_ler10_id,
1623 p_from_date => p_validation_start_date,
1624 p_to_date => p_validation_end_date))) Then
1625 l_table_name := 'ben_ler_f';
1626 Raise l_integrity_error;
1627 End If;
1628 If ((nvl(p_eval_ler_id, hr_api.g_number) <> hr_api.g_number) and
1629 NOT (dt_api.check_min_max_dates
1630 (p_base_table_name => 'ben_ler_f',
1631 p_base_key_column => 'ler_id',
1632 p_base_key_value => p_eval_ler_id,
1633 p_from_date => p_validation_start_date,
1634 p_to_date => p_validation_end_date))) Then
1635 l_table_name := 'ben_ler_f';
1636 Raise l_integrity_error;
1637 End If;
1638 --
1639 End If;
1640 --
1641 hr_utility.set_location(' Leaving:'||l_proc, 10);
1642 Exception
1643 When l_integrity_error Then
1644 --
1645 -- A referential integrity check was violated therefore
1646 -- we must error
1647 --
1648 hr_utility.set_message(801, 'HR_7216_DT_UPD_INTEGRITY_ERR');
1649 hr_utility.set_message_token('TABLE_NAME', l_table_name);
1650 hr_utility.raise_error;
1651 When Others Then
1652 --
1653 -- An unhandled or unexpected error has occurred which
1654 -- we must report
1655 --
1656 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1657 hr_utility.set_message_token('PROCEDURE', l_proc);
1658 hr_utility.set_message_token('STEP','15');
1659 hr_utility.raise_error;
1660 End dt_update_validate;
1661 --
1662 -- ----------------------------------------------------------------------------
1663 -- |--------------------------< dt_delete_validate >--------------------------|
1664 -- ----------------------------------------------------------------------------
1665 -- {Start Of Comments}
1666 --
1667 -- Description:
1668 -- This procedure is used for referential integrity of datetracked
1669 -- child entities when either a datetrack DELETE or ZAP is in operation
1670 -- and where there is no cascading of delete defined for this entity.
1674 --
1671 -- For the datetrack mode of DELETE or ZAP we must ensure that no
1672 -- datetracked child rows exist between the validation start and end
1673 -- dates.
1675 -- Prerequisites:
1676 -- This procedure is called from the delete_validate.
1677 --
1678 -- In Parameters:
1679 --
1680 -- Post Success:
1681 -- Processing continues.
1682 --
1683 -- Post Failure:
1684 -- If a row exists by determining the returning Boolean value from the
1685 -- generic dt_api.rows_exist function then we must supply an error via
1686 -- the use of the local exception handler l_rows_exist.
1687 --
1688 -- Developer Implementation Notes:
1689 -- This procedure should not need maintenance unless the HR Schema model
1690 -- changes.
1691 --
1692 -- Access Status:
1693 -- Internal Row Handler Use Only.
1694 --
1695 -- {End Of Comments}
1696 -- ----------------------------------------------------------------------------
1697 Procedure dt_delete_validate
1698 (p_clpse_lf_evt_id in number,
1699 p_datetrack_mode in varchar2,
1700 p_validation_start_date in date,
1701 p_validation_end_date in date) Is
1702 --
1703 l_proc varchar2(72) := g_package||'dt_delete_validate';
1704 l_rows_exist Exception;
1705 l_table_name all_tables.table_name%TYPE;
1706 --
1707 Begin
1708 hr_utility.set_location('Entering:'||l_proc, 5);
1709 --
1710 -- Ensure that the p_datetrack_mode argument is not null
1711 --
1712 hr_api.mandatory_arg_error
1713 (p_api_name => l_proc,
1714 p_argument => 'datetrack_mode',
1715 p_argument_value => p_datetrack_mode);
1716 --
1717 -- Only perform the validation if the datetrack mode is either
1718 -- DELETE or ZAP
1719 --
1720 If (p_datetrack_mode = 'DELETE' or
1721 p_datetrack_mode = 'ZAP') then
1722 --
1723 --
1724 -- Ensure the arguments are not null
1725 --
1726 hr_api.mandatory_arg_error
1727 (p_api_name => l_proc,
1728 p_argument => 'validation_start_date',
1729 p_argument_value => p_validation_start_date);
1730 --
1731 hr_api.mandatory_arg_error
1732 (p_api_name => l_proc,
1733 p_argument => 'validation_end_date',
1734 p_argument_value => p_validation_end_date);
1735 --
1736 hr_api.mandatory_arg_error
1737 (p_api_name => l_proc,
1738 p_argument => 'clpse_lf_evt_id',
1739 p_argument_value => p_clpse_lf_evt_id);
1740 --
1741 --
1742 --
1743 End If;
1744 --
1745 hr_utility.set_location(' Leaving:'||l_proc, 10);
1746 Exception
1747 When l_rows_exist Then
1748 --
1749 -- A referential integrity check was violated therefore
1750 -- we must error
1751 --
1752 hr_utility.set_message(801, 'HR_7215_DT_CHILD_EXISTS');
1753 hr_utility.set_message_token('TABLE_NAME', l_table_name);
1754 hr_utility.raise_error;
1755 When Others Then
1756 --
1757 -- An unhandled or unexpected error has occurred which
1758 -- we must report
1759 --
1760 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
1761 hr_utility.set_message_token('PROCEDURE', l_proc);
1762 hr_utility.set_message_token('STEP','15');
1763 hr_utility.raise_error;
1764 End dt_delete_validate;
1765 --
1766 -- ----------------------------------------------------------------------------
1767 -- |---------------------------< insert_validate >----------------------------|
1768 -- ----------------------------------------------------------------------------
1769 Procedure insert_validate
1770 (p_rec in ben_clp_shd.g_rec_type,
1771 p_effective_date in date,
1772 p_datetrack_mode in varchar2,
1773 p_validation_start_date in date,
1774 p_validation_end_date in date) is
1775 --
1776 l_proc varchar2(72) := g_package||'insert_validate';
1777 --
1778 Begin
1779 hr_utility.set_location('Entering:'||l_proc, 5);
1780 --
1781 -- Call all supporting business operations
1782 --
1783 --
1784 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1785 --
1786 chk_clpse_lf_evt_id
1787 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1788 p_effective_date => p_effective_date,
1789 p_object_version_number => p_rec.object_version_number);
1790 --
1791 chk_seq
1792 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1793 p_seq => p_rec.seq,
1794 p_effective_date => p_effective_date,
1795 p_business_group_id => p_rec.business_group_id,
1796 p_object_version_number => p_rec.object_version_number,
1797 p_validation_start_date => p_validation_start_date, -- 5951251: Added these two Parameters
1798 p_validation_end_date => p_validation_end_date);
1799
1800 --
1801 chk_ler1_id
1802 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1803 p_ler1_id => p_rec.ler1_id,
1804 p_effective_date => p_effective_date,
1805 p_object_version_number => p_rec.object_version_number);
1806 --
1807 chk_eval_ler_id
1808 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1809 p_eval_ler_id => p_rec.eval_ler_id,
1810 p_effective_date => p_effective_date,
1811 p_object_version_number => p_rec.object_version_number);
1812 --
1816 p_effective_date => p_effective_date,
1813 chk_tlrnc_dys_num
1814 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1815 p_tlrnc_dys_num => p_rec.tlrnc_dys_num,
1817 p_object_version_number => p_rec.object_version_number);
1818 --
1819 chk_bool_cd
1820 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1821 p_bool1_cd => p_rec.bool1_cd,
1822 p_bool2_cd => p_rec.bool2_cd,
1823 p_bool3_cd => p_rec.bool3_cd,
1824 p_bool4_cd => p_rec.bool4_cd,
1825 p_bool5_cd => p_rec.bool5_cd,
1826 p_bool6_cd => p_rec.bool6_cd,
1827 p_bool7_cd => p_rec.bool7_cd,
1828 p_bool8_cd => p_rec.bool8_cd,
1829 p_bool9_cd => p_rec.bool9_cd,
1830 p_effective_date => p_effective_date,
1831 p_object_version_number => p_rec.object_version_number);
1832 --
1833 chk_eval_rl
1834 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1835 p_eval_rl => p_rec.eval_rl,
1836 p_business_group_id => p_rec.business_group_id,
1837 p_effective_date => p_effective_date,
1838 p_object_version_number => p_rec.object_version_number);
1839 --
1840 chk_eval_ler_det_rl
1841 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1842 p_eval_ler_det_rl => p_rec.eval_ler_det_rl,
1843 p_business_group_id => p_rec.business_group_id,
1844 p_effective_date => p_effective_date,
1845 p_object_version_number => p_rec.object_version_number);
1846 --
1847 chk_consecutive_bool_cd
1848 (p_bool1_cd => p_rec.bool1_cd,
1849 p_bool2_cd => p_rec.bool2_cd,
1850 p_bool3_cd => p_rec.bool3_cd,
1851 p_bool4_cd => p_rec.bool4_cd,
1852 p_bool5_cd => p_rec.bool5_cd,
1853 p_bool6_cd => p_rec.bool6_cd,
1854 p_bool7_cd => p_rec.bool7_cd,
1855 p_bool8_cd => p_rec.bool8_cd,
1856 p_bool9_cd => p_rec.bool9_cd);
1857 --
1858 chk_consecutive_ler_id
1859 (p_ler1_id => p_rec.ler1_id,
1860 p_ler2_id => p_rec.ler2_id,
1861 p_ler3_id => p_rec.ler3_id,
1862 p_ler4_id => p_rec.ler4_id,
1863 p_ler5_id => p_rec.ler5_id,
1864 p_ler6_id => p_rec.ler6_id,
1865 p_ler7_id => p_rec.ler7_id,
1866 p_ler8_id => p_rec.ler8_id,
1867 p_ler9_id => p_rec.ler9_id,
1868 p_ler10_id => p_rec.ler10_id);
1869 --
1870 chk_eval_cd
1871 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1872 p_eval_cd => p_rec.eval_cd,
1873 p_effective_date => p_effective_date,
1874 p_object_version_number => p_rec.object_version_number);
1875 --
1876 chk_eval_ler_det_cd
1877 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1878 p_eval_ler_det_cd => p_rec.eval_ler_det_cd,
1879 p_effective_date => p_effective_date,
1880 p_object_version_number => p_rec.object_version_number);
1881 --
1882 chk_ler_bool_seq
1883 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1884 p_ler1_id => p_rec.ler1_id,
1885 p_bool1_cd => p_rec.bool1_cd,
1886 p_ler2_id => p_rec.ler2_id,
1887 p_bool2_cd => p_rec.bool2_cd,
1888 p_ler3_id => p_rec.ler3_id,
1889 p_bool3_cd => p_rec.bool3_cd,
1890 p_ler4_id => p_rec.ler4_id,
1891 p_bool4_cd => p_rec.bool4_cd,
1892 p_ler5_id => p_rec.ler5_id,
1893 p_bool5_cd => p_rec.bool5_cd,
1894 p_ler6_id => p_rec.ler6_id,
1895 p_bool6_cd => p_rec.bool6_cd,
1896 p_ler7_id => p_rec.ler7_id,
1897 p_bool7_cd => p_rec.bool7_cd,
1898 p_ler8_id => p_rec.ler8_id,
1899 p_bool8_cd => p_rec.bool8_cd,
1900 p_ler9_id => p_rec.ler9_id,
1901 p_bool9_cd => p_rec.bool9_cd,
1902 p_ler10_id => p_rec.ler10_id,
1903 p_effective_date => p_effective_date,
1904 p_object_version_number => p_rec.object_version_number);
1905 --
1906 hr_utility.set_location(' Leaving:'||l_proc, 10);
1907 End insert_validate;
1908 --
1909 -- ----------------------------------------------------------------------------
1910 -- |---------------------------< update_validate >----------------------------|
1911 -- ----------------------------------------------------------------------------
1912 Procedure update_validate
1913 (p_rec in ben_clp_shd.g_rec_type,
1914 p_effective_date in date,
1915 p_datetrack_mode in varchar2,
1916 p_validation_start_date in date,
1917 p_validation_end_date in date) is
1918 --
1919 l_proc varchar2(72) := g_package||'update_validate';
1920 --
1921 Begin
1922 hr_utility.set_location('Entering:'||l_proc, 5);
1923 --
1924 -- Call all supporting business operations
1925 --
1926 --
1927 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1928 --
1929 chk_clpse_lf_evt_id
1930 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1931 p_effective_date => p_effective_date,
1932 p_object_version_number => p_rec.object_version_number);
1933 --
1934 chk_seq
1938 p_business_group_id => p_rec.business_group_id,
1935 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1936 p_seq => p_rec.seq,
1937 p_effective_date => p_effective_date,
1939 p_object_version_number => p_rec.object_version_number,
1940 p_validation_start_date => p_validation_start_date, -- 5951251: Added these two Parameters
1941 p_validation_end_date => p_validation_end_date);
1942
1943 --
1944 chk_ler1_id
1945 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1946 p_ler1_id => p_rec.ler1_id,
1947 p_effective_date => p_effective_date,
1948 p_object_version_number => p_rec.object_version_number);
1949 --
1950 chk_eval_ler_id
1951 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1952 p_eval_ler_id => p_rec.eval_ler_id,
1953 p_effective_date => p_effective_date,
1954 p_object_version_number => p_rec.object_version_number);
1955 --
1956 chk_tlrnc_dys_num
1957 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1958 p_tlrnc_dys_num => p_rec.tlrnc_dys_num,
1959 p_effective_date => p_effective_date,
1960 p_object_version_number => p_rec.object_version_number);
1961 --
1962 chk_bool_cd
1963 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1964 p_bool1_cd => p_rec.bool1_cd,
1965 p_bool2_cd => p_rec.bool2_cd,
1966 p_bool3_cd => p_rec.bool3_cd,
1967 p_bool4_cd => p_rec.bool4_cd,
1968 p_bool5_cd => p_rec.bool5_cd,
1969 p_bool6_cd => p_rec.bool6_cd,
1970 p_bool7_cd => p_rec.bool7_cd,
1971 p_bool8_cd => p_rec.bool8_cd,
1972 p_bool9_cd => p_rec.bool9_cd,
1973 p_effective_date => p_effective_date,
1974 p_object_version_number => p_rec.object_version_number);
1975 --
1976 chk_eval_rl
1977 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1978 p_eval_rl => p_rec.eval_rl,
1979 p_business_group_id => p_rec.business_group_id,
1980 p_effective_date => p_effective_date,
1981 p_object_version_number => p_rec.object_version_number);
1982 --
1983 chk_eval_ler_det_rl
1984 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
1985 p_eval_ler_det_rl => p_rec.eval_ler_det_rl,
1986 p_business_group_id => p_rec.business_group_id,
1987 p_effective_date => p_effective_date,
1988 p_object_version_number => p_rec.object_version_number);
1989 --
1990 chk_consecutive_bool_cd
1991 (p_bool1_cd => p_rec.bool1_cd,
1992 p_bool2_cd => p_rec.bool2_cd,
1993 p_bool3_cd => p_rec.bool3_cd,
1994 p_bool4_cd => p_rec.bool4_cd,
1995 p_bool5_cd => p_rec.bool5_cd,
1996 p_bool6_cd => p_rec.bool6_cd,
1997 p_bool7_cd => p_rec.bool7_cd,
1998 p_bool8_cd => p_rec.bool8_cd,
1999 p_bool9_cd => p_rec.bool9_cd);
2000 --
2001 chk_consecutive_ler_id
2002 (p_ler1_id => p_rec.ler1_id,
2003 p_ler2_id => p_rec.ler2_id,
2004 p_ler3_id => p_rec.ler3_id,
2005 p_ler4_id => p_rec.ler4_id,
2006 p_ler5_id => p_rec.ler5_id,
2007 p_ler6_id => p_rec.ler6_id,
2008 p_ler7_id => p_rec.ler7_id,
2009 p_ler8_id => p_rec.ler8_id,
2010 p_ler9_id => p_rec.ler9_id,
2011 p_ler10_id => p_rec.ler10_id);
2012 --
2013 chk_eval_cd
2014 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
2015 p_eval_cd => p_rec.eval_cd,
2016 p_effective_date => p_effective_date,
2017 p_object_version_number => p_rec.object_version_number);
2018 --
2019 chk_eval_ler_det_cd
2020 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
2021 p_eval_ler_det_cd => p_rec.eval_ler_det_cd,
2022 p_effective_date => p_effective_date,
2023 p_object_version_number => p_rec.object_version_number);
2024 --
2025 chk_ler_bool_seq
2026 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id,
2027 p_ler1_id => p_rec.ler1_id,
2028 p_bool1_cd => p_rec.bool1_cd,
2029 p_ler2_id => p_rec.ler2_id,
2030 p_bool2_cd => p_rec.bool2_cd,
2031 p_ler3_id => p_rec.ler3_id,
2032 p_bool3_cd => p_rec.bool3_cd,
2033 p_ler4_id => p_rec.ler4_id,
2034 p_bool4_cd => p_rec.bool4_cd,
2035 p_ler5_id => p_rec.ler5_id,
2036 p_bool5_cd => p_rec.bool5_cd,
2037 p_ler6_id => p_rec.ler6_id,
2038 p_bool6_cd => p_rec.bool6_cd,
2039 p_ler7_id => p_rec.ler7_id,
2040 p_bool7_cd => p_rec.bool7_cd,
2041 p_ler8_id => p_rec.ler8_id,
2042 p_bool8_cd => p_rec.bool8_cd,
2043 p_ler9_id => p_rec.ler9_id,
2044 p_bool9_cd => p_rec.bool9_cd,
2045 p_ler10_id => p_rec.ler10_id,
2046 p_effective_date => p_effective_date,
2047 p_object_version_number => p_rec.object_version_number);
2048 --
2049 -- Call the datetrack update integrity operation
2050 --
2051 dt_update_validate
2052 (p_ler1_id => p_rec.ler1_id,
2053 p_ler2_id => p_rec.ler2_id,
2054 p_ler3_id => p_rec.ler3_id,
2055 p_ler4_id => p_rec.ler4_id,
2056 p_ler5_id => p_rec.ler5_id,
2057 p_ler6_id => p_rec.ler6_id,
2058 p_ler7_id => p_rec.ler7_id,
2059 p_ler8_id => p_rec.ler8_id,
2060 p_ler9_id => p_rec.ler9_id,
2061 p_ler10_id => p_rec.ler10_id,
2062 p_eval_ler_id => p_rec.eval_ler_id,
2063 p_datetrack_mode => p_datetrack_mode,
2064 p_validation_start_date => p_validation_start_date,
2065 p_validation_end_date => p_validation_end_date);
2066 --
2067 hr_utility.set_location(' Leaving:'||l_proc, 10);
2068 End update_validate;
2069 --
2070 -- ----------------------------------------------------------------------------
2071 -- |---------------------------< delete_validate >----------------------------|
2072 -- ----------------------------------------------------------------------------
2073 Procedure delete_validate
2074 (p_rec in ben_clp_shd.g_rec_type,
2075 p_effective_date in date,
2076 p_datetrack_mode in varchar2,
2077 p_validation_start_date in date,
2078 p_validation_end_date in date) is
2079 --
2080 l_proc varchar2(72) := g_package||'delete_validate';
2081 --
2082 Begin
2083 hr_utility.set_location('Entering:'||l_proc, 5);
2084 --
2085 -- Call all supporting business operations
2086 --
2087 dt_delete_validate
2088 (p_datetrack_mode => p_datetrack_mode,
2089 p_validation_start_date => p_validation_start_date,
2090 p_validation_end_date => p_validation_end_date,
2091 p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id);
2092 --
2093 hr_utility.set_location(' Leaving:'||l_proc, 10);
2094 End delete_validate;
2095 --
2096 end ben_clp_bus;