DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_BEP_BUS

Source


1 Package Body ben_bep_bus as
2 /* $Header: bebeprhi.pkb 120.0.12010000.2 2008/08/05 14:07:52 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  ben_bep_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_elig_obj_elig_prfl_id       number         default null;
15 --
16 --  ---------------------------------------------------------------------------
17 --  |----------------------< set_security_group_id >--------------------------|
18 --  ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21   (p_elig_obj_elig_prfl_id                in number
22   ,p_associated_column1                   in varchar2 default null
23   ) is
24   --
25   -- Declare cursor
26   --
27   cursor csr_sec_grp is
28     select pbg.security_group_id,
29            pbg.legislation_code
30       from per_business_groups_perf pbg
31          , ben_elig_obj_elig_profl_f bep
32      where bep.elig_obj_elig_prfl_id = p_elig_obj_elig_prfl_id
33        and pbg.business_group_id = bep.business_group_id;
34   --
35   -- Declare local variables
36   --
37   l_security_group_id number;
38   l_proc              varchar2(72)  :=  g_package||'set_security_group_id';
39   l_legislation_code  varchar2(150);
40   --
41 begin
42   --
43   hr_utility.set_location('Entering:'|| l_proc, 10);
44   --
45   -- Ensure that all the mandatory parameter are not null
46   --
47   hr_api.mandatory_arg_error
48     (p_api_name           => l_proc
49     ,p_argument           => 'elig_obj_elig_prfl_id'
50     ,p_argument_value     => p_elig_obj_elig_prfl_id
51     );
52   --
53   open csr_sec_grp;
54   fetch csr_sec_grp into l_security_group_id
55                        , l_legislation_code;
56   --
57   if csr_sec_grp%notfound then
58      --
59      close csr_sec_grp;
60      --
61      -- The primary key is invalid therefore we must error
62      --
63      fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
64      hr_multi_message.add
65        (p_associated_column1
66          => nvl(p_associated_column1,'ELIG_OBJ_ELIG_PRFL_ID')
67        );
68      --
69   else
70     close csr_sec_grp;
71     --
72     -- Set the security_group_id in CLIENT_INFO
73     --
74     hr_api.set_security_group_id
75       (p_security_group_id => l_security_group_id
76       );
77     --
78     -- Set the sessions legislation context in HR_SESSION_DATA
79     --
80     hr_api.set_legislation_context(l_legislation_code);
81   end if;
82   --
83   hr_utility.set_location(' Leaving:'|| l_proc, 20);
84   --
85 end set_security_group_id;
86 --
87 --  ---------------------------------------------------------------------------
88 --  |---------------------< return_legislation_code >-------------------------|
89 --  ---------------------------------------------------------------------------
90 --
91 Function return_legislation_code
92   (p_elig_obj_elig_prfl_id                in     number
93   )
94   Return Varchar2 Is
95   --
96   -- Declare cursor
97   --
98  cursor csr_leg_code is
99     select pbg.legislation_code
100       from per_business_groups_perf pbg
101          , ben_elig_obj_elig_profl_f bep
102      where bep.elig_obj_elig_prfl_id = p_elig_obj_elig_prfl_id
103        and pbg.business_group_id = bep.business_group_id;
104   --
105   -- Declare local variables
106   --
107   l_legislation_code  varchar2(150);
108   l_proc              varchar2(72)  :=  g_package||'return_legislation_code';
109   --
110 Begin
111   --
112   hr_utility.set_location('Entering:'|| l_proc, 10);
113   --
114   -- Ensure that all the mandatory parameter are not null
115   --
116   hr_api.mandatory_arg_error
117     (p_api_name           => l_proc
118     ,p_argument           => 'elig_obj_elig_prfl_id'
119     ,p_argument_value     => p_elig_obj_elig_prfl_id
120     );
121   --
122   if ( nvl(ben_bep_bus.g_elig_obj_elig_prfl_id, hr_api.g_number)
123        = p_elig_obj_elig_prfl_id) then
124     --
125     -- The legislation code has already been found with a previous
126     -- call to this function. Just return the value in the global
127     -- variable.
128     --
129     l_legislation_code := ben_bep_bus.g_legislation_code;
130     hr_utility.set_location(l_proc, 20);
131   else
132     --
133     -- The ID is different to the last call to this function
134     -- or this is the first call to this function.
135     --
136     open csr_leg_code;
137     fetch csr_leg_code into l_legislation_code;
138     --
139     if csr_leg_code%notfound then
140       --
141       -- The primary key is invalid therefore we must error
142       --
143       close csr_leg_code;
144       fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
145       fnd_message.raise_error;
146     end if;
147     hr_utility.set_location(l_proc,30);
148     --
149     -- Set the global variables so the values are
150     -- available for the next call to this function.
151     --
152     close csr_leg_code;
153     ben_bep_bus.g_elig_obj_elig_prfl_id       := p_elig_obj_elig_prfl_id;
154     ben_bep_bus.g_legislation_code  := l_legislation_code;
155   end if;
156   hr_utility.set_location(' Leaving:'|| l_proc, 40);
157   return l_legislation_code;
158 end return_legislation_code;
159 --
160 -- ----------------------------------------------------------------------------
161 -- |------------------------------< chk_df >----------------------------------|
162 -- ----------------------------------------------------------------------------
163 --
164 -- Description:
165 --   Validates all the Descriptive Flexfield values.
166 --
167 -- Prerequisites:
168 --   All other columns have been validated.  Must be called as the
169 --   last step from insert_validate and update_validate.
170 --
171 -- In Arguments:
172 --   p_rec
173 --
174 -- Post Success:
175 --   If the Descriptive Flexfield structure column and data values are
176 --   all valid this procedure will end normally and processing will
177 --   continue.
178 --
179 -- Post Failure:
180 --   If the Descriptive Flexfield structure column value or any of
181 --   the data values are invalid then an application error is raised as
182 --   a PL/SQL exception.
183 --
184 -- Access Status:
185 --   Internal Row Handler Use Only.
186 --
187 -- ----------------------------------------------------------------------------
188 procedure chk_df
189   (p_rec in ben_bep_shd.g_rec_type
190   ) is
191 --
192   l_proc   varchar2(72) := g_package || 'chk_df';
193 --
194 begin
195   hr_utility.set_location('Entering:'||l_proc,10);
196   --
197   if ((p_rec.elig_obj_elig_prfl_id is not null)  and (
198     nvl(ben_bep_shd.g_old_rec.bep_attribute_category, hr_api.g_varchar2) <>
199     nvl(p_rec.bep_attribute_category, hr_api.g_varchar2)  or
200     nvl(ben_bep_shd.g_old_rec.bep_attribute1, hr_api.g_varchar2) <>
201     nvl(p_rec.bep_attribute1, hr_api.g_varchar2)  or
202     nvl(ben_bep_shd.g_old_rec.bep_attribute2, hr_api.g_varchar2) <>
203     nvl(p_rec.bep_attribute2, hr_api.g_varchar2)  or
204     nvl(ben_bep_shd.g_old_rec.bep_attribute3, hr_api.g_varchar2) <>
205     nvl(p_rec.bep_attribute3, hr_api.g_varchar2)  or
206     nvl(ben_bep_shd.g_old_rec.bep_attribute4, hr_api.g_varchar2) <>
207     nvl(p_rec.bep_attribute4, hr_api.g_varchar2)  or
208     nvl(ben_bep_shd.g_old_rec.bep_attribute5, hr_api.g_varchar2) <>
209     nvl(p_rec.bep_attribute5, hr_api.g_varchar2)  or
210     nvl(ben_bep_shd.g_old_rec.bep_attribute6, hr_api.g_varchar2) <>
211     nvl(p_rec.bep_attribute6, hr_api.g_varchar2)  or
212     nvl(ben_bep_shd.g_old_rec.bep_attribute7, hr_api.g_varchar2) <>
213     nvl(p_rec.bep_attribute7, hr_api.g_varchar2)  or
214     nvl(ben_bep_shd.g_old_rec.bep_attribute8, hr_api.g_varchar2) <>
215     nvl(p_rec.bep_attribute8, hr_api.g_varchar2)  or
216     nvl(ben_bep_shd.g_old_rec.bep_attribute9, hr_api.g_varchar2) <>
217     nvl(p_rec.bep_attribute9, hr_api.g_varchar2)  or
218     nvl(ben_bep_shd.g_old_rec.bep_attribute10, hr_api.g_varchar2) <>
219     nvl(p_rec.bep_attribute10, hr_api.g_varchar2)  or
220     nvl(ben_bep_shd.g_old_rec.bep_attribute11, hr_api.g_varchar2) <>
221     nvl(p_rec.bep_attribute11, hr_api.g_varchar2)  or
222     nvl(ben_bep_shd.g_old_rec.bep_attribute12, hr_api.g_varchar2) <>
223     nvl(p_rec.bep_attribute12, hr_api.g_varchar2)  or
224     nvl(ben_bep_shd.g_old_rec.bep_attribute13, hr_api.g_varchar2) <>
225     nvl(p_rec.bep_attribute13, hr_api.g_varchar2)  or
226     nvl(ben_bep_shd.g_old_rec.bep_attribute14, hr_api.g_varchar2) <>
227     nvl(p_rec.bep_attribute14, hr_api.g_varchar2)  or
228     nvl(ben_bep_shd.g_old_rec.bep_attribute15, hr_api.g_varchar2) <>
229     nvl(p_rec.bep_attribute15, hr_api.g_varchar2)  or
230     nvl(ben_bep_shd.g_old_rec.bep_attribute16, hr_api.g_varchar2) <>
231     nvl(p_rec.bep_attribute16, hr_api.g_varchar2)  or
232     nvl(ben_bep_shd.g_old_rec.bep_attribute17, hr_api.g_varchar2) <>
233     nvl(p_rec.bep_attribute17, hr_api.g_varchar2)  or
234     nvl(ben_bep_shd.g_old_rec.bep_attribute18, hr_api.g_varchar2) <>
235     nvl(p_rec.bep_attribute18, hr_api.g_varchar2)  or
236     nvl(ben_bep_shd.g_old_rec.bep_attribute19, hr_api.g_varchar2) <>
237     nvl(p_rec.bep_attribute19, hr_api.g_varchar2)  or
238     nvl(ben_bep_shd.g_old_rec.bep_attribute20, hr_api.g_varchar2) <>
239     nvl(p_rec.bep_attribute20, hr_api.g_varchar2) ))
240     or (p_rec.elig_obj_elig_prfl_id is null)  then
241     --
242     -- Only execute the validation if absolutely necessary:
243     -- a) During update, the structure column value or any
244     --    of the attribute values have actually changed.
245     -- b) During insert.
246     --
247     hr_dflex_utility.ins_or_upd_descflex_attribs
248       (p_appl_short_name                 => 'BEN'
249       ,p_descflex_name                   => 'EDIT_HERE: Enter descflex name'
250       ,p_attribute_category              => 'BEP_ATTRIBUTE_CATEGORY'
251       ,p_attribute1_name                 => 'BEP_ATTRIBUTE1'
252       ,p_attribute1_value                => p_rec.bep_attribute1
253       ,p_attribute2_name                 => 'BEP_ATTRIBUTE2'
254       ,p_attribute2_value                => p_rec.bep_attribute2
255       ,p_attribute3_name                 => 'BEP_ATTRIBUTE3'
256       ,p_attribute3_value                => p_rec.bep_attribute3
257       ,p_attribute4_name                 => 'BEP_ATTRIBUTE4'
258       ,p_attribute4_value                => p_rec.bep_attribute4
259       ,p_attribute5_name                 => 'BEP_ATTRIBUTE5'
260       ,p_attribute5_value                => p_rec.bep_attribute5
261       ,p_attribute6_name                 => 'BEP_ATTRIBUTE6'
262       ,p_attribute6_value                => p_rec.bep_attribute6
263       ,p_attribute7_name                 => 'BEP_ATTRIBUTE7'
264       ,p_attribute7_value                => p_rec.bep_attribute7
265       ,p_attribute8_name                 => 'BEP_ATTRIBUTE8'
266       ,p_attribute8_value                => p_rec.bep_attribute8
267       ,p_attribute9_name                 => 'BEP_ATTRIBUTE9'
268       ,p_attribute9_value                => p_rec.bep_attribute9
269       ,p_attribute10_name                => 'BEP_ATTRIBUTE10'
270       ,p_attribute10_value               => p_rec.bep_attribute10
271       ,p_attribute11_name                => 'BEP_ATTRIBUTE11'
272       ,p_attribute11_value               => p_rec.bep_attribute11
273       ,p_attribute12_name                => 'BEP_ATTRIBUTE12'
274       ,p_attribute12_value               => p_rec.bep_attribute12
275       ,p_attribute13_name                => 'BEP_ATTRIBUTE13'
276       ,p_attribute13_value               => p_rec.bep_attribute13
277       ,p_attribute14_name                => 'BEP_ATTRIBUTE14'
278       ,p_attribute14_value               => p_rec.bep_attribute14
279       ,p_attribute15_name                => 'BEP_ATTRIBUTE15'
280       ,p_attribute15_value               => p_rec.bep_attribute15
281       ,p_attribute16_name                => 'BEP_ATTRIBUTE16'
282       ,p_attribute16_value               => p_rec.bep_attribute16
283       ,p_attribute17_name                => 'BEP_ATTRIBUTE17'
284       ,p_attribute17_value               => p_rec.bep_attribute17
285       ,p_attribute18_name                => 'BEP_ATTRIBUTE18'
286       ,p_attribute18_value               => p_rec.bep_attribute18
287       ,p_attribute19_name                => 'BEP_ATTRIBUTE19'
288       ,p_attribute19_value               => p_rec.bep_attribute19
289       ,p_attribute20_name                => 'BEP_ATTRIBUTE20'
290       ,p_attribute20_value               => p_rec.bep_attribute20
291       );
292   end if;
293   --
294   hr_utility.set_location(' Leaving:'||l_proc,20);
295 end chk_df;
296 --
297 -- ----------------------------------------------------------------------------
298 -- |-----------------------< chk_non_updateable_args >------------------------|
299 -- ----------------------------------------------------------------------------
300 -- {Start Of Comments}
301 --
302 -- Description:
303 --   This procedure is used to ensure that non updateable attributes have
304 --   not been updated. If an attribute has been updated an error is generated.
305 --
306 -- Pre Conditions:
307 --   g_old_rec has been populated with details of the values currently in
308 --   the database.
309 --
310 -- In Arguments:
311 --   p_rec has been populated with the updated values the user would like the
312 --   record set to.
313 --
314 -- Post Success:
315 --   Processing continues if all the non updateable attributes have not
316 --   changed.
317 --
318 -- Post Failure:
319 --   An application error is raised if any of the non updatable attributes
320 --   have been altered.
321 --
322 -- {End Of Comments}
323 -- ----------------------------------------------------------------------------
324 Procedure chk_non_updateable_args
325   (p_effective_date  in date
326   ,p_rec             in ben_bep_shd.g_rec_type
327   ) IS
328 --
329   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
330 --
331 Begin
332   --
333   -- Only proceed with the validation if a row exists for the current
334   -- record in the HR Schema.
335   --
336   IF NOT ben_bep_shd.api_updating
337       (p_elig_obj_elig_prfl_id            => p_rec.elig_obj_elig_prfl_id
338       ,p_effective_date                   => p_effective_date
339       ,p_object_version_number            => p_rec.object_version_number
340       ) THEN
341      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
342      fnd_message.set_token('PROCEDURE ', l_proc);
343      fnd_message.set_token('STEP ', '5');
344      fnd_message.raise_error;
345   END IF;
346   --
347   -- EDIT_HERE: Add checks to ensure non-updateable args have
348   --            not been updated.
349   --
350 End chk_non_updateable_args;
351 --
352 -- ----------------------------------------------------------------------------
353 -- |--------------------------< dt_update_validate >--------------------------|
354 -- ----------------------------------------------------------------------------
355 -- {Start Of Comments}
356 --
357 -- Description:
358 --   This procedure is used for referential integrity of datetracked
359 --   parent entities when a datetrack update operation is taking place
360 --   and where there is no cascading of update defined for this entity.
361 --
362 -- Prerequisites:
363 --   This procedure is called from the update_validate.
364 --
365 -- In Parameters:
366 --
367 -- Post Success:
368 --   Processing continues.
369 --
370 -- Post Failure:
371 --
372 -- Developer Implementation Notes:
373 --   This procedure should not need maintenance unless the HR Schema model
374 --   changes.
375 --
376 -- Access Status:
377 --   Internal Row Handler Use Only.
378 --
379 -- {End Of Comments}
380 -- ----------------------------------------------------------------------------
381 Procedure dt_update_validate
382   (p_elig_obj_id                   in number default hr_api.g_number
383   ,p_elig_prfl_id                  in number default hr_api.g_number
384   ,p_datetrack_mode                in varchar2
385   ,p_validation_start_date         in date
386   ,p_validation_end_date           in date
387   ) Is
388 --
389   l_proc  varchar2(72) := g_package||'dt_update_validate';
390 --
391 Begin
392   --
393   -- Ensure that the p_datetrack_mode argument is not null
394   --
395   hr_api.mandatory_arg_error
396     (p_api_name       => l_proc
397     ,p_argument       => 'datetrack_mode'
398     ,p_argument_value => p_datetrack_mode
399     );
400   --
401   -- Mode will be valid, as this is checked at the start of the upd.
402   --
403   -- Ensure the arguments are not null
404   --
405   hr_api.mandatory_arg_error
406     (p_api_name       => l_proc
407     ,p_argument       => 'validation_start_date'
408     ,p_argument_value => p_validation_start_date
409     );
410   --
411   hr_api.mandatory_arg_error
412     (p_api_name       => l_proc
413     ,p_argument       => 'validation_end_date'
414     ,p_argument_value => p_validation_end_date
415     );
416   --
417   If ((nvl(p_elig_obj_id, hr_api.g_number) <> hr_api.g_number) and
418       NOT (dt_api.check_min_max_dates
419             (p_base_table_name => 'ben_elig_obj_f'
420             ,p_base_key_column => 'ELIG_OBJ_ID'
421             ,p_base_key_value  => p_elig_obj_id
422             ,p_from_date       => p_validation_start_date
423             ,p_to_date         => p_validation_end_date))) Then
424      fnd_message.set_name('PAY', 'HR_7216_DT_UPD_INTEGRITY_ERR');
425      fnd_message.set_token('TABLE_NAME','elig obj');
426      hr_multi_message.add
427        (p_associated_column1 => ben_bep_shd.g_tab_nam || '.ELIG_OBJ_ID');
428   End If;
429   --
430   If ((nvl(p_elig_prfl_id, hr_api.g_number) <> hr_api.g_number) and
431       NOT (dt_api.check_min_max_dates
432             (p_base_table_name => 'ben_eligy_prfl_f'
433             ,p_base_key_column => 'ELIGY_PRFL_ID'
434             ,p_base_key_value  => p_elig_prfl_id
435             ,p_from_date       => p_validation_start_date
436             ,p_to_date         => p_validation_end_date))) Then
437      fnd_message.set_name('PAY', 'HR_7216_DT_UPD_INTEGRITY_ERR');
438      fnd_message.set_token('TABLE_NAME','eligy prfl');
439      hr_multi_message.add
440        (p_associated_column1 => ben_bep_shd.g_tab_nam || '.ELIG_PRFL_ID');
441   End If;
442   --
443 Exception
444   When Others Then
445     --
446     -- An unhandled or unexpected error has occurred which
447     -- we must report
448     --
449     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
450     fnd_message.set_token('PROCEDURE', l_proc);
451     fnd_message.set_token('STEP','15');
452     fnd_message.raise_error;
453 End dt_update_validate;
454 --
455 -- ----------------------------------------------------------------------------
456 -- |--------------------------< dt_delete_validate >--------------------------|
457 -- ----------------------------------------------------------------------------
458 -- {Start Of Comments}
459 --
460 -- Description:
461 --   This procedure is used for referential integrity of datetracked
462 --   child entities when either a datetrack DELETE or ZAP is in operation
463 --   and where there is no cascading of delete defined for this entity.
464 --   For the datetrack mode of DELETE or ZAP we must ensure that no
465 --   datetracked child rows exist between the validation start and end
466 --   dates.
467 --
468 -- Prerequisites:
469 --   This procedure is called from the delete_validate.
470 --
471 -- In Parameters:
472 --
473 -- Post Success:
474 --   Processing continues.
475 --
476 -- Post Failure:
477 --   If a row exists by determining the returning Boolean value from the
478 --   generic dt_api.rows_exist function then we must supply an error via
479 --   the use of the local exception handler l_rows_exist.
480 --
481 -- Developer Implementation Notes:
482 --   This procedure should not need maintenance unless the HR Schema model
483 --   changes.
484 --
485 -- Access Status:
486 --   Internal Row Handler Use Only.
487 --
488 -- {End Of Comments}
489 -- ----------------------------------------------------------------------------
490 Procedure dt_delete_validate
491   (p_elig_obj_elig_prfl_id            in number
492   ,p_datetrack_mode                   in varchar2
493   ,p_validation_start_date            in date
494   ,p_validation_end_date              in date
495   ) Is
496 --
497   l_proc        varchar2(72)    := g_package||'dt_delete_validate';
498 --
499 Begin
500   --
501   -- Ensure that the p_datetrack_mode argument is not null
502   --
503   hr_api.mandatory_arg_error
504     (p_api_name       => l_proc
505     ,p_argument       => 'datetrack_mode'
506     ,p_argument_value => p_datetrack_mode
507     );
508   --
509   -- Only perform the validation if the datetrack mode is either
510   -- DELETE or ZAP
511   --
512   If (p_datetrack_mode = hr_api.g_delete or
513       p_datetrack_mode = hr_api.g_zap) then
514     --
515     --
516     -- Ensure the arguments are not null
517     --
518     hr_api.mandatory_arg_error
519       (p_api_name       => l_proc
520       ,p_argument       => 'validation_start_date'
521       ,p_argument_value => p_validation_start_date
522       );
523     --
524     hr_api.mandatory_arg_error
525       (p_api_name       => l_proc
526       ,p_argument       => 'validation_end_date'
527       ,p_argument_value => p_validation_end_date
528       );
529     --
530     hr_api.mandatory_arg_error
531       (p_api_name       => l_proc
532       ,p_argument       => 'elig_obj_elig_prfl_id'
533       ,p_argument_value => p_elig_obj_elig_prfl_id
534       );
535     --
536   --
537     --
538   End If;
539   --
540 Exception
541   When Others Then
542     --
543     -- An unhandled or unexpected error has occurred which
544     -- we must report
545     --
546     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
547     fnd_message.set_token('PROCEDURE', l_proc);
548     fnd_message.set_token('STEP','15');
549     fnd_message.raise_error;
550   --
551 End dt_delete_validate;
552 --
553 -- ----------------------------------------------------------------------------
554 -- |---------------------------< insert_validate >----------------------------|
555 -- ----------------------------------------------------------------------------
556 Procedure insert_validate
557   (p_rec                   in ben_bep_shd.g_rec_type
558   ,p_effective_date        in date
559   ,p_datetrack_mode        in varchar2
560   ,p_validation_start_date in date
561   ,p_validation_end_date   in date
562   ) is
563 --
564   l_proc        varchar2(72) := g_package||'insert_validate';
565 --
566 Begin
567   hr_utility.set_location('Entering:'||l_proc, 5);
568   --
569   -- Call all supporting business operations
570   --
571   hr_api.validate_bus_grp_id
572     (p_business_group_id => p_rec.business_group_id
573     ,p_associated_column1 => ben_bep_shd.g_tab_nam
574                               || '.BUSINESS_GROUP_ID');
575   --
576   -- After validating the set of important attributes,
577   -- if Multiple Message detection is enabled and at least
578   -- one error has been found then abort further validation.
579   --
580   hr_multi_message.end_validation_set;
581   --
582   -- Validate Dependent Attributes
583   --
584   --
585 --  ben_bep_bus.chk_df(p_rec);
586   --
587   hr_utility.set_location(' Leaving:'||l_proc, 10);
588 End insert_validate;
589 --
590 -- ----------------------------------------------------------------------------
591 -- |---------------------------< update_validate >----------------------------|
592 -- ----------------------------------------------------------------------------
593 Procedure update_validate
594   (p_rec                     in ben_bep_shd.g_rec_type
595   ,p_effective_date          in date
596   ,p_datetrack_mode          in varchar2
597   ,p_validation_start_date   in date
598   ,p_validation_end_date     in date
599   ) is
600 --
601   l_proc        varchar2(72) := g_package||'update_validate';
602 --
603 Begin
604   hr_utility.set_location('Entering:'||l_proc, 5);
605   --
606   -- Call all supporting business operations
607   --
608   hr_api.validate_bus_grp_id
609     (p_business_group_id => p_rec.business_group_id
610     ,p_associated_column1 => ben_bep_shd.g_tab_nam
611                               || '.BUSINESS_GROUP_ID');
612   --
613   -- After validating the set of important attributes,
614   -- if Multiple Message detection is enabled and at least
615   -- one error has been found then abort further validation.
616   --
617   hr_multi_message.end_validation_set;
618   --
619   -- Validate Dependent Attributes
620   --
621   -- Call the datetrack update integrity operation
622   --
623   dt_update_validate
624     (p_elig_obj_id                    => p_rec.elig_obj_id
625     ,p_elig_prfl_id                   => p_rec.elig_prfl_id
626     ,p_datetrack_mode                 => p_datetrack_mode
627     ,p_validation_start_date          => p_validation_start_date
628     ,p_validation_end_date            => p_validation_end_date
629     );
630   --
631   chk_non_updateable_args
632     (p_effective_date  => p_effective_date
633     ,p_rec             => p_rec
634     );
635   --
636   --
637 --  ben_bep_bus.chk_df(p_rec);
638   --
639   hr_utility.set_location(' Leaving:'||l_proc, 10);
640 End update_validate;
641 --
642 -- ----------------------------------------------------------------------------
643 -- |---------------------------< delete_validate >----------------------------|
644 -- ----------------------------------------------------------------------------
645 Procedure delete_validate
646   (p_rec                    in ben_bep_shd.g_rec_type
647   ,p_effective_date         in date
648   ,p_datetrack_mode         in varchar2
649   ,p_validation_start_date  in date
650   ,p_validation_end_date    in date
651   ) is
652 --
653   l_proc        varchar2(72) := g_package||'delete_validate';
654 --
655 Begin
656   hr_utility.set_location('Entering:'||l_proc, 5);
657   --
658   -- Call all supporting business operations
659   --
660   dt_delete_validate
661     (p_datetrack_mode                   => p_datetrack_mode
662     ,p_validation_start_date            => p_validation_start_date
663     ,p_validation_end_date              => p_validation_end_date
664     ,p_elig_obj_elig_prfl_id            => p_rec.elig_obj_elig_prfl_id
665     );
666   --
667   hr_utility.set_location(' Leaving:'||l_proc, 10);
668 End delete_validate;
669 --
670 end ben_bep_bus;