DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PML_BUS

Source


1 Package Body per_pml_bus as
2 /* $Header: pepmlrhi.pkb 120.5.12010000.2 2008/11/24 14:49:19 rsykam ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  per_pml_bus.';  -- Global package name
9 g_debug    boolean      := hr_utility.debug_enabled;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------------< chk_df >----------------------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- Description:
16 --   Validates all the Descriptive Flexfield values.
17 --
18 -- Prerequisites:
19 --   All other columns have been validated.  Must be called as the
20 --   last step from insert_validate and update_validate.
21 --
22 -- In Arguments:
23 --   p_rec
24 --
25 -- Post Success:
26 --   If the Descriptive Flexfield structure column and data values are
27 --   all valid this procedure will end normally and processing will
28 --   continue.
29 --
30 -- Post Failure:
31 --   If the Descriptive Flexfield structure column value or any of
32 --   the data values are invalid then an application error is raised as
33 --   a PL/SQL exception.
34 --
35 -- Access Status:
36 --   Internal Row Handler Use Only.
37 --
38 -- ----------------------------------------------------------------------------
39 procedure chk_df
40   (p_rec in per_pml_shd.g_rec_type
41   ) is
42 --
43   l_proc   varchar2(72) := g_package || 'chk_df';
44 --
45 begin
46   hr_utility.set_location('Entering:'||l_proc,10);
47   --
48   if ((p_rec.objective_id is not null)  and (
49     nvl(per_pml_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
50     nvl(p_rec.attribute_category, hr_api.g_varchar2)  or
51     nvl(per_pml_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
52     nvl(p_rec.attribute1, hr_api.g_varchar2)  or
53     nvl(per_pml_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
54     nvl(p_rec.attribute2, hr_api.g_varchar2)  or
55     nvl(per_pml_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
56     nvl(p_rec.attribute3, hr_api.g_varchar2)  or
57     nvl(per_pml_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
58     nvl(p_rec.attribute4, hr_api.g_varchar2)  or
59     nvl(per_pml_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
60     nvl(p_rec.attribute5, hr_api.g_varchar2)  or
61     nvl(per_pml_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
62     nvl(p_rec.attribute6, hr_api.g_varchar2)  or
63     nvl(per_pml_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
64     nvl(p_rec.attribute7, hr_api.g_varchar2)  or
65     nvl(per_pml_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
66     nvl(p_rec.attribute8, hr_api.g_varchar2)  or
67     nvl(per_pml_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
68     nvl(p_rec.attribute9, hr_api.g_varchar2)  or
69     nvl(per_pml_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
70     nvl(p_rec.attribute10, hr_api.g_varchar2)  or
71     nvl(per_pml_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
72     nvl(p_rec.attribute11, hr_api.g_varchar2)  or
73     nvl(per_pml_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
74     nvl(p_rec.attribute12, hr_api.g_varchar2)  or
75     nvl(per_pml_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
76     nvl(p_rec.attribute13, hr_api.g_varchar2)  or
77     nvl(per_pml_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
78     nvl(p_rec.attribute14, hr_api.g_varchar2)  or
79     nvl(per_pml_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
80     nvl(p_rec.attribute15, hr_api.g_varchar2)  or
81     nvl(per_pml_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
82     nvl(p_rec.attribute16, hr_api.g_varchar2)  or
83     nvl(per_pml_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
84     nvl(p_rec.attribute17, hr_api.g_varchar2)  or
85     nvl(per_pml_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
86     nvl(p_rec.attribute18, hr_api.g_varchar2)  or
87     nvl(per_pml_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
88     nvl(p_rec.attribute19, hr_api.g_varchar2)  or
89     nvl(per_pml_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
90     nvl(p_rec.attribute20, hr_api.g_varchar2)  or
91     nvl(per_pml_shd.g_old_rec.attribute21, hr_api.g_varchar2) <>
92     nvl(p_rec.attribute21, hr_api.g_varchar2)  or
93     nvl(per_pml_shd.g_old_rec.attribute22, hr_api.g_varchar2) <>
94     nvl(p_rec.attribute22, hr_api.g_varchar2)  or
95     nvl(per_pml_shd.g_old_rec.attribute23, hr_api.g_varchar2) <>
96     nvl(p_rec.attribute23, hr_api.g_varchar2)  or
97     nvl(per_pml_shd.g_old_rec.attribute24, hr_api.g_varchar2) <>
98     nvl(p_rec.attribute24, hr_api.g_varchar2)  or
99     nvl(per_pml_shd.g_old_rec.attribute25, hr_api.g_varchar2) <>
100     nvl(p_rec.attribute25, hr_api.g_varchar2)  or
101     nvl(per_pml_shd.g_old_rec.attribute26, hr_api.g_varchar2) <>
102     nvl(p_rec.attribute26, hr_api.g_varchar2)  or
103     nvl(per_pml_shd.g_old_rec.attribute27, hr_api.g_varchar2) <>
104     nvl(p_rec.attribute27, hr_api.g_varchar2)  or
105     nvl(per_pml_shd.g_old_rec.attribute28, hr_api.g_varchar2) <>
106     nvl(p_rec.attribute28, hr_api.g_varchar2)  or
107     nvl(per_pml_shd.g_old_rec.attribute29, hr_api.g_varchar2) <>
108     nvl(p_rec.attribute29, hr_api.g_varchar2)  or
109     nvl(per_pml_shd.g_old_rec.attribute30, hr_api.g_varchar2) <>
110     nvl(p_rec.attribute30, hr_api.g_varchar2) ))
111     or (p_rec.objective_id is null)  then
112     --
113     -- Only execute the validation if absolutely necessary:
114     -- a) During update, the structure column value or any
115     --    of the attribute values have actually changed.
116     -- b) During insert.
117     --
118     hr_dflex_utility.ins_or_upd_descflex_attribs
119       (p_appl_short_name                 => 'PER'
120       ,p_descflex_name                   => 'PER_OBJECTIVES_LIBRARY'
121       ,p_attribute_category              => p_rec.attribute_category
122       ,p_attribute1_name                 => 'ATTRIBUTE1'
123       ,p_attribute1_value                => p_rec.attribute1
124       ,p_attribute2_name                 => 'ATTRIBUTE2'
125       ,p_attribute2_value                => p_rec.attribute2
126       ,p_attribute3_name                 => 'ATTRIBUTE3'
127       ,p_attribute3_value                => p_rec.attribute3
128       ,p_attribute4_name                 => 'ATTRIBUTE4'
129       ,p_attribute4_value                => p_rec.attribute4
130       ,p_attribute5_name                 => 'ATTRIBUTE5'
131       ,p_attribute5_value                => p_rec.attribute5
132       ,p_attribute6_name                 => 'ATTRIBUTE6'
133       ,p_attribute6_value                => p_rec.attribute6
134       ,p_attribute7_name                 => 'ATTRIBUTE7'
135       ,p_attribute7_value                => p_rec.attribute7
136       ,p_attribute8_name                 => 'ATTRIBUTE8'
137       ,p_attribute8_value                => p_rec.attribute8
138       ,p_attribute9_name                 => 'ATTRIBUTE9'
139       ,p_attribute9_value                => p_rec.attribute9
140       ,p_attribute10_name                => 'ATTRIBUTE10'
141       ,p_attribute10_value               => p_rec.attribute10
142       ,p_attribute11_name                => 'ATTRIBUTE11'
143       ,p_attribute11_value               => p_rec.attribute11
144       ,p_attribute12_name                => 'ATTRIBUTE12'
145       ,p_attribute12_value               => p_rec.attribute12
146       ,p_attribute13_name                => 'ATTRIBUTE13'
147       ,p_attribute13_value               => p_rec.attribute13
148       ,p_attribute14_name                => 'ATTRIBUTE14'
149       ,p_attribute14_value               => p_rec.attribute14
150       ,p_attribute15_name                => 'ATTRIBUTE15'
151       ,p_attribute15_value               => p_rec.attribute15
152       ,p_attribute16_name                => 'ATTRIBUTE16'
153       ,p_attribute16_value               => p_rec.attribute16
154       ,p_attribute17_name                => 'ATTRIBUTE17'
155       ,p_attribute17_value               => p_rec.attribute17
156       ,p_attribute18_name                => 'ATTRIBUTE18'
157       ,p_attribute18_value               => p_rec.attribute18
158       ,p_attribute19_name                => 'ATTRIBUTE19'
159       ,p_attribute19_value               => p_rec.attribute19
160       ,p_attribute20_name                => 'ATTRIBUTE20'
161       ,p_attribute20_value               => p_rec.attribute20
162       ,p_attribute21_name                => 'ATTRIBUTE21'
163       ,p_attribute21_value               => p_rec.attribute21
164       ,p_attribute22_name                => 'ATTRIBUTE22'
165       ,p_attribute22_value               => p_rec.attribute22
166       ,p_attribute23_name                => 'ATTRIBUTE23'
167       ,p_attribute23_value               => p_rec.attribute23
168       ,p_attribute24_name                => 'ATTRIBUTE24'
169       ,p_attribute24_value               => p_rec.attribute24
170       ,p_attribute25_name                => 'ATTRIBUTE25'
171       ,p_attribute25_value               => p_rec.attribute25
172       ,p_attribute26_name                => 'ATTRIBUTE26'
173       ,p_attribute26_value               => p_rec.attribute26
174       ,p_attribute27_name                => 'ATTRIBUTE27'
175       ,p_attribute27_value               => p_rec.attribute27
176       ,p_attribute28_name                => 'ATTRIBUTE28'
177       ,p_attribute28_value               => p_rec.attribute28
178       ,p_attribute29_name                => 'ATTRIBUTE29'
179       ,p_attribute29_value               => p_rec.attribute29
180       ,p_attribute30_name                => 'ATTRIBUTE30'
181       ,p_attribute30_value               => p_rec.attribute30
182       );
183   end if;
184   --
185   hr_utility.set_location(' Leaving:'||l_proc,20);
186 end chk_df;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |-----------------------< chk_non_updateable_args >------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This procedure is used to ensure that non updateable attributes have
195 --   not been updated. If an attribute has been updated an error is generated.
196 --
197 -- Pre Conditions:
198 --   g_old_rec has been populated with details of the values currently in
199 --   the database.
200 --
201 -- In Arguments:
202 --   p_rec has been populated with the updated values the user would like the
203 --   record set to.
204 --
205 -- Post Success:
206 --   Processing continues if all the non updateable attributes have not
207 --   changed.
208 --
209 -- Post Failure:
210 --   An application error is raised if any of the non updatable attributes
211 --   have been altered.
212 --
213 -- {End Of Comments}
214 -- ----------------------------------------------------------------------------
215 Procedure chk_non_updateable_args
216   (p_effective_date               in date
217   ,p_rec in per_pml_shd.g_rec_type
218   ) IS
219 --
220   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
221 --
222 Begin
223   --
224   -- Only proceed with the validation if a row exists for the current
225   -- record in the HR Schema.
226   --
227   IF NOT per_pml_shd.api_updating
228       (p_objective_id                      => p_rec.objective_id
229       ,p_object_version_number             => p_rec.object_version_number
230       ) THEN
231      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
232      fnd_message.set_token('PROCEDURE ', l_proc);
233      fnd_message.set_token('STEP ', '5');
234      fnd_message.raise_error;
235   END IF;
236 
237 End chk_non_updateable_args;
238 --
239 --
240 -- ----------------------------------------------------------------------------
241 -- |------------------------< chk_objective_name >----------------------------|
242 -- ----------------------------------------------------------------------------
243 -- {Start Of Comments}
244 --
245 -- Description:
246 --   Checks the uniqueness of the objective name.
247 --
248 -- Prerequisites:
249 --   None.
250 --
251 -- In Arguments:
252 --
253 --
254 -- Post Success:
255 --  If the name is a duplicate, a warning is set.
256 --
257 -- Post Failure:
258 --  An application error is raised.
259 --
260 -- Access Status:
261 --   Internal Row Handler Use Only.
262 --
263 -- {End Of Comments}
264 -- ----------------------------------------------------------------------------
265 procedure chk_objective_name
266   (p_objective_id           in  number
267   ,p_object_version_number  in  number
268   ,p_objective_name         in  varchar2
269   ,p_valid_from              in date
270   ,p_valid_to                in date
271   ,p_duplicate_name_warning out nocopy boolean
272   ) is
273 
274   -- Declare the cursor
275 
276     cursor chk_objective_name(c_p_valid_from date, c_p_valid_to date) is
277     select 'Y', nvl(valid_from,to_date('01/01/0001','MM/DD/YYYY')),nvl(valid_to,to_date('12/31/4712','MM/DD/YYYY'))
278     from  per_objectives_library pml
279     where pml.objective_id <> nvl(p_objective_id, hr_api.g_number)
280     and   upper(trim(pml.objective_name)) = upper(trim(p_objective_name))
281     and
282     (
283          (
284            nvl(valid_from,to_date('01/01/0001','MM/DD/YYYY')) between c_p_valid_from and c_p_valid_to
285            or
286            nvl(valid_to,to_date('12/31/4712','MM/DD/YYYY')) between c_p_valid_from and c_p_valid_to
287           )
288           or
289           (
290             c_p_valid_from between nvl(valid_from,to_date('01/01/0001','MM/DD/YYYY'))
291                         and nvl(valid_to,to_date('12/31/4712','MM/DD/YYYY'))
292            or c_p_valid_to between nvl( valid_from,to_date('01/01/0001','MM/DD/YYYY'))
293                          and nvl(valid_to,to_date('12/31/4712','MM/DD/YYYY'))
294           )
295     ) order by valid_from,valid_to;
296 
297 
298 
299  -- Declare local variables
300 
301     l_proc         varchar2(72) :=  g_package||'chk_objective_name';
302     l_api_updating boolean;
303     l_dup          varchar2(1)  := 'N';
304     l_st_date      date;
305     l_end_date     date;
306 Begin
307 
308     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 10); END IF;
309 
310     --
311     hr_api.mandatory_arg_error
312             (p_api_name       => l_proc
313             ,p_argument       => 'p_objective_name'
314             ,p_argument_value => p_objective_name
315             );
316 
317     --
318     -- Only proceed with validation if :
319     -- a) The current g_old_rec is current and
320     -- b) The date values have changed
321     --
322     l_api_updating := per_pml_shd.api_updating
323            (p_objective_id          => p_objective_id
324            ,p_object_version_number => p_object_version_number);
325     --
326    /* IF (l_api_updating
327     AND nvl(per_pml_shd.g_old_rec.objective_name, hr_api.g_varchar2)
328       = nvl(p_objective_name, hr_api.g_varchar2))
329     THEN
330         RETURN;
331     END IF;*/
332 
333     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
334 
335     --
336     -- Show erroe if an objective with this name already exists.
337     --
338     open chk_objective_name(nvl(p_valid_from,to_date('01/01/0001','MM/DD/YYYY')), nvl(p_valid_to,to_date('12/31/4712','MM/DD/YYYY')));
339       fetch chk_objective_name into l_dup,l_st_date,l_end_date;
340       loop
341         exit when chk_objective_name%NOTFOUND;
342         fnd_message.set_name('PER','HR_50181_WPM_OBJ_EXIST_WARN');
343         fnd_message.set_token('START_DATE',l_st_date);
344         fnd_message.set_token('END_DATE',l_end_date);
345          if(hr_multi_message.is_message_list_enabled) then
346             hr_multi_message.add
347             (
348               p_message_type => hr_multi_message.G_ERROR_MSG
352          fetch chk_objective_name into l_dup,l_st_date,l_end_date;
349             );
350          end if;
351 	 l_dup:='Y';
353        end loop;
354      close chk_objective_name;
355      p_duplicate_name_warning := false;
356      if (l_dup ='Y') then
357         fnd_message.raise_error;
358      end if;
359 
360     IF g_debug THEN hr_utility.trace('p_duplicate_name_warning: '||l_dup); END IF;
361     IF g_debug THEN hr_utility.set_location('Leaving:'|| l_proc, 970); END IF;
362 
363  End chk_objective_name;
364 --
365 -- ----------------------------------------------------------------------------
366 -- |------------------------< chk_valid_from_to_date >------------------------|
367 -- ----------------------------------------------------------------------------
368 -- {Start Of Comments}
369 --
370 -- Description:
371 --   Checks the valid from date is not greater than the valid to date.
372 --
373 -- Prerequisites:
374 --   None.
375 --
376 -- In Arguments:
377 --
378 --
379 -- Post Success:
380 --   Processing continues if the dates are valid.
381 --
382 -- Post Failure:
383 --   An application error is raised if the dates are not valid.
384 --
385 -- Access Status:
386 --   Internal Row Handler Use Only.
387 --
388 -- {End Of Comments}
389 -- ----------------------------------------------------------------------------
390 procedure chk_valid_from_to_date
391   (p_objective_id           in  number
392   ,p_object_version_number  in  number
393   ,p_valid_from             in date
394   ,p_valid_to               in date
395   ) is
396 
397   l_proc         varchar2(72)  :=  g_package||'chk_valid_from_to_date';
398   l_api_updating boolean;
399 
400 begin
401 
402     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
403 
404     --
405     -- Only proceed with validation if :
406     -- a) The current g_old_rec is current and
407     -- b) The date values have changed
408     --
409     l_api_updating := per_pml_shd.api_updating
410            (p_objective_id          => p_objective_id
411            ,p_object_version_number => p_object_version_number);
412     --
413     IF (l_api_updating
414     AND nvl(per_pml_shd.g_old_rec.valid_from, hr_api.g_date)
415       = nvl(p_valid_from, hr_api.g_date)
416     AND nvl(per_pml_shd.g_old_rec.valid_to, hr_api.g_date)
417       = nvl(p_valid_to, hr_api.g_date))
418     THEN
419         RETURN;
420     END IF;
421 
422     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
423 
424     --
425     -- Only proceed if both parameters are populated.
426     --
427     IF p_valid_from IS NOT NULL AND
428        p_valid_to IS NOT NULL
429     THEN
430         --
431         -- Checks that the valid from date is not greater than the valid to date.
432         --
433         if (p_valid_from > p_valid_to) then
434           fnd_message.set_name('PER','HR_50187_WPM_INV_DATE_FROM_TO');
435           fnd_message.raise_error;
436         end if;
437 
438     END IF;
439 
440     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
441 
442 exception
443   when app_exception.application_exception then
444     if hr_multi_message.exception_add
445     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.VALID_FROM'
446     ,p_associated_column2 =>  'PER_OBJECTIVES_LIBRARY.VALID_TO'
447     ) then
448       hr_utility.set_location(' Leaving:'||l_proc, 980);
449       raise;
450     end if;
451    hr_utility.set_location(' Leaving:'||l_proc, 990);
452 
453 end chk_valid_from_to_date;
454 --
455 -- ----------------------------------------------------------------------------
456 -- |----------------------------< chk_group_code >----------------------------|
457 -- ----------------------------------------------------------------------------
458 -- {Start Of Comments}
459 --
460 -- Description:
461 --   Checks that the group code is a valid lookup code in HR_WPM_GROUP.
462 --
463 -- Prerequisites:
464 --   None.
465 --
466 -- In Arguments:
467 --
468 --
469 -- Post Success:
470 --   Processing continues if the dates are valid.
471 --
472 -- Post Failure:
473 --  A warning message is displayed
474 --
475 -- Access Status:
476 --   Internal Row Handler Use Only.
477 --
478 -- {End Of Comments}
479 -- ----------------------------------------------------------------------------
480 procedure chk_group_code
481   (p_objective_id           in  number
482   ,p_object_version_number  in  number
483   ,p_effective_date         in  date
484   ,p_group_code             in  varchar2
485   ) is
486 
487  -- Declare local variables
488 
489   l_proc         varchar2(72)  :=  g_package||'chk_group_code';
490   l_api_updating boolean;
491 
492 begin
493 
494     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
495 
496     --
497     -- Only proceed with validation if :
498     -- a) The current g_old_rec is current and
499     -- b) The date values have changed
500     --
504     --
501     l_api_updating := per_pml_shd.api_updating
502            (p_objective_id          => p_objective_id
503            ,p_object_version_number => p_object_version_number);
505     IF (l_api_updating
506     AND nvl(per_pml_shd.g_old_rec.group_code, hr_api.g_varchar2)
507       = nvl(p_group_code, hr_api.g_varchar2))
508     THEN
509         RETURN;
510     END IF;
511 
512     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
513 
514     --
515     -- Checks that the group code is valid
516     --
517     if p_group_code is not null then
518       if hr_api.not_exists_in_hrstanlookups
519            (p_effective_date        => p_effective_date
520            ,p_lookup_type           => 'HR_WPM_GROUP'
521            ,p_lookup_code           => p_group_code
522            ) then
523         --  Error: Invalid Group
524         fnd_message.set_name('PER', 'HR_50188_WPM_INV_GROUP');
525         fnd_message.raise_error;
526       end if;
527     end if;
528 
529     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
530 
531 exception
532   when app_exception.application_exception then
533     if hr_multi_message.exception_add
534     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.GROUP_CODE'
535     ) then
536       hr_utility.set_location(' Leaving:'||l_proc, 980);
537       raise;
538     end if;
539    hr_utility.set_location(' Leaving:'||l_proc, 990);
540 --
541 end chk_group_code;
542 --
543 -- ----------------------------------------------------------------------------
544 -- |--------------------------< chk_priority_code >---------------------------|
545 -- ----------------------------------------------------------------------------
546 -- {Start Of Comments}
547 --
548 -- Description:
549 --   Checks that the priority code is a valid lookup code in HR_WPM_PRIORITY.
550 --
551 -- Prerequisites:
552 --   None.
553 --
554 -- In Arguments:
555 --
556 --
557 -- Post Success:
558 --   Processing continues if the priority code is valid.
559 --
560 -- Post Failure:
561 --   An application error is raised if the priority code is invalid.
562 --
563 -- Access Status:
564 --   Internal Row Handler Use Only.
565 --
566 -- {End Of Comments}
567 -- ----------------------------------------------------------------------------
568 procedure chk_priority_code
569   (p_objective_id           in  number
570   ,p_object_version_number  in  number
571   ,p_effective_date         in  date
572   ,p_priority_code          in  varchar2
573   ) is
574 
575  -- Declare local variables
576 
577   l_proc         varchar2(72)  :=  g_package||'chk_priority_code';
578   l_api_updating boolean;
579 
580 begin
581 
582     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
583 
584     --
585     -- Only proceed with validation if :
586     -- a) The current g_old_rec is current and
587     -- b) The date values have changed
588     --
589     l_api_updating := per_pml_shd.api_updating
590            (p_objective_id          => p_objective_id
591            ,p_object_version_number => p_object_version_number);
592     --
593     IF (l_api_updating
594     AND nvl(per_pml_shd.g_old_rec.priority_code, hr_api.g_varchar2)
595       = nvl(p_priority_code, hr_api.g_varchar2))
596     THEN
597         RETURN;
598     END IF;
599 
600     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
601 
602     --
603     -- Checks that the priority code is valid
604     --
605     if p_priority_code is not null then
606       if hr_api.not_exists_in_hrstanlookups
607            (p_effective_date        => p_effective_date
608            ,p_lookup_type           => 'HR_WPM_PRIORITY'
609            ,p_lookup_code           => p_priority_code
610            ) then
611         --  Error: Invalid Group
612         fnd_message.set_name('PER', 'HR_50189_WPM_INV_PRIORITY');
613         fnd_message.raise_error;
614       end if;
615     end if;
616 
617     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
618 
619 exception
620   when app_exception.application_exception then
621     if hr_multi_message.exception_add
622     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.PRIORITY_CODE'
623     ) then
624       hr_utility.set_location(' Leaving:'||l_proc, 980);
625       raise;
626     end if;
627    hr_utility.set_location(' Leaving:'||l_proc, 990);
628 
629 end chk_priority_code;
630 --
631 -- ----------------------------------------------------------------------------
632 -- |--------------------------< chk_appraise_flag >---------------------------|
633 -- ----------------------------------------------------------------------------
634 -- {Start Of Comments}
635 --
636 -- Description:
637 --   Checks that the appraise flag is set to a valid value.
638 --
639 -- Prerequisites:
640 --   None.
641 --
642 -- In Arguments:
643 --
644 --
645 -- Post Success:
646 --   Processing continues if the appraise flag is valid.
647 --
648 -- Post Failure:
652 --   Internal Row Handler Use Only.
649 --   An application error is raised if the appraise flag is invalid.
650 --
651 -- Access Status:
653 --
654 -- {End Of Comments}
655 -- ----------------------------------------------------------------------------
656 procedure chk_appraise_flag
657   (p_objective_id           in  number
658   ,p_object_version_number  in  number
659   ,p_effective_date         in  date
660   ,p_appraise_flag          in  varchar2
661   ) is
662 
663  -- Declare local variables
664 
665   l_proc         varchar2(72)  :=  g_package||'chk_appraise_flag';
666   l_api_updating boolean;
667 
668 begin
669 
670     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
671 
672     --
673     hr_api.mandatory_arg_error
674             (p_api_name       => l_proc
675             ,p_argument       => 'p_appraise_flag'
676             ,p_argument_value => p_appraise_flag
677             );
678 
679     --
680     -- Only proceed with validation if :
681     -- a) The current g_old_rec is current and
682     -- b) The date values have changed
683     --
684     l_api_updating := per_pml_shd.api_updating
685            (p_objective_id          => p_objective_id
686            ,p_object_version_number => p_object_version_number);
687     --
688     IF (l_api_updating
689     AND nvl(per_pml_shd.g_old_rec.appraise_flag, hr_api.g_varchar2)
690       = nvl(p_appraise_flag, hr_api.g_varchar2))
691     THEN
692         RETURN;
693     END IF;
694 
695     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
696 
697     --
698     -- Checks that the appraise flag is valid
699     --
700     if hr_api.not_exists_in_hrstanlookups
701          (p_effective_date        => p_effective_date
702          ,p_lookup_type           => 'YES_NO'
703          ,p_lookup_code           => p_appraise_flag
704          ) then
705       --  Error: Invalid Group
706       fnd_message.set_name('PER', 'HR_50199_WPM_APPRAISE_FLAG');
707       fnd_message.raise_error;
708     end if;
709 
710     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
711 
712 exception
713   when app_exception.application_exception then
714     if hr_multi_message.exception_add
715     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.APPRAISE_FLAG'
716     ) then
717       hr_utility.set_location(' Leaving:'||l_proc, 980);
718       raise;
719     end if;
720    hr_utility.set_location(' Leaving:'||l_proc, 990);
721 
722 end chk_appraise_flag;
723 --
724 -- ----------------------------------------------------------------------------
725 -- |------------------------< chk_weighting_percent >-------------------------|
726 -- ----------------------------------------------------------------------------
727 -- {Start Of Comments}
728 --
729 -- Description:
730 --   Checks that the weighting value is not negative.
731 --   Checks that the weighting percent is not greater than 100.
732 --   Checks if the objective has been marked to be included in appraisals.
733 --
734 -- Prerequisites:
735 --   That the appraise flag has already been validated.
736 --
737 -- In Arguments:
738 --
739 --
740 -- Post Success:
741 --   Processing continues if the weighting percent is valid.
742 --
743 -- Post Failure:
744 --   An application error is raised if the weighting percent is invalid.
745 --
746 -- Access Status:
747 --   Internal Row Handler Use Only.
748 --
749 -- {End Of Comments}
750 -- ----------------------------------------------------------------------------
751 procedure chk_weighting_percent
752   (p_objective_id                in  number
753   ,p_object_version_number       in  number
754   ,p_appraise_flag               in  varchar2
755   ,p_weighting_percent           in  number
756   ,p_weighting_over_100_warning  out nocopy boolean
757   ,p_weighting_appraisal_warning out nocopy boolean
758   ) is
759 
760 
761  -- Declare local variables
762 
763   l_proc         varchar2(72)  :=  g_package||'chk_weighting_percent';
764   l_api_updating boolean;
765 
766 begin
767 
768     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
769 
770     --
771     -- Only proceed with validation if :
772     -- a) The current g_old_rec is current and
773     -- b) The date values have changed
774     --
775     l_api_updating := per_pml_shd.api_updating
776            (p_objective_id          => p_objective_id
777            ,p_object_version_number => p_object_version_number);
778     --
779     IF (l_api_updating
780     AND nvl(per_pml_shd.g_old_rec.appraise_flag, hr_api.g_varchar2)
781       = nvl(p_appraise_flag, hr_api.g_varchar2)
782     AND nvl(per_pml_shd.g_old_rec.weighting_percent, hr_api.g_number)
783       = nvl(p_weighting_percent, hr_api.g_number))
784     THEN
785         RETURN;
786     END IF;
787 
788     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
789 
790     if p_weighting_percent is not null then
791 
792       IF g_debug THEN hr_utility.set_location(l_proc, 30); END IF;
793       --
797           (p_check_column1      => 'PER_OBJECTIVES_LIBRARY.APPRAISE_FLAG'
794       -- Warn if the objective is not marked for appraisal.
795       --
796       if hr_multi_message.no_exclusive_error
798           ,p_associated_column1 => 'PER_OBJECTIVES_LIBRARY.APPRAISE_FLAG'
799           ) then
800         p_weighting_appraisal_warning := (p_appraise_flag = 'N');
801       end if;
802 
803       IF g_debug THEN hr_utility.set_location(l_proc, 40); END IF;
804       --
805       -- Checks that the weighting_percent is not a negative number
806       --
807       if (p_weighting_percent < 0) then
808          fnd_message.set_name('PER','HR_50193_WPM_WEIGHT_VALUE');
809          fnd_message.raise_error;
810       end if;
811 
812       IF g_debug THEN hr_utility.set_location(l_proc, 50); END IF;
813       --
814       -- Warns that the weighting percent is greater than 100
815       --
816       p_weighting_over_100_warning := (p_weighting_percent > 100);
817 
818     end if;
819 
820     IF g_debug THEN hr_utility.set_location('Leaving:'|| l_proc, 970); END IF;
821 
822 exception
823   when app_exception.application_exception then
824     if hr_multi_message.exception_add
825     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.WEIGHTING_PERCENT'
826     ) then
827       hr_utility.set_location(' Leaving:'||l_proc, 980);
828       raise;
829     end if;
830    hr_utility.set_location(' Leaving:'||l_proc, 990);
831 
832 end chk_weighting_percent;
833 --
834 -- ----------------------------------------------------------------------------
835 -- |--------------------------< chk_measurement_style_code >------------------|
836 -- ----------------------------------------------------------------------------
837 -- {Start Of Comments}
838 --
839 -- Description:
840 --   Checks that the measurement style code is a valid lookup code.
841 --
842 -- Prerequisites:
843 --   None.
844 --
845 -- In Arguments:
846 --
847 --
848 -- Post Success:
849 --   Processing continues if the measurement style code is valid.
850 --
851 -- Post Failure:
852 --   An application error is raised if the measurement style code is invalid.
853 --
854 -- Access Status:
855 --   Internal Row Handler Use Only.
856 --
857 -- {End Of Comments}
858 -- ----------------------------------------------------------------------------
859 procedure chk_measurement_style_code
860   (p_objective_id           in  number
861   ,p_object_version_number  in  number
862   ,p_effective_date         in  date
863   ,p_measurement_style_code in  varchar2
864   ) is
865 
866  -- Declare local variables
867 
868   l_proc         varchar2(72)  :=  g_package||'chk_measurement_style_code';
869   l_api_updating boolean;
870 
871 begin
872 
873     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
874 
875     --
876     hr_api.mandatory_arg_error
877             (p_api_name       => l_proc
878             ,p_argument       => 'p_measurement_style_code'
879             ,p_argument_value => p_measurement_style_code
880             );
881 
882     --
883     -- Only proceed with validation if :
884     -- a) The current g_old_rec is current and
885     -- b) The date values have changed
886     --
887     l_api_updating := per_pml_shd.api_updating
888            (p_objective_id          => p_objective_id
889            ,p_object_version_number => p_object_version_number);
890     --
891     IF (l_api_updating
892     AND nvl(per_pml_shd.g_old_rec.measurement_style_code, hr_api.g_varchar2)
893       = nvl(p_measurement_style_code, hr_api.g_varchar2))
894     THEN
895         RETURN;
896     END IF;
897 
898     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
899 
900     --
901     -- Checks that the measurement_style_code is valid
902     --
903     if hr_api.not_exists_in_hrstanlookups
904          (p_effective_date        => p_effective_date
905          ,p_lookup_type           => 'HR_WPM_MEASURE'
906          ,p_lookup_code           => p_measurement_style_code
907          ) then
908       --  Error: Invalid Group
909       fnd_message.set_name('PER', 'HR_50194_WPM_INV_MEASR_STYL');
910       fnd_message.raise_error;
911     end if;
912 
913     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
914 
915 exception
916   when app_exception.application_exception then
917     if hr_multi_message.exception_add
918     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
919     ) then
920       hr_utility.set_location(' Leaving:'||l_proc, 980);
921       raise;
922     end if;
923    hr_utility.set_location(' Leaving:'||l_proc, 990);
924 
925 end chk_measurement_style_code;
926 --
927 -- ----------------------------------------------------------------------------
928 -- |--------------------------< chk_measure_name >----------------------------|
929 -- ----------------------------------------------------------------------------
930 -- {Start Of Comments}
931 --
932 -- Description:
933 --   Checks that the measure name has been entered when the measurement style
937 --   That the measurement style code has been validated without error.
934 --   is quantitative or qualitative.
935 --
936 -- Prerequisites:
938 --
939 -- In Arguments:
940 --
941 --
942 -- Post Success:
943 --   Processing continues if the measure name has been entered.
944 --
945 -- Post Failure:
946 --   An application error is raised if the measure name has not been entered
947 --   when required.
948 --
949 -- Access Status:
950 --   Internal Row Handler Use Only.
951 --
952 -- {End Of Comments}
953 -- ----------------------------------------------------------------------------
954 procedure chk_measure_name
955   (p_objective_id           in  number
956   ,p_object_version_number  in  number
957   ,p_measurement_style_code in  varchar2
958   ,p_measure_name           in  varchar2
959   ) is
960 
961  -- Declare local variables
962 
963   l_proc         varchar2(72)  :=  g_package||'chk_measure_name';
964   l_api_updating boolean;
965 
966 begin
967 
968     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
969 
970     --
971     -- Only proceed with validation if :
972     -- a) The current g_old_rec is current and
973     -- b) The date values have changed
974     --
975     l_api_updating := per_pml_shd.api_updating
976            (p_objective_id          => p_objective_id
977            ,p_object_version_number => p_object_version_number);
978     --
979     IF (l_api_updating
980     AND nvl(per_pml_shd.g_old_rec.measurement_style_code, hr_api.g_varchar2)
981       = nvl(p_measurement_style_code, hr_api.g_varchar2)
982     AND nvl(per_pml_shd.g_old_rec.measure_name, hr_api.g_varchar2)
983       = nvl(p_measure_name, hr_api.g_varchar2))
984     THEN
985         RETURN;
986     END IF;
987 
988     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
989 
990     if hr_multi_message.no_exclusive_error
991         (p_check_column1      => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
992         ,p_associated_column1 => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
993         ) then
994 
995         if p_measurement_style_code <> 'N_M'
996         then
997             IF g_debug THEN hr_utility.set_location(l_proc, 30); END IF;
998 
999             hr_api.mandatory_arg_error
1000                 (p_api_name       => l_proc
1001                 ,p_argument       => 'p_measure_name'
1002                 ,p_argument_value => p_measure_name
1003                 );
1004         end if;
1005 
1006     end if;
1007 
1008     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
1009 
1010 exception
1011   when app_exception.application_exception then
1012     if hr_multi_message.exception_add
1013     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.MEASURE_NAME'
1014     ) then
1015       hr_utility.set_location(' Leaving:'||l_proc, 980);
1016       raise;
1017     end if;
1018    hr_utility.set_location(' Leaving:'||l_proc, 990);
1019 
1020 end chk_measure_name;
1021 --
1022 -- ----------------------------------------------------------------------------
1023 -- |--------------------------< chk_target_value >----------------------------|
1024 -- ----------------------------------------------------------------------------
1025 -- {Start Of Comments}
1026 --
1027 -- Description:
1028 --   Checks that the target value  hs been entered when the measurement style
1029 --   is quantitative.
1030 --
1031 -- Prerequisites:
1032 --   That the measurement style code has been validated without error.
1033 --
1034 -- In Arguments:
1035 --
1036 --
1037 -- Post Success:
1038 --   Processing continues if the target value has been entered.
1039 --
1040 -- Post Failure:
1041 --   An application error is raised if the target value has not been entered
1042 --   when required.
1043 --
1044 -- Access Status:
1045 --   Internal Row Handler Use Only.
1046 --
1047 -- {End Of Comments}
1048 -- ----------------------------------------------------------------------------
1049 procedure chk_target_value
1050   (p_objective_id           in  number
1051   ,p_object_version_number  in  number
1052   ,p_measurement_style_code in  varchar2
1053   ,p_target_value           in  number
1054   ) is
1055 
1056  -- Declare local variables
1057 
1058   l_proc         varchar2(72)  :=  g_package||'chk_target_value';
1059   l_api_updating boolean;
1060 
1061 begin
1062 
1063     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
1064 
1065     --
1066     -- Only proceed with validation if :
1067     -- a) The current g_old_rec is current and
1068     -- b) The date values have changed
1069     --
1070     l_api_updating := per_pml_shd.api_updating
1071            (p_objective_id          => p_objective_id
1072            ,p_object_version_number => p_object_version_number);
1073     --
1074     IF (l_api_updating
1075     AND nvl(per_pml_shd.g_old_rec.measurement_style_code, hr_api.g_varchar2)
1076       = nvl(p_measurement_style_code, hr_api.g_varchar2)
1077     AND nvl(per_pml_shd.g_old_rec.target_value, hr_api.g_number)
1078       = nvl(p_target_value, hr_api.g_number))
1079     THEN
1083     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
1080         RETURN;
1081     END IF;
1082 
1084 
1085     if hr_multi_message.no_exclusive_error
1086         (p_check_column1      => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1087         ,p_associated_column1 => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1088         ) then
1089 
1090     if p_measurement_style_code = 'QUANT_M'
1091         then
1092             IF g_debug THEN hr_utility.set_location(l_proc, 30); END IF;
1093 
1094             hr_api.mandatory_arg_error
1095                 (p_api_name       => l_proc
1096                 ,p_argument       => 'p_target_value'
1097                 ,p_argument_value => p_target_value
1098                 );
1099         end if;
1100 
1101     end if;
1102 
1103     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
1104 
1105 exception
1106   when app_exception.application_exception then
1107     if hr_multi_message.exception_add
1108     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.TARGET_VALUE'
1109     ) then
1110       hr_utility.set_location(' Leaving:'||l_proc, 980);
1111       raise;
1112     end if;
1113    hr_utility.set_location(' Leaving:'||l_proc, 990);
1114 
1115 end chk_target_value;
1116 --
1117 -- ----------------------------------------------------------------------------
1118 -- |--------------------------< chk_uom_code >--------------------------------|
1119 -- ----------------------------------------------------------------------------
1120 -- {Start Of Comments}
1121 --
1122 -- Description:
1123 --   Checks that the UOM code is a valid lookup code.
1124 --
1125 -- Prerequisites:
1126 --   That the measurement style code has been validated without error.
1127 --
1128 -- In Arguments:
1129 --
1130 --
1131 -- Post Success:
1132 --   Processing continues if the UOM code is valid.
1133 --
1134 -- Post Failure:
1135 --   An application error is raised if the UOM code is invalid.
1136 --
1137 -- Access Status:
1138 --   Internal Row Handler Use Only.
1139 --
1140 -- {End Of Comments}
1141 -- ----------------------------------------------------------------------------
1142 procedure chk_uom_code
1143   (p_objective_id           in  number
1144   ,p_object_version_number  in  number
1145   ,p_effective_date         in  date
1146   ,p_measurement_style_code in  varchar2
1147   ,p_uom_code               in  varchar2
1148   ) is
1149 
1150  -- Declare local variables
1151 
1152   l_proc         varchar2(72)  :=  g_package||'chk_uom_code';
1153   l_api_updating boolean;
1154 
1155 begin
1156 
1157     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
1158 
1159     --
1160     -- Only proceed with validation if :
1161     -- a) The current g_old_rec is current and
1162     -- b) The date values have changed
1163     --
1164     l_api_updating := per_pml_shd.api_updating
1165            (p_objective_id          => p_objective_id
1166            ,p_object_version_number => p_object_version_number);
1167     --
1168     IF (l_api_updating
1169     AND nvl(per_pml_shd.g_old_rec.measurement_style_code, hr_api.g_varchar2)
1170       = nvl(p_measurement_style_code, hr_api.g_varchar2)
1171     AND nvl(per_pml_shd.g_old_rec.uom_code, hr_api.g_varchar2)
1172       = nvl(p_uom_code, hr_api.g_varchar2))
1173     THEN
1174         RETURN;
1175     END IF;
1176 
1177     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
1178 
1179     if hr_multi_message.no_exclusive_error
1180         (p_check_column1      => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1181         ,p_associated_column1 => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1182         ) then
1183 
1184         if p_measurement_style_code = 'QUANT_M'
1185         then
1186             IF g_debug THEN hr_utility.set_location(l_proc, 30); END IF;
1187 
1188             hr_api.mandatory_arg_error
1189                 (p_api_name       => l_proc
1190                 ,p_argument       => 'p_uom_code'
1191                 ,p_argument_value => p_uom_code
1192                 );
1193         end if;
1194 
1195     end if;
1196 
1197     IF g_debug THEN hr_utility.set_location(l_proc, 40); END IF;
1198 
1199     --
1200     -- Checks that the UOM code is valid
1201     --
1202     if p_uom_code is not null then
1203         if hr_api.not_exists_in_hrstanlookups
1204              (p_effective_date        => p_effective_date
1205              ,p_lookup_type           => 'HR_WPM_MEASURE_UOM'
1206              ,p_lookup_code           => p_uom_code
1207              ) then
1208           --  Error: Invalid Group
1209           fnd_message.set_name('PER', 'HR_50195_WPM_INV_UOM');
1210           fnd_message.raise_error;
1211         end if;
1212     end if;
1213 
1214     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
1215 
1216 exception
1217   when app_exception.application_exception then
1218     if hr_multi_message.exception_add
1219     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.UOM_CODE'
1220     ) then
1221       hr_utility.set_location(' Leaving:'||l_proc, 980);
1222       raise;
1223     end if;
1227 --
1224    hr_utility.set_location(' Leaving:'||l_proc, 990);
1225 
1226 end chk_uom_code;
1228 -- ----------------------------------------------------------------------------
1229 -- |--------------------------< chk_measure_type_code >-----------------------|
1230 -- ----------------------------------------------------------------------------
1231 -- {Start Of Comments}
1232 --
1233 -- Description:
1234 --   Checks that the measure type is a valid lookup code.
1235 --
1236 -- Prerequisites:
1237 --   That the measurement style code has been validated without error.
1238 --
1239 -- In Arguments:
1240 --
1241 --
1242 -- Post Success:
1243 --   Processing continues if the measure type code is valid.
1244 --
1245 -- Post Failure:
1246 --   An application error is raised if the measure type code is invalid.
1247 --
1248 -- Access Status:
1249 --   Internal Row Handler Use Only.
1250 --
1251 -- {End Of Comments}
1252 -- ----------------------------------------------------------------------------
1253 procedure chk_measure_type_code
1254   (p_objective_id           in  number
1255   ,p_object_version_number  in  number
1256   ,p_effective_date         in  date
1257   ,p_measurement_style_code in  varchar2
1258   ,p_measure_type_code      in  varchar2
1259   ) is
1260 
1261  -- Declare local variables
1262 
1263   l_proc         varchar2(72)  :=  g_package||'chk_measure_type_code';
1264   l_api_updating boolean;
1265 
1266 begin
1267 
1268     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
1269 
1270     --
1271     -- Only proceed with validation if :
1272     -- a) The current g_old_rec is current and
1273     -- b) The date values have changed
1274     --
1275     l_api_updating := per_pml_shd.api_updating
1276            (p_objective_id          => p_objective_id
1277            ,p_object_version_number => p_object_version_number);
1278     --
1279     IF (l_api_updating
1280     AND nvl(per_pml_shd.g_old_rec.measurement_style_code, hr_api.g_varchar2)
1281       = nvl(p_measurement_style_code, hr_api.g_varchar2)
1282     AND nvl(per_pml_shd.g_old_rec.measure_type_code, hr_api.g_varchar2)
1283       = nvl(p_measure_type_code, hr_api.g_varchar2))
1284     THEN
1285         RETURN;
1286     END IF;
1287 
1288     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
1289 
1290     if hr_multi_message.no_exclusive_error
1291         (p_check_column1      => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1292         ,p_associated_column1 => 'PER_OBJECTIVES_LIBRARY.MEASUREMENT_STYLE_CODE'
1293         ) then
1294 
1295         if p_measurement_style_code = 'QUANT_M'
1296         then
1297             IF g_debug THEN hr_utility.set_location(l_proc, 30); END IF;
1298 
1299             hr_api.mandatory_arg_error
1300                 (p_api_name       => l_proc
1301                 ,p_argument       => 'p_measure_type_code'
1302                 ,p_argument_value => p_measure_type_code
1303                 );
1304         end if;
1305 
1306     end if;
1307 
1308     IF g_debug THEN hr_utility.set_location(l_proc, 40); END IF;
1309 
1310     --
1311     -- Checks that the measure type code is valid
1312     --
1313     if p_measure_type_code is not null then
1314       if hr_api.not_exists_in_hrstanlookups
1315            (p_effective_date        => p_effective_date
1316            ,p_lookup_type           => 'HR_WPM_MEASURE_TYPE'
1317            ,p_lookup_code           => p_measure_type_code
1318            ) then
1319         --  Error: Invalid Group
1320         fnd_message.set_name('PER', 'HR_50196_WPM_INV_MEASR_TYPE');
1321         fnd_message.raise_error;
1322       end if;
1323     end if;
1324 
1325     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
1326 
1327 exception
1328   when app_exception.application_exception then
1329     if hr_multi_message.exception_add
1330     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.MEASURE_TYPE_CODE'
1331     ) then
1332       hr_utility.set_location(' Leaving:'||l_proc, 980);
1333       raise;
1334     end if;
1335    hr_utility.set_location(' Leaving:'||l_proc, 990);
1336 
1337 end chk_measure_type_code;
1338 --
1339 -- ----------------------------------------------------------------------------
1340 -- |----------------------------< chk_eligibility_type_code >-----------------|
1341 -- ----------------------------------------------------------------------------
1342 -- {Start Of Comments}
1343 --
1344 -- Description:
1345 --   Checks that the eligiblity type code is a valid lookup code.
1346 --
1347 -- Prerequisites:
1348 --   None.
1349 --
1350 -- In Arguments:
1351 --
1352 --
1353 -- Post Success:
1354 --   Processing continues if the eligibility code is valid.
1355 --
1356 -- Post Failure:
1357 --  An application error is raised if the eligibility code is invalid.
1358 --
1359 -- Access Status:
1360 --   Internal Row Handler Use Only.
1361 --
1362 -- {End Of Comments}
1363 -- ----------------------------------------------------------------------------
1364 procedure chk_eligibility_type_code
1365   (p_objective_id           in  number
1366   ,p_object_version_number  in  number
1370 
1367   ,p_effective_date         in  date
1368   ,p_eligibility_type_code  in  varchar2
1369   ) is
1371  -- Declare local variables
1372 
1373   l_proc         varchar2(72)  :=  g_package||'chk_eligibility_type_code';
1374   l_api_updating boolean;
1375 
1376 begin
1377 
1378     IF g_debug THEN hr_utility.set_location('Entering:'|| l_proc, 1); END IF;
1379 
1380     --
1381     hr_api.mandatory_arg_error
1382             (p_api_name       => l_proc
1383             ,p_argument       => 'p_eligibility_type_code'
1384             ,p_argument_value => p_eligibility_type_code
1385             );
1386 
1387     --
1388     -- Only proceed with validation if :
1389     -- a) The current g_old_rec is current and
1390     -- b) The date values have changed
1391     --
1392     l_api_updating := per_pml_shd.api_updating
1393            (p_objective_id          => p_objective_id
1394            ,p_object_version_number => p_object_version_number);
1395     --
1396     IF (l_api_updating
1397     AND nvl(per_pml_shd.g_old_rec.eligibility_type_code, hr_api.g_varchar2)
1398       = nvl(p_eligibility_type_code, hr_api.g_varchar2))
1399     THEN
1400         RETURN;
1401     END IF;
1402 
1403     IF g_debug THEN hr_utility.set_location(l_proc, 20); END IF;
1404 
1405     --
1406     -- Checks that the eligibility type code is valid
1407     --
1408     if hr_api.not_exists_in_hrstanlookups
1409          (p_effective_date        => p_effective_date
1410          ,p_lookup_type           => 'HR_WPM_ELIGIBILITY'
1411          ,p_lookup_code           => p_eligibility_type_code
1412          ) then
1413       --  Error: Invalid Group
1414       fnd_message.set_name('PER', 'HR_50197_WPM_INV_ELIGY_TYPE');
1415       fnd_message.raise_error;
1416     end if;
1417 
1418     IF g_debug THEN hr_utility.set_location(' Leaving:'|| l_proc, 970); END IF;
1419 
1420 exception
1421   when app_exception.application_exception then
1422     if hr_multi_message.exception_add
1423     (p_associated_column1 =>  'PER_OBJECTIVES_LIBRARY.ELIGIBILITY_TYPE_CODE'
1424     ) then
1425       hr_utility.set_location(' Leaving:'||l_proc, 980);
1426       raise;
1427     end if;
1428    hr_utility.set_location(' Leaving:'||l_proc, 990);
1429 --
1430 end chk_eligibility_type_code;
1431 --
1432 -- ---------------------------------------------------------------------
1433 -- |-----------------------< chk_next_review_date >--------------------|
1434 -- ---------------------------------------------------------------------
1435 --
1436 -- Description:
1437 --    Validates that next_review_date is not later than valid_from.
1438 --
1439 -- Pre-Requisites:
1440 --    None.
1441 --
1442 -- In Parameters:
1443 --    p_objective_id
1444 --    p_valid_from
1445 --    p_next_review_date
1446 --    p_object_version_number
1447 --
1448 -- Post Success:
1449 --    Processing continues if next_review_date is later than valid_from
1450 --    or if next_review_date is not entered.
1451 --
1452 -- Post Failure:
1453 --    An Application Error is raised and processing is terminated if
1454 --    next_review_date is invalid.
1455 --
1456 -- Access Status:
1457 --    Internal Development use only.
1458 --
1459 -- ---------------------------------------------------------------------
1460 procedure chk_next_review_date
1461   (p_objective_id          in per_objectives_library.objective_id%TYPE
1462   ,p_valid_from            in per_objectives_library.valid_from%TYPE
1463   ,p_next_review_date      in per_objectives_library.next_review_date%TYPE
1464   ,p_object_version_number in per_objectives_library.object_version_number%TYPE
1465   ) is
1466   --
1467   l_proc          varchar2(72)  :=  g_package||'chk_next_review_date';
1468   --
1469 begin
1470   --
1471   hr_utility.set_location('Entering:'|| l_proc,5);
1472   --
1473     if p_next_review_date < p_valid_from then
1474       hr_utility.set_message(800,'HR_50425_INV_NEXT_REV_DATE');
1475       hr_utility.raise_error;
1476     end if;
1477     --
1478   hr_utility.set_location(' Leaving:'||l_proc, 10);
1479   --
1480 exception
1481   when app_exception.application_exception then
1482  if hr_multi_message.exception_add
1483        (p_associated_column1      => 'PER_OBJECTIVES.NEXT_REVIEW_DATE'
1484        ) then
1485       raise;
1486     end if;
1487 end chk_next_review_date;
1488 --
1489 -- ---------------------------------------------------------------------
1490 -- |-------------------------< chk_target_date >-----------------------|
1491 -- ---------------------------------------------------------------------
1492 --
1493 -- Description:
1494 --    Validates that target_date is not later than valid_from.
1495 --
1496 -- Pre-Requisites:
1497 --    None.
1498 --
1499 -- In Parameters:
1500 --    p_objective_id
1501 --    p_valid_from
1502 --    p_target_date
1503 --    p_object_version_number
1504 --
1505 -- Post Success:
1506 --    Processing continues if target_date is later than valid_from
1507 --    or if target_date is not entered.
1508 --
1509 -- Post Failure:
1510 --    An Application Error is raised and processing is terminated if
1511 --    target_date is invalid.
1512 --
1513 -- Access Status:
1517 procedure chk_target_date
1514 --    Internal Development use only.
1515 --
1516 -- ---------------------------------------------------------------------
1518   (p_objective_id          in per_objectives_library.objective_id%TYPE
1519   ,p_valid_from            in per_objectives_library.valid_from%TYPE
1520   ,p_target_date      in per_objectives_library.target_date%TYPE
1521   ,p_object_version_number in per_objectives_library.object_version_number%TYPE
1522   ) is
1523   --
1524   l_proc          varchar2(72)  :=  g_package||'chk_target_date';
1525   --
1526 begin
1527   --
1528   hr_utility.set_location('Entering:'|| l_proc,5);
1529   --
1530     if p_target_date < p_valid_from then
1531       hr_utility.set_message(800,'HR_50424_WPM_INV_TARGET_DATE');
1532       hr_utility.raise_error;
1533     end if;
1534     --
1535   hr_utility.set_location(' Leaving:'||l_proc, 10);
1536   --
1537 exception
1538   when app_exception.application_exception then
1539  if hr_multi_message.exception_add
1540        (p_associated_column1      => 'PER_OBJECTIVES.target_date'
1541        ) then
1542       raise;
1543     end if;
1544 end chk_target_date;
1545 --
1546 -- ----------------------------------------------------------------------------
1547 -- |---------------------------< insert_validate >----------------------------|
1548 -- ----------------------------------------------------------------------------
1549 --
1550 Procedure insert_validate
1551   (p_effective_date               in  date
1552   ,p_rec                          in  per_pml_shd.g_rec_type
1553   ,p_duplicate_name_warning       out nocopy boolean
1554   ,p_weighting_over_100_warning   out nocopy boolean
1555   ,p_weighting_appraisal_warning  out nocopy boolean
1556   ) is
1557 --
1558   l_proc  varchar2(72) := g_package||'insert_validate';
1559 
1560 --
1561 Begin
1562 
1563   hr_utility.set_location('Entering:'||l_proc, 5);
1564   --
1565   -- Call all supporting business operations
1566   --
1567   -- No business group context. HR_STANDARD_LOOKUPS used for validation.
1568 
1569   --
1570   -- Validate Independent Attributes
1571   --
1572   -- Check the validity dates.
1573   --
1574   chk_valid_from_to_date
1575     (p_objective_id                => p_rec.objective_id
1576     ,p_object_version_number       => p_rec.object_version_number
1577     ,p_valid_from                  => p_rec.valid_from
1578     ,p_valid_to                    => p_rec.valid_to);
1579 
1580   hr_utility.set_location(l_proc, 10);
1581   --
1582   -- Check the uniqueness of the objective name.
1583   --
1584   chk_objective_name
1585     (p_objective_id                => p_rec.objective_id
1586     ,p_object_version_number       => p_rec.object_version_number
1587     ,p_objective_name              => p_rec.objective_name
1588     ,p_duplicate_name_warning      => p_duplicate_name_warning
1589     ,p_valid_from                  =>p_rec.valid_from
1590     ,p_valid_to                    =>p_rec.valid_to);
1591 
1592 
1593   hr_utility.set_location(l_proc, 15);
1594   --
1595   -- Check the group code.
1596   --
1597   chk_group_code
1598     (p_objective_id                => p_rec.objective_id
1599     ,p_object_version_number       => p_rec.object_version_number
1600     ,p_effective_date              => p_effective_date
1601     ,p_group_code                  => p_rec.group_code);
1602 
1603   hr_utility.set_location(l_proc, 20);
1604   --
1605   -- Check the priority.
1606   --
1607   chk_priority_code
1608     (p_objective_id                => p_rec.objective_id
1609     ,p_object_version_number       => p_rec.object_version_number
1610     ,p_effective_date              => p_effective_date
1611     ,p_priority_code               => p_rec.priority_code);
1612 
1613   hr_utility.set_location(l_proc, 25);
1614   --
1615   -- Check the appraise flag.
1616   --
1617   chk_appraise_flag
1618     (p_objective_id                => p_rec.objective_id
1619     ,p_object_version_number       => p_rec.object_version_number
1620     ,p_effective_date              => p_effective_date
1621     ,p_appraise_flag               => p_rec.appraise_flag);
1622 
1623   hr_utility.set_location(l_proc, 30);
1624   --
1625   -- Check the weighting percent.
1626   --
1627   chk_weighting_percent
1628     (p_objective_id                => p_rec.objective_id
1629     ,p_object_version_number       => p_rec.object_version_number
1630     ,p_appraise_flag               => p_rec.appraise_flag
1631     ,p_weighting_percent           => p_rec.weighting_percent
1632     ,p_weighting_over_100_warning  => p_weighting_over_100_warning
1633     ,p_weighting_appraisal_warning => p_weighting_appraisal_warning);
1634 
1635   hr_utility.set_location(l_proc, 35);
1636   --
1637   -- Check the measurement style code.
1638   --
1639   chk_measurement_style_code
1640     (p_objective_id                => p_rec.objective_id
1641     ,p_object_version_number       => p_rec.object_version_number
1642     ,p_effective_date              => p_effective_date
1643     ,p_measurement_style_code      => p_rec.measurement_style_code);
1644 
1645   hr_utility.set_location(l_proc, 40);
1646   --
1647   -- Check the measure name.
1648   --
1649   chk_measure_name
1650     (p_objective_id                => p_rec.objective_id
1651     ,p_object_version_number       => p_rec.object_version_number
1652     ,p_measurement_style_code      => p_rec.measurement_style_code
1656   --
1653     ,p_measure_name                => p_rec.measure_name);
1654 
1655   hr_utility.set_location(l_proc, 45);
1657   -- Check the target value.
1658   --
1659   chk_target_value
1660     (p_objective_id                => p_rec.objective_id
1661     ,p_object_version_number       => p_rec.object_version_number
1662     ,p_measurement_style_code      => p_rec.measurement_style_code
1663     ,p_target_value                => p_rec.target_value);
1664 
1665   hr_utility.set_location(l_proc, 50);
1666   --
1667   -- Check the UOM code.
1668   --
1669   chk_uom_code
1670     (p_objective_id                => p_rec.objective_id
1671     ,p_object_version_number       => p_rec.object_version_number
1672     ,p_effective_date              => p_effective_date
1673     ,p_measurement_style_code      => p_rec.measurement_style_code
1674     ,p_uom_code                    => p_rec.uom_code);
1675 
1676   hr_utility.set_location(l_proc, 55);
1677   --
1678   -- Check the measure type code.
1679   --
1680   chk_measure_type_code
1681     (p_objective_id                => p_rec.objective_id
1682     ,p_object_version_number       => p_rec.object_version_number
1683     ,p_effective_date              => p_effective_date
1684     ,p_measurement_style_code      => p_rec.measurement_style_code
1685     ,p_measure_type_code           => p_rec.measure_type_code);
1686 
1687   hr_utility.set_location(l_proc, 60);
1688   --
1689   -- Check the eligibility type code.
1690   --
1691   chk_eligibility_type_code
1692     (p_objective_id                => p_rec.objective_id
1693     ,p_object_version_number       => p_rec.object_version_number
1694     ,p_effective_date              => p_effective_date
1695     ,p_eligibility_type_code       => p_rec.eligibility_type_code);
1696 
1697   hr_utility.set_location(l_proc, 65);
1698 
1699   --
1700   -- Check that the next review date is not before start date
1701   --
1702   chk_next_review_date
1703   (p_objective_id          => p_rec.objective_id
1704   ,p_valid_from            => p_rec.valid_from
1705   ,p_next_review_date      => p_rec.next_review_date
1706   ,p_object_version_number => p_rec.object_version_number
1707   );
1708 
1709   hr_utility.set_location(l_proc, 70);
1710 
1711   --
1712   -- Check that the target date is not before start date
1713   --
1714    chk_target_date
1715   (p_objective_id          => p_rec.objective_id
1716   ,p_valid_from            => p_rec.valid_from
1717   ,p_target_date           => p_rec.target_date
1718   ,p_object_version_number => p_rec.object_version_number
1719   );
1720 
1721   hr_utility.set_location(l_proc, 75);
1722 
1723   --
1724   -- Check the flexfield.
1725   --
1726   per_pml_bus.chk_df(p_rec);
1727 
1728   hr_utility.set_location(' Leaving:'||l_proc, 150);
1729 
1730 End insert_validate;
1731 --
1732 -- ----------------------------------------------------------------------------
1733 -- |---------------------------< update_validate >----------------------------|
1734 -- ----------------------------------------------------------------------------
1735 --
1736 Procedure update_validate
1737   (p_effective_date              in  date
1738   ,p_rec                         in  per_pml_shd.g_rec_type
1739   ,p_duplicate_name_warning      out nocopy boolean
1740   ,p_weighting_over_100_warning  out nocopy boolean
1741   ,p_weighting_appraisal_warning out nocopy boolean
1742   ) is
1743 --
1744   l_proc  varchar2(72) := g_package||'update_validate';
1745 
1746 --
1747 Begin
1748 
1749   hr_utility.set_location('Entering:'||l_proc, 5);
1750   --
1751   -- Call all supporting business operations
1752   --
1753   -- No business group context. HR_STANDARD_LOOKUPS used for validation.
1754   --
1755   chk_non_updateable_args
1756     (p_effective_date     => p_effective_date
1757     ,p_rec              => p_rec);
1758 
1759   --
1760   -- Validate Independent Attributes
1761   --
1765     (p_objective_id             => p_rec.objective_id
1762   -- Check the uniqueness of the objective name.
1763   --
1764   chk_objective_name
1766     ,p_object_version_number    => p_rec.object_version_number
1767     ,p_objective_name           => p_rec.objective_name
1768     ,p_duplicate_name_warning   => p_duplicate_name_warning
1769     ,p_valid_from               => p_rec.valid_from
1770     ,p_valid_to                 => p_rec.valid_to
1771     );
1772 
1773   hr_utility.set_location('Entering:'||l_proc, 10);
1774   --
1775   -- Check the validity dates.
1776   --
1777   chk_valid_from_to_date
1778     (p_objective_id             => p_rec.objective_id
1779     ,p_object_version_number    => p_rec.object_version_number
1780     ,p_valid_from               => p_rec.valid_from
1781     ,p_valid_to                 => p_rec.valid_to);
1782 
1783   hr_utility.set_location('Entering:'||l_proc, 15);
1784   --
1785   -- Check the group code.
1786   --
1787   chk_group_code
1788     (p_objective_id             => p_rec.objective_id
1789     ,p_object_version_number    => p_rec.object_version_number
1790     ,p_effective_date           => p_effective_date
1791     ,p_group_code               => p_rec.group_code);
1792 
1793   hr_utility.set_location('Entering:'||l_proc, 20);
1794   --
1795   -- Check the priority.
1796   --
1797   chk_priority_code
1798     (p_objective_id             => p_rec.objective_id
1799     ,p_object_version_number    => p_rec.object_version_number
1800     ,p_effective_date           => p_effective_date
1801     ,p_priority_code            => p_rec.priority_code);
1802 
1803   hr_utility.set_location('Entering:'||l_proc, 25);
1804   --
1805   -- Check the appraise flag.
1806   --
1807   chk_appraise_flag
1808     (p_objective_id             => p_rec.objective_id
1809     ,p_object_version_number    => p_rec.object_version_number
1810     ,p_effective_date           => p_effective_date
1811     ,p_appraise_flag            => p_rec.appraise_flag);
1812 
1813   hr_utility.set_location('Entering:'||l_proc, 30);
1814   --
1815   -- Check the weighting percent.
1816   --
1817   chk_weighting_percent
1818     (p_objective_id                => p_rec.objective_id
1819     ,p_object_version_number       => p_rec.object_version_number
1820     ,p_appraise_flag               => p_rec.appraise_flag
1821     ,p_weighting_percent           => p_rec.weighting_percent
1822     ,p_weighting_over_100_warning  => p_weighting_over_100_warning
1823     ,p_weighting_appraisal_warning => p_weighting_appraisal_warning);
1824 
1825   hr_utility.set_location(l_proc, 35);
1826   --
1827   -- Check the measurement style code.
1828   --
1829   chk_measurement_style_code
1830     (p_objective_id                => p_rec.objective_id
1831     ,p_object_version_number       => p_rec.object_version_number
1832     ,p_effective_date              => p_effective_date
1833     ,p_measurement_style_code      => p_rec.measurement_style_code);
1834 
1835   hr_utility.set_location(l_proc, 40);
1836   --
1837   -- Check the measure name.
1838   --
1839   chk_measure_name
1840     (p_objective_id                => p_rec.objective_id
1841     ,p_object_version_number       => p_rec.object_version_number
1842     ,p_measurement_style_code      => p_rec.measurement_style_code
1843     ,p_measure_name                => p_rec.measure_name);
1844 
1845   hr_utility.set_location(l_proc, 45);
1846   --
1847   -- Check the target value.
1848   --
1849   chk_target_value
1850     (p_objective_id                => p_rec.objective_id
1851     ,p_object_version_number       => p_rec.object_version_number
1852     ,p_measurement_style_code      => p_rec.measurement_style_code
1853     ,p_target_value                => p_rec.target_value);
1854 
1855   hr_utility.set_location(l_proc, 50);
1856   --
1857   -- Check the UOM code.
1858   --
1859   chk_uom_code
1860     (p_objective_id                => p_rec.objective_id
1861     ,p_object_version_number       => p_rec.object_version_number
1862     ,p_effective_date              => p_effective_date
1863     ,p_measurement_style_code      => p_rec.measurement_style_code
1864     ,p_uom_code                    => p_rec.uom_code);
1865 
1866   hr_utility.set_location(l_proc, 55);
1867   --
1868   -- Check the measure type code.
1869   --
1870   chk_measure_type_code
1871     (p_objective_id                => p_rec.objective_id
1872     ,p_object_version_number       => p_rec.object_version_number
1873     ,p_effective_date              => p_effective_date
1874     ,p_measurement_style_code      => p_rec.measurement_style_code
1875     ,p_measure_type_code           => p_rec.measure_type_code);
1876 
1877   hr_utility.set_location(l_proc, 60);
1878   --
1879   -- Check the eligibility type code.
1880   --
1881   chk_eligibility_type_code
1882     (p_objective_id                => p_rec.objective_id
1883     ,p_object_version_number       => p_rec.object_version_number
1884     ,p_effective_date              => p_effective_date
1885     ,p_eligibility_type_code       => p_rec.eligibility_type_code);
1886 
1887   hr_utility.set_location(l_proc, 65);
1888   --
1889   -- Check that the next review dates is not before start date
1890   --
1891   chk_next_review_date
1892   (p_objective_id          => p_rec.objective_id
1893   ,p_valid_from            => p_rec.valid_from
1894   ,p_next_review_date      => p_rec.next_review_date
1895   ,p_object_version_number => p_rec.object_version_number
1896   );
1897   hr_utility.set_location(l_proc, 70);
1898   --
1899   -- Check that the target date is not before start date
1900   --
1901   chk_target_date
1902   (p_objective_id          => p_rec.objective_id
1903   ,p_valid_from            => p_rec.valid_from
1904   ,p_target_date           => p_rec.target_date
1905   ,p_object_version_number => p_rec.object_version_number
1906   );
1907 
1908   hr_utility.set_location(l_proc, 75);
1909 
1910 
1911   --
1912   -- Check the flexfield.
1913   --
1914   per_pml_bus.chk_df(p_rec);
1915 
1916   hr_utility.set_location(' Leaving:'||l_proc, 150);
1917 
1918 End update_validate;
1919 --
1920 -- ----------------------------------------------------------------------------
1921 -- |---------------------------< delete_validate >----------------------------|
1922 -- ----------------------------------------------------------------------------
1923 --
1924 Procedure delete_validate
1925   (p_rec                          in per_pml_shd.g_rec_type
1926   ) is
1927 --
1928   l_proc  varchar2(72) := g_package||'delete_validate';
1929 --
1930 Begin
1931   hr_utility.set_location('Entering:'||l_proc, 5);
1932   --
1933   -- Call all supporting business operations
1934   --
1935   hr_utility.set_location(' Leaving:'||l_proc, 10);
1936 End delete_validate;
1937 --
1938 end per_pml_bus;