DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PAC_BUS

Source


1 Package Body per_pac_bus as
2 /* $Header: pepacrhi.pkb 120.3 2006/10/19 07:29:26 sturlapa noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := '  per_pac_bus.';  -- Global package name
9 g_debug   boolean      := hr_utility.debug_enabled;
10 --
11 -- The following two global variables are only to be
12 -- used by the return_legislation_code function.
13 --
14 g_legislation_code            varchar2(150)  default null;
15 g_allocated_checklist_id      number         default null;
16 --
17 --  ---------------------------------------------------------------------------
18 --  |----------------------< set_security_group_id >--------------------------|
19 --  ---------------------------------------------------------------------------
20 --
21 Procedure set_security_group_id
22   (p_allocated_checklist_id               in number
23   ,p_associated_column1                   in varchar2 default null
24   ) is
25   --
26   -- Declare cursor
27   --
28   cursor csr_sec_grp is
29     select pbg.security_group_id,
30            pbg.legislation_code
31       from per_business_groups_perf pbg
32          , per_allocated_checklists pac
33 	 , per_all_people_f         paf
34      where pac.allocated_checklist_id = p_allocated_checklist_id
35      and   pac.person_id              = paf.person_id
36      and   trunc(sysdate) between paf.EFFECTIVE_START_DATE
37                           and     paf.EFFECTIVE_END_DATE
38      and   pbg.business_group_id = paf.business_group_id;
39   --
40   -- Declare local variables
41   --
42   l_security_group_id number;
43   l_proc              varchar2(72)  :=  g_package||'set_security_group_id';
44   l_legislation_code  varchar2(150);
45   --
46 begin
47   --
48   hr_utility.set_location('Entering:'|| l_proc, 10);
49   --
50   -- Ensure that all the mandatory parameter are not null
51   --
52   hr_api.mandatory_arg_error
53     (p_api_name           => l_proc
54     ,p_argument           => 'allocated_checklist_id'
55     ,p_argument_value     => p_allocated_checklist_id
56     );
57   --
58   open csr_sec_grp;
59   fetch csr_sec_grp into l_security_group_id
60                        , l_legislation_code;
61   --
62   if csr_sec_grp%notfound then
63      --
64      close csr_sec_grp;
65      --
66      -- The primary key is invalid therefore we must error
67      --
68      fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
69      hr_multi_message.add
70        (p_associated_column1
71         => nvl(p_associated_column1,'ALLOCATED_CHECKLIST_ID')
72        );
73      --
74   else
75     close csr_sec_grp;
76     --
77     -- Set the security_group_id in CLIENT_INFO
78     --
79     hr_api.set_security_group_id
80       (p_security_group_id => l_security_group_id
81       );
82     --
83     -- Set the sessions legislation context in HR_SESSION_DATA
84     --
85     hr_api.set_legislation_context(l_legislation_code);
86   end if;
87   --
88   hr_utility.set_location(' Leaving:'|| l_proc, 20);
89   --
90 end set_security_group_id;
91 --
92 --  ---------------------------------------------------------------------------
93 --  |---------------------< return_legislation_code >-------------------------|
94 --  ---------------------------------------------------------------------------
95 --
96 Function return_legislation_code
97   (p_allocated_checklist_id               in     number
98   )
99   Return Varchar2 Is
100   --
101   -- Declare cursor
102   --
103   cursor csr_leg_code is
104     select pbg.legislation_code
105       from per_business_groups_perf     pbg
106          , per_allocated_checklists pac
107       --   , EDIT_HERE table_name(s) 333
108 	 , per_all_people_f         paf
109      where pac.allocated_checklist_id = p_allocated_checklist_id
110      and   pac.person_id              = paf.person_id
111      and   trunc(sysdate) between paf.EFFECTIVE_START_DATE
112                           and     paf.EFFECTIVE_END_DATE
113      and   pbg.business_group_id = paf.business_group_id;
114 
115   --
116   -- Declare local variables
117   --
118   l_legislation_code  varchar2(150);
119   l_proc              varchar2(72)  :=  g_package||'return_legislation_code';
120   --
121 Begin
122   --
123   hr_utility.set_location('Entering:'|| l_proc, 10);
124   --
125   -- Ensure that all the mandatory parameter are not null
126   --
127   hr_api.mandatory_arg_error
128     (p_api_name           => l_proc
129     ,p_argument           => 'allocated_checklist_id'
130     ,p_argument_value     => p_allocated_checklist_id
131     );
132   --
133   if ( nvl(per_pac_bus.g_allocated_checklist_id, hr_api.g_number)
134        = p_allocated_checklist_id) then
135     --
136     -- The legislation code has already been found with a previous
137     -- call to this function. Just return the value in the global
138     -- variable.
139     --
140     l_legislation_code := per_pac_bus.g_legislation_code;
141     hr_utility.set_location(l_proc, 20);
142   else
143     --
144     -- The ID is different to the last call to this function
145     -- or this is the first call to this function.
146     --
147     open csr_leg_code;
148     fetch csr_leg_code into l_legislation_code;
149     --
150     if csr_leg_code%notfound then
151       --
152       -- The primary key is invalid therefore we must error
153       --
154       close csr_leg_code;
155       fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
156       fnd_message.raise_error;
157     end if;
158     hr_utility.set_location(l_proc,30);
159     --
160     -- Set the global variables so the values are
161     -- available for the next call to this function.
162     --
163     close csr_leg_code;
164     per_pac_bus.g_allocated_checklist_id      := p_allocated_checklist_id;
165     per_pac_bus.g_legislation_code  := l_legislation_code;
166   end if;
167   hr_utility.set_location(' Leaving:'|| l_proc, 40);
168   return l_legislation_code;
169 end return_legislation_code;
170 --
171 -- ----------------------------------------------------------------------------
172 -- |--------------------------< chk_name_unq >--------------------------------|
173 -- ----------------------------------------------------------------------------
174 --
175 PROCEDURE chk_name_unq
176   (p_checklist_name         IN per_allocated_checklists.checklist_name%TYPE
177   ,p_checklist_category     IN per_allocated_checklists.checklist_category%TYPE
178   ,p_allocated_checklist_id IN per_allocated_checklists.allocated_checklist_id%TYPE
179   ,p_person_id              IN per_allocated_checklists.person_id%TYPE
180   ,p_object_version_number  IN per_allocated_checklists.object_version_number%TYPE
181   ) IS
182   --
183   -- Declare cursor to check name is unique.
184   --
185    CURSOR csr_unique_name IS
186     SELECT 'x'
187     FROM per_allocated_checklists
188     WHERE checklist_name = p_checklist_name
189     AND checklist_category = p_checklist_category
190     AND  person_id = p_person_id
191     AND allocated_checklist_id <> nvl(p_allocated_checklist_id,-1);
192   --
193   -- Declare local variables
194   --
195   l_exists        VARCHAR2(1);
196   l_proc          VARCHAR2(72)  :=  g_package||'chk_name_unq';
197   l_api_updating  BOOLEAN;
198   --
199 BEGIN
200   IF g_debug THEN hr_utility.set_location('Entering:'||l_proc, 10); END IF;
201   --
202   --  Only proceed with validation if:
203   --  a) The current g_old_rec is current and
204   --  b) The checklist name value has changed
205   --  c) a record is being inserted
206   --
207   l_api_updating := per_pac_shd.api_updating
208     (p_allocated_checklist_id => p_allocated_checklist_id
209     ,p_object_version_number  => p_object_version_number
210     );
211 
212   IF (l_api_updating
213       AND NVL(per_pac_shd.g_old_rec.checklist_name, hr_api.g_varchar2) = nvl(p_checklist_name,hr_api.g_varchar2)
214      )
215   THEN
216       RETURN;
217   END IF;
218   --
219   IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
220   --
221   hr_utility.set_location(l_proc,10);
222   --
223   IF p_checklist_name IS NOT NULL THEN
224     -- Check that name is unique
225     OPEN csr_unique_name;
226     FETCH csr_unique_name INTO l_exists;
227     --
228     IF csr_unique_name%FOUND THEN
229       -- Name is not unique - raise error by calling constraint error
230       CLOSE csr_unique_name;
231       --
232       fnd_message.set_name('PER', 'PER_449664_CKL_CKL_NAME_UNQ');
233       fnd_message.set_token('CHECKLIST_NAME', p_checklist_name);
234       fnd_message.raise_error;
235       --
236     END IF;
237     --
238     CLOSE csr_unique_name;
239   ELSE
240     -- Name is null - raise error
241     fnd_message.set_name('PER','PER_449678_CKL_NAME_REQD');
242     fnd_message.raise_error;
243   END IF;
244   --
245   IF g_debug THEN hr_utility.set_location('Leaving:'||l_proc, 30); END IF;
246   --
247 EXCEPTION
248   WHEN app_exception.application_exception THEN
249     IF hr_multi_message.exception_add
250                  (p_associated_column1 => 'PER_ALLOCATED_CHECKLISTS.CHECKLIST_NAME'
251                  ) THEN
252       hr_utility.set_location(' Leaving:'|| l_proc, 40);
253       RAISE;
254     END IF;
255 END chk_name_unq;
256 --
257 -- ----------------------------------------------------------------------------
258 -- |-----------------------------< chk_ddf >----------------------------------|
259 -- ----------------------------------------------------------------------------
260 --
261 -- Description:
262 --   Validates all the Developer Descriptive Flexfield values.
263 --
264 -- Prerequisites:
265 --   All other columns have been validated.  Must be called as the
266 --   last step from insert_validate and update_validate.
267 --
268 -- In Arguments:
269 --   p_rec
270 --
271 -- Post Success:
272 --   If the Developer Descriptive Flexfield structure column and data values
273 --   are all valid this procedure will end normally and processing will
274 --   continue.
275 --
276 -- Post Failure:
277 --   If the Developer Descriptive Flexfield structure column value or any of
278 --   the data values are invalid then an application error is raised as
279 --   a PL/SQL exception.
280 --
281 -- Access Status:
282 --   Internal Row Handler Use Only.
283 --
284 -- ----------------------------------------------------------------------------
285 procedure chk_ddf
286   (p_rec in per_pac_shd.g_rec_type
287   ) is
288 --
289   l_proc   varchar2(72) := g_package || 'chk_ddf';
290 --
291 begin
292   hr_utility.set_location('Entering:'||l_proc,10);
293   --
294 /*
295   if ((p_rec.allocated_checklist_id is not null)  and (
296     nvl(per_pac_shd.g_old_rec.information_category, hr_api.g_varchar2) <>
297     nvl(p_rec.information_category, hr_api.g_varchar2)  or
298     nvl(per_pac_shd.g_old_rec.information1, hr_api.g_varchar2) <>
299     nvl(p_rec.information1, hr_api.g_varchar2)  or
300     nvl(per_pac_shd.g_old_rec.information2, hr_api.g_varchar2) <>
301     nvl(p_rec.information2, hr_api.g_varchar2)  or
302     nvl(per_pac_shd.g_old_rec.information3, hr_api.g_varchar2) <>
303     nvl(p_rec.information3, hr_api.g_varchar2)  or
304     nvl(per_pac_shd.g_old_rec.information4, hr_api.g_varchar2) <>
305     nvl(p_rec.information4, hr_api.g_varchar2)  or
306     nvl(per_pac_shd.g_old_rec.information5, hr_api.g_varchar2) <>
307     nvl(p_rec.information5, hr_api.g_varchar2)  or
308     nvl(per_pac_shd.g_old_rec.information6, hr_api.g_varchar2) <>
309     nvl(p_rec.information6, hr_api.g_varchar2)  or
310     nvl(per_pac_shd.g_old_rec.information7, hr_api.g_varchar2) <>
311     nvl(p_rec.information7, hr_api.g_varchar2)  or
312     nvl(per_pac_shd.g_old_rec.information8, hr_api.g_varchar2) <>
313     nvl(p_rec.information8, hr_api.g_varchar2)  or
314     nvl(per_pac_shd.g_old_rec.information9, hr_api.g_varchar2) <>
315     nvl(p_rec.information9, hr_api.g_varchar2)  or
316     nvl(per_pac_shd.g_old_rec.information10, hr_api.g_varchar2) <>
317     nvl(p_rec.information10, hr_api.g_varchar2)  or
318     nvl(per_pac_shd.g_old_rec.information11, hr_api.g_varchar2) <>
319     nvl(p_rec.information11, hr_api.g_varchar2)  or
320     nvl(per_pac_shd.g_old_rec.information12, hr_api.g_varchar2) <>
321     nvl(p_rec.information12, hr_api.g_varchar2)  or
322     nvl(per_pac_shd.g_old_rec.information13, hr_api.g_varchar2) <>
323     nvl(p_rec.information13, hr_api.g_varchar2)  or
324     nvl(per_pac_shd.g_old_rec.information14, hr_api.g_varchar2) <>
325     nvl(p_rec.information14, hr_api.g_varchar2)  or
326     nvl(per_pac_shd.g_old_rec.information15, hr_api.g_varchar2) <>
327     nvl(p_rec.information15, hr_api.g_varchar2)  or
328     nvl(per_pac_shd.g_old_rec.information16, hr_api.g_varchar2) <>
329     nvl(p_rec.information16, hr_api.g_varchar2)  or
330     nvl(per_pac_shd.g_old_rec.information17, hr_api.g_varchar2) <>
331     nvl(p_rec.information17, hr_api.g_varchar2)  or
332     nvl(per_pac_shd.g_old_rec.information18, hr_api.g_varchar2) <>
333     nvl(p_rec.information18, hr_api.g_varchar2)  or
334     nvl(per_pac_shd.g_old_rec.information19, hr_api.g_varchar2) <>
335     nvl(p_rec.information19, hr_api.g_varchar2)  or
336     nvl(per_pac_shd.g_old_rec.information20, hr_api.g_varchar2) <>
337     nvl(p_rec.information20, hr_api.g_varchar2) ))
338     or (p_rec.allocated_checklist_id is null)  then
339     --
340     -- Only execute the validation if absolutely necessary:
341     -- a) During update, the structure column value or any
342     --    of the attribute values have actually changed.
343     -- b) During insert.
344     --
345     hr_dflex_utility.ins_or_upd_descflex_attribs
346       (p_appl_short_name                 => 'PER'
347       ,p_descflex_name                   => 'EDIT_HERE: Enter descflex name'
348       ,p_attribute_category              => p_rec.information_category
349       ,p_attribute1_name                 => 'INFORMATION1'
350       ,p_attribute1_value                => p_rec.information1
351       ,p_attribute2_name                 => 'INFORMATION2'
352       ,p_attribute2_value                => p_rec.information2
353       ,p_attribute3_name                 => 'INFORMATION3'
354       ,p_attribute3_value                => p_rec.information3
355       ,p_attribute4_name                 => 'INFORMATION4'
356       ,p_attribute4_value                => p_rec.information4
357       ,p_attribute5_name                 => 'INFORMATION5'
358       ,p_attribute5_value                => p_rec.information5
359       ,p_attribute6_name                 => 'INFORMATION6'
360       ,p_attribute6_value                => p_rec.information6
361       ,p_attribute7_name                 => 'INFORMATION7'
362       ,p_attribute7_value                => p_rec.information7
363       ,p_attribute8_name                 => 'INFORMATION8'
364       ,p_attribute8_value                => p_rec.information8
365       ,p_attribute9_name                 => 'INFORMATION9'
366       ,p_attribute9_value                => p_rec.information9
367       ,p_attribute10_name                => 'INFORMATION10'
368       ,p_attribute10_value               => p_rec.information10
369       ,p_attribute11_name                => 'INFORMATION11'
370       ,p_attribute11_value               => p_rec.information11
371       ,p_attribute12_name                => 'INFORMATION12'
372       ,p_attribute12_value               => p_rec.information12
373       ,p_attribute13_name                => 'INFORMATION13'
374       ,p_attribute13_value               => p_rec.information13
375       ,p_attribute14_name                => 'INFORMATION14'
376       ,p_attribute14_value               => p_rec.information14
377       ,p_attribute15_name                => 'INFORMATION15'
381       ,p_attribute17_name                => 'INFORMATION17'
378       ,p_attribute15_value               => p_rec.information15
379       ,p_attribute16_name                => 'INFORMATION16'
380       ,p_attribute16_value               => p_rec.information16
382       ,p_attribute17_value               => p_rec.information17
383       ,p_attribute18_name                => 'INFORMATION18'
384       ,p_attribute18_value               => p_rec.information18
385       ,p_attribute19_name                => 'INFORMATION19'
386       ,p_attribute19_value               => p_rec.information19
387       ,p_attribute20_name                => 'INFORMATION20'
388       ,p_attribute20_value               => p_rec.information20
389       );
390   end if;
391 */
392   --
393   hr_utility.set_location(' Leaving:'||l_proc,20);
394 end chk_ddf;
395 --
396 -- ----------------------------------------------------------------------------
397 -- |------------------------------< chk_df >----------------------------------|
398 -- ----------------------------------------------------------------------------
399 --
400 -- Description:
401 --   Validates all the Descriptive Flexfield values.
402 --
403 -- Prerequisites:
404 --   All other columns have been validated.  Must be called as the
405 --   last step from insert_validate and update_validate.
406 --
407 -- In Arguments:
408 --   p_rec
409 --
410 -- Post Success:
411 --   If the Descriptive Flexfield structure column and data values are
412 --   all valid this procedure will end normally and processing will
413 --   continue.
414 --
415 -- Post Failure:
416 --   If the Descriptive Flexfield structure column value or any of
417 --   the data values are invalid then an application error is raised as
418 --   a PL/SQL exception.
419 --
420 -- Access Status:
421 --   Internal Row Handler Use Only.
422 --
423 -- ----------------------------------------------------------------------------
424 procedure chk_df
425   (p_rec in per_pac_shd.g_rec_type
426   ) is
427 --
428   l_proc   varchar2(72) := g_package || 'chk_df';
429 --
430 begin
431   hr_utility.set_location('Entering:'||l_proc,10);
432   --
433 /*
434   if ((p_rec.allocated_checklist_id is not null)  and (
435     nvl(per_pac_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
436     nvl(p_rec.attribute_category, hr_api.g_varchar2)  or
437     nvl(per_pac_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
438     nvl(p_rec.attribute1, hr_api.g_varchar2)  or
439     nvl(per_pac_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
440     nvl(p_rec.attribute2, hr_api.g_varchar2)  or
441     nvl(per_pac_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
442     nvl(p_rec.attribute3, hr_api.g_varchar2)  or
443     nvl(per_pac_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
444     nvl(p_rec.attribute4, hr_api.g_varchar2)  or
445     nvl(per_pac_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
446     nvl(p_rec.attribute5, hr_api.g_varchar2)  or
447     nvl(per_pac_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
448     nvl(p_rec.attribute6, hr_api.g_varchar2)  or
449     nvl(per_pac_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
450     nvl(p_rec.attribute7, hr_api.g_varchar2)  or
451     nvl(per_pac_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
452     nvl(p_rec.attribute8, hr_api.g_varchar2)  or
453     nvl(per_pac_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
454     nvl(p_rec.attribute9, hr_api.g_varchar2)  or
455     nvl(per_pac_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
456     nvl(p_rec.attribute10, hr_api.g_varchar2)  or
457     nvl(per_pac_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
458     nvl(p_rec.attribute11, hr_api.g_varchar2)  or
459     nvl(per_pac_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
460     nvl(p_rec.attribute12, hr_api.g_varchar2)  or
461     nvl(per_pac_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
462     nvl(p_rec.attribute13, hr_api.g_varchar2)  or
463     nvl(per_pac_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
464     nvl(p_rec.attribute14, hr_api.g_varchar2)  or
465     nvl(per_pac_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
466     nvl(p_rec.attribute15, hr_api.g_varchar2)  or
467     nvl(per_pac_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
468     nvl(p_rec.attribute16, hr_api.g_varchar2)  or
469     nvl(per_pac_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
470     nvl(p_rec.attribute17, hr_api.g_varchar2)  or
471     nvl(per_pac_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
472     nvl(p_rec.attribute18, hr_api.g_varchar2)  or
473     nvl(per_pac_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
474     nvl(p_rec.attribute19, hr_api.g_varchar2)  or
475     nvl(per_pac_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
476     nvl(p_rec.attribute20, hr_api.g_varchar2) ))
477     or (p_rec.allocated_checklist_id is null)  then
478     --
479     -- Only execute the validation if absolutely necessary:
480     -- a) During update, the structure column value or any
481     --    of the attribute values have actually changed.
482     -- b) During insert.
483     --
484     hr_dflex_utility.ins_or_upd_descflex_attribs
485       (p_appl_short_name                 => 'PER'
486       ,p_descflex_name                   => 'EDIT_HERE: Enter descflex name'
487       ,p_attribute_category              => p_rec.attribute_category
488       ,p_attribute1_name                 => 'ATTRIBUTE1'
489       ,p_attribute1_value                => p_rec.attribute1
490       ,p_attribute2_name                 => 'ATTRIBUTE2'
491       ,p_attribute2_value                => p_rec.attribute2
492       ,p_attribute3_name                 => 'ATTRIBUTE3'
493       ,p_attribute3_value                => p_rec.attribute3
494       ,p_attribute4_name                 => 'ATTRIBUTE4'
495       ,p_attribute4_value                => p_rec.attribute4
496       ,p_attribute5_name                 => 'ATTRIBUTE5'
500       ,p_attribute7_name                 => 'ATTRIBUTE7'
497       ,p_attribute5_value                => p_rec.attribute5
498       ,p_attribute6_name                 => 'ATTRIBUTE6'
499       ,p_attribute6_value                => p_rec.attribute6
501       ,p_attribute7_value                => p_rec.attribute7
502       ,p_attribute8_name                 => 'ATTRIBUTE8'
503       ,p_attribute8_value                => p_rec.attribute8
504       ,p_attribute9_name                 => 'ATTRIBUTE9'
505       ,p_attribute9_value                => p_rec.attribute9
506       ,p_attribute10_name                => 'ATTRIBUTE10'
507       ,p_attribute10_value               => p_rec.attribute10
508       ,p_attribute11_name                => 'ATTRIBUTE11'
509       ,p_attribute11_value               => p_rec.attribute11
510       ,p_attribute12_name                => 'ATTRIBUTE12'
511       ,p_attribute12_value               => p_rec.attribute12
512       ,p_attribute13_name                => 'ATTRIBUTE13'
513       ,p_attribute13_value               => p_rec.attribute13
514       ,p_attribute14_name                => 'ATTRIBUTE14'
515       ,p_attribute14_value               => p_rec.attribute14
516       ,p_attribute15_name                => 'ATTRIBUTE15'
517       ,p_attribute15_value               => p_rec.attribute15
518       ,p_attribute16_name                => 'ATTRIBUTE16'
519       ,p_attribute16_value               => p_rec.attribute16
520       ,p_attribute17_name                => 'ATTRIBUTE17'
521       ,p_attribute17_value               => p_rec.attribute17
522       ,p_attribute18_name                => 'ATTRIBUTE18'
523       ,p_attribute18_value               => p_rec.attribute18
524       ,p_attribute19_name                => 'ATTRIBUTE19'
525       ,p_attribute19_value               => p_rec.attribute19
526       ,p_attribute20_name                => 'ATTRIBUTE20'
527       ,p_attribute20_value               => p_rec.attribute20
528       );
529   end if;
530   --
531 */
532   hr_utility.set_location(' Leaving:'||l_proc,20);
533 end chk_df;
534 --
535 -- ----------------------------------------------------------------------------
536 -- |-----------------------< chk_non_updateable_args >------------------------|
537 -- ----------------------------------------------------------------------------
538 -- {Start Of Comments}
539 --
540 -- Description:
541 --   This procedure is used to ensure that non updateable attributes have
542 --   not been updated. If an attribute has been updated an error is generated.
543 --
544 -- Pre Conditions:
545 --   g_old_rec has been populated with details of the values currently in
546 --   the database.
547 --
548 -- In Arguments:
549 --   p_rec has been populated with the updated values the user would like the
550 --   record set to.
551 --
552 -- Post Success:
553 --   Processing continues if all the non updateable attributes have not
554 --   changed.
555 --
556 -- Post Failure:
557 --   An application error is raised if any of the non updatable attributes
558 --   have been altered.
559 --
560 -- {End Of Comments}
561 -- ----------------------------------------------------------------------------
562 Procedure chk_non_updateable_args
563   (p_effective_date               in date
564   ,p_rec in per_pac_shd.g_rec_type
565   ) IS
566 --
567   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
568 --
569 Begin
570   --
571   -- Only proceed with the validation if a row exists for the current
572   -- record in the HR Schema.
573   --
574   IF NOT per_pac_shd.api_updating
575       (p_allocated_checklist_id            => p_rec.allocated_checklist_id
576       ,p_object_version_number             => p_rec.object_version_number
577       ) THEN
578      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
579      fnd_message.set_token('PROCEDURE ', l_proc);
580      fnd_message.set_token('STEP ', '5');
581      fnd_message.raise_error;
582   END IF;
583 
584   --
585   -- EDIT_HERE: Add checks to ensure non-updateable args have
586   --            not been updated.
587   --
588 End chk_non_updateable_args;
589 --
590 -- ----------------------------------------------------------------------------
591 -- |---------------------------< insert_validate >----------------------------|
592 -- ----------------------------------------------------------------------------
593 Procedure insert_validate
594   (p_effective_date               in date
595   ,p_rec                          in per_pac_shd.g_rec_type
596   ) is
597 --
598   l_proc  varchar2(72) := g_package||'insert_validate';
599 --
600 Begin
601   hr_utility.set_location('Entering:'||l_proc, 5);
602   --
603   -- Call all supporting business operations
604   --
605   per_pac_bus.chk_name_unq
606   (p_checklist_name         => p_rec.checklist_name
607   ,p_checklist_category     => p_rec.checklist_category
608   ,p_allocated_checklist_id => p_rec.allocated_checklist_id
609   ,p_person_id              => p_rec.person_id
610   ,p_object_version_number  => p_rec.object_version_number
611   );
612   --
613   -- Validate Dependent Attributes
614   --
615   per_pac_bus.chk_ddf(p_rec);
616   --
617   per_pac_bus.chk_df(p_rec);
618   --
619   hr_utility.set_location(' Leaving:'||l_proc, 10);
620 End insert_validate;
621 --
622 -- ----------------------------------------------------------------------------
623 -- |---------------------------< update_validate >----------------------------|
624 -- ----------------------------------------------------------------------------
625 Procedure update_validate
626   (p_effective_date               in date
627   ,p_rec                          in per_pac_shd.g_rec_type
628   ) is
629 --
630   l_proc  varchar2(72) := g_package||'update_validate';
631 --
635   -- Call all supporting business operations
632 Begin
633   hr_utility.set_location('Entering:'||l_proc, 5);
634   --
636   --
637   per_pac_bus.chk_name_unq
638   (p_checklist_name         => p_rec.checklist_name
639   ,p_checklist_category     => p_rec.checklist_category
640   ,p_allocated_checklist_id => p_rec.allocated_checklist_id
641   ,p_person_id              => p_rec.person_id
642   ,p_object_version_number  => p_rec.object_version_number
643   );
644   --
645   -- Validate Dependent Attributes
646   --
647   chk_non_updateable_args
648     (p_effective_date              => p_effective_date
649       ,p_rec              => p_rec
650     );
651   --
652   --
653   per_pac_bus.chk_ddf(p_rec);
654   --
655   per_pac_bus.chk_df(p_rec);
656   --
657   hr_utility.set_location(' Leaving:'||l_proc, 10);
658 End update_validate;
659 --
660 -- ----------------------------------------------------------------------------
661 -- |---------------------------< delete_validate >----------------------------|
662 -- ----------------------------------------------------------------------------
663 Procedure delete_validate
664   (p_rec                          in per_pac_shd.g_rec_type
665   ) is
666 --
667   l_proc  varchar2(72) := g_package||'delete_validate';
668 --
669 Begin
670   hr_utility.set_location('Entering:'||l_proc, 5);
671   --
672   -- Call all supporting business operations
673   --
674   hr_utility.set_location(' Leaving:'||l_proc, 10);
675 End delete_validate;
676 --
677 end per_pac_bus;