[Home] [Help]
PACKAGE BODY: APPS.HR_DTY_BUS
Source
1 Package Body hr_dty_bus as
2 /* $Header: hrdtyrhi.pkb 120.0.12010000.2 2008/08/06 08:36:25 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_dty_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_document_type_id number default null;
15 --
16 -- ----------------------------------------------------------------------------
17 -- |-----------------------< chk_non_updateable_args >------------------------|
18 -- ----------------------------------------------------------------------------
19 -- {Start Of Comments}
20 --
21 -- Description:
22 -- This procedure is used to ensure that non updateable attributes have
23 -- not been updated. If an attribute has been updated an error is generated.
24 --
25 -- Pre Conditions:
26 -- g_old_rec has been populated with details of the values currently in
27 -- the database.
28 --
29 -- In Arguments:
30 -- p_rec has been populated with the updated values the user would like the
31 -- record set to.
32 --
33 -- Post Success:
34 -- Processing continues if all the non updateable attributes have not
35 -- changed.
36 --
37 -- Post Failure:
38 -- An application error is raised if any of the non updatable attributes
39 -- have been altered.
40 --
41 -- {End Of Comments}
42 -- ----------------------------------------------------------------------------
43 Procedure chk_non_updateable_args
44 (p_effective_date in date
45 ,p_rec in hr_dty_shd.g_rec_type
46 ) IS
47 --
48 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
49 --
50 Begin
51 --
52 -- Only proceed with the validation if a row exists for the current
53 -- record in the HR Schema.
54 --
55 IF NOT hr_dty_shd.api_updating
56 (p_document_type_id => p_rec.document_type_id
57 ,p_object_version_number => p_rec.object_version_number
58 ) THEN
59 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
60 fnd_message.set_token('PROCEDURE ', l_proc);
61 fnd_message.set_token('STEP ', '5');
62 fnd_message.raise_error;
63 END IF;
64 --
65 --
66 --Check for Non- updation of Legislation Code
67 --
68 if nvl(p_rec.legislation_code, hr_api.g_varchar2) <>
69 hr_dty_shd.g_old_rec.legislation_code then
70
71 hr_api.argument_changed_error
72 (p_api_name => l_proc
73 ,p_argument => 'LEGISLATION_CODE'
74 ,p_base_table => hr_dei_shd.g_tab_nam
75 );
76 end if;
77 --
78 --Check for Non- updation of Multiple Occurences Flag
79 --
80 if nvl(p_rec.multiple_occurences_flag, hr_api.g_varchar2) <>
81 hr_dty_shd.g_old_rec.multiple_occurences_flag then
82
83 hr_api.argument_changed_error
84 (p_api_name => l_proc
85 ,p_argument => 'MULTIPLE_OCCURENCES_FLAG'
86 ,p_base_table => hr_dei_shd.g_tab_nam
87 );
88 end if;
89 --
90 End chk_non_updateable_args;
91 --
92 -- ----------------------------------------------------------------------------
93 -- |-------------------------< chk_category_code >------------------------|
94 -- ----------------------------------------------------------------------------
95 -- {Start Of Comments}
96 --
97 -- Description:
98 -- This procedure ensures that category_code value is valid.
99 --
100 -- Pre Conditions:
101 -- g_old_rec has been populated with details of the values currently in
102 -- the database.
103 --
104 -- In Arguments:
105 -- p_category_code
106 --
107 -- Post Success:
108 -- Processing continues if category_code is valid and if updating,
109 -- old_rec.category_code is null
110 --
111 -- Post Failure:
112 -- An application error is raised
113 -- if updating and old_rec.business_group_id is not null, or
114 -- business_group_id is not valid.
115 --
116 -- {End Of Comments}
117 -- ----------------------------------------------------------------------------
118 procedure chk_category_code
119 (
120 p_category_code in hr_document_types.category_code%TYPE
121 ,p_legislation_code in hr_document_types.legislation_code%TYPE
122 )
123 is
124 --
125
126 --
127 l_proc varchar2(72) := g_package||'chk_category_code';
128 l_api_updating boolean;
129 l_category_code varchar2(50);
130
131 -- Cursor for Validating Category Code
132
133
134 cursor csr_valid_category_code(p_category_cd varchar2,p_legislation_code varchar2)
135 is
136 SELECT 'X'
137 FROM FND_LOOKUP_VALUES FLV
138 WHERE FLV.lookup_type = 'DOCUMENT_CATEGORY'
139 and FLV.lookup_code = p_category_cd
140 AND FLV.LANGUAGE = userenv('LANG')
141 and FLV.VIEW_APPLICATION_ID = 3
142 and FLV.SECURITY_GROUP_ID = decode(substr(userenv('CLIENT_INFO'),55,1), ' ', 0, NULL, 0, '0', 0, fnd_global.lookup_security_group(FLV.LOOKUP_TYPE,FLV.VIEW_APPLICATION_ID))
143 and decode(FLV.TAG, NULL, 'Y',
144 decode(substr(FLV.TAG,1,1), '+', decode(sign(instr(FLV.TAG, p_legislation_code)), 1, 'Y', 'N'),
145 '-', decode(sign(instr(FLV.TAG, p_legislation_code)), 1, 'N', 'Y'), 'Y' ) ) = 'Y';
146 --
147 begin
148 hr_utility.set_location('Entering:'||l_proc, 5);
149
150 hr_api.mandatory_arg_error
151 (p_api_name => l_proc
152 ,p_argument => 'category_code'
153 ,p_argument_value => p_category_code
154 );
155
156 --
157 -- Check that the Category Code
158 -- exists in fnd_lookup_types
159 --
160
161 open csr_valid_category_code(p_category_code,p_legislation_code);
162 fetch csr_valid_category_code into l_category_code;
163
164 if csr_valid_category_code%notfound then
165 close csr_valid_category_code;
166 hr_utility.set_message(800, 'HR_449711_DOR_INVL_COND_VAL');
167 hr_utility.set_message_token('OBJECT', 'CATEGORY_CODE');
168 hr_utility.set_message_token('TABLE', 'FND_LOOKUP_VALUES');
169 hr_utility.set_message_token('CONDITION', 'lookup type "DOCUMENT CATEGORY"');
170 hr_utility.raise_error;
171 hr_utility.set_location(l_proc, 10);
172 --
173 else
174 close csr_valid_category_code;
175
176 end if;
177 hr_utility.set_location(l_proc, 20);
178 --
179
180 exception
181 when app_exception.application_exception then
182 if hr_multi_message.exception_add
183 (p_associated_column1 => 'hr_document_types.category_code'
184 ) then
185 hr_utility.set_location('Leaving:'||l_proc, 50);
186 raise;
187 end if;
188 hr_utility.set_location('Leaving:'||l_proc,60);
189 end chk_category_code;
190 --
191 --
192 -- ----------------------------------------------------------------------------
193 -- |-------------------------< chk_sub_category_code >------------------------|
194 -- ----------------------------------------------------------------------------
195 -- {Start Of Comments}
196 --
197 -- Description:
198 -- This procedure ensures that sub_category_code value is valid.
199 --
200 -- Pre Conditions:
201 -- g_old_rec has been populated with details of the values currently in
202 -- the database.
203 --
204 -- In Arguments:
205 -- p_category_code
206 -- p_sub_category_code
207 --
208 -- Post Success:
209 -- Processing continues if category_code is valid and if updating,
210 -- old_rec.category_code is null
211 --
212 -- Post Failure:
213 -- An application error is raised
214 -- if updating and old_rec.business_group_id is not null, or
215 -- business_group_id is not valid.
216 --
217 -- {End Of Comments}
218 -- ----------------------------------------------------------------------------
219 procedure chk_sub_category_code
220 (
221 p_category_code in hr_document_types.category_code%TYPE
222 ,p_sub_category_code in hr_document_types.sub_category_code%TYPE
223 )
224 is
225 --
226
227 --
228 l_proc varchar2(72) := g_package||'chk_sub_category_code';
229 l_api_updating boolean;
230 l_sub_category_code varchar2(50);
231
232 -- Cursor for Validating Sub Category Code
233
234 cursor csr_valid_sub_category_code(p_sub_category_cd varchar2)
235 is
236 select 'X'
237 from per_shared_types_vl pst
238 where pst.lookup_type = 'DOCUMENT_CATEGORY'
239 and pst.system_type_cd = p_category_code
240 and pst.shared_type_code = p_sub_category_cd;
241 --
242 begin
243 hr_utility.set_location('Entering:'||l_proc, 5);
244
245
246 --
247 -- Check that the Category Code
248 -- exists in per_shared_types
249 --
250 if(p_sub_category_code is NOT NULL) then
251 open csr_valid_sub_category_code(p_sub_category_code);
252 fetch csr_valid_sub_category_code into l_sub_category_code;
253
254
255 if csr_valid_sub_category_code%notfound then
256 close csr_valid_sub_category_code;
257
258 hr_utility.set_message(800, 'HR_449711_DOR_INVL_COND_VAL');
259 hr_utility.set_message_token('OBJECT', 'SUB_CATEGORY_CODE');
260 hr_utility.set_message_token('TABLE', 'PER_SHARED_TYPES');
261 hr_utility.set_message_token('CONDITION', 'lookup type "DOCUMENT CATEGORY"');
262 hr_utility.raise_error;
263 hr_utility.set_location(l_proc, 10);
264 --
265 else
266 close csr_valid_sub_category_code;
267
268 end if;
269 end if;
270 hr_utility.set_location(l_proc, 20);
271 --
272
273 exception
274 when app_exception.application_exception then
275 if hr_multi_message.exception_add
276 (p_associated_column1 => 'hr_document_types.sub_category_code'
277 ) then
278 hr_utility.set_location('Leaving:'||l_proc, 50);
279 raise;
280 end if;
281 hr_utility.set_location('Leaving:'||l_proc,60);
282 end chk_sub_category_code;
283 --
284 -- ----------------------------------------------------------------------------
285 -- |-------------------------< chk_active_flag >------------------------|
286 -- ----------------------------------------------------------------------------
287 -- {Start Of Comments}
288 --
289 -- Description:
290 -- This procedure ensures that active_inactive_flag value is valid.
291 --
292 -- Pre Conditions:
293 -- g_old_rec has been populated with details of the values currently in
294 -- the database.
295 --
296 -- In Arguments:
297 -- p_active_flag
298 -- p_document_type_id
299 --
300 -- Post Success:
301 -- Processing continues if category_code is valid and if updating,
302 -- old_rec.category_code is null
303 --
304 -- Post Failure:
305 -- An application error is raised
306 -- if updating and old_rec.business_group_id is not null, or
307 -- business_group_id is not valid.
308 --
309 -- {End Of Comments}
310 -- ----------------------------------------------------------------------------
311 procedure chk_active_flag
312 (
313 p_active_flag in hr_document_types.active_inactive_flag%TYPE
314 )
315 is
316 --
317
318 --
319 l_proc varchar2(72) := g_package||'chk_active_flag';
320 l_api_updating boolean;
321 l_active_flag varchar2(10);
322
323 cursor csr_valid_active_flag(p_active_flg varchar2)
324 is
325 select 'X'
326 from hr_standard_lookups
327 where lookup_type = 'YES_NO'
328 and lookup_code = p_active_flg;
329
330
331 --
332 begin
333 hr_utility.set_location('Entering:'||l_proc, 5);
334
335
336 hr_api.mandatory_arg_error
337 (p_api_name => l_proc
338 ,p_argument => 'active_inactive_flag'
339 ,p_argument_value => p_active_flag
340 );
341 --
342
343 open csr_valid_active_flag(p_active_flag);
344 fetch csr_valid_active_flag into l_active_flag;
345 if csr_valid_active_flag%notfound then
346 close csr_valid_active_flag;
347 hr_utility.set_message(800, 'HR_449711_DOR_INVL_COND_VAL');
348 hr_utility.set_message_token('OBJECT', 'ACTIVE_FLAG');
349 hr_utility.set_message_token('TABLE', 'HR_STANDARD_LOOKUPS');
350 hr_utility.set_message_token('CONDITION', 'lookup type "YES_NO"');
351 hr_utility.raise_error;
352 hr_utility.set_location(l_proc, 10);
353 --
354 else
355 close csr_valid_active_flag;
356 end if;
357 hr_utility.set_location(l_proc, 20);
358
359 exception
360 when app_exception.application_exception then
361 if hr_multi_message.exception_add
362 (p_same_associated_columns => 'Y'
363 ) then
364 hr_utility.set_location('Leaving:'||l_proc, 50);
365 raise;
366 end if;
367 hr_utility.set_location('Leaving:'||l_proc,60);
368 end chk_active_flag;
369 --
370
371 --
372 -- ----------------------------------------------------------------------------
373 -- |-------------------------< chk_multiple_occurence_flag >------------------------|
374 -- ----------------------------------------------------------------------------
375 -- {Start Of Comments}
376 --
377 -- Description:
378 -- This procedure ensures that multiple_occurences_flag value is valid.
379 --
380 -- Pre Conditions:
381 -- g_old_rec has been populated with details of the values currently in
382 -- the database.
383 --
384 -- In Arguments:
385 -- p_multiple_occurence_flag
386 --
387 -- Post Success:
388 -- Processing continues if category_code is valid and if updating,
389 -- old_rec.category_code is null
390 --
391 -- Post Failure:
392 -- An application error is raised
393 -- if updating and old_rec.business_group_id is not null, or
394 -- business_group_id is not valid.
395 --
396 -- {End Of Comments}
397 -- ----------------------------------------------------------------------------
398 procedure chk_multiple_occurence_flag
399 (
400 p_multiple_occurence_flag in hr_document_types.multiple_occurences_flag%TYPE
401 )
402 is
403 --
404
405 --
406 l_proc varchar2(72) := g_package||'chk_multiple_occurence_flag';
407 l_api_updating boolean;
408 l_multiple_occurence_flag varchar2(10);
409
410 -- Cursor for Validating Multiple Occurences Flag
411
412 cursor csr_valid_mul_occurence_flag(p_mul_occ_flag varchar2)
413 is
414 select 'X'
415 from hr_standard_lookups
416 where lookup_type = 'YES_NO'
417 and lookup_code = p_mul_occ_flag;
418
419 --
420 begin
421 hr_utility.set_location('Entering:'||l_proc, 5);
422
423
424 hr_api.mandatory_arg_error
425 (p_api_name => l_proc
426 ,p_argument => 'MULTIPLE_OCCURENCES_FLAG'
427 ,p_argument_value => p_multiple_occurence_flag
428 );
429
430 --
431
432 open csr_valid_mul_occurence_flag(p_multiple_occurence_flag);
433 fetch csr_valid_mul_occurence_flag into l_multiple_occurence_flag;
434 if csr_valid_mul_occurence_flag%notfound then
435 close csr_valid_mul_occurence_flag;
436
437 hr_utility.set_message(800, 'HR_449711_DOR_INVL_COND_VAL');
438 hr_utility.set_message_token('OBJECT', 'MULTIPLE_OCCURENCES_FLAG');
439 hr_utility.set_message_token('TABLE', 'HR_STANDARD_LOOKUPS');
440 hr_utility.set_message_token('CONDITION', 'lookup type "YES_NO"');
441 hr_utility.raise_error;
442 hr_utility.set_location(l_proc, 10);
443 --
444 else
445 close csr_valid_mul_occurence_flag;
446
447 end if;
448 hr_utility.set_location(l_proc, 20);
449 --
450
451 exception
452 when app_exception.application_exception then
453 if hr_multi_message.exception_add
454 (p_same_associated_columns => 'Y'
455 ) then
456 hr_utility.set_location('Leaving:'||l_proc, 50);
457 raise;
458 end if;
459 hr_utility.set_location('Leaving:'||l_proc,60);
460 end chk_multiple_occurence_flag;
461 --
462 --
463 -- ----------------------------------------------------------------------------
464 -- |-------------------------< chk_legislation_code >------------------------|
465 -- ----------------------------------------------------------------------------
466 -- {Start Of Comments}
467 --
468 -- Description:
469 -- This procedure ensures that legislation_code value is valid.
470 --
471 -- Pre Conditions:
472 -- g_old_rec has been populated with details of the values currently in
473 -- the database.
474 --
475 -- In Arguments:
476 -- p_legislation_code
477 --
478 -- Post Success:
479 -- Processing continues if category_code is valid and if updating,
480 -- old_rec.category_code is null
481 --
482 -- Post Failure:
483 -- An application error is raised
484 -- if updating and old_rec.business_group_id is not null, or
485 -- business_group_id is not valid.
486 --
487 -- {End Of Comments}
488 -- ----------------------------------------------------------------------------
489 procedure chk_legislation_code
490 (
491 p_legislation_code in hr_document_types.legislation_code%TYPE
492 )
493 is
494 --
495
496 --
497 l_proc varchar2(72) := g_package||'chk_legislation_code';
498 l_api_updating boolean;
499 l_legislation_code varchar2(10);
500
501 -- Cursor for Validating Legislation Code
502
503 cursor csr_valid_leg_code is
504 select 'X'
505 from fnd_territories
506 where TERRITORY_CODE = p_legislation_code;
507
508 --
509 begin
510 hr_utility.set_location('Entering:'||l_proc, 5);
511
512 --
513 if(p_legislation_code is NOT NULL) then
514 open csr_valid_leg_code;
515 fetch csr_valid_leg_code into l_legislation_code;
516 if csr_valid_leg_code%notfound then
517 close csr_valid_leg_code;
518 hr_utility.set_message(800, 'HR_449710_DOR_INVL_VAL');
519 hr_utility.set_message_token('OBJECT', 'LEGISLATION_CODE');
520 hr_utility.set_message_token('TABLE', 'FND_TERRITORIES');
521 hr_utility.raise_error;
522 hr_utility.set_location(l_proc, 10);
523 --
524 else
525 close csr_valid_leg_code;
526
527 end if;
528 end if;
529 hr_utility.set_location(l_proc, 20);
530 --
531
532 exception
533 when app_exception.application_exception then
534 if hr_multi_message.exception_add
535 (p_same_associated_columns => 'Y'
536 ) then
537 hr_utility.set_location('Leaving:'||l_proc, 50);
538 raise;
539 end if;
540 hr_utility.set_location('Leaving:'||l_proc,60);
541 end chk_legislation_code;
542 --
543 --
544 -- ----------------------------------------------------------------------------
545 -- |-------------------------< chk_authorization_code >------------------------|
546 -- ----------------------------------------------------------------------------
547 -- {Start Of Comments}
548 --
549 -- Description:
550 -- This procedure ensures that authorization_code value is valid.
551 --
552 -- Pre Conditions:
553 -- g_old_rec has been populated with details of the values currently in
554 -- the database.
555 --
556 -- In Arguments:
557 -- p_authorization_code
558 --
559 -- Post Success:
560 -- Processing continues if category_code is valid and if updating,
561 -- old_rec.category_code is null
562 --
563 -- Post Failure:
564 -- An application error is raised
565 -- if updating and old_rec.business_group_id is not null, or
566 -- business_group_id is not valid.
567 --
568 -- {End Of Comments}
569 -- ----------------------------------------------------------------------------
570 procedure chk_authorization_required
571 (
572 p_authorization_required in hr_document_types.authorization_required%TYPE
573 )
574 is
575 --
576
577 --
578 l_proc varchar2(72) := g_package||'chk_authorization_code';
579 l_api_updating boolean;
580 l_auth_code varchar2(10);
581
582 -- Cursor for Validating Multiple Occurences Flag
583
584 cursor csr_valid_auth_code(p_auth_code varchar2)
585 is
586 select 'X'
587 from hr_standard_lookups
588 where lookup_type = 'YES_NO'
589 and lookup_code = p_auth_code;
590
591 --
592 begin
593 hr_utility.set_location('Entering:'||l_proc, 5);
594
595
596 hr_api.mandatory_arg_error
597 (p_api_name => l_proc
598 ,p_argument => 'AUTHORIZATION_REQUIRED'
599 ,p_argument_value => p_authorization_required
600 );
601
602 --
603
604 open csr_valid_auth_code(p_authorization_required);
605 fetch csr_valid_auth_code into l_auth_code;
606 if csr_valid_auth_code%notfound then
607 close csr_valid_auth_code;
608 hr_utility.set_message(800, 'HR_449711_DOR_INVL_COND_VAL');
609 hr_utility.set_message_token('OBJECT', 'AUTHORIZATION_REQUIRED');
610 hr_utility.set_message_token('TABLE', 'HR_STANDARD_LOOKUPS');
611 hr_utility.set_message_token('CONDITION', 'lookup type "YES_NO"');
612 hr_utility.raise_error;
613 hr_utility.set_location(l_proc, 10);
614 --
615 else
616 close csr_valid_auth_code;
617
618 end if;
619 hr_utility.set_location(l_proc, 20);
620 --
621
622 exception
623 when app_exception.application_exception then
624 if hr_multi_message.exception_add
625 (p_same_associated_columns => 'Y'
626 ) then
627 hr_utility.set_location('Leaving:'||l_proc, 50);
628 raise;
629 end if;
630 hr_utility.set_location('Leaving:'||l_proc,60);
631 end chk_authorization_required;
632 --
633 -- ----------------------------------------------------------------------------
634 -- |-------------------------< chk_document_type_delete >------------------------|
635 -- ----------------------------------------------------------------------------
636 -- {Start Of Comments}
637 --
638 -- Description:
639 -- This procedure ensures an document type can't be deleted if it is referenced by
640 -- HR_DOCUMENT_EXTRA_INFO
641 --
642 -- Pre Conditions:
643 -- g_old_rec has been populated with details of the values currently in
644 -- the database.
645 --
646 -- In Arguments:
647 -- p_authorization_code
648 --
649 -- Post Success:
650 -- Processing continues if category_code is valid and if updating,
651 -- old_rec.category_code is null
652 --
653 -- Post Failure:
654 -- An application error is raised
655 -- if updating and old_rec.business_group_id is not null, or
656 -- business_group_id is not valid.
657 --
658 -- {End Of Comments}
659 -- ----------------------------------------------------------------------------
660 procedure chk_document_type_delete
661 (
662 p_document_type in hr_document_types.document_type_id%TYPE
663 )
664 is
665 --
666
667 --
668 l_proc varchar2(72) := g_package||'chk_document_type_delete';
669 l_api_updating boolean;
670 l_doc_type varchar2(10);
671 l_document_type varchar2(30);
672
673 -- Cursor for Validating Deletion of Document Type Id
674 cursor get_document_type(p_document_type_id number)
675 is
676 select document_type
677 from hr_document_types_v
678 where document_type_id=p_document_type_id;
679
680
681 cursor csr_doc_type_delete
682 is
683 select 'X'
684 from hr_document_extra_info hdei
685 where hdei.document_type_id = p_document_type;
686
687 --
688 begin
689 hr_utility.set_location('Entering:'||l_proc, 5);
690
691 --
692 open get_document_type(p_document_type_id =>p_document_type);
693 fetch get_document_type into l_document_type;
694 close get_document_type;
695
696 open csr_doc_type_delete;
697 fetch csr_doc_type_delete into l_doc_type;
698 if csr_doc_type_delete%found then
699 close csr_doc_type_delete;
700
701 hr_utility.set_message(800, 'HR_449715_DOR_DOC_TYP_DEL_VAL');
702 hr_utility.set_message_token('TYPE', l_document_type);
703 hr_utility.set_message_token('TABLE', 'HR_DOCUMENT_EXTRA_INFO');
704 hr_utility.raise_error;
705 hr_utility.set_location(l_proc, 10);
706 --
707 else
708 close csr_doc_type_delete;
709
710 end if;
711 hr_utility.set_location(l_proc, 20);
712 --
713
714 exception
715 when app_exception.application_exception then
716 if hr_multi_message.exception_add
717 (p_same_associated_columns => 'Y'
718 ) then
719 hr_utility.set_location('Leaving:'||l_proc, 50);
720 raise;
721 end if;
722 hr_utility.set_location('Leaving:'||l_proc,60);
723 end chk_document_type_delete;
724 --
725 -- ----------------------------------------------------------------------------
726 -- |---------------------------< insert_validate >----------------------------|
727 -- ----------------------------------------------------------------------------
728 Procedure insert_validate
729 (p_effective_date in date
730 ,p_rec in hr_dty_shd.g_rec_type
731 ) is
732 --
733 l_proc varchar2(72) := g_package||'insert_validate';
734 --
735 Begin
736 hr_utility.set_location('Entering:'||l_proc, 5);
737 --
738 -- Call all supporting business operations
739 --
740 --
741 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
742 --
743 -- Validate Dependent Attributes
744 --
745 --
746 -- Validate Category Code
747
748 chk_category_code
749 (p_category_code => p_rec.category_code
750 ,p_legislation_code => p_rec.legislation_code
751 );
752 -- Valid Sub Category ID
753
754 chk_sub_category_code
755 (p_category_code => p_rec.category_code
756 ,p_sub_category_code => p_rec.sub_category_code
757 );
758 -- Valid Active Flag
759
760 chk_active_flag
761 (p_active_flag => p_rec.active_inactive_flag
762 );
763 --Valid Multiple Occurences Flag
764
765 chk_multiple_occurence_flag
766 (p_multiple_occurence_flag => p_rec.multiple_occurences_flag
767 );
768 --Valid Legislation Code
769
770 chk_legislation_code
771 (
772 p_legislation_code => p_rec.legislation_code
773 );
774 --Valid Authorization Required
775
776 chk_authorization_required
777 (
778 p_authorization_required => p_rec.authorization_required
779 );
780
781 hr_utility.set_location(' Leaving:'||l_proc, 10);
782 End insert_validate;
783 --
784 -- ----------------------------------------------------------------------------
785 -- |---------------------------< update_validate >----------------------------|
786 -- ----------------------------------------------------------------------------
787 Procedure update_validate
788 (p_effective_date in date
789 ,p_rec in hr_dty_shd.g_rec_type
790 ) is
791 --
792 l_proc varchar2(72) := g_package||'update_validate';
793 --
794 Begin
795 hr_utility.set_location('Entering:'||l_proc, 5);
796 --
797 -- Call all supporting business operations
798 --
799 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
800 --
801 -- Validate Dependent Attributes
802 --
803 chk_non_updateable_args
804 (p_effective_date => p_effective_date
805 ,p_rec => p_rec
806 );
807
808 -- Valid Category Code
809 chk_category_code
810 (p_category_code => p_rec.category_code
811 ,p_legislation_code => p_rec.legislation_code
812 );
813
814 --Valid Sub Category code
815 chk_sub_category_code
816 (p_category_code => p_rec.category_code
817 ,p_sub_category_code => p_rec.sub_category_code
818 );
819 -- Valid Active Flag
820 chk_active_flag
821 (p_active_flag => p_rec.active_inactive_flag
822 );
823 -- Valid Multiple Occurences Flag
824 chk_multiple_occurence_flag
825 (p_multiple_occurence_flag => p_rec.multiple_occurences_flag
826 );
827 --Valid Authorization Required
828 chk_authorization_required
829 (
830 p_authorization_required => p_rec.authorization_required
831 );
832 hr_utility.set_location(' Leaving:'||l_proc, 10);
833 End update_validate;
834 --
835 -- ----------------------------------------------------------------------------
836 -- |---------------------------< delete_validate >----------------------------|
837 -- ----------------------------------------------------------------------------
838 Procedure delete_validate
839 (p_rec in hr_dty_shd.g_rec_type
840 ) is
841 --
842 l_proc varchar2(72) := g_package||'delete_validate';
843 --
844 Begin
845 hr_utility.set_location('Entering:'||l_proc, 5);
846 --
847 -- Call all supporting business operations
848 chk_document_type_delete
849 (
850 p_document_type => p_rec.document_type_id
851 );
852 --
853 hr_utility.set_location(' Leaving:'||l_proc, 10);
854 End delete_validate;
855 --
856 end hr_dty_bus;
857