22: l_error exception;
23: l_argument varchar2(30);
24:
25: Begin
26: hr_utility.set_location('Entering:'||l_proc, 5);
27:
28: -- Only proceed with validation if a row exists for
29: -- the current record in the HR Schema
30:
31: if not per_apt_shd.api_updating
32: (p_appraisal_template_id => p_rec.appraisal_template_id
33: ,p_object_version_number => p_rec.object_version_number
34: ) then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP', '5');
38: end if;
39:
32: (p_appraisal_template_id => p_rec.appraisal_template_id
33: ,p_object_version_number => p_rec.object_version_number
34: ) then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP', '5');
38: end if;
39:
40: hr_utility.set_location(l_proc, 6);
33: ,p_object_version_number => p_rec.object_version_number
34: ) then
35: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP', '5');
38: end if;
39:
40: hr_utility.set_location(l_proc, 6);
41:
36: hr_utility.set_message_token('PROCEDURE', l_proc);
37: hr_utility.set_message_token('STEP', '5');
38: end if;
39:
40: hr_utility.set_location(l_proc, 6);
41:
42: if p_rec.business_group_id <> per_apt_shd.g_old_rec.business_group_id then
43: l_argument := 'business_group_id';
44: raise l_error;
42: if p_rec.business_group_id <> per_apt_shd.g_old_rec.business_group_id then
43: l_argument := 'business_group_id';
44: raise l_error;
45: end if;
46: hr_utility.set_location(l_proc, 11);
47:
48: exception
49: when l_error then
50: hr_api.argument_changed_error
51: (p_api_name => l_proc
52: ,p_argument => l_argument);
53: when others then
54: raise;
55: hr_utility.set_location(' Leaving:'||l_proc, 12);
56: end chk_non_updateable_args;
57:
58: ----------------------------------------------------------------------------+
59: ------------------------------------
112: )
113: and apt.name = p_name and
114: ( business_group_id is null or p_business_group_id is null or business_group_id = p_business_group_id);
115: begin
116: hr_utility.set_location('Entering:'|| l_proc, 1);
117:
118:
119:
120: -- Only proceed with validation if :
133:
134: -- check if the user has entered a name
135: -- It is mandatory column.
136:
137: hr_utility.set_location(l_proc, 3);
138: if p_name is null then
139: hr_utility.set_message(801,'HR_51907_APT_NAME_MANDATORY');
140: hr_utility.raise_error;
141: end if;
135: -- It is mandatory column.
136:
137: hr_utility.set_location(l_proc, 3);
138: if p_name is null then
139: hr_utility.set_message(801,'HR_51907_APT_NAME_MANDATORY');
140: hr_utility.raise_error;
141: end if;
142:
143: hr_utility.set_location(l_proc, 4);
136:
137: hr_utility.set_location(l_proc, 3);
138: if p_name is null then
139: hr_utility.set_message(801,'HR_51907_APT_NAME_MANDATORY');
140: hr_utility.raise_error;
141: end if;
142:
143: hr_utility.set_location(l_proc, 4);
144: open csr_name_unique;
139: hr_utility.set_message(801,'HR_51907_APT_NAME_MANDATORY');
140: hr_utility.raise_error;
141: end if;
142:
143: hr_utility.set_location(l_proc, 4);
144: open csr_name_unique;
145: fetch csr_name_unique into l_business_group_id;
146: if csr_name_unique%found then
147: close csr_name_unique;
144: open csr_name_unique;
145: fetch csr_name_unique into l_business_group_id;
146: if csr_name_unique%found then
147: close csr_name_unique;
148: hr_utility.set_message(801,'HR_51908_APT_NAME_NOT_UNIQUE');
149: hr_utility.raise_error;
150: end if;
151: close csr_name_unique;
152: end if;
145: fetch csr_name_unique into l_business_group_id;
146: if csr_name_unique%found then
147: close csr_name_unique;
148: hr_utility.set_message(801,'HR_51908_APT_NAME_NOT_UNIQUE');
149: hr_utility.raise_error;
150: end if;
151: close csr_name_unique;
152: end if;
153:
150: end if;
151: close csr_name_unique;
152: end if;
153:
154: hr_utility.set_location(l_proc, 5);
155:
156: hr_utility.set_location('Leaving: '|| l_proc, 10);
157:
158: end chk_name;
152: end if;
153:
154: hr_utility.set_location(l_proc, 5);
155:
156: hr_utility.set_location('Leaving: '|| l_proc, 10);
157:
158: end chk_name;
159:
160:
217: and apr.appraisal_template_id = p_appraisal_template_id;
218:
219:
220: begin
221: hr_utility.set_location('Entering:'|| l_proc, 1);
222:
223: -- Check if date from is set to null when date to exists
224: if ( (p_date_from is null) AND (p_date_to is not null) )
225: then
222:
223: -- Check if date from is set to null when date to exists
224: if ( (p_date_from is null) AND (p_date_to is not null) )
225: then
226: hr_utility.set_message(800, 'HR_52247_APT_DATE_FROM_NULL');
227: hr_utility.raise_error;
228: end if;
229: -- Date From has to be <= date to, else error.
230: if ( nvl(p_date_from,hr_api.g_sot) > nvl(p_date_to,hr_api.g_eot) )
223: -- Check if date from is set to null when date to exists
224: if ( (p_date_from is null) AND (p_date_to is not null) )
225: then
226: hr_utility.set_message(800, 'HR_52247_APT_DATE_FROM_NULL');
227: hr_utility.raise_error;
228: end if;
229: -- Date From has to be <= date to, else error.
230: if ( nvl(p_date_from,hr_api.g_sot) > nvl(p_date_to,hr_api.g_eot) )
231: then
228: end if;
229: -- Date From has to be <= date to, else error.
230: if ( nvl(p_date_from,hr_api.g_sot) > nvl(p_date_to,hr_api.g_eot) )
231: then
232: hr_utility.set_message(801, 'HR_51909_APT_DATE_FROM_BEFORE');
233: hr_utility.raise_error;
234: end if;
235: -- Date To has to be >= date to, else error.
236: if ( nvl(p_date_to,hr_api.g_eot) < nvl(p_date_from,hr_api.g_sot) )
229: -- Date From has to be <= date to, else error.
230: if ( nvl(p_date_from,hr_api.g_sot) > nvl(p_date_to,hr_api.g_eot) )
231: then
232: hr_utility.set_message(801, 'HR_51909_APT_DATE_FROM_BEFORE');
233: hr_utility.raise_error;
234: end if;
235: -- Date To has to be >= date to, else error.
236: if ( nvl(p_date_to,hr_api.g_eot) < nvl(p_date_from,hr_api.g_sot) )
237: then
234: end if;
235: -- Date To has to be >= date to, else error.
236: if ( nvl(p_date_to,hr_api.g_eot) < nvl(p_date_from,hr_api.g_sot) )
237: then
238: hr_utility.set_message(801, 'HR_51910_APT_DATE_TO_AFTER');
239: hr_utility.raise_error;
240: end if;
241:
242: l_api_updating := per_apt_shd.api_updating
235: -- Date To has to be >= date to, else error.
236: if ( nvl(p_date_to,hr_api.g_eot) < nvl(p_date_from,hr_api.g_sot) )
237: then
238: hr_utility.set_message(801, 'HR_51910_APT_DATE_TO_AFTER');
239: hr_utility.raise_error;
240: end if;
241:
242: l_api_updating := per_apt_shd.api_updating
243: (p_appraisal_template_id => p_appraisal_template_id
261:
262: open csr_check_dates_in_apr;
263: fetch csr_check_dates_in_apr into l_exists;
264: if csr_check_dates_in_apr%found then
265: hr_utility.set_location(l_proc, 3);
266: -- dates out of range
267: close csr_check_dates_in_apr ;
268: hr_utility.set_message(801,'HR_51911_APT_INVALIDATE_APR');
269: hr_utility.raise_error;
264: if csr_check_dates_in_apr%found then
265: hr_utility.set_location(l_proc, 3);
266: -- dates out of range
267: close csr_check_dates_in_apr ;
268: hr_utility.set_message(801,'HR_51911_APT_INVALIDATE_APR');
269: hr_utility.raise_error;
270: end if;
271: close csr_check_dates_in_apr;
272:
265: hr_utility.set_location(l_proc, 3);
266: -- dates out of range
267: close csr_check_dates_in_apr ;
268: hr_utility.set_message(801,'HR_51911_APT_INVALIDATE_APR');
269: hr_utility.raise_error;
270: end if;
271: close csr_check_dates_in_apr;
272:
273: end if;
271: close csr_check_dates_in_apr;
272:
273: end if;
274:
275: hr_utility.set_location('Leaving:'|| l_proc, 10);
276:
277: end chk_template_dates;
278:
279: ----------------------------------------------------------------------------+
348: and nvl(date_to,hr_api.g_eot) >= nvl(p_date_to,hr_api.g_sot) ;
349: -- Bug 3947233 Ends Here
350:
351: begin
352: hr_utility.set_location('Entering:'|| l_proc, 1);
353:
354: -- Check mandatory parameters have been set
355:
356:
353:
354: -- Check mandatory parameters have been set
355:
356:
357: hr_utility.set_location('Entering:'|| l_proc, 2);
358:
359: l_api_updating := per_apt_shd.api_updating
360: (p_appraisal_template_id => p_appraisal_template_id
361: ,p_object_version_number => p_object_version_number);
375: open csr_appraisal_type_exists;
376: fetch csr_appraisal_type_exists into l_business_group_id;
377: if csr_appraisal_type_exists%notfound then
378: close csr_appraisal_type_exists;
379: hr_utility.set_message(801,'HR_51912_APT_AST_NOT_EXIST');
380: hr_utility.raise_error;
381: end if;
382: close csr_appraisal_type_exists;
383:
376: fetch csr_appraisal_type_exists into l_business_group_id;
377: if csr_appraisal_type_exists%notfound then
378: close csr_appraisal_type_exists;
379: hr_utility.set_message(801,'HR_51912_APT_AST_NOT_EXIST');
380: hr_utility.raise_error;
381: end if;
382: close csr_appraisal_type_exists;
383:
384: -- check if assessment is in the same business group
383:
384: -- check if assessment is in the same business group
385:
386: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
387: hr_utility.set_message(800,'HR_51913_APT_AST_DIFF_BUS_GRP');
388: hr_utility.raise_error;
389: end if;
390:
391: -- check if assessment type exists with the date range of the
384: -- check if assessment is in the same business group
385:
386: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
387: hr_utility.set_message(800,'HR_51913_APT_AST_DIFF_BUS_GRP');
388: hr_utility.raise_error;
389: end if;
390:
391: -- check if assessment type exists with the date range of the
392: -- appraisal template
394: open csr_assessment_type_valid;
395: fetch csr_assessment_type_valid into l_exists;
396: if csr_assessment_type_valid%notfound then
397: close csr_assessment_type_valid;
398: hr_utility.set_message(801,'HR_51914_APT_AST_NOT_DATE');
399: hr_utility.raise_error;
400: end if;
401: close csr_assessment_type_valid;
402: end if;
395: fetch csr_assessment_type_valid into l_exists;
396: if csr_assessment_type_valid%notfound then
397: close csr_assessment_type_valid;
398: hr_utility.set_message(801,'HR_51914_APT_AST_NOT_DATE');
399: hr_utility.raise_error;
400: end if;
401: close csr_assessment_type_valid;
402: end if;
403:
402: end if;
403:
404: end if;
405:
406: hr_utility.set_location(l_proc, 4);
407:
408: hr_utility.set_location('Leaving: '|| l_proc, 10);
409:
410: end chk_assessment_type;
404: end if;
405:
406: hr_utility.set_location(l_proc, 4);
407:
408: hr_utility.set_location('Leaving: '|| l_proc, 10);
409:
410: end chk_assessment_type;
411:
412: ----------------------------------------------------------------------------+
481: and nvl(date_to,hr_api.g_eot) >= nvl(p_date_to,hr_api.g_sot) ;
482: -- Bug 3947233 Ends Here
483:
484: begin
485: hr_utility.set_location('Entering:'|| l_proc, 1);
486:
487:
488:
489: l_api_updating := per_apt_shd.api_updating
505: open csr_appraisal_type_exists;
506: fetch csr_appraisal_type_exists into l_business_group_id;
507: if csr_appraisal_type_exists%notfound then
508: close csr_appraisal_type_exists;
509: hr_utility.set_message(800,'HR_APT_OAST_NOT_EXIST');
510: hr_utility.raise_error;
511: end if;
512: close csr_appraisal_type_exists;
513:
506: fetch csr_appraisal_type_exists into l_business_group_id;
507: if csr_appraisal_type_exists%notfound then
508: close csr_appraisal_type_exists;
509: hr_utility.set_message(800,'HR_APT_OAST_NOT_EXIST');
510: hr_utility.raise_error;
511: end if;
512: close csr_appraisal_type_exists;
513:
514: -- check if assessment is in the same business group
513:
514: -- check if assessment is in the same business group
515:
516: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
517: hr_utility.set_message(800,'HR_APT_OAST_DIFF_BUS_GRP');
518: hr_utility.raise_error;
519: end if;
520:
521: -- check if assessment type exists with the date range of the
514: -- check if assessment is in the same business group
515:
516: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
517: hr_utility.set_message(800,'HR_APT_OAST_DIFF_BUS_GRP');
518: hr_utility.raise_error;
519: end if;
520:
521: -- check if assessment type exists with the date range of the
522: -- appraisal template
524: open csr_assessment_type_valid;
525: fetch csr_assessment_type_valid into l_exists;
526: if csr_assessment_type_valid%notfound then
527: close csr_assessment_type_valid;
528: hr_utility.set_message(800,'HR_APT_OAST_NOT_DATE');
529: hr_utility.raise_error;
530: end if;
531: close csr_assessment_type_valid;
532: end if;
525: fetch csr_assessment_type_valid into l_exists;
526: if csr_assessment_type_valid%notfound then
527: close csr_assessment_type_valid;
528: hr_utility.set_message(800,'HR_APT_OAST_NOT_DATE');
529: hr_utility.raise_error;
530: end if;
531: close csr_assessment_type_valid;
532: end if;
533:
532: end if;
533:
534: end if;
535:
536: hr_utility.set_location(l_proc, 4);
537:
538: hr_utility.set_location('Leaving: '|| l_proc, 10);
539:
540: end chk_objective_asmnt_type;
534: end if;
535:
536: hr_utility.set_location(l_proc, 4);
537:
538: hr_utility.set_location('Leaving: '|| l_proc, 10);
539:
540: end chk_objective_asmnt_type;
541:
542: ----------------------------------------------------------------------------+
628: where apr.appraisal_template_id
629: = p_appraisal_template_id);
630:
631: begin
632: hr_utility.set_location('Entering:'|| l_proc, 1);
633:
634: l_api_updating := per_apt_shd.api_updating
635: (p_appraisal_template_id => p_appraisal_template_id
636: ,p_object_version_number => p_object_version_number);
639:
640: if (NOT l_api_updating) then
641: -- check if template exists
642: if p_questionnaire_template_id is not null then
643: hr_utility.set_location(l_proc, 3);
644: open csr_question_template_exists;
645: fetch csr_question_template_exists into l_bus_grp_id;
646: if csr_question_template_exists%notfound then
647: close csr_question_template_exists;
644: open csr_question_template_exists;
645: fetch csr_question_template_exists into l_bus_grp_id;
646: if csr_question_template_exists%notfound then
647: close csr_question_template_exists;
648: hr_utility.set_message(800,'HR_51915_APT_QST_NOT_EXIST');
649: hr_utility.raise_error;
650: end if;
651: close csr_question_template_exists;
652:
645: fetch csr_question_template_exists into l_bus_grp_id;
646: if csr_question_template_exists%notfound then
647: close csr_question_template_exists;
648: hr_utility.set_message(800,'HR_51915_APT_QST_NOT_EXIST');
649: hr_utility.raise_error;
650: end if;
651: close csr_question_template_exists;
652:
653: -- check if questionnaire template is of type 'APPRAISAL'
651: close csr_question_template_exists;
652:
653: -- check if questionnaire template is of type 'APPRAISAL'
654:
655: hr_utility.set_location(l_proc, 6);
656: -- if l_type <> 'APPRAISAL' then
657: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
658: -- hr_utility.raise_error;
659: -- end if;
653: -- check if questionnaire template is of type 'APPRAISAL'
654:
655: hr_utility.set_location(l_proc, 6);
656: -- if l_type <> 'APPRAISAL' then
657: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
658: -- hr_utility.raise_error;
659: -- end if;
660:
661: -- Check if business_group_id is correct for the given questionnaire
654:
655: hr_utility.set_location(l_proc, 6);
656: -- if l_type <> 'APPRAISAL' then
657: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
658: -- hr_utility.raise_error;
659: -- end if;
660:
661: -- Check if business_group_id is correct for the given questionnaire
662: -- template id.
679: then
680:
681: -- Check if the questionnaire template can be updated first.
682:
683: -- hr_utility.set_location(l_proc, 7);
684: -- open csr_question_update;
685: -- fetch csr_question_update into l_exists;
686: -- if csr_question_update%found then
687: -- close csr_question_update;
684: -- open csr_question_update;
685: -- fetch csr_question_update into l_exists;
686: -- if csr_question_update%found then
687: -- close csr_question_update;
688: -- hr_utility.set_message(801,'HR_51917_APT_USED_IN_APR_ANS');
689: -- hr_utility.raise_error;
690: -- end if;
691: -- close csr_question_update;
692: open csr_question_update1;
685: -- fetch csr_question_update into l_exists;
686: -- if csr_question_update%found then
687: -- close csr_question_update;
688: -- hr_utility.set_message(801,'HR_51917_APT_USED_IN_APR_ANS');
689: -- hr_utility.raise_error;
690: -- end if;
691: -- close csr_question_update;
692: open csr_question_update1;
693: fetch csr_question_update1 into l_exists;
710:
711:
712: -- check if questionnaire template is of type 'APPRAISAL'
713:
714: -- hr_utility.set_location(l_proc, 9);
715: -- if l_type <> 'APPRAISAL' then
716: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
717: -- hr_utility.raise_error;
718: -- end if;
712: -- check if questionnaire template is of type 'APPRAISAL'
713:
714: -- hr_utility.set_location(l_proc, 9);
715: -- if l_type <> 'APPRAISAL' then
716: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
717: -- hr_utility.raise_error;
718: -- end if;
719:
720: -- check if questionnaire template is of correct business_group
713:
714: -- hr_utility.set_location(l_proc, 9);
715: -- if l_type <> 'APPRAISAL' then
716: -- hr_utility.set_message(801,'HR_51916_APT_QST_INV_TYPE');
717: -- hr_utility.raise_error;
718: -- end if;
719:
720: -- check if questionnaire template is of correct business_group
721:
720: -- check if questionnaire template is of correct business_group
721:
722: end if;
723:
724: hr_utility.set_location(l_proc, 10);
725:
726: hr_utility.set_location('Leaving: '|| l_proc, 11);
727:
728: end chk_question_template;
722: end if;
723:
724: hr_utility.set_location(l_proc, 10);
725:
726: hr_utility.set_location('Leaving: '|| l_proc, 11);
727:
728: end chk_question_template;
729:
730:
817: where apr.appraisal_template_id
818: = p_appraisal_template_id);
819:
820: begin
821: hr_utility.set_location('Entering:'|| l_proc, 1);
822:
823: l_api_updating := per_apt_shd.api_updating
824: (p_appraisal_template_id => p_appraisal_template_id
825: ,p_object_version_number => p_object_version_number);
828:
829: if (NOT l_api_updating) then
830: -- check if template exists
831: if p_ma_quest_template_id is not null then
832: hr_utility.set_location(l_proc, 3);
833: open csr_question_template_exists;
834: fetch csr_question_template_exists into l_bus_grp_id;
835: if csr_question_template_exists%notfound then
836: close csr_question_template_exists;
833: open csr_question_template_exists;
834: fetch csr_question_template_exists into l_bus_grp_id;
835: if csr_question_template_exists%notfound then
836: close csr_question_template_exists;
837: hr_utility.set_message(800,'HR_APT_MA_QST_NOT_EXIST');
838: hr_utility.raise_error;
839: end if;
840: close csr_question_template_exists;
841:
834: fetch csr_question_template_exists into l_bus_grp_id;
835: if csr_question_template_exists%notfound then
836: close csr_question_template_exists;
837: hr_utility.set_message(800,'HR_APT_MA_QST_NOT_EXIST');
838: hr_utility.raise_error;
839: end if;
840: close csr_question_template_exists;
841:
842:
863: then
864:
865: -- Check if the questionnaire template can be updated first.
866:
867: -- hr_utility.set_location(l_proc, 7);
868: -- open csr_question_update;
869: -- fetch csr_question_update into l_exists;
870: -- if csr_question_update%found then
871: -- close csr_question_update;
868: -- open csr_question_update;
869: -- fetch csr_question_update into l_exists;
870: -- if csr_question_update%found then
871: -- close csr_question_update;
872: -- hr_utility.set_message(801,'HR_51917_APT_USED_IN_APR_ANS');
873: -- hr_utility.raise_error;
874: -- end if;
875: -- close csr_question_update;
876: open csr_question_update1;
869: -- fetch csr_question_update into l_exists;
870: -- if csr_question_update%found then
871: -- close csr_question_update;
872: -- hr_utility.set_message(801,'HR_51917_APT_USED_IN_APR_ANS');
873: -- hr_utility.raise_error;
874: -- end if;
875: -- close csr_question_update;
876: open csr_question_update1;
877: fetch csr_question_update1 into l_exists;
896:
897: -- check if questionnaire template is of correct business_group
898:
899: if l_bus_grp_id <> p_business_group_id then
900: hr_utility.set_message(801,'PER_52470_TEMP_NOT_IN_BG');
901: hr_utility.raise_error;
902: end if;
903: end if;
904:
897: -- check if questionnaire template is of correct business_group
898:
899: if l_bus_grp_id <> p_business_group_id then
900: hr_utility.set_message(801,'PER_52470_TEMP_NOT_IN_BG');
901: hr_utility.raise_error;
902: end if;
903: end if;
904:
905: hr_utility.set_location(l_proc, 10);
901: hr_utility.raise_error;
902: end if;
903: end if;
904:
905: hr_utility.set_location(l_proc, 10);
906:
907: hr_utility.set_location('Leaving: '|| l_proc, 11);
908:
909: end chk_ma_question_template;
903: end if;
904:
905: hr_utility.set_location(l_proc, 10);
906:
907: hr_utility.set_location('Leaving: '|| l_proc, 11);
908:
909: end chk_ma_question_template;
910:
911: ----------------------------------------------------------------------------+
996: and apr.appraisal_template_id = p_appraisal_template_id;
997:
998:
999: begin
1000: hr_utility.set_location('Entering:'|| l_proc, 1);
1001:
1002: -- Check mandatory parameters have been set
1003:
1004: -- ngundura change done for pa requirements
1009: );
1010: */
1011: -- ngundura end of changes
1012:
1013: hr_utility.set_location('Entering:'|| l_proc, 2);
1014:
1015: l_api_updating := per_apt_shd.api_updating
1016: (p_appraisal_template_id => p_appraisal_template_id
1017: ,p_object_version_number => p_object_version_number);
1021: -- b) The value for rating scale has changed
1022:
1023: if (NOT l_api_updating) then
1024: if p_rating_scale_id is not null then
1025: hr_utility.set_location(l_proc, 3);
1026: open csr_rating_scale_exists;
1027: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1028: if csr_rating_scale_exists%notfound then
1029: close csr_rating_scale_exists;
1026: open csr_rating_scale_exists;
1027: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1028: if csr_rating_scale_exists%notfound then
1029: close csr_rating_scale_exists;
1030: hr_utility.set_message(801,'HR_51928_APT_RSC_NOT_EXIST');
1031: hr_utility.raise_error;
1032: end if;
1033: close csr_rating_scale_exists;
1034:
1027: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1028: if csr_rating_scale_exists%notfound then
1029: close csr_rating_scale_exists;
1030: hr_utility.set_message(801,'HR_51928_APT_RSC_NOT_EXIST');
1031: hr_utility.raise_error;
1032: end if;
1033: close csr_rating_scale_exists;
1034:
1035: -- check if rating scale is in the same business group
1033: close csr_rating_scale_exists;
1034:
1035: -- check if rating scale is in the same business group
1036:
1037: hr_utility.set_location(l_proc, 5);
1038: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
1039: if(l_business_group_id is not null) then
1040: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1041: hr_utility.raise_error;
1036:
1037: hr_utility.set_location(l_proc, 5);
1038: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
1039: if(l_business_group_id is not null) then
1040: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1041: hr_utility.raise_error;
1042: end if;
1043: end if;
1044:
1037: hr_utility.set_location(l_proc, 5);
1038: if nvl(l_business_group_id,-1) <> nvl(p_business_group_id,-1) then
1039: if(l_business_group_id is not null) then
1040: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1041: hr_utility.raise_error;
1042: end if;
1043: end if;
1044:
1045: -- check if rating scale template is of type 'PERFORMANCE'
1043: end if;
1044:
1045: -- check if rating scale template is of type 'PERFORMANCE'
1046:
1047: hr_utility.set_location(l_proc, 6);
1048: if l_type <> 'PERFORMANCE' then
1049: hr_utility.set_message(801,'HR_51930_APT_RSC_INV_TYPE');
1050: hr_utility.raise_error;
1051: end if;
1045: -- check if rating scale template is of type 'PERFORMANCE'
1046:
1047: hr_utility.set_location(l_proc, 6);
1048: if l_type <> 'PERFORMANCE' then
1049: hr_utility.set_message(801,'HR_51930_APT_RSC_INV_TYPE');
1050: hr_utility.raise_error;
1051: end if;
1052: end if;
1053: end if;
1046:
1047: hr_utility.set_location(l_proc, 6);
1048: if l_type <> 'PERFORMANCE' then
1049: hr_utility.set_message(801,'HR_51930_APT_RSC_INV_TYPE');
1050: hr_utility.raise_error;
1051: end if;
1052: end if;
1053: end if;
1054:
1061: then
1062:
1063: -- Check if the rating scale can be updated
1064:
1065: hr_utility.set_location(l_proc, 7);
1066: open csr_rating_scale_update1;
1067: fetch csr_rating_scale_update1 into l_overall_performance_level_id;
1068: close csr_rating_scale_update1;
1069: if l_overall_performance_level_id is not null then
1066: open csr_rating_scale_update1;
1067: fetch csr_rating_scale_update1 into l_overall_performance_level_id;
1068: close csr_rating_scale_update1;
1069: if l_overall_performance_level_id is not null then
1070: hr_utility.set_message(801,'HR_51931_APT_APR_LVL_NOTNULL');
1071: hr_utility.raise_error;
1072: end if;
1073:
1074: hr_utility.set_location(l_proc, 8);
1067: fetch csr_rating_scale_update1 into l_overall_performance_level_id;
1068: close csr_rating_scale_update1;
1069: if l_overall_performance_level_id is not null then
1070: hr_utility.set_message(801,'HR_51931_APT_APR_LVL_NOTNULL');
1071: hr_utility.raise_error;
1072: end if;
1073:
1074: hr_utility.set_location(l_proc, 8);
1075: open csr_rating_scale_update2;
1070: hr_utility.set_message(801,'HR_51931_APT_APR_LVL_NOTNULL');
1071: hr_utility.raise_error;
1072: end if;
1073:
1074: hr_utility.set_location(l_proc, 8);
1075: open csr_rating_scale_update2;
1076: fetch csr_rating_scale_update2 into l_exists;
1077: if csr_rating_scale_update2%found then
1078: close csr_rating_scale_update2;
1075: open csr_rating_scale_update2;
1076: fetch csr_rating_scale_update2 into l_exists;
1077: if csr_rating_scale_update2%found then
1078: close csr_rating_scale_update2;
1079: hr_utility.set_message(801,'HR_51932_APT_EXIST_IN_PRF');
1080: hr_utility.raise_error;
1081: end if;
1082: close csr_rating_scale_update2;
1083:
1076: fetch csr_rating_scale_update2 into l_exists;
1077: if csr_rating_scale_update2%found then
1078: close csr_rating_scale_update2;
1079: hr_utility.set_message(801,'HR_51932_APT_EXIST_IN_PRF');
1080: hr_utility.raise_error;
1081: end if;
1082: close csr_rating_scale_update2;
1083:
1084: -- Now check if the rating scale exists and is of the correct type
1083:
1084: -- Now check if the rating scale exists and is of the correct type
1085:
1086: if p_rating_scale_id is not null then
1087: hr_utility.set_location(l_proc, 9);
1088: open csr_rating_scale_exists;
1089: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1090: if csr_rating_scale_exists%notfound then
1091: close csr_rating_scale_exists;
1088: open csr_rating_scale_exists;
1089: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1090: if csr_rating_scale_exists%notfound then
1091: close csr_rating_scale_exists;
1092: hr_utility.set_message(801,'HR_51928_APT_RSC_NOT_EXIST');
1093: hr_utility.raise_error;
1094: end if;
1095: close csr_rating_scale_exists;
1096:
1089: fetch csr_rating_scale_exists into l_business_group_id,l_type;
1090: if csr_rating_scale_exists%notfound then
1091: close csr_rating_scale_exists;
1092: hr_utility.set_message(801,'HR_51928_APT_RSC_NOT_EXIST');
1093: hr_utility.raise_error;
1094: end if;
1095: close csr_rating_scale_exists;
1096:
1097: -- check if rating scale is in the same business group
1095: close csr_rating_scale_exists;
1096:
1097: -- check if rating scale is in the same business group
1098:
1099: hr_utility.set_location(l_proc, 10);
1100: if l_business_group_id <> p_business_group_id then
1101: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1102: hr_utility.raise_error;
1103: end if;
1097: -- check if rating scale is in the same business group
1098:
1099: hr_utility.set_location(l_proc, 10);
1100: if l_business_group_id <> p_business_group_id then
1101: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1102: hr_utility.raise_error;
1103: end if;
1104:
1105: -- check if rating scale template is of type 'PERFORMANCE'
1098:
1099: hr_utility.set_location(l_proc, 10);
1100: if l_business_group_id <> p_business_group_id then
1101: hr_utility.set_message(801,'HR_51929_APT_RSC_DIFF_BUS_GRP');
1102: hr_utility.raise_error;
1103: end if;
1104:
1105: -- check if rating scale template is of type 'PERFORMANCE'
1106:
1103: end if;
1104:
1105: -- check if rating scale template is of type 'PERFORMANCE'
1106:
1107: hr_utility.set_location(l_proc, 11);
1108: if l_type <> 'PERFORMANCE' then
1109: hr_utility.set_message(801,'HR_52930_APT_RSC_INV_TYPE');
1110: hr_utility.raise_error;
1111: end if;
1105: -- check if rating scale template is of type 'PERFORMANCE'
1106:
1107: hr_utility.set_location(l_proc, 11);
1108: if l_type <> 'PERFORMANCE' then
1109: hr_utility.set_message(801,'HR_52930_APT_RSC_INV_TYPE');
1110: hr_utility.raise_error;
1111: end if;
1112: end if;
1113:
1106:
1107: hr_utility.set_location(l_proc, 11);
1108: if l_type <> 'PERFORMANCE' then
1109: hr_utility.set_message(801,'HR_52930_APT_RSC_INV_TYPE');
1110: hr_utility.raise_error;
1111: end if;
1112: end if;
1113:
1114: end if;
1112: end if;
1113:
1114: end if;
1115:
1116: hr_utility.set_location(l_proc, 12);
1117:
1118: hr_utility.set_location('Leaving: '|| l_proc, 10);
1119:
1120: end chk_rating_scale;
1114: end if;
1115:
1116: hr_utility.set_location(l_proc, 12);
1117:
1118: hr_utility.set_location('Leaving: '|| l_proc, 10);
1119:
1120: end chk_rating_scale;
1121:
1122:
1166: from per_appraisals
1167: where appraisal_template_id = p_appraisal_template_id;
1168:
1169: begin
1170: hr_utility.set_location('Entering:'|| l_proc, 1);
1171:
1172: -- Check mandatory parameters have been set
1173:
1174: hr_api.mandatory_arg_error
1177: ,p_argument_value => p_appraisal_template_id
1178: );
1179:
1180:
1181: hr_utility.set_location('Entering:'|| l_proc, 2);
1182:
1183: open csr_template_delete;
1184: fetch csr_template_delete into l_exists;
1185: if csr_template_delete%found then
1183: open csr_template_delete;
1184: fetch csr_template_delete into l_exists;
1185: if csr_template_delete%found then
1186: close csr_template_delete;
1187: hr_utility.set_message(801,'HR_51933_APT_EXIST_IN_APR');
1188: hr_utility.raise_error;
1189: end if;
1190: close csr_template_delete;
1191:
1184: fetch csr_template_delete into l_exists;
1185: if csr_template_delete%found then
1186: close csr_template_delete;
1187: hr_utility.set_message(801,'HR_51933_APT_EXIST_IN_APR');
1188: hr_utility.raise_error;
1189: end if;
1190: close csr_template_delete;
1191:
1192: hr_utility.set_location('Leaving: '|| l_proc, 10);
1188: hr_utility.raise_error;
1189: end if;
1190: close csr_template_delete;
1191:
1192: hr_utility.set_location('Leaving: '|| l_proc, 10);
1193:
1194: end chk_template_delete;
1195:
1196: --------------------------------------------------------------------------+
1245: --
1246: begin
1247: -- Bug#885806
1248: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1249: hr_utility.trace('Inside the chk_update_comp_profile procedure');
1250: hr_utility.set_location('Entering:'|| l_proc, 1);
1251:
1252: if ( p_assessment_type_id is null and p_update_personal_comp_profile is not null ) then
1253: hr_utility.set_location(l_proc, 2);
1246: begin
1247: -- Bug#885806
1248: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1249: hr_utility.trace('Inside the chk_update_comp_profile procedure');
1250: hr_utility.set_location('Entering:'|| l_proc, 1);
1251:
1252: if ( p_assessment_type_id is null and p_update_personal_comp_profile is not null ) then
1253: hr_utility.set_location(l_proc, 2);
1254: hr_utility.set_message(800,'HR_APT_AST_REQUIRED_MSG');
1249: hr_utility.trace('Inside the chk_update_comp_profile procedure');
1250: hr_utility.set_location('Entering:'|| l_proc, 1);
1251:
1252: if ( p_assessment_type_id is null and p_update_personal_comp_profile is not null ) then
1253: hr_utility.set_location(l_proc, 2);
1254: hr_utility.set_message(800,'HR_APT_AST_REQUIRED_MSG');
1255: hr_utility.raise_error;
1256:
1257: end if;
1250: hr_utility.set_location('Entering:'|| l_proc, 1);
1251:
1252: if ( p_assessment_type_id is null and p_update_personal_comp_profile is not null ) then
1253: hr_utility.set_location(l_proc, 2);
1254: hr_utility.set_message(800,'HR_APT_AST_REQUIRED_MSG');
1255: hr_utility.raise_error;
1256:
1257: end if;
1258: --
1251:
1252: if ( p_assessment_type_id is null and p_update_personal_comp_profile is not null ) then
1253: hr_utility.set_location(l_proc, 2);
1254: hr_utility.set_message(800,'HR_APT_AST_REQUIRED_MSG');
1255: hr_utility.raise_error;
1256:
1257: end if;
1258: --
1259: -- Check mandatory parameters have been set
1279: <> nvl(p_update_personal_comp_profile, hr_api.g_varchar2))
1280: or
1281: (NOT l_api_updating)) then
1282: --
1283: hr_utility.set_location(l_proc, 5);
1284: --
1285: -- Check the value in p_display_assessment_comments exists in hr_lookups
1286: --
1287: if hr_api.not_exists_in_hr_lookups
1288: (p_effective_date => p_effective_date
1289: ,p_lookup_type => 'YES_NO'
1290: ,p_lookup_code => p_update_personal_comp_profile
1291: ) then
1292: hr_utility.set_location(l_proc, 10);
1293: hr_utility.set_message(801,'HR_APT_UPD_COMP_PROF_INVAL');
1294: hr_utility.raise_error;
1295: end if;
1296: --
1289: ,p_lookup_type => 'YES_NO'
1290: ,p_lookup_code => p_update_personal_comp_profile
1291: ) then
1292: hr_utility.set_location(l_proc, 10);
1293: hr_utility.set_message(801,'HR_APT_UPD_COMP_PROF_INVAL');
1294: hr_utility.raise_error;
1295: end if;
1296: --
1297: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1290: ,p_lookup_code => p_update_personal_comp_profile
1291: ) then
1292: hr_utility.set_location(l_proc, 10);
1293: hr_utility.set_message(801,'HR_APT_UPD_COMP_PROF_INVAL');
1294: hr_utility.raise_error;
1295: end if;
1296: --
1297: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1298: end if;
1293: hr_utility.set_message(801,'HR_APT_UPD_COMP_PROF_INVAL');
1294: hr_utility.raise_error;
1295: end if;
1296: --
1297: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1298: end if;
1299: end chk_update_comp_profile;
1300:
1301: --------------------------------------------------------------------------+
1350: --
1351: begin
1352: -- Bug#885806
1353: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1354: hr_utility.trace('Inside the chk_comp_profile_source_type procedure');
1355: hr_utility.set_location('Entering:'|| l_proc, 1);
1356:
1357: if ( p_comp_profile_source_type is not null and ( p_update_personal_comp_profile is null or p_update_personal_comp_profile = 'N') ) then
1358: hr_utility.set_location(l_proc, 2);
1351: begin
1352: -- Bug#885806
1353: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1354: hr_utility.trace('Inside the chk_comp_profile_source_type procedure');
1355: hr_utility.set_location('Entering:'|| l_proc, 1);
1356:
1357: if ( p_comp_profile_source_type is not null and ( p_update_personal_comp_profile is null or p_update_personal_comp_profile = 'N') ) then
1358: hr_utility.set_location(l_proc, 2);
1359: hr_utility.set_message(800,'HR_APT_UPD_COMP_PROF_REQUIRED');
1354: hr_utility.trace('Inside the chk_comp_profile_source_type procedure');
1355: hr_utility.set_location('Entering:'|| l_proc, 1);
1356:
1357: if ( p_comp_profile_source_type is not null and ( p_update_personal_comp_profile is null or p_update_personal_comp_profile = 'N') ) then
1358: hr_utility.set_location(l_proc, 2);
1359: hr_utility.set_message(800,'HR_APT_UPD_COMP_PROF_REQUIRED');
1360: hr_utility.raise_error;
1361: end if;
1362: --
1355: hr_utility.set_location('Entering:'|| l_proc, 1);
1356:
1357: if ( p_comp_profile_source_type is not null and ( p_update_personal_comp_profile is null or p_update_personal_comp_profile = 'N') ) then
1358: hr_utility.set_location(l_proc, 2);
1359: hr_utility.set_message(800,'HR_APT_UPD_COMP_PROF_REQUIRED');
1360: hr_utility.raise_error;
1361: end if;
1362: --
1363: -- Check mandatory parameters have been set
1356:
1357: if ( p_comp_profile_source_type is not null and ( p_update_personal_comp_profile is null or p_update_personal_comp_profile = 'N') ) then
1358: hr_utility.set_location(l_proc, 2);
1359: hr_utility.set_message(800,'HR_APT_UPD_COMP_PROF_REQUIRED');
1360: hr_utility.raise_error;
1361: end if;
1362: --
1363: -- Check mandatory parameters have been set
1364: --
1383: <> nvl(p_comp_profile_source_type, hr_api.g_varchar2))
1384: or
1385: (NOT l_api_updating)) then
1386: --
1387: hr_utility.set_location(l_proc, 5);
1388: --
1389: -- Check the value in p_display_assessment_comments exists in hr_lookups
1390: --
1391: if hr_api.not_exists_in_hr_lookups
1392: (p_effective_date => p_effective_date
1393: ,p_lookup_type => 'PROFICIENCY_SOURCE'
1394: ,p_lookup_code => p_comp_profile_source_type
1395: ) then
1396: hr_utility.set_location(l_proc, 10);
1397: hr_utility.set_message(800,'HR_APT_COMP_PROF_SRC_INVAL');
1398: hr_utility.raise_error;
1399: end if;
1400: --
1393: ,p_lookup_type => 'PROFICIENCY_SOURCE'
1394: ,p_lookup_code => p_comp_profile_source_type
1395: ) then
1396: hr_utility.set_location(l_proc, 10);
1397: hr_utility.set_message(800,'HR_APT_COMP_PROF_SRC_INVAL');
1398: hr_utility.raise_error;
1399: end if;
1400: --
1401: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1394: ,p_lookup_code => p_comp_profile_source_type
1395: ) then
1396: hr_utility.set_location(l_proc, 10);
1397: hr_utility.set_message(800,'HR_APT_COMP_PROF_SRC_INVAL');
1398: hr_utility.raise_error;
1399: end if;
1400: --
1401: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1402: end if;
1397: hr_utility.set_message(800,'HR_APT_COMP_PROF_SRC_INVAL');
1398: hr_utility.raise_error;
1399: end if;
1400: --
1401: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1402: end if;
1403: end chk_comp_profile_source_type;
1404:
1405: --------------------------------------------------------------------------+
1449: --
1450: begin
1451: -- Bug#885806
1452: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1453: hr_utility.trace('Inside the chk_link_appr_to_learning_path procedure');
1454: hr_utility.set_location('Entering:'|| l_proc, 1);
1455:
1456:
1457: --
1450: begin
1451: -- Bug#885806
1452: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1453: hr_utility.trace('Inside the chk_link_appr_to_learning_path procedure');
1454: hr_utility.set_location('Entering:'|| l_proc, 1);
1455:
1456:
1457: --
1458: -- Check mandatory parameters have been set
1478: <> nvl(p_link_appr_to_learning_path, hr_api.g_varchar2))
1479: or
1480: (NOT l_api_updating)) then
1481: --
1482: hr_utility.set_location(l_proc, 5);
1483: --
1484: -- Check the value in p_link_appr_to_learning_path exists in hr_lookups
1485: --
1486: if hr_api.not_exists_in_hr_lookups
1487: (p_effective_date => p_effective_date
1488: ,p_lookup_type => 'YES_NO'
1489: ,p_lookup_code => p_link_appr_to_learning_path
1490: ) then
1491: hr_utility.set_location(l_proc, 10);
1492: hr_utility.set_message(800,'HR_APT_LINK_TO_LP_INVAL');
1493: hr_utility.raise_error;
1494: end if;
1495: --
1488: ,p_lookup_type => 'YES_NO'
1489: ,p_lookup_code => p_link_appr_to_learning_path
1490: ) then
1491: hr_utility.set_location(l_proc, 10);
1492: hr_utility.set_message(800,'HR_APT_LINK_TO_LP_INVAL');
1493: hr_utility.raise_error;
1494: end if;
1495: --
1496: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1489: ,p_lookup_code => p_link_appr_to_learning_path
1490: ) then
1491: hr_utility.set_location(l_proc, 10);
1492: hr_utility.set_message(800,'HR_APT_LINK_TO_LP_INVAL');
1493: hr_utility.raise_error;
1494: end if;
1495: --
1496: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1497: end if;
1492: hr_utility.set_message(800,'HR_APT_LINK_TO_LP_INVAL');
1493: hr_utility.raise_error;
1494: end if;
1495: --
1496: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1497: end if;
1498: end chk_link_appr_to_learning_path;
1499:
1500: --------------------------------------------------------------------------+
1544: --
1545: begin
1546: -- Bug#885806
1547: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1548: hr_utility.trace('Inside the chk_available_flag procedure');
1549: hr_utility.set_location('Entering:'|| l_proc, 1);
1550:
1551:
1552: --
1545: begin
1546: -- Bug#885806
1547: -- dbms_output.put_line('Inside the chk_display_assessment_comments procedure');
1548: hr_utility.trace('Inside the chk_available_flag procedure');
1549: hr_utility.set_location('Entering:'|| l_proc, 1);
1550:
1551:
1552: --
1553: -- Check mandatory parameters have been set
1573: <> nvl(p_available_flag, hr_api.g_varchar2))
1574: or
1575: (NOT l_api_updating)) then
1576: --
1577: hr_utility.set_location(l_proc, 5);
1578: --
1579: -- Check the value in p_available_flag exists in hr_lookups
1580: --
1581: if hr_api.not_exists_in_hr_lookups
1582: (p_effective_date => p_effective_date
1583: ,p_lookup_type => 'TEMPLATE_AVAILABILITY_FLAG'
1584: ,p_lookup_code => p_available_flag
1585: ) then
1586: hr_utility.set_location(l_proc, 10);
1587: hr_utility.set_message(800,'HR_AVAIL_FLAG_INVAL');
1588: hr_utility.raise_error;
1589: end if;
1590: --
1583: ,p_lookup_type => 'TEMPLATE_AVAILABILITY_FLAG'
1584: ,p_lookup_code => p_available_flag
1585: ) then
1586: hr_utility.set_location(l_proc, 10);
1587: hr_utility.set_message(800,'HR_AVAIL_FLAG_INVAL');
1588: hr_utility.raise_error;
1589: end if;
1590: --
1591: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1584: ,p_lookup_code => p_available_flag
1585: ) then
1586: hr_utility.set_location(l_proc, 10);
1587: hr_utility.set_message(800,'HR_AVAIL_FLAG_INVAL');
1588: hr_utility.raise_error;
1589: end if;
1590: --
1591: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1592: end if;
1587: hr_utility.set_message(800,'HR_AVAIL_FLAG_INVAL');
1588: hr_utility.raise_error;
1589: end if;
1590: --
1591: hr_utility.set_location(' Leaving:'|| l_proc, 15);
1592: end if;
1593: end chk_available_flag;
1594: -- ----------------------------------------------------------------------+
1595: -- |------------------------------< chk_df >-----------------------------+
1623:
1624: l_proc varchar2(72) := g_package||'chk_df';
1625:
1626: begin
1627: hr_utility.set_location('Entering:'||l_proc, 10);
1628:
1629: if ((p_rec.appraisal_template_id is not null) and (
1630: nvl(per_apt_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
1631: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
1723: ,p_attribute20_value => p_rec.attribute20
1724: );
1725: end if;
1726:
1727: hr_utility.set_location(' Leaving:'||l_proc, 20);
1728:
1729: end chk_df;
1730:
1731: -- ---------------------------------------------------------------------------+
1736:
1737: l_proc varchar2(72) := g_package||'insert_validate';
1738:
1739: Begin
1740: hr_utility.set_location('Entering:'||l_proc, 5);
1741:
1742: -- Call all supporting business operations
1743: if p_rec.business_group_id is not null then
1744: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1858: -- Call descriptive flexfield validation routines
1859:
1860: per_apt_bus.chk_df(p_rec => p_rec);
1861:
1862: hr_utility.set_location(' Leaving:'||l_proc, 45);
1863:
1864: hr_utility.set_location(' Leaving:'||l_proc, 10);
1865: End insert_validate;
1866:
1860: per_apt_bus.chk_df(p_rec => p_rec);
1861:
1862: hr_utility.set_location(' Leaving:'||l_proc, 45);
1863:
1864: hr_utility.set_location(' Leaving:'||l_proc, 10);
1865: End insert_validate;
1866:
1867: -- ---------------------------------------------------------------------------+
1868: -- |---------------------------< update_validate >----------------------------|
1872:
1873: l_proc varchar2(72) := g_package||'update_validate';
1874:
1875: Begin
1876: hr_utility.set_location('Entering:'||l_proc, 5);
1877:
1878: -- Call all supporting business operations
1879:
1880: if p_rec.business_group_id is not null then
1996: ,p_object_version_number => p_rec.object_version_number
1997: ,p_appraisal_template_id => p_rec.appraisal_template_id
1998: );
1999: end if;
2000: hr_utility.set_location(' Leaving:'||l_proc, 10);
2001:
2002: -- Call descriptive flexfield validation routines
2003:
2004: per_apt_bus.chk_df(p_rec => p_rec);
2002: -- Call descriptive flexfield validation routines
2003:
2004: per_apt_bus.chk_df(p_rec => p_rec);
2005:
2006: hr_utility.set_location(' Leaving:'||l_proc, 15);
2007: End update_validate;
2008:
2009: -- ---------------------------------------------------------------------------+
2010: -- |---------------------------< delete_validate >----------------------------|
2013:
2014: l_proc varchar2(72) := g_package||'delete_validate';
2015:
2016: Begin
2017: hr_utility.set_location('Entering:'||l_proc, 5);
2018:
2019: -- Call all supporting business operations
2020:
2021: per_apt_bus.chk_template_delete
2022: (p_appraisal_template_id => p_rec.appraisal_template_id
2023: ,p_object_version_number => p_rec.object_version_number
2024: );
2025:
2026: hr_utility.set_location(' Leaving:'||l_proc, 10);
2027: End delete_validate;
2028:
2029: -- ---------------------------------------------------------------------------+
2030: -- |-----------------------< return_legislation_code >------------------------|
2045: l_proc varchar2(72) := g_package||'return_legislation_code';
2046: l_legislation_code varchar2(150);
2047:
2048: Begin
2049: hr_utility.set_location('Entering:'||l_proc, 5);
2050:
2051: -- Ensure that all the mandatory parameters are not null
2052:
2053: hr_api.mandatory_arg_error (p_api_name => l_proc,
2060: -- call to this function. Just return the value in the global
2061: -- variable.
2062:
2063: l_legislation_code := g_legislation_code;
2064: hr_utility.set_location(l_proc, 20);
2065: else
2066:
2067: -- The ID is different to the last call to this function
2068: -- or this is the first call to this function.
2074: close csr_leg_code;
2075:
2076: -- The primary key is invalid therefore we must error out
2077:
2078: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
2079: hr_utility.raise_error;
2080: end if;
2081:
2082: close csr_leg_code;
2075:
2076: -- The primary key is invalid therefore we must error out
2077:
2078: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
2079: hr_utility.raise_error;
2080: end if;
2081:
2082: close csr_leg_code;
2083: g_appraisal_template_id := p_appraisal_template_id;
2082: close csr_leg_code;
2083: g_appraisal_template_id := p_appraisal_template_id;
2084: g_legislation_code := l_legislation_code;
2085: end if;
2086: hr_utility.set_location(' Leaving:'||l_proc, 10);
2087: return l_legislation_code;
2088:
2089:
2090: End return_legislation_code;