20: --
21: l_proc varchar2(72) := g_package||'check_non_updateable_args';
22: --
23: Begin
24: hr_utility.set_location('Entering:'||l_proc, 5);
25: --
26: -- Only proceed with validation if a row exists for
27: -- the current record in the HR Schema
28: --
29: if not per_apl_shd.api_updating
30: (p_application_id => p_rec.application_id
31: ,p_object_version_number => p_rec.object_version_number
32: ) then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP', '5');
36: hr_utility.raise_error;
37: end if;
30: (p_application_id => p_rec.application_id
31: ,p_object_version_number => p_rec.object_version_number
32: ) then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP', '5');
36: hr_utility.raise_error;
37: end if;
38: --
31: ,p_object_version_number => p_rec.object_version_number
32: ) then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP', '5');
36: hr_utility.raise_error;
37: end if;
38: --
39: hr_utility.set_location(l_proc, 6);
32: ) then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP', '5');
36: hr_utility.raise_error;
37: end if;
38: --
39: hr_utility.set_location(l_proc, 6);
40: --
35: hr_utility.set_message_token('STEP', '5');
36: hr_utility.raise_error;
37: end if;
38: --
39: hr_utility.set_location(l_proc, 6);
40: --
41: --
42: if nvl(p_rec.business_group_id, hr_api.g_number) <>
43: per_apl_shd.g_old_rec.business_group_id then
55: ,p_argument => 'PERSON_ID'
56: ,p_base_table => per_apl_shd.g_tab_nam
57: );
58: end if;
59: hr_utility.set_location(' Leaving:'||l_proc, 14);
60: end check_non_updateable_args;
61: --
62: -- ---------------------------------------------------------------------------
63: -- |----------------------< df_update_validate >---------------------------|
94: --
95: l_proc varchar2(72) := g_package||'df_update_validate';
96: --
97: begin
98: hr_utility.set_location('Entering:'||l_proc, 10);
99: --
100: if nvl(per_apl_shd.g_old_rec.appl_attribute_category, hr_api.g_varchar2) <>
101: nvl(p_rec.appl_attribute_category, hr_api.g_varchar2) or
102: nvl(per_apl_shd.g_old_rec.appl_attribute1, hr_api.g_varchar2) <>
190: );
191: --
192: end if;
193: --
194: hr_utility.set_location(' Leaving:'||l_proc, 10);
195: --
196: end df_update_validate;
197: --
198: -- ----------------------------------------------------------------------------
204: --
205: l_proc varchar2(72) := g_package||'insert_validate';
206: --
207: Begin
208: hr_utility.set_location('Entering:'||l_proc, 5);
209: --
210: -- Validate Important Attributes
211: --
212: hr_api.validate_bus_grp_id
301: ,p_attribute20_value => p_rec.appl_attribute20
302: );
303: end if;
304: --
305: hr_utility.set_location(' Leaving:'||l_proc, 10);
306: --
307: End insert_validate;
308: --
309: -- ----------------------------------------------------------------------------
314: --
315: l_proc varchar2(72) := g_package||'update_validate';
316: --
317: Begin
318: hr_utility.set_location('Entering:'||l_proc, 5);
319: --
320: -- Validate Important Attributes
321: --
322: hr_api.validate_bus_grp_id
331: hr_multi_message.end_validation_set;
332: --
333: -- Call all supporting business operations
334: --
335: hr_utility.set_location(l_proc, 6);
336: --
337: -- Check the non-updateable arguments have in fact not been modified
338: --
339: per_apl_bus.check_non_updateable_args(p_rec => p_rec);
380: -- Validate Descriptive flexfields
381: --
382: per_apl_bus.df_update_validate(p_rec => p_rec);
383: --
384: hr_utility.set_location(' Leaving:'||l_proc, 10);
385: End update_validate;
386: --
387: -- ----------------------------------------------------------------------------
388: -- |---------------------------< delete_validate >----------------------------|
391: --
392: l_proc varchar2(72) := g_package||'delete_validate';
393: --
394: Begin
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: -- Call all supporting business operations
398: --
399: hr_utility.set_location(' Leaving:'||l_proc, 10);
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: -- Call all supporting business operations
398: --
399: hr_utility.set_location(' Leaving:'||l_proc, 10);
400: End delete_validate;
401: -- ----------------------------------------------------------------------------
402: -- |--------------------< chk_date_received_person_id >-----------------------|
403: -- ----------------------------------------------------------------------------
440: where person_id = p_person_id
441: and date_received = p_date_received;
442: --
443: begin
444: hr_utility.set_location('Entering:'||l_proc,1);
445: --
446: -- Perform mandatory parameter checks
447: --
448: hr_api.mandatory_arg_error
458: ,p_argument => 'person_id'
459: ,p_argument_value => p_person_id
460: );
461: --
462: hr_utility.set_location(l_proc,11);
463: --
464: -- Check if application is being updated and load g_old_rec if applicable
465: --
466: l_api_updating := per_apl_shd.api_updating
474: if ((l_api_updating and
475: per_apl_shd.g_old_rec.date_received <> p_date_received)
476: or (NOT l_api_updating)) then
477: --
478: hr_utility.set_location(l_proc,21);
479: --
480: -- Check the person_id exist date_effectively
481: --
482: open csr_valid_person_per_people_f;
483: fetch csr_valid_person_per_people_f
484: into l_business_group_id, l_system_person_type;
485: if (csr_valid_person_per_people_f%notfound) then
486: close csr_valid_person_per_people_f;
487: hr_utility.set_message(801,'HR_51194_APL_INV_DT_PERSON');
488: hr_multi_message.add
489: (p_associated_column1 => 'PER_APPLICATIONS.PERSON_ID'
490: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_RECEIVED'
491: );
491: );
492: else
493: close csr_valid_person_per_people_f;
494: --
495: hr_utility.set_location(l_proc,31);
496: --
497: -- The following person checks only need to be performed on an
498: -- insert.
499: --
498: -- insert.
499: --
500: if NOT l_api_updating then
501: --
502: hr_utility.set_location(l_proc,41);
503: --
504: -- Check the system_person_type of the applicant is 'APL','EMP_APL',
505: -- 'APL_EX_APL','EX_EMP_APL'
506: --
508: l_system_person_type <> 'APL' AND
509: l_system_person_type <> 'EMP_APL' AND
510: l_system_person_type <> 'APL_EX_APL' AND
511: l_system_person_type <> 'EX_EMP_APL') then
512: hr_utility.set_message(801,'HR_51185_APL_INV_SYS_PER_TYPE');
513: hr_multi_message.add
514: (p_associated_column1 => 'PER_APPLICATIONS.PERSON_ID'
515: );
516: end if;
514: (p_associated_column1 => 'PER_APPLICATIONS.PERSON_ID'
515: );
516: end if;
517: --
518: hr_utility.set_location(l_proc,51);
519: --
520: -- Check the application is in the same business group as the person
521: --
522: if (p_business_group_id <> l_business_group_id) then
519: --
520: -- Check the application is in the same business group as the person
521: --
522: if (p_business_group_id <> l_business_group_id) then
523: hr_utility.set_message(801,'HR_51187_APL_INV_BUS_GRP');
524: hr_multi_message.add
525: (p_associated_column1 => 'PER_APPLICATIONS.PERSON_ID'
526: );
527: end if;
527: end if;
528: end if;
529: end if;
530: --
531: hr_utility.set_location(l_proc,61);
532: --
533: -- Validate date received with respect to DATE_END
534: --
535: if (p_date_received > nvl(p_date_end,hr_api.g_eot)) then
532: --
533: -- Validate date received with respect to DATE_END
534: --
535: if (p_date_received > nvl(p_date_end,hr_api.g_eot)) then
536: hr_utility.set_message(801,'HR_51188_APL_DTE_REC_DTE_END');
537: hr_multi_message.add
538: (p_associated_column1 => 'PER_APPLICATIONS.DATE_RECEIVED'
539: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_END'
540: );
539: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_END'
540: );
541: end if;
542: --
543: hr_utility.set_location(l_proc,71);
544: --
545: -- Validate date received with respect to PROJECTED HIRE DATE
546: --
547: if (p_date_received > nvl(p_projected_hire_date,hr_api.g_eot)) then
544: --
545: -- Validate date received with respect to PROJECTED HIRE DATE
546: --
547: if (p_date_received > nvl(p_projected_hire_date,hr_api.g_eot)) then
548: hr_utility.set_message(801,'HR_51189_APL_DTE_REC_PROJ_HIRE');
549: hr_multi_message.add
550: (p_associated_column1 => 'PER_APPLICATIONS.DATE_RECEIVED'
551: ,p_associated_column2 => 'PER_APPLICATIONS.PROJECTED_HIRE_DATE'
552: );
551: ,p_associated_column2 => 'PER_APPLICATIONS.PROJECTED_HIRE_DATE'
552: );
553: end if;
554: --
555: hr_utility.set_location(l_proc,81);
556: --
557: /* Removed 18-Aug-97
558: Reinstated 19-Jan-98, Version 110.3, S.Bhattal
559: */
563: open csr_valid_person_per_apl;
564: fetch csr_valid_person_per_apl into l_application_id;
565: if (csr_valid_person_per_apl%found) then
566: close csr_valid_person_per_apl;
567: hr_utility.set_message(801,'HR_51190_APL_DTE_REC_PERSON');
568: hr_multi_message.add
569: (p_associated_column1 => 'PER_APPLICATIONS.PERSON_ID'
570: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_RECEIVED'
571: );
572: else
573: close csr_valid_person_per_apl;
574: end if;
575: --
576: hr_utility.set_location(l_proc,91);
577: /*
578: */
579: --
580: end if;
577: /*
578: */
579: --
580: end if;
581: hr_utility.set_location('Leaving '||l_proc, 101);
582: end chk_date_received_person_id;
583: --
584: -- ---------------------------------------------------------------------------
585: -- |----------------< chk_projected_hire_date >------------------------------|
594: l_proc varchar2(72) := g_package||'chk_proj_hire_date';
595: l_api_updating boolean;
596: --
597: Begin
598: hr_utility.set_location('Entering:'||l_proc,1);
599: --
600: -- Check if projected hire date is not null, only validate if it is not null
601: --
602: if hr_multi_message.no_all_inclusive_error
617: nvl(p_projected_hire_date,hr_api.g_date))
618: or
619: NOT l_api_updating) then
620: --
621: hr_utility.set_location('Inside:'||l_proc,11);
622: --
623: -- Validate projected hire date WRT date received.
624: --
625: if (p_date_received > p_projected_hire_date) then
622: --
623: -- Validate projected hire date WRT date received.
624: --
625: if (p_date_received > p_projected_hire_date) then
626: hr_utility.set_message(801,'HR_51192_APL_PROJ_HIRE_DTE_REC');
627: hr_multi_message.add
628: (p_associated_column1 => 'PER_APPLICATIONS.DATE_RECEIVED'
629: ,p_associated_column2 => 'PER_APPLICATIONS.PROJECTED_HIRE_DATE'
630: );
629: ,p_associated_column2 => 'PER_APPLICATIONS.PROJECTED_HIRE_DATE'
630: );
631: end if;
632: end if;
633: hr_utility.set_location('Inside:'||l_proc,21);
634: --
635: end if;
636: hr_utility.set_location('Inside:'||l_proc,31);
637: --
632: end if;
633: hr_utility.set_location('Inside:'||l_proc,21);
634: --
635: end if;
636: hr_utility.set_location('Inside:'||l_proc,31);
637: --
638: end if;
639: hr_utility.set_location(' Leaving:' || l_proc, 41);
640: end chk_projected_hire_date;
635: end if;
636: hr_utility.set_location('Inside:'||l_proc,31);
637: --
638: end if;
639: hr_utility.set_location(' Leaving:' || l_proc, 41);
640: end chk_projected_hire_date;
641: --
642: -- ----------------------------------------------------------------------------
643: -- |---------------------------< chk_date_end >-------------------------------|
676: and CURRENT_APPLICANT_FLAG <> 'Y';
677: --bug no 5105005
678: --
679: Begin
680: hr_utility.set_location('Entering:'||l_proc,1);
681: --
682: -- If date_end is non null then do the remaining validation otherwise end
683: --
684: if (p_date_end is not null) then
682: -- If date_end is non null then do the remaining validation otherwise end
683: --
684: if (p_date_end is not null) then
685: --
686: hr_utility.set_location(l_proc,11);
687: --
688: -- Check if application is being updated and load g_old_rec if applicable
689: --
690: l_api_updating := per_apl_shd.api_updating
696: if (NOT l_api_updating) then
697: --
698: -- On insert and not null, so raise error
699: --
700: hr_utility.set_location(l_proc,21);
701: --
702: hr_utility.set_message(801,'HR_7441_API_ARG_NOT_SET');
703: hr_utility.set_message_token('ARG_NAME','DATE_END');
704: hr_multi_message.add
698: -- On insert and not null, so raise error
699: --
700: hr_utility.set_location(l_proc,21);
701: --
702: hr_utility.set_message(801,'HR_7441_API_ARG_NOT_SET');
703: hr_utility.set_message_token('ARG_NAME','DATE_END');
704: hr_multi_message.add
705: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
706: );
699: --
700: hr_utility.set_location(l_proc,21);
701: --
702: hr_utility.set_message(801,'HR_7441_API_ARG_NOT_SET');
703: hr_utility.set_message_token('ARG_NAME','DATE_END');
704: hr_multi_message.add
705: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
706: );
707: --
710: p_date_end) then
711: --
712: -- Date end changed to a not null value so do validation
713: --
714: hr_utility.set_location(l_proc,31);
715: --
716: -- If change is from not-null to different not-null then raise error
717: --
718: if (per_apl_shd.g_old_rec.date_end is not null and
716: -- If change is from not-null to different not-null then raise error
717: --
718: if (per_apl_shd.g_old_rec.date_end is not null and
719: per_apl_shd.g_old_rec.date_end <> p_date_end) then
720: hr_utility.set_location('Inside:'||l_proc,35);
721: hr_utility.set_message(801,'HR_51234_APL_INVALID_UPDATE');
722: hr_multi_message.add
723: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
724: );
717: --
718: if (per_apl_shd.g_old_rec.date_end is not null and
719: per_apl_shd.g_old_rec.date_end <> p_date_end) then
720: hr_utility.set_location('Inside:'||l_proc,35);
721: hr_utility.set_message(801,'HR_51234_APL_INVALID_UPDATE');
722: hr_multi_message.add
723: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
724: );
725: end if;
722: hr_multi_message.add
723: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
724: );
725: end if;
726: hr_utility.set_location(l_proc,41);
727: --
728: -- Raise error if date_end before date_received
729: --
730: if (p_date_end < p_date_received) then
727: --
728: -- Raise error if date_end before date_received
729: --
730: if (p_date_end < p_date_received) then
731: hr_utility.set_message(801,'HR_51235_APL_DTE_END_DTE_REC');
732: hr_multi_message.add
733: (p_associated_column1 => 'PER_APPLICATIONS.DATE_RECEIVED'
734: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_END'
735: );
733: (p_associated_column1 => 'PER_APPLICATIONS.DATE_RECEIVED'
734: ,p_associated_column2 => 'PER_APPLICATIONS.DATE_END'
735: );
736: end if;
737: hr_utility.set_location(l_proc,51);
738: --
739: -- Raise error if there are future changes to the applicant assignments
740: -- after date_end.
741: --
745: if csr_chk_asg_future_changes%found and (nvl(fnd_profile.value('HR_ALLOW_FPT_UPDATES'),'N') = 'N')then
746: --
747: close csr_chk_asg_future_changes;
748: --
749: hr_utility.set_message(801,'HR_51236_APL_ASG_FUTURE_CHGS');
750: hr_multi_message.add
751: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
752: );
753: else
755: close csr_chk_asg_future_changes;
756: --
757: end if;
758:
759: hr_utility.set_location(l_proc,61);
760: --
761: -- Raise error if there are future changes to the applicant person
762: -- after date_end.
763: --
766: if csr_chk_apl_future_changes%found then
767: --
768: close csr_chk_apl_future_changes;
769: --
770: hr_utility.set_message(801,'HR_51237_APL_PER_FUTURE_CHGS');
771: hr_multi_message.add
772: (p_associated_column1 => 'PER_APPLICATIONS.DATE_END'
773: );
774: else
775: --
776: close csr_chk_apl_future_changes;
777: --
778: end if;
779: hr_utility.set_location(l_proc,71);
780: --
781: end if;
782: hr_utility.set_location(l_proc,81);
783: --
778: end if;
779: hr_utility.set_location(l_proc,71);
780: --
781: end if;
782: hr_utility.set_location(l_proc,81);
783: --
784: end if;
785: hr_utility.set_location(' Leaving:' || l_proc,91);
786: end chk_date_end;
781: end if;
782: hr_utility.set_location(l_proc,81);
783: --
784: end if;
785: hr_utility.set_location(' Leaving:' || l_proc,91);
786: end chk_date_end;
787: --
788: -- ----------------------------------------------------------------------------
789: -- |------------------------< chk_successful_flag >---------------------------|
797: l_proc varchar2(72) := g_package||'chk_successful_flag';
798: l_api_updating boolean;
799: --
800: Begin
801: hr_utility.set_location('Entering:'||l_proc,1);
802: --
803: --
804: -- Check if application is being updated and load g_old_rec if applicable
805: --
814: nvl(p_successful_flag,hr_api.g_varchar2))
815: or
816: NOT l_api_updating) then
817: --
818: hr_utility.set_location('Inside:'||l_proc,11);
819: --
820: -- Check that successful flag is null
821: --
822: if p_successful_flag is not null then
820: -- Check that successful flag is null
821: --
822: if p_successful_flag is not null then
823: -- Error: Invalid value
824: hr_utility.set_message(801, 'HR_7441_API_ARG_NOT_SET');
825: hr_utility.set_message_token('ARG_NAME','SUCCESSFUL_FLAG');
826: hr_utility.raise_error;
827: end if;
828: hr_utility.set_location('Inside:'||l_proc,21);
821: --
822: if p_successful_flag is not null then
823: -- Error: Invalid value
824: hr_utility.set_message(801, 'HR_7441_API_ARG_NOT_SET');
825: hr_utility.set_message_token('ARG_NAME','SUCCESSFUL_FLAG');
826: hr_utility.raise_error;
827: end if;
828: hr_utility.set_location('Inside:'||l_proc,21);
829: --
822: if p_successful_flag is not null then
823: -- Error: Invalid value
824: hr_utility.set_message(801, 'HR_7441_API_ARG_NOT_SET');
825: hr_utility.set_message_token('ARG_NAME','SUCCESSFUL_FLAG');
826: hr_utility.raise_error;
827: end if;
828: hr_utility.set_location('Inside:'||l_proc,21);
829: --
830: end if;
824: hr_utility.set_message(801, 'HR_7441_API_ARG_NOT_SET');
825: hr_utility.set_message_token('ARG_NAME','SUCCESSFUL_FLAG');
826: hr_utility.raise_error;
827: end if;
828: hr_utility.set_location('Inside:'||l_proc,21);
829: --
830: end if;
831: --
832: hr_utility.set_location(' Leaving:' || l_proc, 31);
828: hr_utility.set_location('Inside:'||l_proc,21);
829: --
830: end if;
831: --
832: hr_utility.set_location(' Leaving:' || l_proc, 31);
833: --
834: exception
835: when app_exception.application_exception then
836: if hr_multi_message.exception_add
835: when app_exception.application_exception then
836: if hr_multi_message.exception_add
837: (p_associated_column1 => 'PER_APPLICATIONS.SUCCESSFUL_FLAG'
838: ) then
839: hr_utility.set_location(' Leaving:' || l_proc,40);
840: raise;
841: end if;
842: hr_utility.set_location(' Leaving:' || l_proc,41);
843: end chk_successful_flag;
838: ) then
839: hr_utility.set_location(' Leaving:' || l_proc,40);
840: raise;
841: end if;
842: hr_utility.set_location(' Leaving:' || l_proc,41);
843: end chk_successful_flag;
844: --
845: -- ----------------------------------------------------------------------------
846: -- |-----------------------< chk_termination_reason >-------------------------|
855: l_proc varchar2(72) := g_package||'chk_termination_reason';
856: l_api_updating boolean;
857: --
858: Begin
859: hr_utility.set_location('Entering:'||l_proc,1);
860: --
861: -- Check mandatory parameters have been set
862: --
863: hr_api.mandatory_arg_error
883: nvl(p_termination_reason,hr_api.g_varchar2))
884: or
885: NOT l_api_updating) then
886: --
887: hr_utility.set_location('Inside:'||l_proc,11);
888: --
889: -- Check that termination reason is in the lookups table
890: --
891: if hr_api.not_exists_in_hr_lookups
893: ,p_lookup_type => 'TERM_APL_REASON'
894: ,p_lookup_code => p_termination_reason
895: )then
896: -- Error : Invalid Termination Reason
897: hr_utility.set_message(801,'HR_51238_APL_TERM_REASON');
898: hr_utility.raise_error;
899: end if;
900: hr_utility.set_location('Inside:'||l_proc,21);
901: --
894: ,p_lookup_code => p_termination_reason
895: )then
896: -- Error : Invalid Termination Reason
897: hr_utility.set_message(801,'HR_51238_APL_TERM_REASON');
898: hr_utility.raise_error;
899: end if;
900: hr_utility.set_location('Inside:'||l_proc,21);
901: --
902: end if;
896: -- Error : Invalid Termination Reason
897: hr_utility.set_message(801,'HR_51238_APL_TERM_REASON');
898: hr_utility.raise_error;
899: end if;
900: hr_utility.set_location('Inside:'||l_proc,21);
901: --
902: end if;
903: --
904: end if;
902: end if;
903: --
904: end if;
905: --
906: hr_utility.set_location(' Leaving:'|| l_proc, 31);
907: exception
908: when app_exception.application_exception then
909: if hr_multi_message.exception_add
910: (p_associated_column1 => 'PER_APPLICATIONS.TERMINATION_REASON'
908: when app_exception.application_exception then
909: if hr_multi_message.exception_add
910: (p_associated_column1 => 'PER_APPLICATIONS.TERMINATION_REASON'
911: ) then
912: hr_utility.set_location(' Leaving:'||l_proc,40);
913: raise;
914: end if;
915: hr_utility.set_location(' Leaving:' ||l_proc,41);
916: end chk_termination_reason;
911: ) then
912: hr_utility.set_location(' Leaving:'||l_proc,40);
913: raise;
914: end if;
915: hr_utility.set_location(' Leaving:' ||l_proc,41);
916: end chk_termination_reason;
917: --
918: -- ---------------------------------------------------------------------------
919: -- |---------------------< return_legislation_code >-------------------------|
936: --
937: l_legislation_code varchar2(150);
938: l_proc varchar2(72) := g_package||'return_legislation_code';
939: begin
940: hr_utility.set_location('Entering:'|| l_proc, 10);
941: --
942: -- Ensure that all the mandatory parameter are not null
943: --
944: hr_api.mandatory_arg_error(p_api_name => l_proc,
951: close csr_leg_code;
952: --
953: -- The primary key is invalid therefore we must error
954: --
955: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
956: hr_utility.raise_error;
957: end if;
958: --
959: close csr_leg_code;
952: --
953: -- The primary key is invalid therefore we must error
954: --
955: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
956: hr_utility.raise_error;
957: end if;
958: --
959: close csr_leg_code;
960: hr_utility.set_location(' Leaving:' || l_proc, 20);
956: hr_utility.raise_error;
957: end if;
958: --
959: close csr_leg_code;
960: hr_utility.set_location(' Leaving:' || l_proc, 20);
961: --
962: return l_legislation_code;
963: end return_legislation_code;
964: --