DBA Data[Home] [Help]

PACKAGE BODY: APPS.HXC_HAD_BUS

Source


1 Package Body hxc_had_bus as
2 /* $Header: hxchadrhi.pkb 120.2.12020000.2 2012/08/27 06:36:28 pravesk ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  hxc_had_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_alias_definition_id         number         default null;
16 --
17 --  ---------------------------------------------------------------------------
18 --  |----------------------< set_security_group_id >--------------------------|
19 --  ---------------------------------------------------------------------------
20 --
21 Procedure set_security_group_id
22   (p_alias_definition_id                  in number
23   ) is
24   --
25   -- Declare cursor
26   --
27   -- EDIT_HERE  In the following cursor statement add join(s) between
28   -- hxc_alias_definitions 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_alias_definitions had
36       --   , EDIT_HERE table_name(s) 333
37      where had.alias_definition_id = p_alias_definition_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           => 'alias_definition_id'
58     ,p_argument_value     => p_alias_definition_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_alias_definition_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_alias_definitions 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_alias_definitions had
108       --   , EDIT_HERE table_name(s) 333
109      where had.alias_definition_id = p_alias_definition_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           => 'alias_definition_id'
130     ,p_argument_value     => p_alias_definition_id
131     );
132   --
133   if ( nvl(hxc_had_bus.g_alias_definition_id, hr_api.g_number)
134        = p_alias_definition_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_had_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_had_bus.g_alias_definition_id := p_alias_definition_id;
169     hxc_had_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_had_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_had_shd.api_updating
218       (p_alias_definition_id                  => p_rec.alias_definition_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 a valid alias definition name
246 --
247 -- Pre Conditions:
248 --   None
249 --
250 -- In Arguments:
251 --   name
252 --   object_version_number
253 --   timecard_field
254 --
255 -- Post Success:
256 --   Processing continues if the alias definition name business rules
257 --   have not been violated
258 --
259 -- Post Failure:
260 --   An application error is raised if the name is not valid
261 --
262 -- {End Of Comments}
263 -- ----------------------------------------------------------------------------
264 Procedure chk_name
265   (
266    p_name       	   in hxc_alias_definitions.alias_definition_name%TYPE
267   ,p_ovn        	   in hxc_alias_definitions.object_version_number%TYPE
268   ,p_alias_definition_id   in hxc_alias_definitions.timecard_field%TYPE
269   ,p_business_group_id     in hxc_alias_definitions.business_group_id%TYPE
270   ) IS
271 --
272   l_proc  varchar2(72);
273 --
274 -- cursor to check alias definition name does not overlap
275 --
276 CURSOR  csr_chk_name IS
277 SELECT 'error'
278 FROM    hxc_alias_definitions had,
279         hxc_alias_definitions_tl hadtl
280 WHERE   hadtl.alias_definition_name = p_name
281 AND	hadtl.alias_definition_id   = had.alias_definition_id
282 and     hadtl.language = USERENV('LANG')
283 AND     had.alias_definition_id   <> NVL(p_alias_definition_id,9.99E125)
284 AND     had.object_version_number <> NVL(p_ovn, -1)
285 AND     had.business_group_id 	  =  p_business_group_id;
286 --
287  l_dup_name varchar2(5) := NULL;
288 --
289 BEGIN
290   g_debug:=hr_utility.debug_enabled;
291   if g_debug then
292 	l_proc := g_package||'chk_name';
293 	hr_utility.set_location('Entering:'||l_proc, 5);
294   end if;
295 --
296 -- check that the name has been entered
297 --
298 IF p_name IS NULL
299 THEN
300 --
301       hr_utility.set_message(809, 'HXC_ALIAS_NAME_DEFN_MAND');
302       hr_utility.raise_error;
303 --
304 END IF;
305 --
306 
307 --IF p_tc_field IS NULL
308 --THEN
309 --
310 --      hr_utility.set_message(809, 'HXC_ALIAS_TC_FIELD_MAND');
311 --      hr_utility.raise_error;
312 --
313 --END IF;
314 
315 --
316   if g_debug then
317 	hr_utility.set_location('Processing:'||l_proc, 10);
318   end if;
319 --
320 -- check that the name is unique
321 --
322   OPEN  csr_chk_name;
323   FETCH csr_chk_name INTO l_dup_name;
324   CLOSE csr_chk_name;
325 --
326 IF l_dup_name IS NOT NULL
327 THEN
328 --
329       hr_utility.set_message(809, 'HXC_ALIAS_NAME_DEFN_UNIQUE');
330       hr_utility.raise_error;
331 --
332 END IF;
333 --
334   if g_debug then
335 	hr_utility.set_location('Leaving:'||l_proc, 20);
336   end if;
337 --
338 END chk_name;
339 --
340 -- ----------------------------------------------------------------------------
341 -- |-----------------------< chk_delete >-------------------------------------|
342 -- ----------------------------------------------------------------------------
343 -- {Start Of Comments}
344 --
345 -- Description:
346 --   This procedure carries out refential integrity checks
347 --
348 -- Pre Conditions:
349 --   None
350 --
351 -- In Arguments:
352 --   alias_definition_id
353 --
354 -- Post Success:
355 --   Processing continues if the Timecard Alias is not being used
356 --
357 -- Post Failure:
358 --   An application error is raised if the Timecard Alias is being used.
359 --
360 -- {End Of Comments}
361 -- ----------------------------------------------------------------------------
362 Procedure chk_delete
363   (
364    p_alias_definition_id in hxc_alias_definitions.alias_definition_id%TYPE
365   ) IS
366 --
367   l_proc  varchar2(72);
368 --
369 --l_exists_attribute1 VARCHAR2(6) := NULL;
370 --l_exists_attribute2 VARCHAR2(6) := NULL;
371 l_num_count NUMBER := 0;
372 --
373 CURSOR get_num_hierarchy_occurances
374 IS
375 SELECT count(*)
376 FROM   hxc_pref_hierarchies hph,
377        hxc_pref_definitions hpd,
378        hxc_pref_hierarchies hph1
379 WHERE  hph.pref_definition_id = hpd.pref_definition_id
380 AND    hpd.code = 'TC_W_TCRD_ALIASES'
381 AND    (hph.attribute1 = TO_CHAR(p_alias_definition_id)
382 				OR  hph.attribute2 = TO_CHAR(p_alias_definition_id)
383         OR  hph.attribute3 = TO_CHAR(p_alias_definition_id)
384         OR  hph.attribute4 = TO_CHAR(p_alias_definition_id)
385         OR  hph.attribute5 = TO_CHAR(p_alias_definition_id)
386         OR  hph.attribute6 = TO_CHAR(p_alias_definition_id)
387         OR  hph.attribute7 = TO_CHAR(p_alias_definition_id)
388         OR  hph.attribute8 = TO_CHAR(p_alias_definition_id)
389         OR  hph.attribute9 = TO_CHAR(p_alias_definition_id)
390         OR  hph.attribute10 = TO_CHAR(p_alias_definition_id) )
391 AND    hph1.pref_hierarchy_id = hph.top_level_parent_id;
392 --
393 BEGIN
394   g_debug:=hr_utility.debug_enabled;
395   if g_debug then
396 	l_proc := g_package||'chk_delete';
397 	hr_utility.set_location('Entering:'||l_proc, 5);
398   end if;
399 --
400 --check that Timecard Alias is not being used
401 --
402 
403   if g_debug then
404 	hr_utility.set_location('Opening Cursor: '||l_proc, 10);
405   end if;
406 
407   /*l_exists_attribute1 := HXC_PREFERENCE_EVALUATION.num_hierarchy_occurances
408                          ('TC_W_TCRD_ALIASES'
409                           ,1
410                           ,TO_CHAR(p_alias_definition_id));
411   l_exists_attribute2 := HXC_PREFERENCE_EVALUATION.num_hierarchy_occurances
412                          ('TC_W_TCRD_ALIASES'
413                           ,2
414                           ,TO_CHAR(p_alias_definition_id));
415   if g_debug then
416 	hr_utility.set_location('After calling num_hierarchy_occurances:'||l_proc,20);
417   end if;
418 
419 --
420 IF l_exists_attribute1 <> 0 OR l_exists_attribute2 <> 0 THEN
421 --
422       hr_utility.set_message(809, 'HXC_HEG_ALT_NAME_IN_USE');
423       hr_utility.raise_error;
424 --
425 END IF;
426 */
427 
428   open get_num_hierarchy_occurances;
429   fetch get_num_hierarchy_occurances into l_num_count;
430   close get_num_hierarchy_occurances;
431 
432 IF  l_num_count <> 0 THEN
433 --
434       hr_utility.set_message(809, 'HXC_HEG_ALT_NAME_IN_USE');
435       hr_utility.raise_error;
436 --
437 END IF;
438 
439   hxc_time_category_utils_pkg.alias_definition_ref_int_chk ( p_alias_definition_id );
440 
441 --
442   if g_debug then
443 	hr_utility.set_location('Entering:'||l_proc, 5);
444   end if;
445 --
446 END chk_delete;
447 
448 --  -----------------------------------------------------------------
449 --  |-----------------------< chk_legislation_code >----------------|
450 --  -----------------------------------------------------------------
451 --
452 --  Description:
453 --    Validate the legislation_code against the FND_TERRITORIES table.
454 --
455 --  Pre-Requisites:
456 --    None
457 --
458 --  In Parameters:
459 --    p_legislation_code
460 --
461 --  Post Success:
462 --    Processing continues if the legislation_code is valid.
463 --
464 --  Post Failure:
465 --    An application error is raised and processing is terminated if
466 --    the legislation_code is invalid.
467 --
468 --  Access Status:
469 --    Internal Row Handler Use Only.
470 --
471 Procedure chk_legislation_code
472        (p_business_group_id           in      number,
473         p_legislation_code           in      varchar2
474        ) is
475 --
476 --   Local declarations
477   l_proc               varchar2(72);
478   l_territory_code     fnd_territories.territory_code%TYPE;
479   l_lc                 per_business_groups.legislation_code%TYPE;
480 --
481 -- Setup cursor for valid legislation code check
482   cursor csr_valid_legislation_code is
483     select territory_code
484     from fnd_territories ft
485     where ft.territory_code = p_legislation_code;
486 
487 -- Setup cursor for valid legislation code for a particular business_group
488   cursor csr_valid_bg_lc is
489     select legislation_code
490     from per_business_groups pbg
491     where pbg.business_group_id = p_business_group_id
492     and   pbg.legislation_code = p_legislation_code;
493 
494 --
495 --
496 begin
497     g_debug:=hr_utility.debug_enabled;
498     if g_debug then
499 	l_proc := g_package||'chk_legislation_code';
500 	hr_utility.set_location('Entering: '||l_proc,5);
501     end if;
502      --------------------------------
503      -- Check legislation code is valid --
504      --------------------------------
505      if p_legislation_code is not null then
506 
507         open csr_valid_legislation_code;
508         fetch csr_valid_legislation_code into l_territory_code;
509         if csr_valid_legislation_code%notfound then
510             close csr_valid_legislation_code;
511             hr_utility.set_message(800,'PER_52123_AMD_LEG_CODE_INV');
512             hr_utility.raise_error;
513         end if; -- End cursor if
514         close csr_valid_legislation_code;
515 
516         if p_business_group_id is not null then
517            open csr_valid_bg_lc;
518            fetch csr_valid_bg_lc into l_lc;
519            if csr_valid_bg_lc%notfound then
520               close csr_valid_bg_lc;
521               hr_utility.set_message(800,'PER_52123_AMD_LEG_CODE_INV');
522               hr_utility.raise_error;
523            end if; -- End cursor if
524            close csr_valid_bg_lc;
525         end if;
526 
527      end if; -- end check
528 
529     if g_debug then
530 	hr_utility.set_location('Leaving: '||l_proc,10);
531     end if;
532 end chk_legislation_code;
533 --
534 --
535 -- ----------------------------------------------------------------------------
536 -- |-----------------------< chk_context >---------------------------------------|
537 -- ----------------------------------------------------------------------------
538 -- {Start Of Comments}
539 --
540 -- Description:
541 --   This procedure ensures a valid alias context name
542 --
543 -- Pre Conditions:
544 --   None
545 --
546 -- In Arguments:
547 --   context
548 --
549 -- Post Success:
550 --   Processing continues if the alias context name business rules
551 --   have not been violated
552 --
553 -- Post Failure:
554 --   An application error is raised if the context name is not valid
555 --
556 -- {End Of Comments}
557 -- ----------------------------------------------------------------------------
558 Procedure chk_context
559   (
560    p_context_name       in hxc_alias_definitions.alias_context_code%TYPE
561   ) IS
562 --
563   l_proc  varchar2(72);
564 --
565 -- cursor to check alias definition name does not overlap
566 --
567 CURSOR  csr_chk_context IS
568 SELECT 'success'
569 FROM   fnd_descr_flex_contexts_vl c,
570       fnd_application a
571 where c.descriptive_flexfield_name = 'OTC Aliases'
572 and   a.application_short_name = 'HXC'
573 and   a.application_id = c.application_id
574 and   c.descriptive_flex_context_code = p_context_name ;
575 
576 --
577  l_context_name varchar2(7) := NULL;
578 --
579 BEGIN
580   g_debug:=hr_utility.debug_enabled;
581   if g_debug then
582 	l_proc := g_package||'chk_context';
583 	hr_utility.set_location('Entering:'||l_proc, 5);
584   end if;
585 --
586 -- check that the name has been entered
587 --
588 IF p_context_name IS NULL
589 THEN
590 --
591       hr_utility.set_message(809, 'HXC_ALIAS_CONTEXT_MAND');
592       hr_utility.raise_error;
593 --
594 END IF;
595 --
596   if g_debug then
597 	hr_utility.set_location('Processing:'||l_proc, 10);
598   end if;
599 --
600 -- check that the name is unique
601 --
602   OPEN  csr_chk_context;
603   FETCH csr_chk_context INTO l_context_name;
604   CLOSE csr_chk_context;
605 --
606 IF l_context_name IS NULL
607 THEN
608 --
609       hr_utility.set_message(809, 'HXC_ALIAS_CONTEXT_INVALID');
610       hr_utility.raise_error;
611 --
612 END IF;
613 --
614   if g_debug then
615 	hr_utility.set_location('Leaving:'||l_proc, 20);
616   end if;
617 --
618 END chk_context;
619 -- ----------------------------------------------------------------------------
620 -- |---------------------------< n >----------------------------|
621 -- ----------------------------------------------------------------------------
622 Procedure insert_validate
623   (p_rec                          in hxc_had_shd.g_rec_type
624   ) is
625 --
626   l_proc  varchar2(72);
627 --
628 Begin
629   g_debug:=hr_utility.debug_enabled;
630   if g_debug then
631 	l_proc := g_package||'insert_validate';
632 	hr_utility.set_location('Entering:'||l_proc, 5);
633   end if;
634   --
635   -- Call all supporting business operations
636   --
637 chk_name (
638    p_name           		=> p_rec.alias_definition_name
639   ,p_ovn            		=> p_rec.object_version_number
640   ,p_alias_definition_id        => p_rec.alias_definition_id
641   ,p_business_group_id		=> p_rec.business_group_id
642   );
643   --
644 /*chk_context
645   (
646    p_context_name  => p_rec.alias_context_code
647   ); */
648   --
649   -- EDIT_HERE: As this table does not have a mandatory business_group_id
650   -- column, ensure client_info is populated by calling a suitable
651   -- ???_???_bus.set_security_group_id procedure, or add one of the following
652   -- comments:
653   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
654   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
655   --
656   --
657     --
658     if p_rec.business_group_id is not null then
659       hr_api.validate_bus_grp_id(p_rec.business_group_id);  -- Validate Bus Grp
660     end if;
661   -- Validate the legislation_code
662        chk_legislation_code
663        (p_business_group_id           => p_rec.business_group_id,
664         p_legislation_code              => p_rec.legislation_code);
665   --
666   if g_debug then
667 	hr_utility.set_location(' Leaving:'||l_proc, 10);
668   end if;
669 End insert_validate;
670 --
671 -- ----------------------------------------------------------------------------
672 -- |---------------------------< update_validate >----------------------------|
673 -- ----------------------------------------------------------------------------
674 Procedure update_validate
675   (p_rec                          in hxc_had_shd.g_rec_type
676   ) is
677 --
678   l_proc  varchar2(72);
679 --
680 Begin
681   g_debug:=hr_utility.debug_enabled;
682   if g_debug then
683 	l_proc := g_package||'update_validate';
684 	hr_utility.set_location('Entering:'||l_proc, 5);
685   end if;
686   --
687   -- Call all supporting business operations
688   --
689 chk_name (
690    p_name           		=> p_rec.alias_definition_name
691   ,p_ovn            		=> p_rec.object_version_number
692   ,p_alias_definition_id        => p_rec.alias_definition_id
693   ,p_business_group_id		=> p_rec.business_group_id
694   );
695   --
696 /*chk_context
697   (
698    p_context_name  => p_rec.alias_context_code
699   );  */
700   -- EDIT_HERE: As this table does not have a mandatory business_group_id
701   -- column, ensure client_info is populated by calling a suitable
702   -- ???_???_bus.set_security_group_id procedure, or add one of the following
703   -- comments:
704   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
705   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
706   --
707   chk_non_updateable_args
708     (p_rec              => p_rec
709     );
710   --
711   --
712     if p_rec.business_group_id is not null then
713       hr_api.validate_bus_grp_id(p_rec.business_group_id);  -- Validate Bus Grp
714     end if;
715   -- Validate the legislation_code
716        chk_legislation_code
717        (p_business_group_id           => p_rec.business_group_id,
718         p_legislation_code              => p_rec.legislation_code);
719   --
720   --
721   if g_debug then
722 	hr_utility.set_location(' Leaving:'||l_proc, 10);
723   end if;
724 End update_validate;
725 --
726 -- ----------------------------------------------------------------------------
727 -- |---------------------------< delete_validate >----------------------------|
728 -- ----------------------------------------------------------------------------
729 Procedure delete_validate
730   (p_rec                          in hxc_had_shd.g_rec_type
731   ) is
732 --
733   l_proc  varchar2(72);
734 --
735 Begin
736   g_debug:=hr_utility.debug_enabled;
737   if g_debug then
738 	l_proc := g_package||'delete_validate';
739 	hr_utility.set_location('Entering:'||l_proc, 5);
740   end if;
741   --
742   -- Call all supporting business operations
743   --
744   chk_delete
745   ( p_alias_definition_id => p_rec.alias_definition_id);
746   --
747   if g_debug then
748 	hr_utility.set_location(' Leaving:'||l_proc, 10);
749   end if;
750 End delete_validate;
751 --
752 end hxc_had_bus;