[Home] [Help]
PACKAGE BODY: APPS.BEN_VEP_BUS
Source
1 Package Body ben_vep_bus as
2 /* $Header: beveprhi.pkb 120.0.12010000.2 2008/08/05 15:33:44 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_vep_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code varchar2(150) default null;
14 g_vrbl_rt_elig_prfl_id number default null;
15 --
16 -- ----------------------------------------------------------------------------
17 -- |------< chk_vrbl_rt_elig_prfl_id >------|
18 -- ----------------------------------------------------------------------------
19 --
20 -- Description
21 -- This procedure is used to check that the primary key for the table
22 -- is created properly. It should be null on insert and
23 -- should not be able to be updated.
24 --
25 -- Pre Conditions
26 -- None.
27 --
28 -- In Parameters
29 -- vrbl_rt_elig_prfl_id PK of record being inserted or updated.
30 -- effective_date Effective Date of session
31 -- object_version_number Object version number of record being
32 -- inserted or updated.
33 --
34 -- Post Success
35 -- Processing continues
36 --
37 -- Post Failure
38 -- Errors handled by the procedure
39 --
40 -- Access Status
41 -- Internal table handler use only.
42 --
43 Procedure chk_vrbl_rt_elig_prfl_id(p_vrbl_rt_elig_prfl_id in number,
44 p_effective_date in date,
45 p_object_version_number in number) is
46 --
47 l_proc varchar2(72) := g_package||'chk_vrbl_rt_elig_prfl_id';
48 l_api_updating boolean;
49 --
50 Begin
51 --
52 hr_utility.set_location('Entering:'||l_proc, 5);
53 --
54 l_api_updating := ben_vep_shd.api_updating
55 (p_effective_date => p_effective_date,
56 p_vrbl_rt_elig_prfl_id => p_vrbl_rt_elig_prfl_id,
57 p_object_version_number => p_object_version_number);
58 --
59 if (l_api_updating
60 and nvl(p_vrbl_rt_elig_prfl_id,hr_api.g_number)
61 <> ben_vep_shd.g_old_rec.vrbl_rt_elig_prfl_id) then
62 -- raise error as PK has changed
63 --
64 ben_vep_shd.constraint_error('BEN_VRBL_RT_ELIG_PRFL_F_PK');
65 --
66 elsif not l_api_updating then
67 --
68 -- check if PK is null
69 --
70 if p_vrbl_rt_elig_prfl_id is not null then
71 --
72 -- raise error as PK is not null
73 --
74 ben_vep_shd.constraint_error('BEN_VRBL_RT_ELIG_PRFL_F_PK');
75 --
76 end if;
77 --
78 end if;
79 --
80 hr_utility.set_location('Leaving:'||l_proc, 10);
81 --
82 End chk_vrbl_rt_elig_prfl_id;
83
84
85
86 -- ----------------------------------------------------------------------------
87 -- |------< chk_mndtry_flag >------|
88 -- ----------------------------------------------------------------------------
89 --
90 -- Description
91 -- This procedure is used to check that the lookup value is valid.
92 --
93 -- Pre Conditions
94 -- None.
95 --
96 -- In Parameters
97 -- prtn_elig_prfl_id PK of record being inserted or updated.
98 -- mndtry_flag Value of lookup code.
99 -- effective_date effective date
100 -- object_version_number Object version number of record being
101 -- inserted or updated.
102 --
103 -- Post Success
104 -- Processing continues
105 --
106 -- Post Failure
107 -- Error handled by procedure
108 --
109 -- Access Status
110 -- Internal table handler use only.
111 --
112 Procedure chk_mndtry_flag(p_vrbl_rt_elig_prfl_id in number,
113 p_mndtry_flag in varchar2,
114 p_effective_date in date,
115 p_object_version_number in number) is
116 --
117 --
118 l_proc varchar2(72) := g_package||'chk_mndtry_flag';
119 l_api_updating boolean;
120 --
121 Begin
122 --
123 hr_utility.set_location('Entering:'||l_proc, 5);
124 --
125 l_api_updating := ben_vep_shd.api_updating
126 (p_vrbl_rt_elig_prfl_id => p_vrbl_rt_elig_prfl_id,
127 p_effective_date => p_effective_date,
128 p_object_version_number => p_object_version_number);
129 --
130 if (l_api_updating
131 and p_mndtry_flag
132 <> nvl(ben_vep_shd.g_old_rec.mndtry_flag,hr_api.g_varchar2)
133 or not l_api_updating)
134 and p_mndtry_flag is not null then
135 --
136 -- check if value of lookup falls within lookup type.
137 --
138 if hr_api.not_exists_in_hr_lookups
139 (p_lookup_type => 'YES_NO',
140 p_lookup_code => p_mndtry_flag,
141 p_effective_date => p_effective_date) then
142 --
143 -- raise error as does not exist as lookup
144 --
145 hr_utility.set_message(801,'MNDTRY_FLAG_NOT_EXIST');
146 hr_utility.raise_error;
147 --
148 end if;
149 end if;
150 --
151 hr_utility.set_location('Leaving:'||l_proc,10);
152 --
153 end chk_mndtry_flag;
154 -- ----------------------------------------------------------------------------
155 -- |------< chk_vrbl_rt_elig_prfl_count >------|
156 -- ----------------------------------------------------------------------------
157 --
158 -- Description
159 -- This procedure is used to check that there should be only one
160 -- Eligibility Profile record linked to VAPRO.
161 -- This procedure has been created as part of bug 3548872
162 -- Since PDW is not supporting multiple VAPROs, we have this check.
163 -- As soon as PDW start supporting multiple VAPROs, this procedure needs
164 -- to be removed. This would be called only from Insert_Validate
165 --
166 --
167 -- In Parameters
168 -- p_vrbl_rt_prfl_id
169 -- effective_date Effective Date of session
170 --
171 -- Post Success
172 -- Processing continues
173 --
174 -- Post Failure
175 -- Errors handled by the procedure
176 --
177 -- Access Status
178 -- Internal table handler use only.
179 --
180 Procedure chk_vrbl_rt_elig_prfl_count(
181 p_vrbl_rt_prfl_id in number,
182 p_effective_date in date
183 ) is
184 --
185 l_proc varchar2(72) := g_package||'chk_vrbl_rt_elig_prfl_count';
186 l_dummy varchar2(1) := null ;
187 --
188 cursor c_vrbl_rt_elig_prfl is
189 select null from
190 BEN_VRBL_RT_ELIG_PRFL_f vep
191 where
192 vep.vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
193 and p_effective_date between effective_start_date
194 and effective_end_date;
195
196 Begin
197 hr_utility.set_location('Entering:'||l_proc, 5);
198 --
199 -- raise error as the record already exists
200 open c_vrbl_rt_elig_prfl ;
201 fetch c_vrbl_rt_elig_prfl into l_dummy ;
202 --
203 if c_vrbl_rt_elig_prfl%found then
204 --
205 hr_utility.set_location('Only one Profile is allowed ', 8 ) ;
206 close c_vrbl_rt_elig_prfl ;
207 fnd_message.set_name('BEN','BEN_93952_ONLY_ONE_ELPRO');
208 fnd_message.raise_error;
209 --
210 end if;
211 close c_vrbl_rt_elig_prfl ;
212 --
213 hr_utility.set_location('Leaving:'||l_proc, 10);
214 --
215 End chk_vrbl_rt_elig_prfl_count;
216 --
217 --
218 -- ----------------------------------------------------------------------------
219 -- |------< chk_uniq_vrbl_rt_elig_prfl >------|
220 -- ----------------------------------------------------------------------------
221 --
222 -- Description
223 -- This procedure is used to check that the the records is unique with the
224 --
225 -- Pre Conditions
226 -- None.
227 --
228 -- In Parameters
229 -- eligy_prfl_id
230 -- effective_date Effective Date of session
231 -- object_version_number Object version number of record being
232 -- inserted or updated.
233 --
234 -- Post Success
235 -- Processing continues
236 --
237 -- Post Failure
238 -- Errors handled by the procedure
239 --
240 -- Access Status
241 -- Internal table handler use only.
242 --
243 Procedure chk_uniq_vrbl_rt_elig_prfl(
244 p_vrbl_rt_elig_prfl_id in number,
245 p_eligy_prfl_id in number,
246 p_vrbl_rt_prfl_id in number,
247 p_effective_date in date,
248 p_object_version_number in number) is
249 --
250 l_proc varchar2(72) := g_package||'chk_uniq_vrbl_rt_elig_prfl';
251 l_dummy varchar2(1) := null ;
252 --
253 cursor c_uniq_vrbl_rt_elig_prfl is
254 select null from
255 BEN_VRBL_RT_ELIG_PRFL_f vep
256 where
257 vep.eligy_prfl_id = p_eligy_prfl_id
258 and vep.vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
259 and vep.effective_start_date > p_effective_date
260 and nvl(vep.vrbl_rt_elig_prfl_id,-1) <> p_vrbl_rt_elig_prfl_id ;
261 Begin
262 hr_utility.set_location('Entering:'||l_proc, 5);
263 --
264 -- raise error as the record already exists
265 open c_uniq_vrbl_rt_elig_prfl ;
266 fetch c_uniq_vrbl_rt_elig_prfl into l_dummy ;
267 --
268 if c_uniq_vrbl_rt_elig_prfl%found then
269 --
270 hr_utility.set_location('Future record exists.Cannot insert ', 8 ) ;
271 close c_uniq_vrbl_rt_elig_prfl ;
272 fnd_message.set_name('PER','HR_7211_DT_UPD_ROWS_IN_FUTURE');
273 fnd_message.raise_error;
274 --
275 end if;
276 close c_uniq_vrbl_rt_elig_prfl ;
277 --
278 hr_utility.set_location('Leaving:'||l_proc, 10);
279 --
280 End chk_uniq_vrbl_rt_elig_prfl;
281 --
282 -- 2940151
283 -- ----------------------------------------------------------------------------
284 -- |------< chk_elig_prfl_criteria >------|
285 -- ----------------------------------------------------------------------------
286 --
287 -- Description
288 -- This procedure is used to ensure that a variable prfl has either an
289 -- elig profile or criteria attached, not both
290 --
291 -- Pre Conditions
292 -- None.
293 --
294 -- In Parameters
295 -- eligy_prfl_id
296 -- effective_date Effective Date of session
297 -- object_version_number Object version number of record being
298 -- inserted or updated.
299 --
300 -- Post Success
301 -- Processing continues
302 --
303 -- Post Failure
304 -- Errors handled by the procedure
305 --
306 -- Access Status
307 -- Internal table handler use only.
308 --
309 Procedure chk_elig_prfl_criteria(
310 p_vrbl_rt_elig_prfl_id in number,
311 p_eligy_prfl_id in number,
312 p_vrbl_rt_prfl_id in number,
313 p_effective_date in date,
314 p_object_version_number in number) is
315 --
316 l_proc varchar2(72) := g_package||'chk_elig_prfl_criteria';
317 l_dummy varchar2(1) := null ;
318 --
319 cursor c_vrbl_rt_flags is
320 select 'X' from
321 ben_vrbl_rt_prfl_f vpf
322 where
323 vpf.vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
324 and p_effective_date between vpf.effective_start_date and vpf.effective_end_date
325 and (rt_hrly_slrd_flag = 'Y' or
326 rt_pstl_cd_flag = 'Y' or
327 rt_lbr_mmbr_flag = 'Y' or
328 rt_lgl_enty_flag = 'Y' or
329 rt_benfts_grp_flag = 'Y' or
330 rt_wk_loc_flag = 'Y' or
331 rt_brgng_unit_flag = 'Y' or
332 rt_age_flag = 'Y' or
333 rt_los_flag = 'Y' or
334 rt_per_typ_flag = 'Y' or
335 rt_fl_tm_pt_tm_flag = 'Y' or
336 rt_ee_stat_flag = 'Y' or
337 rt_grd_flag = 'Y' or
338 rt_pct_fl_tm_flag = 'Y' or
339 rt_asnt_set_flag = 'Y' or
340 rt_hrs_wkd_flag = 'Y' or
341 rt_comp_lvl_flag = 'Y' or
342 rt_org_unit_flag = 'Y' or
343 rt_loa_rsn_flag = 'Y' or
344 rt_pyrl_flag = 'Y' or
345 rt_schedd_hrs_flag = 'Y' or
346 rt_py_bss_flag = 'Y' or
347 rt_prfl_rl_flag = 'Y' or
348 rt_cmbn_age_los_flag = 'Y' or
349 rt_prtt_pl_flag = 'Y' or
350 rt_svc_area_flag = 'Y' or
351 rt_ppl_grp_flag = 'Y' or
352 rt_dsbld_flag = 'Y' or
353 rt_hlth_cvg_flag = 'Y' or
354 rt_poe_flag = 'Y' or
355 rt_ttl_cvg_vol_flag = 'Y' or
356 rt_ttl_prtt_flag = 'Y' or
357 rt_gndr_flag = 'Y' or
358 rt_tbco_use_flag = 'Y' or
359 rt_cntng_prtn_prfl_flag = 'Y' or
360 rt_cbr_quald_bnf_flag = 'Y' or
361 rt_optd_mdcr_flag = 'Y' or
362 rt_lvg_rsn_flag = 'Y' or
363 rt_pstn_flag = 'Y' or
364 rt_comptncy_flag = 'Y' or
365 rt_job_flag = 'Y' or
366 rt_qual_titl_flag = 'Y' or
367 rt_dpnt_cvrd_pl_flag = 'Y' or
368 rt_dpnt_cvrd_plip_flag = 'Y' or
369 rt_dpnt_cvrd_ptip_flag = 'Y' or
370 rt_dpnt_cvrd_pgm_flag = 'Y' or
371 rt_enrld_oipl_flag = 'Y' or
375 rt_enrld_pgm_flag = 'Y' or
372 rt_enrld_pl_flag = 'Y' or
373 rt_enrld_plip_flag = 'Y' or
374 rt_enrld_ptip_flag = 'Y' or
376 rt_prtt_anthr_pl_flag = 'Y' or
377 rt_othr_ptip_flag = 'Y' or
378 rt_no_othr_cvg_flag = 'Y' or
379 rt_dpnt_othr_ptip_flag = 'Y' or
380 rt_qua_in_gr_flag = 'Y' or
381 rt_perf_rtng_flag = 'Y'
382 -- or rt_elig_prfl_flag = 'Y'
383 );
384
385 Begin
386 hr_utility.set_location('Entering:'||l_proc, 5);
387 --
388 -- raise error as the record already exists
389 open c_vrbl_rt_flags ;
390 fetch c_vrbl_rt_flags into l_dummy ;
391 --
392 if c_vrbl_rt_flags%found then
393 --
394
395 close c_vrbl_rt_flags ;
396 fnd_message.set_name('BEN','BEN_93550_VAPRO_ELIG_PRFL');
397 fnd_message.raise_error;
398 --
399 end if;
400 close c_vrbl_rt_flags ;
401 --
402 hr_utility.set_location('Leaving:'||l_proc, 10);
403 --
404 End chk_elig_prfl_criteria;
405 --
406
407 -- ---------------------------------------------------------------------------
408 -- |----------------------< set_security_group_id >--------------------------|
409 -- ---------------------------------------------------------------------------
410 --
411 Procedure set_security_group_id
412 (p_vrbl_rt_elig_prfl_id in number
413 ) is
414 --
415 -- Declare cursor
416 --
417 cursor csr_sec_grp is
418 select pbg.security_group_id
419 from per_business_groups pbg
420 , BEN_VRBL_RT_ELIG_PRFL_f vep
421 where vep.vrbl_rt_elig_prfl_id = p_vrbl_rt_elig_prfl_id
422 and pbg.business_group_id = vep.business_group_id;
423 --
424 -- Declare local variables
425 --
426 l_security_group_id number;
427 l_proc varchar2(72) := g_package||'set_security_group_id';
428 --
429 begin
430 --
431 hr_utility.set_location('Entering:'|| l_proc, 10);
432 --
433 -- Ensure that all the mandatory parameter are not null
434 --
435 hr_api.mandatory_arg_error
436 (p_api_name => l_proc
437 ,p_argument => 'VRBL_RT_ELIG_PRFL_ID'
438 ,p_argument_value => p_vrbl_rt_elig_prfl_id
439 );
440 --
441 open csr_sec_grp;
442 fetch csr_sec_grp into l_security_group_id;
443 --
444 if csr_sec_grp%notfound then
445 --
446 close csr_sec_grp;
447 --
448 -- The primary key is invalid therefore we must error
449 --
450 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
451 fnd_message.raise_error;
452 --
453 end if;
454 close csr_sec_grp;
455 --
456 -- Set the security_group_id in CLIENT_INFO
457 --
458 hr_api.set_security_group_id
459 (p_security_group_id => l_security_group_id
460 );
461 --
462 hr_utility.set_location(' Leaving:'|| l_proc, 20);
463 --
464 end set_security_group_id;
465 --
466 -- ---------------------------------------------------------------------------
467 -- |---------------------< return_legislation_code >-------------------------|
468 -- ---------------------------------------------------------------------------
469 --
470 Function return_legislation_code
471 (p_vrbl_rt_elig_prfl_id in number
472 )
473 Return Varchar2 Is
474 --
475 -- Declare cursor
476 --
477 cursor csr_leg_code is
478 select pbg.legislation_code
479 from per_business_groups pbg
480 , BEN_VRBL_RT_ELIG_PRFL_f vep
481 where vep.vrbl_rt_elig_prfl_id = p_vrbl_rt_elig_prfl_id
482 and pbg.business_group_id = vep.business_group_id;
483 --
484 -- Declare local variables
485 --
486 l_legislation_code varchar2(150);
487 l_proc varchar2(72) := g_package||'return_legislation_code';
488 --
489 Begin
490 --
491 hr_utility.set_location('Entering:'|| l_proc, 10);
492 --
493 -- Ensure that all the mandatory parameter are not null
494 --
495 hr_api.mandatory_arg_error
496 (p_api_name => l_proc
497 ,p_argument => 'VRBL_RT_ELIG_PRFL_ID'
498 ,p_argument_value => p_vrbl_rt_elig_prfl_id
499 );
500 --
501 if ( nvl(ben_vep_bus.g_vrbl_rt_elig_prfl_id, hr_api.g_number)
502 = p_vrbl_rt_elig_prfl_id) then
503 --
504 -- The legislation code has already been found with a previous
505 -- call to this function. Just return the value in the global
506 -- variable.
507 --
508 l_legislation_code := ben_vep_bus.g_legislation_code;
509 hr_utility.set_location(l_proc, 20);
510 else
511 --
512 -- The ID is different to the last call to this function
513 -- or this is the first call to this function.
514 --
515 open csr_leg_code;
516 fetch csr_leg_code into l_legislation_code;
517 --
518 if csr_leg_code%notfound then
519 --
520 -- The primary key is invalid therefore we must error
521 --
522 close csr_leg_code;
526 hr_utility.set_location(l_proc,30);
523 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
524 fnd_message.raise_error;
525 end if;
527 --
528 -- Set the global variables so the values are
529 -- available for the next call to this function.
530 --
531 close csr_leg_code;
532 ben_vep_bus.g_vrbl_rt_elig_prfl_id := p_vrbl_rt_elig_prfl_id;
533 ben_vep_bus.g_legislation_code := l_legislation_code;
534 end if;
535 hr_utility.set_location(' Leaving:'|| l_proc, 40);
536 return l_legislation_code;
537 end return_legislation_code;
538 --
539 /*
540 -- ----------------------------------------------------------------------------
541 -- |------------------------------< chk_df >----------------------------------|
542 -- ----------------------------------------------------------------------------
543 --
544 -- Description:
545 -- Validates all the Descriptive Flexfield values.
546 --
547 -- Prerequisites:
548 -- All other columns have been validated. Must be called as the
549 -- last step from insert_validate and update_validate.
550 --
551 -- In Arguments:
552 -- p_rec
553 --
554 -- Post Success:
555 -- If the Descriptive Flexfield structure column and data values are
556 -- all valid this procedure will end normally and processing will
557 -- continue.
558 --
559 -- Post Failure:
560 -- If the Descriptive Flexfield structure column value or any of
561 -- the data values are invalid then an application error is raised as
562 -- a PL/SQL exception.
563 --
564 -- Access Status:
565 -- Internal Row Handler Use Only.
566 --
567 -- ----------------------------------------------------------------------------
568 procedure chk_df
569 (p_rec in ben_vep_shd.g_rec_type
570 ) is
571 --
572 l_proc varchar2(72) := g_package || 'chk_df';
573 --
574 begin
575 hr_utility.set_location('Entering:'||l_proc,10);
576 --
577 if ((p_rec.vrbl_rt_elig_prfl_id is not null) and (
578 nvl(ben_vep_shd.g_old_rec.vep_attribute_category, hr_api.g_varchar2) <>
579 nvl(p_rec.vep_attribute_category, hr_api.g_varchar2) or
580 nvl(ben_vep_shd.g_old_rec.vep_attribute1, hr_api.g_varchar2) <>
581 nvl(p_rec.vep_attribute1, hr_api.g_varchar2) or
582 nvl(ben_vep_shd.g_old_rec.vep_attribute2, hr_api.g_varchar2) <>
583 nvl(p_rec.vep_attribute2, hr_api.g_varchar2) or
584 nvl(ben_vep_shd.g_old_rec.vep_attribute3, hr_api.g_varchar2) <>
585 nvl(p_rec.vep_attribute3, hr_api.g_varchar2) or
586 nvl(ben_vep_shd.g_old_rec.vep_attribute4, hr_api.g_varchar2) <>
587 nvl(p_rec.vep_attribute4, hr_api.g_varchar2) or
588 nvl(ben_vep_shd.g_old_rec.vep_attribute5, hr_api.g_varchar2) <>
589 nvl(p_rec.vep_attribute5, hr_api.g_varchar2) or
590 nvl(ben_vep_shd.g_old_rec.vep_attribute6, hr_api.g_varchar2) <>
591 nvl(p_rec.vep_attribute6, hr_api.g_varchar2) or
592 nvl(ben_vep_shd.g_old_rec.vep_attribute7, hr_api.g_varchar2) <>
593 nvl(p_rec.vep_attribute7, hr_api.g_varchar2) or
594 nvl(ben_vep_shd.g_old_rec.vep_attribute8, hr_api.g_varchar2) <>
595 nvl(p_rec.vep_attribute8, hr_api.g_varchar2) or
596 nvl(ben_vep_shd.g_old_rec.vep_attribute9, hr_api.g_varchar2) <>
597 nvl(p_rec.vep_attribute9, hr_api.g_varchar2) or
598 nvl(ben_vep_shd.g_old_rec.vep_attribute10, hr_api.g_varchar2) <>
599 nvl(p_rec.vep_attribute10, hr_api.g_varchar2) or
600 nvl(ben_vep_shd.g_old_rec.vep_attribute11, hr_api.g_varchar2) <>
601 nvl(p_rec.vep_attribute11, hr_api.g_varchar2) or
602 nvl(ben_vep_shd.g_old_rec.vep_attribute12, hr_api.g_varchar2) <>
603 nvl(p_rec.vep_attribute12, hr_api.g_varchar2) or
604 nvl(ben_vep_shd.g_old_rec.vep_attribute13, hr_api.g_varchar2) <>
605 nvl(p_rec.vep_attribute13, hr_api.g_varchar2) or
606 nvl(ben_vep_shd.g_old_rec.vep_attribute14, hr_api.g_varchar2) <>
607 nvl(p_rec.vep_attribute14, hr_api.g_varchar2) or
608 nvl(ben_vep_shd.g_old_rec.vep_attribute15, hr_api.g_varchar2) <>
609 nvl(p_rec.vep_attribute15, hr_api.g_varchar2) or
610 nvl(ben_vep_shd.g_old_rec.vep_attribute16, hr_api.g_varchar2) <>
611 nvl(p_rec.vep_attribute16, hr_api.g_varchar2) or
612 nvl(ben_vep_shd.g_old_rec.vep_attribute17, hr_api.g_varchar2) <>
613 nvl(p_rec.vep_attribute17, hr_api.g_varchar2) or
614 nvl(ben_vep_shd.g_old_rec.vep_attribute18, hr_api.g_varchar2) <>
615 nvl(p_rec.vep_attribute18, hr_api.g_varchar2) or
616 nvl(ben_vep_shd.g_old_rec.vep_attribute19, hr_api.g_varchar2) <>
617 nvl(p_rec.vep_attribute19, hr_api.g_varchar2) or
618 nvl(ben_vep_shd.g_old_rec.vep_attribute20, hr_api.g_varchar2) <>
619 nvl(p_rec.vep_attribute20, hr_api.g_varchar2) or
620 nvl(ben_vep_shd.g_old_rec.vep_attribute21, hr_api.g_varchar2) <>
621 nvl(p_rec.vep_attribute21, hr_api.g_varchar2) or
622 nvl(ben_vep_shd.g_old_rec.vep_attribute22, hr_api.g_varchar2) <>
623 nvl(p_rec.vep_attribute22, hr_api.g_varchar2) or
624 nvl(ben_vep_shd.g_old_rec.vep_attribute23, hr_api.g_varchar2) <>
625 nvl(p_rec.vep_attribute23, hr_api.g_varchar2) or
626 nvl(ben_vep_shd.g_old_rec.vep_attribute24, hr_api.g_varchar2) <>
627 nvl(p_rec.vep_attribute24, hr_api.g_varchar2) or
628 nvl(ben_vep_shd.g_old_rec.vep_attribute25, hr_api.g_varchar2) <>
629 nvl(p_rec.vep_attribute25, hr_api.g_varchar2) or
630 nvl(ben_vep_shd.g_old_rec.vep_attribute26, hr_api.g_varchar2) <>
631 nvl(p_rec.vep_attribute26, hr_api.g_varchar2) or
632 nvl(ben_vep_shd.g_old_rec.vep_attribute27, hr_api.g_varchar2) <>
636 nvl(ben_vep_shd.g_old_rec.vep_attribute29, hr_api.g_varchar2) <>
633 nvl(p_rec.vep_attribute27, hr_api.g_varchar2) or
634 nvl(ben_vep_shd.g_old_rec.vep_attribute28, hr_api.g_varchar2) <>
635 nvl(p_rec.vep_attribute28, hr_api.g_varchar2) or
637 nvl(p_rec.vep_attribute29, hr_api.g_varchar2) or
638 nvl(ben_vep_shd.g_old_rec.vep_attribute30, hr_api.g_varchar2) <>
639 nvl(p_rec.vep_attribute30, hr_api.g_varchar2) ))
640 or (p_rec.vrbl_rt_elig_prfl_idis null) then
641 --
642 -- Only execute the validation if absolutely necessary:
643 -- a) During update, the structure column value or any
644 -- of the attribute values have actually changed.
645 -- b) During insert.
646 --
647 hr_dflex_utility.ins_or_upd_descflex_attribs
648 (p_appl_short_name => 'BEN'
649 ,p_descflex_name => 'EDIT_HERE: Enter descflex name'
650 ,p_attribute_category => 'VEP_ATTRIBUTE_CATEGORY'
651 ,p_attribute1_name => 'VEP_ATTRIBUTE1'
652 ,p_attribute1_value => p_rec.vep_attribute1
653 ,p_attribute2_name => 'VEP_ATTRIBUTE2'
654 ,p_attribute2_value => p_rec.vep_attribute2
655 ,p_attribute3_name => 'VEP_ATTRIBUTE3'
656 ,p_attribute3_value => p_rec.vep_attribute3
657 ,p_attribute4_name => 'VEP_ATTRIBUTE4'
658 ,p_attribute4_value => p_rec.vep_attribute4
659 ,p_attribute5_name => 'VEP_ATTRIBUTE5'
660 ,p_attribute5_value => p_rec.vep_attribute5
661 ,p_attribute6_name => 'VEP_ATTRIBUTE6'
662 ,p_attribute6_value => p_rec.vep_attribute6
663 ,p_attribute7_name => 'VEP_ATTRIBUTE7'
664 ,p_attribute7_value => p_rec.vep_attribute7
665 ,p_attribute8_name => 'VEP_ATTRIBUTE8'
666 ,p_attribute8_value => p_rec.vep_attribute8
667 ,p_attribute9_name => 'VEP_ATTRIBUTE9'
668 ,p_attribute9_value => p_rec.vep_attribute9
669 ,p_attribute10_name => 'VEP_ATTRIBUTE10'
670 ,p_attribute10_value => p_rec.vep_attribute10
671 ,p_attribute11_name => 'VEP_ATTRIBUTE11'
672 ,p_attribute11_value => p_rec.vep_attribute11
673 ,p_attribute12_name => 'VEP_ATTRIBUTE12'
674 ,p_attribute12_value => p_rec.vep_attribute12
675 ,p_attribute13_name => 'VEP_ATTRIBUTE13'
676 ,p_attribute13_value => p_rec.vep_attribute13
677 ,p_attribute14_name => 'VEP_ATTRIBUTE14'
678 ,p_attribute14_value => p_rec.vep_attribute14
679 ,p_attribute15_name => 'VEP_ATTRIBUTE15'
680 ,p_attribute15_value => p_rec.vep_attribute15
681 ,p_attribute16_name => 'VEP_ATTRIBUTE16'
682 ,p_attribute16_value => p_rec.vep_attribute16
683 ,p_attribute17_name => 'VEP_ATTRIBUTE17'
684 ,p_attribute17_value => p_rec.vep_attribute17
685 ,p_attribute18_name => 'VEP_ATTRIBUTE18'
686 ,p_attribute18_value => p_rec.vep_attribute18
687 ,p_attribute19_name => 'VEP_ATTRIBUTE19'
688 ,p_attribute19_value => p_rec.vep_attribute19
689 ,p_attribute20_name => 'VEP_ATTRIBUTE20'
690 ,p_attribute20_value => p_rec.vep_attribute20
691 ,p_attribute21_name => 'VEP_ATTRIBUTE21'
692 ,p_attribute21_value => p_rec.vep_attribute21
693 ,p_attribute22_name => 'VEP_ATTRIBUTE22'
694 ,p_attribute22_value => p_rec.vep_attribute22
695 ,p_attribute23_name => 'VEP_ATTRIBUTE23'
696 ,p_attribute23_value => p_rec.vep_attribute23
697 ,p_attribute24_name => 'VEP_ATTRIBUTE24'
698 ,p_attribute24_value => p_rec.vep_attribute24
699 ,p_attribute25_name => 'VEP_ATTRIBUTE25'
700 ,p_attribute25_value => p_rec.vep_attribute25
701 ,p_attribute26_name => 'VEP_ATTRIBUTE26'
702 ,p_attribute26_value => p_rec.vep_attribute26
703 ,p_attribute27_name => 'VEP_ATTRIBUTE27'
704 ,p_attribute27_value => p_rec.vep_attribute27
705 ,p_attribute28_name => 'VEP_ATTRIBUTE28'
706 ,p_attribute28_value => p_rec.vep_attribute28
707 ,p_attribute29_name => 'VEP_ATTRIBUTE29'
708 ,p_attribute29_value => p_rec.vep_attribute29
709 ,p_attribute30_name => 'VEP_ATTRIBUTE30'
710 ,p_attribute30_value => p_rec.vep_attribute30
711 );
712 end if;
713 --
714 hr_utility.set_location(' Leaving:'||l_proc,20);
715 end chk_df;
716 */
717 --
718 /*
719 -- ----------------------------------------------------------------------------
720 -- |-----------------------< chk_non_updateable_args >------------------------|
721 -- ----------------------------------------------------------------------------
722 -- {Start Of Comments}
723 --
724 -- Description:
725 -- This procedure is used to ensure that non updateable attributes have
726 -- not been updated. If an attribute has been updated an error is generated.
727 --
728 -- Pre Conditions:
732 -- In Arguments:
729 -- g_old_rec has been populated with details of the values currently in
730 -- the database.
731 --
733 -- p_rec has been populated with the updated values the user would like the
734 -- record set to.
735 --
736 -- Post Success:
737 -- Processing continues if all the non updateable attributes have not
738 -- changed.
739 --
740 -- Post Failure:
741 -- An application error is raised if any of the non updatable attributes
742 -- have been altered.
743 --
744 -- {End Of Comments}
745 -- ----------------------------------------------------------------------------
746 Procedure chk_non_updateable_args
747 (p_effective_date in date
748 ,p_rec in ben_vep_shd.g_rec_type
749 ) IS
750 --
751 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
752 l_error EXCEPTION;
753 l_argument varchar2(30);
754 --
755 Begin
756 --
757 -- Only proceed with the validation if a row exists for the current
758 -- record in the HR Schema.
759 --
760 IF NOT ben_vep_shd.api_updating
761 (p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id
762 ,p_effective_date => p_effective_date
763 ,p_object_version_number => p_rec.object_version_number
764 ) THEN
765 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
766 fnd_message.set_token('PROCEDURE ', l_proc);
767 fnd_message.set_token('STEP ', '5');
768 fnd_message.raise_error;
769 END IF;
770 --
771 -- EDIT_HERE: Add checks to ensure non-updateable args have
772 -- not been updated.
773 --
774 EXCEPTION
775 WHEN l_error THEN
776 hr_api.argument_changed_error
777 (p_api_name => l_proc
778 ,p_argument => l_argument);
779 WHEN OTHERS THEN
780 RAISE;
781 End chk_non_updateable_args;
782 */
783 --
784 --
785 -- ----------------------------------------------------------------------------
786 -- |----------------------< chk_ttlcov_ttlprtt_mutexcl >----------------------|
787 -- ----------------------------------------------------------------------------
788 -- Added for checks during usage of 'Eligbility Profiles' for defining
789 -- criteria for calculation of Variable Coverages and Variable Actual Premiums.
790 -- Bug : 3456400
791 --
792 --
793 Procedure chk_ttlcov_ttlprtt_mutexcl
794 (p_vrbl_rt_prfl_id in number
795 ,p_eligy_prfl_id in number
796 ,p_effective_date in date
797 ,p_business_group_id in number
798 ) is
799 --
800 l_dummy varchar2(1);
801 l_proc varchar2(72) := g_package||'chk_ttlcov_ttlprtt_mutexcl';
802 --
803 cursor c1 is
804 select null
805 from ben_elig_ttl_cvg_vol_prte_f
806 where eligy_prfl_id = p_eligy_prfl_id
807 and exists
808 (select null
809 from ben_elig_ttl_prtt_prte_f
810 where eligy_prfl_id in
811 (select eligy_prfl_id
812 from ben_vrbl_rt_elig_prfl_f
813 where vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
814 and business_group_id = p_business_group_id
815 and p_effective_date between effective_start_date and effective_end_date)
816 or eligy_prfl_id = p_eligy_prfl_id);
817 --
818 cursor c2 is
819 select null
820 from ben_elig_ttl_prtt_prte_f
821 where eligy_prfl_id = p_eligy_prfl_id
822 and exists
823 (select null
824 from ben_elig_ttl_cvg_vol_prte_f
825 where eligy_prfl_id in
826 (select eligy_prfl_id
827 from ben_vrbl_rt_elig_prfl_f
828 where vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
829 and business_group_id = p_business_group_id
830 and p_effective_date between effective_start_date and effective_end_date)
831 or eligy_prfl_id = p_eligy_prfl_id);
832
833 --
834 --
835 Begin
836 --
837 hr_utility.set_location('Entering:'||l_proc, 5);
838 --
839 open c1;
840 fetch c1 into l_dummy;
841 --
842 if c1%found then
843 close c1;
844 fnd_message.set_name('BEN','BEN_92258_TTLPRTT_CVGVOL_EXCL1');
845 fnd_message.raise_error;
846 end if;
847 --
848 close c1;
849 --
850 --
851 open c2;
852 fetch c2 into l_dummy;
853 --
854 if c2%found then
855 close c2;
856 fnd_message.set_name('BEN','BEN_92259_TTLPRTT_CVGVOL_EXCL2');
857 fnd_message.raise_error;
858 end if;
859 --
860 close c2;
861 --
862 --
863 hr_utility.set_location('Leaving:'||l_proc, 10);
864 End chk_ttlcov_ttlprtt_mutexcl;
865 --
866 --
867 -- ----------------------------------------------------------------------------
868 -- |----------------------< chk_ttlcov_ttlprtt_mlt_cd >-----------------------|
869 -- ----------------------------------------------------------------------------
870 -- Added for checks during usage of 'Eligbility Profiles' for defining
871 -- criteria for calculation of Variable Coverages and Variable Actual Premiums.
872 -- Bug : 3456400
873 --
874 Procedure chk_ttlcov_ttlprtt_mlt_cd
875 (p_vrbl_rt_prfl_id in number
879 ) is
876 ,p_eligy_prfl_id in number
877 ,p_effective_date in date
878 ,p_business_group_id in number
880 --
881 l_dummy varchar2(1);
882 l_proc varchar2(72) := g_package||'chk_ttlcov_ttlprtt_mlt_cd';
883 l_mlt_cd varchar2(30);
884 l_vrbl_usg_cd varchar2(30);
885 --
886 cursor c1 is
887 select mlt_cd, vrbl_usg_cd
888 from ben_vrbl_rt_prfl_f
889 where vrbl_rt_prfl_id = p_vrbl_rt_prfl_id
890 and business_group_id = p_business_group_id
891 and p_effective_date between effective_start_date and effective_end_date;
892 --
893 cursor c2 is
894 select null
895 from ben_elig_ttl_prtt_prte_f
896 where eligy_prfl_id = p_eligy_prfl_id
897 and business_group_id = p_business_group_id
898 and p_effective_date between effective_start_date and effective_end_date;
899 --
900 cursor c3 is
901 select null
902 from ben_elig_ttl_cvg_vol_prte_f
903 where eligy_prfl_id = p_eligy_prfl_id
904 and business_group_id = p_business_group_id
905 and p_effective_date between effective_start_date and effective_end_date;
906 --
907 Begin
908 --
909 hr_utility.set_location('Entering:'||l_proc, 5);
910 --
911 open c1;
912 fetch c1 into l_mlt_cd, l_vrbl_usg_cd;
913 close c1;
914 --
915 open c2;
916 fetch c2 into l_dummy;
917 if c2%found then
918 if l_vrbl_usg_cd = 'ACP' and l_mlt_cd <> 'TTLPRTT' then
919 close c2;
920 fnd_message.set_name('BEN','BEN_92263_TTLPRTT_MLTCD');
921 fnd_message.raise_error;
922 end if;
923 end if;
924 close c2;
925 --
926 --
927 open c3;
928 fetch c3 into l_dummy;
929 if c3%found then
930 if l_vrbl_usg_cd = 'ACP' and l_mlt_cd <> 'TTLCVG' then
931 close c3;
932 fnd_message.set_name('BEN','BEN_92264_TTLCVG_MLTCD');
933 fnd_message.raise_error;
934 end if;
935 end if;
936 close c3;
937 --
938 hr_utility.set_location('Leaving:'||l_proc, 10);
939 End chk_ttlcov_ttlprtt_mlt_cd;
940 --
941
942 --
943 -- ----------------------------------------------------------------------------
944 -- |--------------------------< dt_update_validate >--------------------------|
945 -- ----------------------------------------------------------------------------
946 -- {Start Of Comments}
947 --
948 -- Description:
949 -- This procedure is used for referential integrity of datetracked
950 -- parent entities when a datetrack update operation is taking place
951 -- and where there is no cascading of update defined for this entity.
952 --
953 -- Prerequisites:
954 -- This procedure is called from the update_validate.
955 --
956 -- In Parameters:
957 --
958 -- Post Success:
959 -- Processing continues.
960 --
961 -- Post Failure:
962 --
963 -- Developer Implementation Notes:
964 -- This procedure should not need maintenance unless the HR Schema model
965 -- changes.
966 --
967 -- Access Status:
968 -- Internal Row Handler Use Only.
969 --
970 -- {End Of Comments}
971 -- ----------------------------------------------------------------------------
972 Procedure dt_update_validate
973 (
974 p_vrbl_rt_prfl_id in number default hr_api.g_number
975 ,p_eligy_prfl_id in number default hr_api.g_number
976 ,p_datetrack_mode in varchar2
977 ,p_validation_start_date in date
978 ,p_validation_end_date in date
979 ) Is
980 --
981 l_proc varchar2(72) := g_package||'dt_update_validate';
982 l_integrity_error Exception;
983 l_table_name all_tables.table_name%TYPE;
984 --
985 Begin
986 --
987 -- Ensure that the p_datetrack_mode argument is not null
988 --
989 hr_api.mandatory_arg_error
990 (p_api_name => l_proc
991 ,p_argument => 'datetrack_mode'
992 ,p_argument_value => p_datetrack_mode
993 );
994 --
995 -- Mode will be valid, as this is checked at the start of the upd.
996 --
997 -- Ensure the arguments are not null
998 --
999 hr_api.mandatory_arg_error
1000 (p_api_name => l_proc
1001 ,p_argument => 'validation_start_date'
1002 ,p_argument_value => p_validation_start_date
1003 );
1004 --
1005 hr_api.mandatory_arg_error
1006 (p_api_name => l_proc
1007 ,p_argument => 'validation_end_date'
1008 ,p_argument_value => p_validation_end_date
1009 );
1010 --
1011 Exception
1012 When Others Then
1013 --
1014 -- An unhandled or unexpected error has occurred which
1015 -- we must report
1016 --
1017 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1018 fnd_message.set_token('PROCEDURE', l_proc);
1019 fnd_message.set_token('STEP','15');
1020 fnd_message.raise_error;
1021 End dt_update_validate;
1022 --
1023 -- ----------------------------------------------------------------------------
1024 -- |--------------------------< dt_delete_validate >--------------------------|
1025 -- ----------------------------------------------------------------------------
1029 -- This procedure is used for referential integrity of datetracked
1026 -- {Start Of Comments}
1027 --
1028 -- Description:
1030 -- child entities when either a datetrack DELETE or ZAP is in operation
1031 -- and where there is no cascading of delete defined for this entity.
1032 -- For the datetrack mode of DELETE or ZAP we must ensure that no
1033 -- datetracked child rows exist between the validation start and end
1034 -- dates.
1035 --
1036 -- Prerequisites:
1037 -- This procedure is called from the delete_validate.
1038 --
1039 -- In Parameters:
1040 --
1041 -- Post Success:
1042 -- Processing continues.
1043 --
1044 -- Post Failure:
1045 -- If a row exists by determining the returning Boolean value from the
1046 -- generic dt_api.rows_exist function then we must supply an error via
1047 -- the use of the local exception handler l_rows_exist.
1048 --
1049 -- Developer Implementation Notes:
1050 -- This procedure should not need maintenance unless the HR Schema model
1051 -- changes.
1052 --
1053 -- Access Status:
1054 -- Internal Row Handler Use Only.
1055 --
1056 -- {End Of Comments}
1057 -- ----------------------------------------------------------------------------
1058 Procedure dt_delete_validate
1059 (p_vrbl_rt_elig_prfl_id in number
1060 ,p_datetrack_mode in varchar2
1061 ,p_validation_start_date in date
1062 ,p_validation_end_date in date
1063 ) Is
1064 --
1065 l_proc varchar2(72) := g_package||'dt_delete_validate';
1066 l_rows_exist Exception;
1067 l_table_name all_tables.table_name%TYPE;
1068 --
1069 Begin
1070 --
1071 -- Ensure that the p_datetrack_mode argument is not null
1072 --
1073 hr_api.mandatory_arg_error
1074 (p_api_name => l_proc
1075 ,p_argument => 'datetrack_mode'
1076 ,p_argument_value => p_datetrack_mode
1077 );
1078 --
1079 -- Only perform the validation if the datetrack mode is either
1080 -- DELETE or ZAP
1081 --
1082 If (p_datetrack_mode = hr_api.g_delete or
1083 p_datetrack_mode = hr_api.g_zap) then
1084 --
1085 --
1086 -- Ensure the arguments are not null
1087 --
1088 hr_api.mandatory_arg_error
1089 (p_api_name => l_proc
1090 ,p_argument => 'validation_start_date'
1091 ,p_argument_value => p_validation_start_date
1092 );
1093 --
1094 hr_api.mandatory_arg_error
1095 (p_api_name => l_proc
1096 ,p_argument => 'validation_end_date'
1097 ,p_argument_value => p_validation_end_date
1098 );
1099 --
1100 hr_api.mandatory_arg_error
1101 (p_api_name => l_proc
1102 ,p_argument => 'VRBL_RT_ELIG_PRFL_ID'
1103 ,p_argument_value => p_vrbl_rt_elig_prfl_id
1104 );
1105 --
1106 --
1107 --
1108 End If;
1109 --
1110 Exception
1111 When l_rows_exist Then
1112 --
1113 -- A referential integrity check was violated therefore
1114 -- we must error
1115 --
1116 fnd_message.set_name('PAY', 'HR_7215_DT_CHILD_EXISTS');
1117 fnd_message.set_token('TABLE_NAME', l_table_name);
1118 fnd_message.raise_error;
1119 When Others Then
1120 --
1121 -- An unhandled or unexpected error has occurred which
1122 -- we must report
1123 --
1124 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1125 fnd_message.set_token('PROCEDURE', l_proc);
1126 fnd_message.set_token('STEP','15');
1127 fnd_message.raise_error;
1128 --
1129 End dt_delete_validate;
1130 --
1131 -- ----------------------------------------------------------------------------
1132 -- |---------------------------< insert_validate >----------------------------|
1133 -- ----------------------------------------------------------------------------
1134 Procedure insert_validate
1135 (p_rec in ben_vep_shd.g_rec_type
1136 ,p_effective_date in date
1137 ,p_datetrack_mode in varchar2
1138 ,p_validation_start_date in date
1139 ,p_validation_end_date in date
1140 ) is
1141 --
1142 l_proc varchar2(72) := g_package||'insert_validate';
1143 --
1144 Begin
1145 hr_utility.set_location('Entering:'||l_proc, 5);
1146 --
1147 -- Call all supporting business operations
1148 --
1149 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1150 --
1151 --
1152 --ben_vep_bus.chk_df(p_rec);
1153
1154 chk_vrbl_rt_elig_prfl_id
1155 (p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1156 p_effective_date => p_effective_date,
1157 p_object_version_number => p_rec.object_version_number);
1158 -- Check the future rows for eligy_prfl/effective_date combination
1159 --
1160 chk_mndtry_flag
1161 (p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1162 p_mndtry_flag => p_rec.mndtry_flag,
1163 p_effective_date => p_effective_date,
1164 p_object_version_number => p_rec.object_version_number);
1165
1166 chk_vrbl_rt_elig_prfl_count(
1167 p_vrbl_rt_prfl_id =>p_rec.vrbl_rt_prfl_id,
1168 p_effective_date => p_effective_date);
1169
1170 chk_uniq_vrbl_rt_elig_prfl
1171 (
1172 p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1173 p_vrbl_rt_prfl_id =>p_rec.vrbl_rt_prfl_id,
1174 p_eligy_prfl_id =>p_rec.eligy_prfl_id,
1175 p_effective_date =>p_effective_date,
1176 p_object_version_number => p_rec.object_version_number);
1177 chk_elig_prfl_criteria
1178 (
1179 p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1180 p_vrbl_rt_prfl_id =>p_rec.vrbl_rt_prfl_id,
1181 p_eligy_prfl_id =>p_rec.eligy_prfl_id,
1182 p_effective_date =>p_effective_date,
1183 p_object_version_number => p_rec.object_version_number);
1184 -- Bug : 3456400
1185 chk_ttlcov_ttlprtt_mutexcl
1186 (p_vrbl_rt_prfl_id => p_rec.vrbl_rt_prfl_id,
1187 p_eligy_prfl_id => p_rec.eligy_prfl_id,
1188 p_effective_date => p_effective_date,
1189 p_business_group_id => p_rec.business_group_id);
1190 chk_ttlcov_ttlprtt_mlt_cd
1191 (p_vrbl_rt_prfl_id => p_rec.vrbl_rt_prfl_id,
1192 p_eligy_prfl_id => p_rec.eligy_prfl_id,
1193 p_effective_date => p_effective_date,
1194 p_business_group_id => p_rec.business_group_id);
1195
1196
1197 hr_utility.set_location(' Leaving:'||l_proc, 10);
1198 End insert_validate;
1199 --
1200 -- ----------------------------------------------------------------------------
1201 -- |---------------------------< update_validate >----------------------------|
1202 -- ----------------------------------------------------------------------------
1203 Procedure update_validate
1204 (p_rec in ben_vep_shd.g_rec_type
1205 ,p_effective_date in date
1206 ,p_datetrack_mode in varchar2
1207 ,p_validation_start_date in date
1208 ,p_validation_end_date in date
1209 ) is
1210 --
1211 l_proc varchar2(72) := g_package||'update_validate';
1212 --
1213 Begin
1214 hr_utility.set_location('Entering:'||l_proc, 5);
1215 --
1216 -- Call all supporting business operations
1217 --
1218 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1219 --
1220 chk_vrbl_rt_elig_prfl_id
1221 (p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1222 p_effective_date => p_effective_date,
1223 p_object_version_number => p_rec.object_version_number);
1224
1225 chk_mndtry_flag
1226 (p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1227 p_mndtry_flag => p_rec.mndtry_flag,
1228 p_effective_date => p_effective_date,
1229 p_object_version_number => p_rec.object_version_number);
1230
1231 chk_uniq_vrbl_rt_elig_prfl
1232 (
1233 p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1234 p_vrbl_rt_prfl_id =>p_rec.vrbl_rt_prfl_id,
1235 p_eligy_prfl_id =>p_rec.eligy_prfl_id,
1236 p_effective_date =>p_effective_date,
1237 p_object_version_number => p_rec.object_version_number);
1238
1239 chk_elig_prfl_criteria
1240 (
1241 p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id,
1242 p_vrbl_rt_prfl_id =>p_rec.vrbl_rt_prfl_id,
1243 p_eligy_prfl_id =>p_rec.eligy_prfl_id,
1244 p_effective_date =>p_effective_date,
1245 p_object_version_number => p_rec.object_version_number);
1246
1247 -- Bug : 3456400
1248 chk_ttlcov_ttlprtt_mutexcl
1249 (p_vrbl_rt_prfl_id => p_rec.vrbl_rt_prfl_id,
1250 p_eligy_prfl_id => p_rec.eligy_prfl_id,
1251 p_effective_date => p_effective_date,
1252 p_business_group_id => p_rec.business_group_id);
1253 chk_ttlcov_ttlprtt_mlt_cd
1254 (p_vrbl_rt_prfl_id => p_rec.vrbl_rt_prfl_id,
1255 p_eligy_prfl_id => p_rec.eligy_prfl_id,
1256 p_effective_date => p_effective_date,
1257 p_business_group_id => p_rec.business_group_id);
1258
1259 -- Call the datetrack update integrity operation
1260 --
1261 dt_update_validate
1262 (
1263 p_vrbl_rt_prfl_id => p_rec.vrbl_rt_prfl_id
1264 ,p_eligy_prfl_id => p_rec.eligy_prfl_id
1265 ,p_datetrack_mode => p_datetrack_mode
1266 ,p_validation_start_date => p_validation_start_date
1267 ,p_validation_end_date => p_validation_end_date
1268 );
1269 --
1270 /*
1271 chk_non_updateable_args
1272 (p_effective_date => p_effective_date
1273 ,p_rec => p_rec
1274 );
1275 */
1276 --
1277 --
1278 --ben_vep_bus.chk_df(p_rec);
1279 --
1280 hr_utility.set_location(' Leaving:'||l_proc, 10);
1281 End update_validate;
1282 --
1283 -- ----------------------------------------------------------------------------
1284 -- |---------------------------< delete_validate >----------------------------|
1285 -- ----------------------------------------------------------------------------
1286 Procedure delete_validate
1287 (p_rec in ben_vep_shd.g_rec_type
1288 ,p_effective_date in date
1289 ,p_datetrack_mode in varchar2
1290 ,p_validation_start_date in date
1291 ,p_validation_end_date in date
1292 ) is
1293 --
1294 l_proc varchar2(72) := g_package||'delete_validate';
1295 --
1296 Begin
1297 hr_utility.set_location('Entering:'||l_proc, 5);
1298 --
1299 -- Call all supporting business operations
1300 --
1301 dt_delete_validate
1302 (p_datetrack_mode => p_datetrack_mode
1303 ,p_validation_start_date => p_validation_start_date
1304 ,p_validation_end_date => p_validation_end_date
1305 ,p_vrbl_rt_elig_prfl_id => p_rec.vrbl_rt_elig_prfl_id
1306 );
1307 --
1308 hr_utility.set_location(' Leaving:'||l_proc, 10);
1309 End delete_validate;
1310 end ben_vep_bus;