1 Package Body hxc_has_bus as
2 /* $Header: hxchasrhi.pkb 120.5 2006/06/11 12:53:42 gsirigin noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hxc_has_bus.'; -- Global package name
9 g_debug boolean :=hr_utility.debug_enabled;
10 --
11 -- The following two global variables are only to be
12 -- used by the return_legislation_code function.
13 --
14 g_legislation_code varchar2(150) default null;
15 g_approval_style_id number default null;
16 --
17 -- ---------------------------------------------------------------------------
18 -- |----------------------< set_security_group_id >--------------------------|
19 -- ---------------------------------------------------------------------------
20 --
21 Procedure set_security_group_id
22 (p_approval_style_id in number
23 ) is
24 --
25 -- Declare cursor
26 --
27 -- EDIT_HERE In the following cursor statement add join(s) between
28 -- hxc_approval_styles and PER_BUSINESS_GROUPS
29 -- so that the security_group_id for
30 -- the current business group context can be derived.
31 -- Remove this comment when the edit has been completed.
32 cursor csr_sec_grp is
33 select pbg.security_group_id
34 from per_business_groups pbg
35 , hxc_approval_styles has
36 -- , EDIT_HERE table_name(s) 333
37 where has.approval_style_id = p_approval_style_id;
38 -- and pbg.business_group_id = EDIT_HERE 333.business_group_id;
39 --
40 -- Declare local variables
41 --
42 l_security_group_id number;
43 l_proc varchar2(72);
44 --
45 begin
46 --
47 g_debug:=hr_utility.debug_enabled;
48 if g_debug then
49 l_proc := g_package||'set_security_group_id';
50 hr_utility.set_location('Entering:'|| l_proc, 10);
51 end if;
52 --
53 -- Ensure that all the mandatory parameter are not null
54 --
55 hr_api.mandatory_arg_error
56 (p_api_name => l_proc
57 ,p_argument => 'approval_style_id'
58 ,p_argument_value => p_approval_style_id
59 );
60 --
61 open csr_sec_grp;
62 fetch csr_sec_grp into l_security_group_id;
63 --
64 if csr_sec_grp%notfound then
65 --
66 close csr_sec_grp;
67 --
68 -- The primary key is invalid therefore we must error
69 --
70 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
71 fnd_message.raise_error;
72 --
73 end if;
74 close csr_sec_grp;
75 --
76 -- Set the security_group_id in CLIENT_INFO
77 --
78 hr_api.set_security_group_id
79 (p_security_group_id => l_security_group_id
80 );
81 --
82 if g_debug then
83 hr_utility.set_location(' Leaving:'|| l_proc, 20);
84 end if;
85 --
86 end set_security_group_id;
87 --
88 -- ---------------------------------------------------------------------------
89 -- |---------------------< return_legislation_code >-------------------------|
90 -- ---------------------------------------------------------------------------
91 --
92 Function return_legislation_code
93 (p_approval_style_id in number
94 )
95 Return Varchar2 Is
96 --
97 -- Declare cursor
98 --
99 -- EDIT_HERE In the following cursor statement add join(s) between
100 -- hxc_approval_styles and PER_BUSINESS_GROUPS
101 -- so that the legislation_code for
102 -- the current business group context can be derived.
103 -- Remove this comment when the edit has been completed.
104 cursor csr_leg_code is
105 select pbg.legislation_code
106 from per_business_groups pbg
107 , hxc_approval_styles has
108 -- , EDIT_HERE table_name(s) 333
109 where has.approval_style_id = p_approval_style_id;
110 -- and pbg.business_group_id = EDIT_HERE 333.business_group_id;
111 --
112 -- Declare local variables
113 --
114 l_legislation_code varchar2(150);
115 l_proc varchar2(72);
116 --
117 Begin
118 --
119 g_debug:=hr_utility.debug_enabled;
120 if g_debug then
121 l_proc := g_package||'return_legislation_code';
122 hr_utility.set_location('Entering:'|| l_proc, 10);
123 end if;
124 --
125 -- Ensure that all the mandatory parameter are not null
126 --
127 hr_api.mandatory_arg_error
128 (p_api_name => l_proc
129 ,p_argument => 'approval_style_id'
130 ,p_argument_value => p_approval_style_id
131 );
132 --
133 if ( nvl(hxc_has_bus.g_approval_style_id, hr_api.g_number)
134 = p_approval_style_id) then
135 --
136 -- The legislation code has already been found with a previous
137 -- call to this function. Just return the value in the global
138 -- variable.
139 --
140 l_legislation_code := hxc_has_bus.g_legislation_code;
141 if g_debug then
142 hr_utility.set_location(l_proc, 20);
143 end if;
144 else
145 --
146 -- The ID is different to the last call to this function
147 -- or this is the first call to this function.
148 --
149 open csr_leg_code;
150 fetch csr_leg_code into l_legislation_code;
151 --
152 if csr_leg_code%notfound then
153 --
154 -- The primary key is invalid therefore we must error
155 --
156 close csr_leg_code;
157 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
158 fnd_message.raise_error;
159 end if;
160 if g_debug then
161 hr_utility.set_location(l_proc,30);
162 end if;
163 --
164 -- Set the global variables so the values are
165 -- available for the next call to this function.
166 --
167 close csr_leg_code;
168 hxc_has_bus.g_approval_style_id := p_approval_style_id;
169 hxc_has_bus.g_legislation_code := l_legislation_code;
170 end if;
171 if g_debug then
172 hr_utility.set_location(' Leaving:'|| l_proc, 40);
173 end if;
174 return l_legislation_code;
175 end return_legislation_code;
176 --
177 -- ----------------------------------------------------------------------------
178 -- |-----------------------< chk_non_updateable_args >------------------------|
179 -- ----------------------------------------------------------------------------
180 -- {Start Of Comments}
181 --
182 -- Description:
183 -- This procedure is used to ensure that non updateable attributes have
184 -- not been updated. If an attribute has been updated an error is generated.
185 --
186 -- Pre Conditions:
187 -- g_old_rec has been populated with details of the values currently in
188 -- the database.
189 --
190 -- In Arguments:
191 -- p_rec has been populated with the updated values the user would like the
192 -- record set to.
193 --
194 -- Post Success:
195 -- Processing continues if all the non updateable attributes have not
196 -- changed.
197 --
198 -- Post Failure:
199 -- An application error is raised if any of the non updatable attributes
200 -- have been altered.
201 --
202 -- {End Of Comments}
203 -- ----------------------------------------------------------------------------
204 Procedure chk_non_updateable_args
205 (p_rec in hxc_has_shd.g_rec_type
206 ) IS
207 --
208 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
209 l_error EXCEPTION;
210 l_argument varchar2(30);
211 --
212 Begin
213 --
214 -- Only proceed with the validation if a row exists for the current
215 -- record in the HR Schema.
216 --
217 IF NOT hxc_has_shd.api_updating
218 (p_approval_style_id => p_rec.approval_style_id
219 ,p_object_version_number => p_rec.object_version_number
220 ) THEN
221 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
222 fnd_message.set_token('PROCEDURE ', l_proc);
223 fnd_message.set_token('STEP ', '5');
224 fnd_message.raise_error;
225 END IF;
226 --
227 -- EDIT_HERE: Add checks to ensure non-updateable args have
228 -- not been updated.
229 --
230 EXCEPTION
231 WHEN l_error THEN
232 hr_api.argument_changed_error
233 (p_api_name => l_proc
234 ,p_argument => l_argument);
235 WHEN OTHERS THEN
236 RAISE;
237 End chk_non_updateable_args;
238 --
239 -- ----------------------------------------------------------------------------
240 -- |-----------------------------< chk_name >---------------------------------|
241 -- ----------------------------------------------------------------------------
242 -- {Start Of Comments}
243 --
244 -- Description:
245 -- This procedure ensures that a valid and a unique Approval style name
246 -- has been entered
247 --
248 -- Pre Conditions:
249 -- None
250 --
251 -- In Arguments:
252 -- name
253 -- object_version_number
254 --
255 -- Post Success:
256 -- Processing continues if a valid and a unique name has been entered
257 --
258 -- Post Failure:
259 -- An application error is raised if the name is not valid
260 --
261 -- {End Of Comments}
262 -- ----------------------------------------------------------------------------
263 Procedure chk_name
264 (
265 p_name in hxc_approval_styles.name%TYPE,
266 p_object_version_number in hxc_approval_styles.object_version_number%TYPE
267 ) IS
268 --
269 l_proc varchar2(72);
270 --
271 -- cursor to check that a duplicate approval period style name is not entered
272 --
273
274
275 CURSOR csr_chk_name IS
276 SELECT 'error'
277 FROM sys.dual
278 WHERE EXISTS (
279 SELECT 'x'
280 FROM hxc_approval_styles has
281 WHERE has.name = p_name
282 AND has.object_version_number <>
283 decode(created_by,
284 2, (NVL(decode(p_object_version_number, 1, null, p_object_version_number),-1)),
285 (NVL(p_object_version_number, -1))
286 ) ); /* For Bug: 4589073 */
287 --
288 l_error varchar2(5) := NULL;
289 --
290 BEGIN
291 g_debug:=hr_utility.debug_enabled;
292 if g_debug then
293 l_proc := g_package||'chk_name';
294 hr_utility.set_location('Entering:'||l_proc, 5);
295 end if;
296 --
297 -- Raise error if name is NULL as it is a mandatory field.
298 --
299 IF p_name IS NULL
300 THEN
301 --
302 hr_utility.set_message(809, 'HXC_0150_HAS_APR_STL_NAME_MAND');
303 hr_utility.raise_error;
304 --
305 END IF;
306 if g_debug then
307 hr_utility.set_location('Processing:'||l_proc, 10);
308 end if;
309 --
310 -- Raise an error if the approval style name is not unique
311 --
312 OPEN csr_chk_name;
313 FETCH csr_chk_name INTO l_error;
314 CLOSE csr_chk_name;
315 --
316 IF l_error IS NOT NULL
317 THEN
318 --
319 hr_utility.set_message(809, 'HXC_0151_HAS_DUP_APR_STL');
320 hr_utility.raise_error;
321 --
322 END IF;
323 --
324 if g_debug then
325 hr_utility.set_location('Leaving:'||l_proc, 20);
326 end if;
327 --
328 END chk_name;
329 --
330 -- ----------------------------------------------------------------------------
331 -- |-----------------------< chk_delete >-------------------------------------|
332 -- ----------------------------------------------------------------------------
333 -- {Start Of Comments}
334 --
335 -- Description:
336 -- This procedure carries out delete time refential integrity checks
337 --
338 -- Pre Conditions:
339 -- None
340 --
341 -- In Arguments:
342 -- approval_style_id
343 --
344 -- Post Success:
345 -- Processing continues if the approval style name is not being referenced
346 --
347 -- Post Failure:
348 -- An application error is raised if the approval style is being used.
349 --
350 -- {End Of Comments}
351 -- ----------------------------------------------------------------------------
352 Procedure chk_delete
353 (
354 p_approval_style_id in hxc_approval_styles.approval_style_id%TYPE
355 ) IS
356 --
357 l_proc varchar2(72);
358 --
359 --CURSOR csr_chk_hrr IS
360 --SELECT 'exists'
361 --FROM hxc_resource_rules
362 --WHERE data_type_id = p_approval_style_id;
363 --
364 /*
365 CURSOR csr_chk_hph IS
366 SELECT 'exists'
367 FROM hxc_pref_hierarchies
368 WHERE attribute_category = 'TS_PER_APPROVAL_STYLE'
369 AND attribute1 = p_approval_style_id;
370 */
371 --
372 l_exists_attribute1 VARCHAR2(6) := NULL;
373 l_exists_attribute2 VARCHAR2(6) := NULL;
374 --
375 BEGIN
376 g_debug:=hr_utility.debug_enabled;
377 if g_debug then
378 l_proc := g_package||'chk_delete';
379 hr_utility.set_location('Entering:'||l_proc, 5);
380 end if;
381 --
382 -- check that approval style is not being used
383 --
384 /*OPEN csr_chk_hph;
385 FETCH csr_chk_hph INTO l_exists;
386 CLOSE csr_chk_hph;*/
387 if g_debug then
388 hr_utility.set_location('Calling num_hierarchy_occurances: '||l_proc, 10);
389 end if;
390 l_exists_attribute1 := HXC_PREFERENCE_EVALUATION.num_hierarchy_occurances
391 ('TS_PER_APPROVAL_STYLE'
392 ,1
393 ,TO_CHAR(p_approval_style_id));
394 l_exists_attribute2 := HXC_PREFERENCE_EVALUATION.num_hierarchy_occurances
395 ('TS_PER_APPROVAL_STYLE'
396 ,2
397 ,TO_CHAR(p_approval_style_id));
398 if g_debug then
399 hr_utility.set_location('After calling num_hierarchy_occurances:'||l_proc,20);
400 end if;
401 --
402 if g_debug then
403 hr_utility.set_location('Processing: '||l_proc, 10);
404 end if;
405 --
406 IF l_exists_attribute1 <> 0 or l_exists_attribute2 <> 0 THEN
407 --
408 hr_utility.set_message(809, 'HXC_366240_APS_IN_PREF');
409 hr_utility.raise_error;
410 --
411 END IF;
412 --
413 if g_debug then
414 hr_utility.set_location('Entering:'||l_proc, 5);
415 end if;
416 --
417 END chk_delete;
418 --
419 -- -----------------------------------------------------------------
420 -- |-----------------------< chk_legislation_code >----------------|
421 -- -----------------------------------------------------------------
422 --
423 -- Description:
424 -- Validate the legislation_code against the FND_TERRITORIES table.
425 --
426 -- Pre-Requisites:
427 -- None
428 --
429 -- In Parameters:
430 -- p_legislation_code
431 --
432 -- Post Success:
433 -- Processing continues if the legislation_code is valid.
434 --
435 -- Post Failure:
436 -- An application error is raised and processing is terminated if
437 -- the legislation_code is invalid.
438 --
439 -- Access Status:
440 -- Internal Row Handler Use Only.
441 --
442 Procedure chk_legislation_code
443 (p_business_group_id in number,
444 p_legislation_code in varchar2
445 ) is
446 --
447 -- Local declarations
448 l_proc varchar2(72);
449 l_territory_code fnd_territories.territory_code%TYPE;
450 l_lc per_business_groups.legislation_code%TYPE;
451 --
452 -- Setup cursor for valid legislation code check
453 cursor csr_valid_legislation_code is
454 select territory_code
455 from fnd_territories ft
456 where ft.territory_code = p_legislation_code;
457
458 -- Setup cursor for valid legislation code for a particular business_group
459 cursor csr_valid_bg_lc is
460 select legislation_code
461 from per_business_groups pbg
462 where pbg.business_group_id = p_business_group_id
463 and pbg.legislation_code = p_legislation_code;
464
465 --
466 --
467 begin
468 g_debug:=hr_utility.debug_enabled;
469 if g_debug then
470 l_proc := g_package||'chk_legislation_code';
471 hr_utility.set_location('Entering: '||l_proc,5);
472 end if;
473 --------------------------------
474 -- Check legislation code is valid --
475 --------------------------------
476 if p_legislation_code is not null then
477
478 open csr_valid_legislation_code;
479 fetch csr_valid_legislation_code into l_territory_code;
480 if csr_valid_legislation_code%notfound then
481 close csr_valid_legislation_code;
482 hr_utility.set_message(800,'PER_52123_AMD_LEG_CODE_INV');
483 hr_utility.raise_error;
484 end if; -- End cursor if
485 close csr_valid_legislation_code;
486
487 if p_business_group_id is not null then
488 open csr_valid_bg_lc;
489 fetch csr_valid_bg_lc into l_lc;
490 if csr_valid_bg_lc%notfound then
491 close csr_valid_bg_lc;
492 hr_utility.set_message(800,'PER_52123_AMD_LEG_CODE_INV');
493 hr_utility.raise_error;
494 end if; -- End cursor if
495 close csr_valid_bg_lc;
496 end if;
497
498 end if; -- end check
499
500 if g_debug then
501 hr_utility.set_location('Leaving: '||l_proc,10);
502 end if;
503 end chk_legislation_code;
504 --
505 -- -------------------------------------------------------------------------
506 -- -----------------------------<chk_run_recipient_extensions>-------------|
507 -- -------------------------------------------------------------------------
508 --
509 --
510 -- Description:
511 -- Validates if the value entered for run_recipient_extensionsis null, 'Y' or 'N'.
512 -- Throws an error if the value does not belong to this list.
513 --
514 -- Pre-Requisites:
515 -- None
516 --
517 -- In Parameters:
518 -- p_run_recipient_extensions
519 --
520 -- Post Success:
521 -- Processing continues if the run_recipient_extensions is valid.
522 --
523 -- Post Failure:
524 -- An application error is raised and processing is terminated if
525 -- the run_recipient_extensions is invalid.
526 --
527 -- Access Status:
528 -- Internal Row Handler Use Only.
529 --
530 Procedure chk_run_recipient_extensions
531 (
532 p_run_recipient_extensions in hxc_approval_styles.run_recipient_extensions%TYPE
533 ) IS
534 Begin
535 IF not(p_run_recipient_extensions IS NULL OR p_run_recipient_extensions IN ('Y','N'))
536 THEN
537 hr_utility.set_message(809,'HXC_VALUE_RECIPIENT_EXTENSIONS');
538 hr_utility.raise_error;
539 END IF;
540 END chk_run_recipient_extensions;
541 --
542 -- -------------------------------------------------------------------------
543 -- -----------------------------<chk_admin_role>----------------------------|
544 -- -------------------------------------------------------------------------
545 --
546 --
547 -- Description:
548 -- Validate the admin_role is either null or present in WF_LOCAL_ROLES table.
549 --
550 -- Pre-Requisites:
551 -- None
552 --
553 -- In Parameters:
554 -- p_admin_role
555 --
556 -- Post Success:
557 -- Processing continues if the p_admin_role is valid.
558 --
559 -- Post Failure:
560 -- An application error is raised and processing is terminated if
561 -- the p_admin_role is invalid.
562 --
563 -- Access Status:
564 -- Internal Row Handler Use Only.
565 --
566 Procedure chk_admin_role
567 (
568 p_admin_role in hxc_approval_styles.admin_role%TYPE
569 ) IS
570 l_admin_role varchar2(1):=null;
571 cursor crs_admin_role is select 'Y' from wf_local_roles where name=p_admin_role;
572 begin
573 open crs_admin_role;
574 fetch crs_admin_role into l_admin_role;
575 IF NOT(p_admin_role IS NULL OR crs_admin_role%found)
576 THEN
577 hr_utility.set_message(809,'HXC_ADMIN_ROLE');
578 hr_utility.raise_error;
579 END IF;
580 close crs_admin_role;
581 END chk_admin_role;
582 --
583 -- -------------------------------------------------------------------------
584 -- -----------------------------<chk_error_admin_role>---------------------|
585 -- -------------------------------------------------------------------------
586 --
587 --
588 -- Description:
589 -- Validate the error_admin_role is either null or present in WF_LOCAL_ROLES table.
590 --
591 -- Pre-Requisites:
592 -- None
593 --
594 -- In Parameters:
595 -- p_error_admin_role
596 --
597 -- Post Success:
598 -- Processing continues if the p_error_admin_role is valid.
599 --
600 -- Post Failure:
601 -- An application error is raised and processing is terminated if
602 -- the p_error_admin_role is invalid.
603 --
604 -- Access Status:
605 -- Internal Row Handler Use Only.
606 --
607 Procedure chk_error_admin_role
608 (
609 p_error_admin_role in hxc_approval_styles.error_admin_role%TYPE
610 ) IS
611 l_error_admin_role varchar2(1):=null;
612 cursor crs_error_admin_role is select 'Y' from wf_local_roles where name=p_error_admin_role;
613 begin
614 open crs_error_admin_role;
615 fetch crs_error_admin_role into l_error_admin_role;
616 IF NOT(p_error_admin_role IS NULL OR crs_error_admin_role%found)
617 THEN
618 hr_utility.set_message(809,'HXC_ERROR_ADMIN_ROLE');
619 hr_utility.raise_error;
620 END IF;
621 close crs_error_admin_role;
622 END chk_error_admin_role;
623
624 --
625 -- ----------------------------------------------------------------------------
626 -- |---------------------------< insert_validate >----------------------------|
627 -- ----------------------------------------------------------------------------
628 Procedure insert_validate
629 (p_rec in hxc_has_shd.g_rec_type
630 ) is
631 --
632 l_proc varchar2(72);
633 --
634 Begin
635 g_debug:=hr_utility.debug_enabled;
636 if g_debug then
637 l_proc := g_package||'insert_validate';
638 hr_utility.set_location('Entering:'||l_proc, 5);
639 end if;
640 --
641 -- Call all supporting business operations
642 --
643 if g_debug then
644 hr_utility.set_location('Processing:'||l_proc, 10);
645 end if;
646 --
647 chk_name ( p_name => p_rec.name,
648 p_object_version_number => p_rec.object_version_number );
649 --
650 if g_debug then
651 hr_utility.set_location(' Leaving:'||l_proc, 10);
652 end if;
653 --
654 if p_rec.business_group_id is not null then
655 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
656 end if;
657 -- Validate the legislation_code
658 chk_legislation_code
659 (p_business_group_id => p_rec.business_group_id,
660 p_legislation_code => p_rec.legislation_code);
661 --Validate run_recipient_extensions
662 chk_run_recipient_extensions
663 (p_run_recipient_extensions => p_rec.run_recipient_extensions);
664 --Validate admin_role
665 chk_admin_role
666 (p_admin_role => p_rec.admin_role);
667 --Validate error_admin_role
668 chk_error_admin_role
669 (p_error_admin_role => p_rec.error_admin_role);
670 --
671 --
672 --
673 -- EDIT_HERE: As this table does not have a mandatory business_group_id
674 -- column, ensure client_info is populated by calling a suitable
675 -- ???_???_bus.set_security_group_id procedure, or add one of the following
676 -- comments:
677 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
678 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
679 --
680 --
681 if g_debug then
682 hr_utility.set_location(' Leaving:'||l_proc, 10);
683 end if;
684 End insert_validate;
685 --
686 -- ----------------------------------------------------------------------------
687 -- |---------------------------< update_validate >----------------------------|
688 -- ----------------------------------------------------------------------------
689 Procedure update_validate
690 (p_rec in hxc_has_shd.g_rec_type
691 ) is
692 --
693 l_proc varchar2(72);
694 --
695 Begin
696 g_debug:=hr_utility.debug_enabled;
697 if g_debug then
698 l_proc := g_package||'update_validate';
699 hr_utility.set_location('Entering:'||l_proc, 5);
700 end if;
701 --
702 -- Call all supporting business operations
703 --
704 if g_debug then
705 hr_utility.set_location('Processing:'||l_proc, 10);
706 end if;
707 --
708 chk_name ( p_name => p_rec.name,
709 p_object_version_number => p_rec.object_version_number );
710 --
711 if g_debug then
712 hr_utility.set_location(' Leaving:'||l_proc, 10);
713 end if;
714 --
715 --
716 -- EDIT_HERE: As this table does not have a mandatory business_group_id
717 -- column, ensure client_info is populated by calling a suitable
718 -- ???_???_bus.set_security_group_id procedure, or add one of the following
719 -- comments:
720 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
721 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
722 --
723 chk_non_updateable_args
724 (p_rec => p_rec
725 );
726 --
727 --
728 if p_rec.business_group_id is not null then
729 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
730 end if;
731 -- Validate the legislation_code
732 chk_legislation_code
733 (p_business_group_id => p_rec.business_group_id,
734 p_legislation_code => p_rec.legislation_code);
735 --
736 --
737 --Validate run_recipient_extensions
738 chk_run_recipient_extensions
739 (p_run_recipient_extensions => p_rec.run_recipient_extensions);
740 --Validate admin_role
741 chk_admin_role
742 (p_admin_role => p_rec.admin_role);
743 --Validate error_admin_role
744 chk_error_admin_role
745 (p_error_admin_role => p_rec.error_admin_role);
746 if g_debug then
747 hr_utility.set_location(' Leaving:'||l_proc, 10);
748 end if;
749 End update_validate;
750 --
751 -- ----------------------------------------------------------------------------
752 -- |---------------------------< delete_validate >----------------------------|
753 -- ----------------------------------------------------------------------------
754 Procedure delete_validate
755 (p_rec in hxc_has_shd.g_rec_type
756 ) is
757 --
758 l_proc varchar2(72);
759 --
760 Begin
761 g_debug:=hr_utility.debug_enabled;
762 if g_debug then
763 l_proc := g_package||'delete_validate';
764 hr_utility.set_location('Entering:'||l_proc, 5);
765 end if;
766 --
767 -- Call all supporting business operations
768 --
769 chk_delete
770 (
771 p_approval_style_id => p_rec.approval_style_id
772 );
773 --
774 if g_debug then
775 hr_utility.set_location(' Leaving:'||l_proc, 10);
776 end if;
777 End delete_validate;
778 --
779 end hxc_has_bus;