[Home] [Help]
PACKAGE BODY: APPS.PAY_PYR_BUS
Source
1 PACKAGE BODY pay_pyr_bus AS
2 /* $Header: pypyrrhi.pkb 115.3 2003/09/15 04:18:59 adhunter noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package VARCHAR2(33) := ' pay_pyr_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code VARCHAR2(150) DEFAULT NULL;
14 g_rate_id NUMBER DEFAULT NULL;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------------< chk_rate_basis >---------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 PROCEDURE chk_rate_basis
21 (p_rate_basis IN pay_rates.rate_basis%TYPE
22 ,p_effective_date IN DATE
23 ,p_rate_id IN pay_rates.rate_id%TYPE
24 ,p_object_version_number IN pay_rates.object_version_number%TYPE) IS
25 --
26 l_api_updating BOOLEAN;
27 l_proc VARCHAR2(72) := g_package||'chk_rate_basis';
28 --
29 BEGIN
30 --
31 hr_utility.set_location('Entering : '||l_proc,10);
32 --
33 -- Only proceed with validation if :
34 -- a) The rate_basis is changing or new
35 -- b) The value for rate_uom is changing and not null
36 --
37 l_api_updating := pay_pyr_shd.api_updating
38 (p_rate_id => p_rate_id
39 ,p_object_version_number => p_object_version_number);
40 --
41 hr_utility.set_location(l_proc, 20);
42 --
43 IF ((l_api_updating AND
44 NVL(pay_pyr_shd.g_old_rec.rate_basis, hr_api.g_varchar2) <>
45 NVL(p_rate_basis, hr_api.g_varchar2) AND (p_rate_basis IS NOT NULL)) OR
46 (NOT l_api_updating and p_rate_basis IS NOT NULL)) THEN
47 --
48 hr_utility.set_location('g_old_rec.rate_basis'||pay_pyr_shd.g_old_rec.rate_basis,888);
49 hr_utility.set_location('p_rate_basis'||p_rate_basis,888);
50 -- Check that the rate basis exists in HR_LOOKUPS
51 --
52 IF hr_api.not_exists_in_hr_lookups
53 (p_effective_date => p_effective_date
54 ,p_lookup_type => 'RATE_BASIS'
55 ,p_lookup_code => p_rate_basis) THEN
56 --
57 hr_utility.set_location(l_proc, 30);
58 --
59 hr_utility.set_message(800, 'HR_289581_RATE_BASIS_INVALID');
60 hr_utility.raise_error;
61 --
62 END IF;
63 --
64 END IF;
65 --
66 hr_utility.set_location(' Leaving : '||l_proc,997);
67 --
68 EXCEPTION
69 --
70 WHEN app_exception.application_exception THEN
71 --
72 IF hr_multi_message.exception_add
73 (p_associated_column1 => 'PAY_RATES.RATE_BASIS') THEN
74 --
75 hr_utility.set_location(' Leaving : '||l_proc,998);
76 --
77 RAISE;
78 --
79 END IF;
80 --
81 hr_utility.set_location(' Leaving : '||l_proc,999);
82 --
83 END chk_rate_basis;
84 --
85 -- ---------------------------------------------------------------------------
86 -- |-----------------------------< chk_rate_uom >----------------------------|
87 -- ---------------------------------------------------------------------------
88 --
89 PROCEDURE chk_rate_uom
90 (p_rate_uom IN pay_rates.rate_uom%TYPE
91 ,p_effective_date IN DATE
92 ,p_rate_id IN pay_rates.rate_id%TYPE
93 ,p_object_version_number IN pay_rates.object_version_number%TYPE) IS
94 --
95 l_api_updating BOOLEAN;
96 l_proc VARCHAR2(72) := g_package||'chk_rate_uom';
97 --
98 BEGIN
99 --
100 hr_utility.set_location('Entering : '||l_proc,10);
101 --
102 -- Only proceed with validation if :
103 -- a) The rate_uom is changing or new
104 -- b) The value for rate_uom is changing and not null
105 --
106 l_api_updating := pay_pyr_shd.api_updating
107 (p_rate_id => p_rate_id
108 ,p_object_version_number => p_object_version_number);
109 --
110 hr_utility.set_location(l_proc, 20);
111 --
112 IF ((l_api_updating AND
113 NVL(pay_pyr_shd.g_old_rec.rate_uom, hr_api.g_varchar2) <>
114 NVL(p_rate_uom, hr_api.g_varchar2) AND (p_rate_uom IS NOT NULL)) OR
115 (NOT l_api_updating and p_rate_uom IS NOT NULL)) THEN
116 --
117 -- Check that the rate uom exists in HR_LOOKUPS
118 --
119 IF hr_api.not_exists_in_hr_lookups
120 (p_effective_date => p_effective_date
121 ,p_lookup_type => 'UNITS'
122 ,p_lookup_code => p_rate_uom) THEN
123 --
124 hr_utility.set_location(l_proc, 30);
125 --
126 hr_utility.set_message(800, 'HR_289582_RATE_UOM_INVALID');
127 hr_utility.raise_error;
128 --
129 END IF;
130 --
131 END IF;
132 --
133 hr_utility.set_location(' Leaving : '||l_proc,997);
134 --
135 EXCEPTION
136 --
137 WHEN app_exception.application_exception THEN
138 --
139 IF hr_multi_message.exception_add
140 (p_associated_column1 => 'PAY_RATES.RATE_UOM') THEN
141 --
142 hr_utility.set_location(' Leaving : '||l_proc,998);
143 --
144 RAISE;
145 --
146 END IF;
147 --
148 hr_utility.set_location(' Leaving : '||l_proc,999);
149 --
150 END chk_rate_uom;
151 --
152 -- ---------------------------------------------------------------------------
153 -- |----------------------------< chk_rate_type >----------------------------|
154 -- ---------------------------------------------------------------------------
155 --
156 PROCEDURE chk_rate_type
157 (p_rate_type IN pay_rates.rate_type%TYPE
158 ,p_effective_date IN DATE
159 ,p_rate_id IN pay_rates.rate_id%TYPE
160 ,p_object_version_number IN pay_rates.object_version_number%TYPE) IS
161 --
162 l_api_updating BOOLEAN;
163 l_proc VARCHAR2(72) := g_package||'chk_rate_type';
164 --
165 BEGIN
166 --
167 hr_utility.set_location('Entering : '||l_proc,10);
168 --
169 -- Only proceed with validation if :
170 -- a) The rate_type is changing or new
171 -- b) The value for rate_type is changing and not null
172 --
173 l_api_updating := pay_pyr_shd.api_updating
174 (p_rate_id => p_rate_id
175 ,p_object_version_number => p_object_version_number);
176 --
177 hr_utility.set_location(l_proc, 20);
178 --
179 IF ((l_api_updating AND
180 NVL(pay_pyr_shd.g_old_rec.rate_type, hr_api.g_varchar2) <>
181 NVL(p_rate_type, hr_api.g_varchar2) AND (p_rate_type IS NOT NULL)) OR
182 (NOT l_api_updating and p_rate_type IS NOT NULL)) THEN
183 --
184 -- Check that the rate type exists in HR_LOOKUPS
185 --
186 IF hr_api.not_exists_in_hr_lookups
187 (p_effective_date => p_effective_date
188 ,p_lookup_type => 'RATE_TYPE'
189 ,p_lookup_code => p_rate_type) THEN
190 --
191 hr_utility.set_location(l_proc, 30);
192 --
193 hr_utility.set_message(800, 'HR_289589_INV_ASG_RATE_TYPE');
194 hr_utility.raise_error;
195 --
196 END IF;
197 --
198 END IF;
199 --
200 hr_utility.set_location(' Leaving : '||l_proc,997);
201 --
202 EXCEPTION
203 --
204 WHEN app_exception.application_exception THEN
205 --
206 IF hr_multi_message.exception_add
207 (p_associated_column1 => 'PAY_RATES.RATE_TYPE') THEN
208 --
209 hr_utility.set_location(' Leaving : '||l_proc,998);
210 --
211 RAISE;
212 --
213 END IF;
214 --
215 hr_utility.set_location(' Leaving : '||l_proc,999);
216 --
217 END chk_rate_type;
218 --
219 -- ---------------------------------------------------------------------------
220 -- |--------------------------------< chk_name >-----------------------------|
221 -- ---------------------------------------------------------------------------
222 --
223 PROCEDURE chk_name
224 (p_name IN pay_rates.name%TYPE
225 ,p_rate_id IN pay_rates.rate_id%TYPE
226 ,p_business_group_id IN pay_rates.business_group_id%TYPE
227 ,p_object_version_number IN pay_rates.object_version_number%TYPE
228 ,p_rate_type IN pay_rates.rate_type%TYPE
229 ,p_asg_rate_type IN pay_rates.asg_rate_type%TYPE) IS
230 --
231 CURSOR chk_duplicate_name IS
232 SELECT pr.name
233 FROM pay_rates pr
234 WHERE pr.name = p_name
235 AND pr.rate_type = p_rate_type
236 AND business_group_id = p_business_group_id
237 AND ((p_rate_id IS NULL) OR
238 (p_rate_id IS NOT NULL AND
239 pr.rate_id <> p_rate_id))
240 AND (p_rate_type <> 'A'
241 OR
242 (p_rate_type = 'A' AND
243 ( (p_asg_rate_type is not null
244 AND pr.asg_rate_type is not null
245 AND pr.asg_rate_type=p_asg_rate_type)
246 OR (p_asg_rate_type is null
247 AND pr.asg_rate_type is null))
248 ));
249 --
250 l_proc VARCHAR2(72):= g_package || 'chk_name';
251 l_name pay_rates.name%TYPE;
252 l_api_updating BOOLEAN;
253 --
254 BEGIN
255 --
256 hr_utility.set_location('Entering: '||l_proc,10);
257 --
258 hr_api.mandatory_arg_error
259 (p_api_name => l_proc
260 ,p_argument => 'name'
261 ,p_argument_value => p_name);
262 --
263 -- Only proceed with validation if :
264 -- a) The name is changing or new
265 -- b) The value for name is changing and not null
266 --
267 l_api_updating := pay_pyr_shd.api_updating
268 (p_rate_id => p_rate_id
269 ,p_object_version_number => p_object_version_number);
270 --
271 hr_utility.set_location(l_proc||'/'||p_business_group_id, 20);
272 --
273 IF ((l_api_updating AND
274 NVL(pay_pyr_shd.g_old_rec.name, hr_api.g_varchar2) <>
275 NVL(p_name, hr_api.g_varchar2) AND (p_Name IS NOT NULL)) OR
276 (NOT l_api_updating and p_name IS NOT NULL)) THEN
277 --
278 hr_utility.set_location(l_proc, 30);
279 --
280 -- Check to see if the name already
281 -- exists for the business group
282 --
283 OPEN chk_duplicate_name;
284 FETCH chk_duplicate_name INTO l_name;
285 --
286 -- If the name already exists for the
287 -- business group then raise an error
288 --
289 IF chk_duplicate_name%FOUND THEN
290 --
291 CLOSE chk_duplicate_name;
292 --
293 hr_utility.set_message(800, 'PAY_6703_DEF_GRD_RATE_EXISTS');
294 hr_utility.raise_error;
295 --
296 ELSE
297 --
298 CLOSE chk_duplicate_name;
299 --
300 END IF;
301 --
302 hr_utility.set_location(l_proc, 40);
303 --
304 END IF;
305 --
306 hr_utility.set_location('Leaving : '||l_proc,997);
307 --
308 EXCEPTION
309 --
310 WHEN app_exception.application_exception THEN
311 --
312 IF hr_multi_message.exception_add
313 (p_associated_column1 => 'PAY_RATES.NAME') THEN
314 --
315 hr_utility.set_location(' Leaving : '||l_proc,998);
316 --
317 RAISE;
318 --
319 END IF;
320 --
321 hr_utility.set_location(' Leaving : '||l_proc,999);
322 --
323 END chk_name;
324 --
325 -- ---------------------------------------------------------------------------
326 -- |-------------------------< chk_for_child_records >-----------------------|
327 -- ---------------------------------------------------------------------------
328 --
329 PROCEDURE chk_for_child_records
330 (p_rate_id IN pay_rates.rate_id%TYPE
331 ,p_rate_type IN pay_rates.rate_type%TYPE) IS
332 --
333 CURSOR chk_for_records IS
334 SELECT 'X'
335 FROM pay_grade_rules_f pgr
336 WHERE pgr.rate_id = p_rate_id;
337 --
338 l_proc VARCHAR2(72):= g_package || 'chk_for_child_records';
339 l_dummy CHAR;
340 l_api_updating BOOLEAN;
341 --
342 BEGIN
343 --
344 hr_utility.set_location('Entering: '||l_proc,10);
345 --
346 hr_api.mandatory_arg_error
347 (p_api_name => l_proc
348 ,p_argument => 'rate_id'
349 ,p_argument_value => p_rate_id);
350 --
351 OPEN chk_for_records;
352 FETCH chk_for_records INTO l_dummy;
353 --
354 hr_utility.set_location(l_proc||'/'||p_rate_type,20);
355 --
356 -- If child records exists then the delete
357 -- cannot be performed until these child records
358 -- have been deleted. So raise an error.
359 --
360 IF chk_for_records%FOUND THEN
361 --
362 hr_utility.set_location(l_proc,30);
363 --
364 CLOSE chk_for_records;
365 --
366 IF p_rate_type = 'G' THEN
367 --
368 hr_utility.set_message(800, 'HR_289594_GRADE_RULES_EXIST');
369 hr_utility.raise_error;
370 --
371 ELSIF p_rate_type = 'SP' THEN
372 --
373 hr_utility.set_message(800, 'HR_289595_POINT_VALUES_EXIST');
374 hr_utility.raise_error;
375 --
376 ELSIF p_rate_type = 'A' THEN
377 --
378 hr_utility.set_message(800, 'HR_289596_ASG_RATE_VAL_EXISTS');
379 hr_utility.raise_error;
380 --
381 END IF;
382 --
383 ELSE
384 --
385 CLOSE chk_for_records;
386 --
387 END IF;
388 --
389 hr_utility.set_location('Leaving : '||l_proc,999);
390 --
391 END chk_for_child_records;
392 --
393 -- ---------------------------------------------------------------------------
394 -- |-------------------------< chk_field_combinations >-----------------------|
395 -- ---------------------------------------------------------------------------
396 --
397 PROCEDURE chk_field_combinations
398 (p_rate_type IN pay_rates.rate_type%TYPE
399 ,p_rate_uom IN pay_rates.rate_uom%TYPE
400 ,p_rate_basis IN pay_rates.rate_basis%TYPE
401 ,p_parent_spine_id IN pay_rates.parent_spine_id%TYPE
402 ,p_asg_rate_type IN pay_rates.asg_rate_type%TYPE) IS
406 l_api_updating BOOLEAN;
403 --
404 l_proc VARCHAR2(72):= g_package || 'chk_correct_rate';
405 l_name pay_rates.name%TYPE;
407 --
408 BEGIN
409 --
410 hr_utility.set_location('Entering: '||l_proc,10);
411 --
412 -- If the rate type is an Assignment then
413 -- check the correct fields have been set
414 -- and that they have the correct value
415 --
416 IF p_rate_type = 'A' THEN
417 --
418 hr_utility.set_location(l_proc, 20);
419 --
420 -- If the rate_uom has not been set
421 -- to M (Money) then raise an error
422 --
423 IF p_rate_uom <> 'M' THEN
424 --
425 hr_utility.set_message(800, 'HR_289590_INV_ASG_RATE_UOM');
426 hr_utility.raise_error;
427 --
428 -- If the parent spine id has been populated
429 -- then raise an error.
430 --
431 ELSIF p_parent_spine_id IS NOT NULL THEN
432 --
433 hr_utility.set_message(800, 'HR_289591_SPINE_ID_POPULATED');
434 hr_utility.raise_error;
435 --
436 -- If the pay basis field has not been populated
437 -- then raise an error as for Assignment Rates
438 -- the pay basis field is mandatory.
439 --
440 ELSIF p_rate_basis IS NULL THEN
441 --
442 hr_utility.set_message(800, 'HR_289592_RATE_BASIS_IS_NULL');
443 hr_utility.raise_error;
444 --
445 END IF;
446 --
447 -- If the Rate is a Grade Rate then check that the
448 -- Rate_Basis has not been populated, and that the
449 -- Parent Spine ID has not been populated.
450 --
451 ELSIF p_rate_type = 'G' THEN
452 --
453 IF p_rate_basis IS NOT NULL THEN
454 --
455 hr_utility.set_message(800, 'HR_289593_RATE_BASIS_NOT_NULL');
456 hr_utility.raise_error;
457 --
458 ELSIF p_parent_spine_id IS NOT NULL THEN
459 --
460 hr_utility.set_message(800, 'HR_289743_PARENT_SPINE_NOT_NUL');
461 hr_utility.raise_error;
462 --
463 ELSIF p_asg_rate_type IS NOT NULL THEN
464 hr_utility.set_message(800, 'HR_449033_ASGRAT_TYPE_NOT_NULL');
465 hr_utility.raise_error;
466 --
467 END IF;
468 --
469 -- If the Rate is a Scale Rate then check that the rate_basis
470 -- has not been populated and the parent spine id (Pay Scale)
471 -- has been populated.
472 --
473 ELSIF p_rate_type = 'SP' THEN
474 --
475 IF p_rate_basis IS NOT NULL THEN
476 --
477 hr_utility.set_message(800, 'HR_289593_RATE_BASIS_NOT_NULL');
478 hr_utility.raise_error;
479 --
480 ELSIF p_parent_spine_id IS NULL THEN
481 --
482 hr_utility.set_message(800, 'HR_289744_PARENT_SPINE_NULL');
483 hr_utility.raise_error;
484 --
485 ELSIF p_asg_rate_type IS NOT NULL THEN
486 hr_utility.set_message(800, 'HR_449033_ASGRAT_TYPE_NOT_NULL');
487 hr_utility.raise_error;
488 --
489 END IF;
490 --
491 END IF;
492 --
493 hr_utility.set_location('Leaving : '||l_proc,999);
494 --
495 END chk_field_combinations;
496 --
497 -- ---------------------------------------------------------------------------
498 -- |---------------------------< chk_parent_spine_id >------------------------|
499 -- ---------------------------------------------------------------------------
500 --
501 PROCEDURE chk_parent_spine_id
502 (p_parent_spine_id IN pay_rates.parent_spine_id%TYPE
503 ,p_rate_id IN pay_rates.rate_id%TYPE
504 ,p_object_version_number IN pay_rates.object_version_number%TYPE ) IS
505 --
506 -- Declare Cursors
507 --
508 CURSOR csr_chk_parent_spine_fk IS
509 SELECT 'Y'
510 FROM per_parent_spines pps
511 WHERE pps.parent_spine_id = p_parent_spine_id;
512 --
513 -- Declare local variables
514 --
515 l_proc VARCHAR2(72) := g_package || 'chk_parent_spine_id';
516 l_dummy VARCHAR2(1);
517 l_api_updating BOOLEAN;
518 --
519 BEGIN
520 --
521 hr_utility.set_location('Entering:'||l_proc, 10);
522 --
523 -- Only proceed with validation if :
524 -- a) The parent_spine_id is changing or new
525 -- b) The value for parent_spine_id is changing and not null
526 --
527 l_api_updating := pay_pyr_shd.api_updating
528 (p_rate_id => p_rate_id
529 ,p_object_version_number => p_object_version_number);
530 --
531 hr_utility.set_location(l_proc, 20);
532 --
533 IF ((l_api_updating AND
534 NVL(pay_pyr_shd.g_old_rec.rate_id, hr_api.g_number) <>
535 NVL(p_rate_id, hr_api.g_number) AND (p_rate_id IS NOT NULL)) OR
536 (NOT l_api_updating and p_rate_id IS NOT NULL)) THEN
537 --
538 hr_utility.set_location(l_proc, 30);
539 --
540 -- Check if parent_spine_id is not null
541 --
542 OPEN csr_chk_parent_spine_fk;
543 FETCH csr_chk_parent_spine_fk INTO l_dummy;
544 --
545 IF csr_chk_parent_spine_fk%NOTFOUND THEN
546 --
547 CLOSE csr_chk_parent_spine_fk;
548 --
549 hr_utility.set_message(800, 'HR_289286_PARENT_SPINE_INVALID');
550 hr_utility.raise_error;
554 hr_utility.set_location(l_proc, 40);
551 --
552 ELSE
553 --
555 --
556 CLOSE csr_chk_parent_spine_fk;
557 --
558 END IF;
559 --
560 END IF;
561 --
562 hr_utility.set_location(' Leaving: '||l_proc,997);
563 --
564 EXCEPTION
565 --
566 WHEN app_exception.application_exception THEN
567 --
568 IF hr_multi_message.exception_add
569 (p_associated_column1 => 'PAY_RATES.PARENT_SPINE_ID') THEN
570 --
571 hr_utility.set_location(' Leaving: '|| l_proc,998);
572 RAISE;
573 --
574 END IF;
575 --
576 hr_utility.set_location(' Leaving: '||l_proc,999);
577 --
578 END chk_parent_spine_id;
579 --
580 -- ---------------------------------------------------------------------------
581 -- |----------------------< chk_asg_rate_type >------------------------------|
582 -- ---------------------------------------------------------------------------
583 --
584 PROCEDURE chk_asg_rate_type
585 (p_rate_id IN VARCHAR2
586 ,p_object_version_number IN NUMBER
587 ,p_effective_date IN DATE
588 ,p_asg_rate_type IN VARCHAR2
589 ,p_rate_type IN VARCHAR2
590 ) IS
591 --
592 l_proc VARCHAR2(72) := g_package||'chk_asg_rate_type';
593 l_dummy VARCHAR2(1);
594 l_api_updating BOOLEAN;
595 --
596 cursor csr_matching_children is
597 SELECT 'y' from dual where exists
598 (select 'y'
599 from pay_grade_rules_f pgr1
600 ,pay_grade_rules_f pgr2
601 ,pay_rates pyr1
602 ,pay_rates pyr2
603 where pgr1.rate_id=pyr1.rate_id
604 and pgr2.rate_id=pyr2.rate_id
605 and pgr1.grade_or_spinal_point_id=pgr2.grade_or_spinal_point_id
606 and pgr1.effective_start_date
607 between pgr2.effective_start_date and pgr2.effective_end_date
608 and pgr1.rate_type='A'
609 and pgr2.rate_type='A'
610 and pyr2.asg_rate_type=p_asg_rate_type
611 and pyr1.rate_id=p_rate_id
612 and pyr1.rate_id <> pyr2.rate_id);
613 --
614 cursor csr_price_differentials is
615 select 'Y' from dual where exists
616 (SELECT 'Y'
617 FROM fnd_lookups
618 WHERE lookup_type='PRICE DIFFERENTIALS'
619 AND lookup_code=p_asg_rate_type
620 AND enabled_flag='Y'
621 AND p_effective_date between nvl(start_date_active,hr_api.g_sot)
622 and nvl(end_date_active,hr_api.g_eot));
623 --
624 BEGIN
625 hr_utility.set_location('Entering:'|| l_proc, 10);
626 --
627 -- Only proceed with validation if :
628 -- a) Updating and the asg_rate_type is changing
629 -- b) Inserting
630 --
631 l_api_updating := pay_pyr_shd.api_updating
632 (p_rate_id => p_rate_id
633 ,p_object_version_number => p_object_version_number);
634 --
635 IF ((l_api_updating AND
636 NVL(pay_pyr_shd.g_old_rec.asg_rate_type, hr_api.g_varchar2) <>
637 NVL(p_asg_rate_type, hr_api.g_varchar2) AND (p_asg_rate_type IS NOT NULL)) OR
638 (NOT l_api_updating and p_rate_id IS NULL AND p_asg_rate_type IS NOT NULL)) THEN
639 --
640 -- check the asg_rate_type is valid in the lookup
641 --
642 open csr_price_differentials;
643 fetch csr_price_differentials into l_dummy;
644 IF csr_price_differentials%notfound then
645 close csr_price_differentials;
646 hr_utility.set_message(800, 'HR_449034_ASGRAT_TYPE_INVALID');
647 hr_utility.raise_error;
648 ELSE
649 close csr_price_differentials;
650 END IF;
651 --
652 -- check the change in asg_rate_type does not result in an assignment
653 -- having more than one row of the same asg_rate_type at any given date
654 --
655 open csr_matching_children;
656 fetch csr_matching_children into l_dummy;
657 if csr_matching_children%found then
658 close csr_matching_children;
659 fnd_message.set_name('PER','HR_449035_ASGRAT_INV_CHILD');
660 hr_multi_message.add
661 (p_associated_column1
662 => 'ASG_RATE_TYPE');
663 else
664 close csr_matching_children;
665 end if;
666 --
667 END IF;
668 hr_utility.set_location('Leaving:'|| l_proc, 10);
669 END chk_asg_rate_type;
670 --
671 -- ---------------------------------------------------------------------------
672 -- |----------------------< set_security_group_id >--------------------------|
673 -- ---------------------------------------------------------------------------
674 --
675 PROCEDURE set_security_group_id
676 (p_rate_id IN NUMBER
677 ,p_associated_column1 IN VARCHAR2 DEFAULT NULL
678 ) IS
679 --
680 -- Declare cursor
681 --
682 CURSOR csr_sec_grp IS
683 SELECT pbg.security_group_id
684 FROM per_business_groups pbg
685 , pay_rates pyr
686 WHERE pyr.rate_id = p_rate_id
687 AND pbg.business_group_id = pyr.business_group_id;
688 --
689 -- Declare local variables
690 --
691 l_security_group_id NUMBER;
695 --
692 l_proc VARCHAR2(72) := g_package||'set_security_group_id';
693 --
694 BEGIN
696 hr_utility.set_location('Entering:'|| l_proc, 10);
697 --
698 -- Ensure that all the mandatory parameter are not NULL
699 --
700 hr_api.mandatory_arg_error
701 (p_api_name => l_proc
702 ,p_argument => 'rate_id'
703 ,p_argument_value => p_rate_id
704 );
705 --
706 OPEN csr_sec_grp;
707 FETCH csr_sec_grp INTO l_security_group_id;
708 --
709 IF csr_sec_grp%notfound THEN
710 --
711 CLOSE csr_sec_grp;
712 --
713 -- The primary key IS invalid therefore we must error
714 --
715 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
716 hr_multi_message.add
717 (p_associated_column1
718 => NVL(p_associated_column1,'RATE_ID')
719 );
720 --
721 ELSE
722 CLOSE csr_sec_grp;
723 --
724 -- Set the security_group_id IN CLIENT_INFO
725 --
726 hr_api.set_security_group_id
727 (p_security_group_id => l_security_group_id
728 );
729 END IF;
730 --
731 hr_utility.set_location(' Leaving:'|| l_proc, 20);
732 --
733 END set_security_group_id;
734 --
735 -- ---------------------------------------------------------------------------
736 -- |---------------------< return_legislation_code >-------------------------|
737 -- ---------------------------------------------------------------------------
738 --
739 FUNCTION return_legislation_code
740 (p_rate_id IN NUMBER
741 )
742 RETURN Varchar2 IS
743 --
744 -- Declare CURSOR
745 --
746 CURSOR csr_leg_code IS
747 SELECT pbg.legislation_code
748 FROM per_business_groups pbg
749 , pay_rates pyr
750 WHERE pyr.rate_id = p_rate_id
751 AND pbg.business_group_id = pyr.business_group_id;
752 --
753 -- Declare local variables
754 --
755 l_legislation_code VARCHAR2(150);
756 l_proc VARCHAR2(72) := g_package||'return_legislation_code';
757 --
758 BEGIN
759 --
760 hr_utility.set_location('Entering:'|| l_proc, 10);
761 --
762 -- Ensure that all the mandatory parameter are not NULL
763 --
764 hr_api.mandatory_arg_error
765 (p_api_name => l_proc
766 ,p_argument => 'rate_id'
767 ,p_argument_value => p_rate_id
768 );
769 --
770 IF ( NVL(pay_pyr_bus.g_rate_id, hr_api.g_number)
771 = p_rate_id) THEN
772 --
773 -- The legislation code has already been found with a previous
774 -- call to this function. Just RETURN the value IN the global
775 -- variable.
776 --
777 l_legislation_code := pay_pyr_bus.g_legislation_code;
778 hr_utility.set_location(l_proc, 20);
779 ELSE
780 --
781 -- The ID IS different to the last call to this function
782 -- or this IS the first call to this function.
783 --
784 OPEN csr_leg_code;
785 FETCH csr_leg_code INTO l_legislation_code;
786 --
787 IF csr_leg_code%notfound THEN
788 --
789 -- The primary key IS invalid therefore we must error
790 --
791 CLOSE csr_leg_code;
792 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
793 fnd_message.raise_error;
794 END IF;
795 hr_utility.set_location(l_proc,30);
796 --
797 -- Set the global variables so the values are
798 -- available for the next call to this function.
799 --
800 CLOSE csr_leg_code;
801 pay_pyr_bus.g_rate_id := p_rate_id;
802 pay_pyr_bus.g_legislation_code := l_legislation_code;
803 END IF;
804 hr_utility.set_location(' Leaving:'|| l_proc, 40);
805 RETURN l_legislation_code;
806 END return_legislation_code;
807 --
808 -- ----------------------------------------------------------------------------
809 -- |------------------------------< chk_df >----------------------------------|
810 -- ----------------------------------------------------------------------------
811 --
812 -- Description:
813 -- Validates all the Descriptive Flexfield values.
814 --
815 -- Prerequisites:
816 -- All other columns have been validated. Must be called as the
817 -- last step FROM insert_validate AND update_validate.
818 --
819 -- In Arguments:
820 -- p_rec
821 --
822 -- Post Success:
823 -- IF the Descriptive Flexfield structure column AND data values are
824 -- all valid this procedure will END normally AND processing will
825 -- continue.
826 --
827 -- Post Failure:
828 -- IF the Descriptive Flexfield structure column value or any of
829 -- the data values are invalid THEN an application error IS raised as
830 -- a PL/SQL exception.
831 --
832 -- Access Status:
833 -- Internal Row Handler Use Only.
834 --
835 -- ----------------------------------------------------------------------------
836 procedure chk_df
837 (p_rec IN pay_pyr_shd.g_rec_type
838 ) IS
839 --
843 hr_utility.set_location('Entering:'||l_proc,10);
840 l_proc VARCHAR2(72) := g_package || 'chk_df';
841 --
842 BEGIN
844 --
845 IF ((p_rec.rate_id IS not NULL) AND (
846 NVL(pay_pyr_shd.g_old_rec.attribute_category, hr_api.g_VARCHAR2) <>
847 NVL(p_rec.attribute_category, hr_api.g_VARCHAR2) or
848 NVL(pay_pyr_shd.g_old_rec.attribute1, hr_api.g_VARCHAR2) <>
849 NVL(p_rec.attribute1, hr_api.g_VARCHAR2) or
850 NVL(pay_pyr_shd.g_old_rec.attribute2, hr_api.g_VARCHAR2) <>
851 NVL(p_rec.attribute2, hr_api.g_VARCHAR2) or
852 NVL(pay_pyr_shd.g_old_rec.attribute3, hr_api.g_VARCHAR2) <>
853 NVL(p_rec.attribute3, hr_api.g_VARCHAR2) or
854 NVL(pay_pyr_shd.g_old_rec.attribute4, hr_api.g_VARCHAR2) <>
855 NVL(p_rec.attribute4, hr_api.g_VARCHAR2) or
856 NVL(pay_pyr_shd.g_old_rec.attribute5, hr_api.g_VARCHAR2) <>
857 NVL(p_rec.attribute5, hr_api.g_VARCHAR2) or
858 NVL(pay_pyr_shd.g_old_rec.attribute6, hr_api.g_VARCHAR2) <>
859 NVL(p_rec.attribute6, hr_api.g_VARCHAR2) or
860 NVL(pay_pyr_shd.g_old_rec.attribute7, hr_api.g_VARCHAR2) <>
861 NVL(p_rec.attribute7, hr_api.g_VARCHAR2) or
862 NVL(pay_pyr_shd.g_old_rec.attribute8, hr_api.g_VARCHAR2) <>
863 NVL(p_rec.attribute8, hr_api.g_VARCHAR2) or
864 NVL(pay_pyr_shd.g_old_rec.attribute9, hr_api.g_VARCHAR2) <>
865 NVL(p_rec.attribute9, hr_api.g_VARCHAR2) or
866 NVL(pay_pyr_shd.g_old_rec.attribute10, hr_api.g_VARCHAR2) <>
867 NVL(p_rec.attribute10, hr_api.g_VARCHAR2) or
868 NVL(pay_pyr_shd.g_old_rec.attribute11, hr_api.g_VARCHAR2) <>
869 NVL(p_rec.attribute11, hr_api.g_VARCHAR2) or
870 NVL(pay_pyr_shd.g_old_rec.attribute12, hr_api.g_VARCHAR2) <>
871 NVL(p_rec.attribute12, hr_api.g_VARCHAR2) or
872 NVL(pay_pyr_shd.g_old_rec.attribute13, hr_api.g_VARCHAR2) <>
873 NVL(p_rec.attribute13, hr_api.g_VARCHAR2) or
874 NVL(pay_pyr_shd.g_old_rec.attribute14, hr_api.g_VARCHAR2) <>
875 NVL(p_rec.attribute14, hr_api.g_VARCHAR2) or
876 NVL(pay_pyr_shd.g_old_rec.attribute15, hr_api.g_VARCHAR2) <>
877 NVL(p_rec.attribute15, hr_api.g_VARCHAR2) or
878 NVL(pay_pyr_shd.g_old_rec.attribute16, hr_api.g_VARCHAR2) <>
879 NVL(p_rec.attribute16, hr_api.g_VARCHAR2) or
880 NVL(pay_pyr_shd.g_old_rec.attribute17, hr_api.g_VARCHAR2) <>
881 NVL(p_rec.attribute17, hr_api.g_VARCHAR2) or
882 NVL(pay_pyr_shd.g_old_rec.attribute18, hr_api.g_VARCHAR2) <>
883 NVL(p_rec.attribute18, hr_api.g_VARCHAR2) or
884 NVL(pay_pyr_shd.g_old_rec.attribute19, hr_api.g_VARCHAR2) <>
885 NVL(p_rec.attribute19, hr_api.g_VARCHAR2) or
886 NVL(pay_pyr_shd.g_old_rec.attribute20, hr_api.g_VARCHAR2) <>
887 NVL(p_rec.attribute20, hr_api.g_VARCHAR2) ))
888 or (p_rec.rate_id IS NULL) THEN
889 --
890 -- Only execute the validation IF absolutely necessary:
891 -- a) During update, the structure column value or any
892 -- of the attribute values have actually changed.
893 -- b) During insert.
894 --
895 hr_dflex_utility.ins_or_upd_descflex_attribs
896 (p_appl_short_name => 'PAY'
897 ,p_descflex_name => 'PAY_RATES'
898 ,p_attribute_category => p_rec.attribute_category
899 ,p_attribute1_name => 'ATTRIBUTE1'
900 ,p_attribute1_value => p_rec.attribute1
901 ,p_attribute2_name => 'ATTRIBUTE2'
902 ,p_attribute2_value => p_rec.attribute2
903 ,p_attribute3_name => 'ATTRIBUTE3'
904 ,p_attribute3_value => p_rec.attribute3
905 ,p_attribute4_name => 'ATTRIBUTE4'
906 ,p_attribute4_value => p_rec.attribute4
907 ,p_attribute5_name => 'ATTRIBUTE5'
908 ,p_attribute5_value => p_rec.attribute5
909 ,p_attribute6_name => 'ATTRIBUTE6'
910 ,p_attribute6_value => p_rec.attribute6
911 ,p_attribute7_name => 'ATTRIBUTE7'
912 ,p_attribute7_value => p_rec.attribute7
913 ,p_attribute8_name => 'ATTRIBUTE8'
914 ,p_attribute8_value => p_rec.attribute8
915 ,p_attribute9_name => 'ATTRIBUTE9'
916 ,p_attribute9_value => p_rec.attribute9
917 ,p_attribute10_name => 'ATTRIBUTE10'
918 ,p_attribute10_value => p_rec.attribute10
919 ,p_attribute11_name => 'ATTRIBUTE11'
920 ,p_attribute11_value => p_rec.attribute11
921 ,p_attribute12_name => 'ATTRIBUTE12'
922 ,p_attribute12_value => p_rec.attribute12
923 ,p_attribute13_name => 'ATTRIBUTE13'
924 ,p_attribute13_value => p_rec.attribute13
925 ,p_attribute14_name => 'ATTRIBUTE14'
926 ,p_attribute14_value => p_rec.attribute14
927 ,p_attribute15_name => 'ATTRIBUTE15'
928 ,p_attribute15_value => p_rec.attribute15
929 ,p_attribute16_name => 'ATTRIBUTE16'
930 ,p_attribute16_value => p_rec.attribute16
931 ,p_attribute17_name => 'ATTRIBUTE17'
932 ,p_attribute17_value => p_rec.attribute17
933 ,p_attribute18_name => 'ATTRIBUTE18'
937 ,p_attribute20_name => 'ATTRIBUTE20'
934 ,p_attribute18_value => p_rec.attribute18
935 ,p_attribute19_name => 'ATTRIBUTE19'
936 ,p_attribute19_value => p_rec.attribute19
938 ,p_attribute20_value => p_rec.attribute20
939 );
940 END IF;
941 --
942 hr_utility.set_location(' Leaving:'||l_proc,20);
943 END chk_df;
944 --
945 -- ----------------------------------------------------------------------------
946 -- |-----------------------< chk_non_updateable_args >------------------------|
947 -- ----------------------------------------------------------------------------
948 -- {Start Of Comments}
949 --
950 -- Description:
951 -- This procedure IS used to ensure that non updateable attributes have
952 -- not been updated. IF an attribute has been updated an error IS generated.
953 --
954 -- Pre Conditions:
955 -- g_old_rec has been populated with details of the values currently IN
956 -- the database.
957 --
958 -- In Arguments:
959 -- p_rec has been populated with the updated values the user would like the
960 -- record set to.
961 --
962 -- Post Success:
963 -- Processing continues IF all the non updateable attributes have not
964 -- changed.
965 --
966 -- Post Failure:
967 -- An application error IS raised IF any of the non updatable attributes
968 -- have been altered.
969 --
970 -- {END OfComments}
971 -- ----------------------------------------------------------------------------
972 PROCEDURE chk_non_updateable_args
973 (p_effective_date IN DATE
974 ,p_rec IN pay_pyr_shd.g_rec_type
975 ) IS
976 --
977 l_proc VARCHAR2(72) := g_package || 'chk_non_updateable_args';
978 l_error EXCEPTION;
979 l_argument VARCHAR2(30);
980 --
981 BEGIN
982 --
983 hr_utility.set_location('Entering:'||l_proc, 10);
984 --
985 -- Only proceed with the validation IF a row exists for the current
986 -- record IN the HR Schema.
987 --
988 IF NOT pay_pyr_shd.api_updating
989 (p_rate_id => p_rec.rate_id
990 ,p_object_version_number => p_rec.object_version_number
991 ) THEN
992 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
993 fnd_message.set_token('PROCEDURE ', l_proc);
994 fnd_message.set_token('STEP ', '5');
995 fnd_message.raise_error;
996 END IF;
997 --
998 hr_utility.set_location(l_proc,20);
999 --
1000 IF nvl(p_rec.business_group_id, hr_api.g_number) <>
1001 nvl(pay_pyr_shd.g_old_rec.business_group_id,hr_api.g_number) THEN
1002 --
1003 l_argument := 'business_group_id';
1004 RAISE l_error;
1005 --
1006 END IF;
1007 --
1008 hr_utility.set_location('Leaving :'||l_proc,999);
1009 --
1010 EXCEPTION
1011 WHEN l_error THEN
1012 --
1013 hr_api.argument_changed_error
1014 (p_api_name => l_proc
1015 ,p_argument => l_argument);
1016 --
1017 WHEN OTHERS THEN
1018 --
1019 RAISE;
1020 --
1021 END chk_non_updateable_args;
1022 --
1023 -- ----------------------------------------------------------------------------
1024 -- |---------------------------< insert_validate >----------------------------|
1025 -- ----------------------------------------------------------------------------
1026 PROCEDURE insert_validate
1027 (p_effective_date IN DATE
1028 ,p_rec IN pay_pyr_shd.g_rec_type
1029 ) IS
1030 --
1031 l_proc VARCHAR2(72) := g_package||'insert_validate';
1032 --
1033 BEGIN
1034 hr_utility.set_location('Entering:'||l_proc, 10);
1035 --
1036 -- Call all supporting business operations
1037 --
1038 hr_api.validate_bus_grp_id
1039 (p_business_group_id => p_rec.business_group_id
1040 ,p_associated_column1 => pay_pyr_shd.g_tab_nam
1041 || '.BUSINESS_GROUP_ID');
1042 --
1043 -- After validating the set of important attributes,
1044 -- IF Multiple Message detection IS enabled AND at least
1045 -- one error has been found THEN abort further validation.
1046 --
1047 hr_multi_message.end_validation_set;
1048 --
1049 hr_utility.set_location(l_proc,20);
1050 --
1051 -- Validate Dependent Attributes
1052 --
1053 pay_pyr_bus.chk_parent_spine_id
1054 (p_parent_spine_id => p_rec.parent_spine_id
1055 ,p_rate_id => p_rec.rate_id
1056 ,p_object_version_number => p_rec.object_version_number);
1057 --
1058 hr_utility.set_location(l_proc,30);
1059 --
1060 pay_pyr_bus.chk_rate_type
1061 (p_rate_type => p_rec.rate_type
1062 ,p_effective_date => p_effective_date
1063 ,p_rate_id => p_rec.rate_id
1064 ,p_object_version_number => p_rec.object_version_number);
1065 --
1066 hr_utility.set_location(l_proc,40);
1067 --
1068 pay_pyr_bus.chk_rate_uom
1069 (p_rate_uom => p_rec.rate_uom
1070 ,p_effective_date => p_effective_date
1071 ,p_rate_id => p_rec.rate_id
1072 ,p_object_version_number => p_rec.object_version_number);
1073 --
1074 hr_utility.set_location(l_proc,50);
1075 --
1076 pay_pyr_bus.chk_rate_basis
1077 (p_rate_basis => p_rec.rate_basis
1078 ,p_effective_date => p_effective_date
1079 ,p_rate_id => p_rec.rate_id
1080 ,p_object_version_number => p_rec.object_version_number);
1081 --
1082 hr_utility.set_location(l_proc,60);
1083 --
1084 pay_pyr_bus.chk_name
1085 (p_name => p_rec.name
1086 ,p_rate_id => p_rec.rate_id
1094 pay_pyr_bus.chk_field_combinations
1087 ,p_business_group_id => p_rec.business_group_id
1088 ,p_object_version_number => p_rec.object_version_number
1089 ,p_rate_type => p_rec.rate_type
1090 ,p_asg_rate_type => p_rec.asg_rate_type);
1091 --
1092 hr_utility.set_location(l_proc,70);
1093 --
1095 (p_rate_type => p_rec.rate_type
1096 ,p_rate_uom => p_rec.rate_uom
1097 ,p_rate_basis => p_rec.rate_basis
1098 ,p_parent_spine_id => p_rec.parent_spine_id
1099 ,p_asg_rate_type => p_rec.asg_rate_type);
1100 --
1101 hr_utility.set_location(l_proc,80);
1102 --
1103 pay_pyr_bus.chk_asg_rate_type
1104 (p_rate_id => p_rec.rate_id
1105 ,p_object_version_number => p_rec.object_version_number
1106 ,p_effective_date => p_effective_date
1107 ,p_asg_rate_type => p_rec.asg_rate_type
1108 ,p_rate_type => p_rec.rate_type
1109 );
1110 --
1111 hr_utility.set_location(l_proc,90);
1112 --
1113 pay_pyr_bus.chk_df(p_rec);
1114 --
1115 hr_utility.set_location(' Leaving:'||l_proc, 999);
1116 --
1117 END insert_validate;
1118 --
1119 -- ----------------------------------------------------------------------------
1123 (p_effective_date IN DATE
1120 -- |---------------------------< update_validate >----------------------------|
1121 -- ----------------------------------------------------------------------------
1122 PROCEDURE update_validate
1124 ,p_rec IN pay_pyr_shd.g_rec_type
1125 ) IS
1126 --
1127 l_proc VARCHAR2(72) := g_package||'update_validate';
1128 --
1129 BEGIN
1130 --
1131 hr_utility.set_location('Entering:'||l_proc, 10);
1132 --
1133 -- Call all supporting business operations
1137 ,p_associated_column1 => pay_pyr_shd.g_tab_nam
1134 --
1135 hr_api.validate_bus_grp_id
1136 (p_business_group_id => p_rec.business_group_id
1138 || '.BUSINESS_GROUP_ID');
1139 --
1140 -- After validating the set of important attributes,
1141 -- IF Multiple Message detection IS enabled AND at least
1142 -- one error has been found THEN abort further validation.
1143 --
1144 hr_multi_message.end_validation_set;
1145 --
1146 hr_utility.set_location(l_proc,20);
1147 --
1148 -- Validate Dependent Attributes
1149 --
1150 chk_non_updateable_args
1151 (p_effective_date => p_effective_date
1152 ,p_rec => p_rec );
1153 --
1154 hr_utility.set_location(l_proc,30);
1155 --
1156 -- Validate Dependent Attributes
1157 --
1158 pay_pyr_bus.chk_parent_spine_id
1159 (p_parent_spine_id => p_rec.parent_spine_id
1160 ,p_rate_id => p_rec.rate_id
1161 ,p_object_version_number => p_rec.object_version_number);
1162 --
1163 hr_utility.set_location(l_proc,40);
1164 --
1165 pay_pyr_bus.chk_rate_type
1166 (p_rate_type => p_rec.rate_type
1167 ,p_effective_date => p_effective_date
1168 ,p_rate_id => p_rec.rate_id
1169 ,p_object_version_number => p_rec.object_version_number);
1170 --
1171 hr_utility.set_location(l_proc,50);
1172 --
1173 pay_pyr_bus.chk_rate_uom
1174 (p_rate_uom => p_rec.rate_uom
1175 ,p_effective_date => p_effective_date
1176 ,p_rate_id => p_rec.rate_id
1177 ,p_object_version_number => p_rec.object_version_number);
1178 --
1179 hr_utility.set_location(l_proc,60);
1180 --
1181 pay_pyr_bus.chk_rate_basis
1182 (p_rate_basis => p_rec.rate_basis
1183 ,p_effective_date => p_effective_date
1184 ,p_rate_id => p_rec.rate_id
1185 ,p_object_version_number => p_rec.object_version_number);
1186 --
1187 hr_utility.set_location(l_proc,70);
1188 --
1189 pay_pyr_bus.chk_name
1190 (p_name => p_rec.name
1191 ,p_rate_id => p_rec.rate_id
1192 ,p_business_group_id => p_rec.business_group_id
1193 ,p_object_version_number => p_rec.object_version_number
1194 ,p_rate_type => p_rec.rate_type
1195 ,p_asg_rate_type => p_rec.asg_rate_type);
1196 --
1197 hr_utility.set_location(l_proc,80);
1198 --
1199 pay_pyr_bus.chk_field_combinations
1200 (p_rate_type => p_rec.rate_type
1201 ,p_rate_uom => p_rec.rate_uom
1202 ,p_rate_basis => p_rec.rate_basis
1203 ,p_parent_spine_id => p_rec.parent_spine_id
1204 ,p_asg_rate_type => p_rec.asg_rate_type);
1205 --
1206 hr_utility.set_location(l_proc,90);
1207 --
1208 pay_pyr_bus.chk_asg_rate_type
1209 (p_rate_id => p_rec.rate_id
1210 ,p_object_version_number => p_rec.object_version_number
1211 ,p_effective_date => p_effective_date
1212 ,p_asg_rate_type => p_rec.asg_rate_type
1213 ,p_rate_type => p_rec.rate_type
1214 );
1215 --
1219 --
1216 hr_utility.set_location(l_proc,100);
1217 --
1218 pay_pyr_bus.chk_df(p_rec);
1220 hr_utility.set_location(' Leaving:'||l_proc, 999);
1221 --
1222 END update_validate;
1223 --
1224 -- ----------------------------------------------------------------------------
1225 -- |---------------------------< delete_validate >----------------------------|
1226 -- ----------------------------------------------------------------------------
1227 PROCEDURE delete_validate
1228 (p_rec IN pay_pyr_shd.g_rec_type
1229 ) IS
1230 --
1231 l_proc VARCHAR2(72) := g_package||'delete_validate';
1232 --
1233 BEGIN
1234 hr_utility.set_location('Entering:'||l_proc, 5);
1235 --
1236 pay_pyr_bus.chk_for_child_records
1237 (p_rate_id => p_rec.rate_id
1238 ,p_rate_type => p_rec.rate_type);
1239 --
1240 hr_utility.set_location(' Leaving:'||l_proc, 10);
1241 END delete_validate;
1242 --
1243 END pay_pyr_bus;