23: l_error exception;
24: l_argument varchar2(30);
25: --
26: Begin
27: hr_utility.set_location('Entering:'||l_proc, 5);
28: --
29: -- Only proceed with validation if a row exists for
30: -- the current record in the HR Schema
31: --
32: if not per_cpn_shd.api_updating
33: (p_competence_id => p_rec.competence_id
34: ,p_object_version_number => p_rec.object_version_number
35: ) then
36: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('STEP', '5');
39: end if;
40: --
33: (p_competence_id => p_rec.competence_id
34: ,p_object_version_number => p_rec.object_version_number
35: ) then
36: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('STEP', '5');
39: end if;
40: --
41: hr_utility.set_location(l_proc, 6);
34: ,p_object_version_number => p_rec.object_version_number
35: ) then
36: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('STEP', '5');
39: end if;
40: --
41: hr_utility.set_location(l_proc, 6);
42: --
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('STEP', '5');
39: end if;
40: --
41: hr_utility.set_location(l_proc, 6);
42: --
43: if p_rec.business_group_id <> per_cpn_shd.g_old_rec.business_group_id then
44: l_argument := 'business_group_id';
45: raise l_error;
43: if p_rec.business_group_id <> per_cpn_shd.g_old_rec.business_group_id then
44: l_argument := 'business_group_id';
45: raise l_error;
46: end if;
47: hr_utility.set_location(l_proc, 7);
48:
49: if per_cpn_shd.g_old_rec.competence_cluster = 'UNIT_STANDARD'
50: and (p_rec.competence_cluster is NULL
51: or p_rec.competence_cluster <> 'UNIT_STANDARD') then
52: --
53: fnd_message.set_name('PER','HR_449146_QUA_FWK_CHG_CLUSTER');
54: fnd_message.raise_error;
55: end if;
56: hr_utility.set_location(l_proc, 8);
57:
58: --
59: exception
60: when l_error then
62: (p_api_name => l_proc
63: ,p_argument => l_argument);
64: when others then
65: raise;
66: hr_utility.set_location(' Leaving:'||l_proc, 12);
67: end chk_non_updateable_args;
68: --
69: -------------------------------------------------------------------------------
70: ----------------------< chk_definition_id >------------------------------------
132: and ( business_group_id + 0 = p_business_group_id or
133: business_group_id is null);
134: --
135: begin
136: hr_utility.set_location('Entering:'|| l_proc, 1);
137: --
138: -- Check mandatory parameters have been set
139: --
140: -- Only proceed with validation if :
150: ) or
151: (NOT l_api_updating)
152: ) then
153: --
154: -- hr_utility.set_loc --
155: -- check if the user has entered a name, as name is
156: -- is mandatory column.
157: --
158: if p_competence_definition_id is null then
155: -- check if the user has entered a name, as name is
156: -- is mandatory column.
157: --
158: if p_competence_definition_id is null then
159: hr_utility.set_message(801,'HR_51441_COMP_NAME_MANDATORY');
160: hr_utility.raise_error;
161: end if;
162:
163: --
156: -- is mandatory column.
157: --
158: if p_competence_definition_id is null then
159: hr_utility.set_message(801,'HR_51441_COMP_NAME_MANDATORY');
160: hr_utility.raise_error;
161: end if;
162:
163: --
164: -- check if name is unique
165: --
166: open csr_chk_definition_id;
167: fetch csr_chk_definition_id into l_exists;
168: if csr_chk_definition_id%found then
169: hr_utility.set_location(l_proc, 3);
170: -- name is not unique
171: close csr_chk_definition_id;
172: if l_exists is null then
173: fnd_message.set_name('PER','HR_52698_COMP_NAME_IN_GLOB');
177: fnd_message.raise_error;
178: end if;
179: end if;
180: end if;
181: hr_utility.set_location('Leaving:'|| l_proc, 10);
182: end chk_definition_id;
183: --
184: -- ----------------------------------------------------------------------------
185: -- |------------------------< chk_competence_dates >-------------------------|
249: -- and cpe.type in
250: -- ('PREREQUISITE','PERSONAL','DELIVERY','PROPOSAL','ASSESSMENT','REQUIREMENT');
251: --
252: begin
253: hr_utility.set_location('Entering:'|| l_proc, 1);
254: --
255: if (p_date_from is NULL) then
256: --
257: hr_utility.set_message(801, 'HR_51598_CPN_DATE_FROM_NULL');
253: hr_utility.set_location('Entering:'|| l_proc, 1);
254: --
255: if (p_date_from is NULL) then
256: --
257: hr_utility.set_message(801, 'HR_51598_CPN_DATE_FROM_NULL');
258: hr_utility.raise_error;
259: --
260: end if;
261: --
254: --
255: if (p_date_from is NULL) then
256: --
257: hr_utility.set_message(801, 'HR_51598_CPN_DATE_FROM_NULL');
258: hr_utility.raise_error;
259: --
260: end if;
261: --
262: -- The date from has to be >= the date to, else error.
262: -- The date from has to be >= the date to, else error.
263: --
264: if (p_date_from > nvl(p_date_to,hr_api.g_eot)) then
265: --
266: hr_utility.set_message(801, 'HR_51599_CPN_DATE_TO_LATER');
267: hr_utility.raise_error;
268: --
269: end if;
270: --
263: --
264: if (p_date_from > nvl(p_date_to,hr_api.g_eot)) then
265: --
266: hr_utility.set_message(801, 'HR_51599_CPN_DATE_TO_LATER');
267: hr_utility.raise_error;
268: --
269: end if;
270: --
271: -- only continue if called from UPDATE check
283:
284: open csr_check_dates_in_ele;
285: fetch csr_check_dates_in_ele into l_exists;
286: if csr_check_dates_in_ele%found then
287: hr_utility.set_location(l_proc, 3);
288: -- dates out of range
289: close csr_check_dates_in_ele ;
290: hr_utility.set_message(801,'HR_51809_CPN_INVALIDATE_ELE');
291: hr_utility.raise_error;
286: if csr_check_dates_in_ele%found then
287: hr_utility.set_location(l_proc, 3);
288: -- dates out of range
289: close csr_check_dates_in_ele ;
290: hr_utility.set_message(801,'HR_51809_CPN_INVALIDATE_ELE');
291: hr_utility.raise_error;
292: end if;
293: close csr_check_dates_in_ele;
294: end if;
287: hr_utility.set_location(l_proc, 3);
288: -- dates out of range
289: close csr_check_dates_in_ele ;
290: hr_utility.set_message(801,'HR_51809_CPN_INVALIDATE_ELE');
291: hr_utility.raise_error;
292: end if;
293: close csr_check_dates_in_ele;
294: end if;
295: hr_utility.set_location('Leaving:'|| l_proc, 10);
291: hr_utility.raise_error;
292: end if;
293: close csr_check_dates_in_ele;
294: end if;
295: hr_utility.set_location('Leaving:'|| l_proc, 10);
296: --
297: end chk_competence_dates;
298: -------------------------------------------------------------------------------
299: --------------------------
340: l_proc varchar2(72) := g_package||'chk_certification_required';
341:
342: --
343: begin
344: hr_utility.set_location('Entering:'|| l_proc, 1);
345: --
346: -- Check mandatory parameters have been set
347: --
348: hr_api.mandatory_arg_error
365: ) or
366: (NOT l_api_updating)
367: ) then
368: --
369: hr_utility.set_location(l_proc, 2);
370: --
371: --
372: -- If certification required is not null then
373: -- check if the value exists in hr_lookups
380: ,p_lookup_type => 'YES_NO'
381: ,p_lookup_code => p_certification_required
382: ) then
383: -- error invalid certification flag
384: hr_utility.set_message(801,'HR_51432_COMP_CERTIFY_FLAG');
385: hr_utility.raise_error;
386: end if;
387: hr_utility.set_location(l_proc, 3);
388: end if;
381: ,p_lookup_code => p_certification_required
382: ) then
383: -- error invalid certification flag
384: hr_utility.set_message(801,'HR_51432_COMP_CERTIFY_FLAG');
385: hr_utility.raise_error;
386: end if;
387: hr_utility.set_location(l_proc, 3);
388: end if;
389: end if;
383: -- error invalid certification flag
384: hr_utility.set_message(801,'HR_51432_COMP_CERTIFY_FLAG');
385: hr_utility.raise_error;
386: end if;
387: hr_utility.set_location(l_proc, 3);
388: end if;
389: end if;
390: hr_utility.set_location('Leaving: '|| l_proc, 10);
391: end chk_certification_required;
386: end if;
387: hr_utility.set_location(l_proc, 3);
388: end if;
389: end if;
390: hr_utility.set_location('Leaving: '|| l_proc, 10);
391: end chk_certification_required;
392: --
393: -------------------------------------------------------------------------------
394: --------------------------
435: l_proc varchar2(72) := g_package||'chk_evaluation_method';
436:
437: --
438: begin
439: hr_utility.set_location('Entering:'|| l_proc, 1);
440: --
441: -- Check mandatory parameters have been set
442: --
443: hr_api.mandatory_arg_error
460: ) or
461: (NOT l_api_updating)
462: ) then
463: --
464: hr_utility.set_location(l_proc, 2);
465: --
466: --
467: -- If evaluation method is not null then
468: -- check if the value exists in hr_lookups
476: (p_effective_date => p_effective_date
477: ,p_lookup_type => 'COMPETENCE_EVAL_TYPE'
478: ,p_lookup_code => p_evaluation_method
479: ) then
480: hr_utility.set_message(801,'HR_51433_COMP_EVAL_METHOD');
481: hr_utility.raise_error;
482: end if;
483: else
484: if hr_api.not_exists_in_hr_lookups
477: ,p_lookup_type => 'COMPETENCE_EVAL_TYPE'
478: ,p_lookup_code => p_evaluation_method
479: ) then
480: hr_utility.set_message(801,'HR_51433_COMP_EVAL_METHOD');
481: hr_utility.raise_error;
482: end if;
483: else
484: if hr_api.not_exists_in_hr_lookups
485: (p_effective_date => p_effective_date
486: ,p_lookup_type => 'COMPETENCE_EVAL_TYPE'
487: ,p_lookup_code => p_evaluation_method
488: ) then
489: -- error invalid evaluation method
490: hr_utility.set_message(801,'HR_51433_COMP_EVAL_METHOD');
491: hr_utility.raise_error;
492: end if;
493: end if;
494: -- ngundura end of the changes.
487: ,p_lookup_code => p_evaluation_method
488: ) then
489: -- error invalid evaluation method
490: hr_utility.set_message(801,'HR_51433_COMP_EVAL_METHOD');
491: hr_utility.raise_error;
492: end if;
493: end if;
494: -- ngundura end of the changes.
495: hr_utility.set_location(l_proc, 3);
491: hr_utility.raise_error;
492: end if;
493: end if;
494: -- ngundura end of the changes.
495: hr_utility.set_location(l_proc, 3);
496: end if;
497: end if;
498: hr_utility.set_location('Leaving: '|| l_proc, 10);
499: end chk_evaluation_method;
494: -- ngundura end of the changes.
495: hr_utility.set_location(l_proc, 3);
496: end if;
497: end if;
498: hr_utility.set_location('Leaving: '|| l_proc, 10);
499: end chk_evaluation_method;
500: --
501: -------------------------------------------------------------------------------
502: --------------------------
542: l_proc varchar2(72) := g_package||'chk_renewal_period_units';
543:
544: --
545: begin
546: hr_utility.set_location('Entering:'|| l_proc, 1);
547: --
548: -- Check mandatory parameters have been set
549: --
550: hr_api.mandatory_arg_error
567: ) or
568: (NOT l_api_updating)
569: ) then
570: --
571: hr_utility.set_location(l_proc, 2);
572: --
573: --
574: -- If renewal_period_units is not null then
575: -- check if the value exists in hr_lookups
593: ,p_lookup_type => 'FREQUENCY'
594: ,p_lookup_code => p_renewal_period_units
595: ) then
596: -- error invalid period frequency units
597: hr_utility.set_message(801,'HR_51434_COMP_RENEW_UNIT');
598: hr_utility.raise_error;
599: end if;
600: hr_utility.set_location(l_proc, 3);
601: end if;
594: ,p_lookup_code => p_renewal_period_units
595: ) then
596: -- error invalid period frequency units
597: hr_utility.set_message(801,'HR_51434_COMP_RENEW_UNIT');
598: hr_utility.raise_error;
599: end if;
600: hr_utility.set_location(l_proc, 3);
601: end if;
602: end if;
596: -- error invalid period frequency units
597: hr_utility.set_message(801,'HR_51434_COMP_RENEW_UNIT');
598: hr_utility.raise_error;
599: end if;
600: hr_utility.set_location(l_proc, 3);
601: end if;
602: end if;
603: hr_utility.set_location('Leaving: '|| l_proc, 10);
604: end chk_renewal_period_units;
599: end if;
600: hr_utility.set_location(l_proc, 3);
601: end if;
602: end if;
603: hr_utility.set_location('Leaving: '|| l_proc, 10);
604: end chk_renewal_period_units;
605: --
606: -------------------------------------------------------------------------------
607: --------------------------
647: l_proc varchar2(72) := g_package||'chk_renewable_unit_frequency';
648:
649: --
650: begin
651: hr_utility.set_location('Entering:'|| l_proc, 1);
652: --
653: -- Only proceed with validation if :
654: -- a) The current g_old_rec is current and
655: -- b) The value for renewal period units or renewal period frquency has
670: <> nvl(p_renewal_period_frequency,hr_api.g_number))))
671: or
672: NOT l_api_updating then
673: --
674: hr_utility.set_location(l_proc, 2);
675: --
676: -- Only check for a valid combination when either of the fields
677: -- are set
678: --
682: (p_renewal_period_units is not null and
683: p_renewal_period_frequency is null)
684: ) then
685: -- raise error
686: hr_utility.set_message(801,'HR_51435_COMP_DEPENDENT_FIELDS');
687: hr_utility.raise_error;
688: end if;
689: hr_utility.set_location(l_proc, 3);
690: end if;
683: p_renewal_period_frequency is null)
684: ) then
685: -- raise error
686: hr_utility.set_message(801,'HR_51435_COMP_DEPENDENT_FIELDS');
687: hr_utility.raise_error;
688: end if;
689: hr_utility.set_location(l_proc, 3);
690: end if;
691: hr_utility.set_location('Leaving: '|| l_proc, 10);
685: -- raise error
686: hr_utility.set_message(801,'HR_51435_COMP_DEPENDENT_FIELDS');
687: hr_utility.raise_error;
688: end if;
689: hr_utility.set_location(l_proc, 3);
690: end if;
691: hr_utility.set_location('Leaving: '|| l_proc, 10);
692: end chk_renewable_unit_frequency;
693: --
687: hr_utility.raise_error;
688: end if;
689: hr_utility.set_location(l_proc, 3);
690: end if;
691: hr_utility.set_location('Leaving: '|| l_proc, 10);
692: end chk_renewable_unit_frequency;
693: --
694: -----------------------------------------------------------------------------
695: ------------------------
742: where rating_scale_id = p_rating_scale_id;
743: --
744: --
745: begin
746: hr_utility.set_location('Entering:'|| l_proc, 1);
747: --
748: -- Only proceed with validation if :
749: -- a) The current g_old_rec is current and
750: -- b) The value for rating scale has changed
759: ) or
760: (NOT l_api_updating)
761: ) then
762: --
763: hr_utility.set_location(l_proc, 2);
764: --
765: if p_rating_scale_id is not null then
766: open csr_rat_scale_bus_grp_exist;
767: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
766: open csr_rat_scale_bus_grp_exist;
767: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
768: if csr_rat_scale_bus_grp_exist%notfound then
769: close csr_rat_scale_bus_grp_exist;
770: hr_utility.set_message(801,'HR_51452_COMP_RAT_SC_NOT_EXIST');
771: hr_utility.raise_error;
772: end if;
773: close csr_rat_scale_bus_grp_exist;
774: -- check if rating sacel is in the same business group
767: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
768: if csr_rat_scale_bus_grp_exist%notfound then
769: close csr_rat_scale_bus_grp_exist;
770: hr_utility.set_message(801,'HR_51452_COMP_RAT_SC_NOT_EXIST');
771: hr_utility.raise_error;
772: end if;
773: close csr_rat_scale_bus_grp_exist;
774: -- check if rating sacel is in the same business group
775: -- ngundura changes done for pa requirements.
774: -- check if rating sacel is in the same business group
775: -- ngundura changes done for pa requirements.
776: if p_business_group_id is null then
777: if l_business_group_id is not null then
778: hr_utility.set_message(801,'HR_51453_COMP_DIFF_BUS_GRP');
779: hr_utility.raise_error;
780: end if;
781: else
782: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id and l_business_group_id is not null then
775: -- ngundura changes done for pa requirements.
776: if p_business_group_id is null then
777: if l_business_group_id is not null then
778: hr_utility.set_message(801,'HR_51453_COMP_DIFF_BUS_GRP');
779: hr_utility.raise_error;
780: end if;
781: else
782: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id and l_business_group_id is not null then
783: hr_utility.set_message(801,'HR_51453_COMP_DIFF_BUS_GRP');
779: hr_utility.raise_error;
780: end if;
781: else
782: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id and l_business_group_id is not null then
783: hr_utility.set_message(801,'HR_51453_COMP_DIFF_BUS_GRP');
784: hr_utility.raise_error;
785: end if;
786: end if;
787: --
780: end if;
781: else
782: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id and l_business_group_id is not null then
783: hr_utility.set_message(801,'HR_51453_COMP_DIFF_BUS_GRP');
784: hr_utility.raise_error;
785: end if;
786: end if;
787: --
788: end if;
785: end if;
786: end if;
787: --
788: end if;
789: hr_utility.set_location(l_proc, 3);
790: end if;
791: hr_utility.set_location('Leaving: '|| l_proc, 10);
792: --
793: end chk_rat_scale_bus_grp_exist;
787: --
788: end if;
789: hr_utility.set_location(l_proc, 3);
790: end if;
791: hr_utility.set_location('Leaving: '|| l_proc, 10);
792: --
793: end chk_rat_scale_bus_grp_exist;
794: -----------------------------------------------------------------------------
795: ------------------------
843: and upper(type) = 'PROFICIENCY';
844: --
845: --
846: begin
847: hr_utility.set_location('Entering:'|| l_proc, 1);
848: --
849: -- Only proceed with validation if :
850: -- a) The current g_old_rec is current and
851: -- b) The value for rating scale has changed
860: ) or
861: (NOT l_api_updating)
862: ) then
863: --
864: hr_utility.set_location(l_proc, 2);
865: --
866: if p_rating_scale_id is not null then
867: open csr_chk_rating_scale_type;
868: fetch csr_chk_rating_scale_type into l_exists;
867: open csr_chk_rating_scale_type;
868: fetch csr_chk_rating_scale_type into l_exists;
869: if csr_chk_rating_scale_type%notfound then
870: close csr_chk_rating_scale_type;
871: hr_utility.set_message(801,'HR_51442_COMP_TYPE_NOT_PROF');
872: hr_utility.raise_error;
873: end if;
874: close csr_chk_rating_scale_type;
875: end if;
868: fetch csr_chk_rating_scale_type into l_exists;
869: if csr_chk_rating_scale_type%notfound then
870: close csr_chk_rating_scale_type;
871: hr_utility.set_message(801,'HR_51442_COMP_TYPE_NOT_PROF');
872: hr_utility.raise_error;
873: end if;
874: close csr_chk_rating_scale_type;
875: end if;
876: hr_utility.set_location(l_proc, 3);
872: hr_utility.raise_error;
873: end if;
874: close csr_chk_rating_scale_type;
875: end if;
876: hr_utility.set_location(l_proc, 3);
877: end if;
878: hr_utility.set_location('Leaving: '|| l_proc, 10);
879: --
880: end chk_rating_scale_type;
874: close csr_chk_rating_scale_type;
875: end if;
876: hr_utility.set_location(l_proc, 3);
877: end if;
878: hr_utility.set_location('Leaving: '|| l_proc, 10);
879: --
880: end chk_rating_scale_type;
881: --
882: -----------------------------------------------------------------------------
928: from per_rating_levels
929: where competence_id = p_competence_id;
930: --
931: begin
932: hr_utility.set_location('Entering:'|| l_proc, 1);
933: --
934: -- Only proceed with validation if :
935: -- a) The current g_old_rec is current and
936: -- b) The value for rating scale has changed
945: ) or
946: (NOT l_api_updating)
947: ) then
948: --
949: hr_utility.set_location(l_proc, 2);
950: --
951: if p_rating_scale_id is not null then
952: open csr_comp_has_prof_levels;
953: fetch csr_comp_has_prof_levels into l_exists;
952: open csr_comp_has_prof_levels;
953: fetch csr_comp_has_prof_levels into l_exists;
954: if csr_comp_has_prof_levels%found then
955: close csr_comp_has_prof_levels;
956: hr_utility.set_message(801,'HR_51437_COMP_PROF_SCALE');
957: hr_utility.raise_error;
958: end if;
959: close csr_comp_has_prof_levels;
960: end if;
953: fetch csr_comp_has_prof_levels into l_exists;
954: if csr_comp_has_prof_levels%found then
955: close csr_comp_has_prof_levels;
956: hr_utility.set_message(801,'HR_51437_COMP_PROF_SCALE');
957: hr_utility.raise_error;
958: end if;
959: close csr_comp_has_prof_levels;
960: end if;
961: hr_utility.set_location(l_proc, 3);
957: hr_utility.raise_error;
958: end if;
959: close csr_comp_has_prof_levels;
960: end if;
961: hr_utility.set_location(l_proc, 3);
962: end if;
963: hr_utility.set_location('Leaving: '|| l_proc, 10);
964: --
965: end chk_competence_has_prof;
959: close csr_comp_has_prof_levels;
960: end if;
961: hr_utility.set_location(l_proc, 3);
962: end if;
963: hr_utility.set_location('Leaving: '|| l_proc, 10);
964: --
965: end chk_competence_has_prof;
966: -------------------------------------------------------------------------------
967: --------------------------
1021: and rl.rating_scale_id = nvl(per_cpn_shd.g_old_rec.rating_scale_id,-9999)
1022: and ce.competence_id = p_competence_id;
1023: --
1024: begin
1025: hr_utility.set_location('Entering:'|| l_proc, 1);
1026: --
1027: -- Only proceed with validation if :
1028: -- a) The current g_old_rec is current and
1029: -- b) The value for rating scale has changed
1038: ) or
1039: (NOT l_api_updating)
1040: ) then
1041: --
1042: hr_utility.set_location(l_proc, 2);
1043: --
1044: open csr_rating_level_in_ele;
1045: fetch csr_rating_level_in_ele into l_exists;
1046: if csr_rating_level_in_ele%found then
1044: open csr_rating_level_in_ele;
1045: fetch csr_rating_level_in_ele into l_exists;
1046: if csr_rating_level_in_ele%found then
1047: close csr_rating_level_in_ele;
1048: hr_utility.set_message(801,'HR_51443_COMP_LEVELS_IN_ELE');
1049: hr_utility.raise_error;
1050: hr_utility.set_location(l_proc, 2);
1051: else
1052: close csr_rating_level_in_ele;
1045: fetch csr_rating_level_in_ele into l_exists;
1046: if csr_rating_level_in_ele%found then
1047: close csr_rating_level_in_ele;
1048: hr_utility.set_message(801,'HR_51443_COMP_LEVELS_IN_ELE');
1049: hr_utility.raise_error;
1050: hr_utility.set_location(l_proc, 2);
1051: else
1052: close csr_rating_level_in_ele;
1053: end if;
1046: if csr_rating_level_in_ele%found then
1047: close csr_rating_level_in_ele;
1048: hr_utility.set_message(801,'HR_51443_COMP_LEVELS_IN_ELE');
1049: hr_utility.raise_error;
1050: hr_utility.set_location(l_proc, 2);
1051: else
1052: close csr_rating_level_in_ele;
1053: end if;
1054: --
1051: else
1052: close csr_rating_level_in_ele;
1053: end if;
1054: --
1055: hr_utility.set_location(l_proc, 3);
1056: --
1057: end if;
1058: --
1059: hr_utility.set_location('Leaving: '|| l_proc, 10);
1055: hr_utility.set_location(l_proc, 3);
1056: --
1057: end if;
1058: --
1059: hr_utility.set_location('Leaving: '|| l_proc, 10);
1060: --
1061: end chk_competence_rating_update;
1062: --
1063: -------------------------------------------------------------------------------
1125: from per_competence_outcomes
1126: where competence_id = p_competence_id;
1127: --
1128: begin
1129: hr_utility.set_location('Entering:'|| l_proc, 1);
1130: --
1131: -- Check mandatory parameters have been set
1132: --
1133: hr_api.mandatory_arg_error
1139: open csr_chk_comp_exists_in_ele;
1140: fetch csr_chk_comp_exists_in_ele into l_exists;
1141: if csr_chk_comp_exists_in_ele%found then
1142: close csr_chk_comp_exists_in_ele;
1143: hr_utility.set_message(801,'HR_51440_COMP_EXIST_IN_ELE');
1144: hr_utility.raise_error;
1145: hr_utility.set_location(l_proc, 2);
1146: else
1147: close csr_chk_comp_exists_in_ele;
1140: fetch csr_chk_comp_exists_in_ele into l_exists;
1141: if csr_chk_comp_exists_in_ele%found then
1142: close csr_chk_comp_exists_in_ele;
1143: hr_utility.set_message(801,'HR_51440_COMP_EXIST_IN_ELE');
1144: hr_utility.raise_error;
1145: hr_utility.set_location(l_proc, 2);
1146: else
1147: close csr_chk_comp_exists_in_ele;
1148: open csr_chk_comp_exists_in_rl;
1141: if csr_chk_comp_exists_in_ele%found then
1142: close csr_chk_comp_exists_in_ele;
1143: hr_utility.set_message(801,'HR_51440_COMP_EXIST_IN_ELE');
1144: hr_utility.raise_error;
1145: hr_utility.set_location(l_proc, 2);
1146: else
1147: close csr_chk_comp_exists_in_ele;
1148: open csr_chk_comp_exists_in_rl;
1149: fetch csr_chk_comp_exists_in_rl into l_exists;
1148: open csr_chk_comp_exists_in_rl;
1149: fetch csr_chk_comp_exists_in_rl into l_exists;
1150: if csr_chk_comp_exists_in_rl%found then
1151: close csr_chk_comp_exists_in_rl;
1152: hr_utility.set_message(801,'HR_51439_COMP_PROF_LVL_EXIST');
1153: hr_utility.raise_error;
1154: hr_utility.set_location(l_proc, 3);
1155: end if;
1156: close csr_chk_comp_exists_in_rl;
1149: fetch csr_chk_comp_exists_in_rl into l_exists;
1150: if csr_chk_comp_exists_in_rl%found then
1151: close csr_chk_comp_exists_in_rl;
1152: hr_utility.set_message(801,'HR_51439_COMP_PROF_LVL_EXIST');
1153: hr_utility.raise_error;
1154: hr_utility.set_location(l_proc, 3);
1155: end if;
1156: close csr_chk_comp_exists_in_rl;
1157: open csr_chk_comp_exists_in_co;
1150: if csr_chk_comp_exists_in_rl%found then
1151: close csr_chk_comp_exists_in_rl;
1152: hr_utility.set_message(801,'HR_51439_COMP_PROF_LVL_EXIST');
1153: hr_utility.raise_error;
1154: hr_utility.set_location(l_proc, 3);
1155: end if;
1156: close csr_chk_comp_exists_in_rl;
1157: open csr_chk_comp_exists_in_co;
1158: fetch csr_chk_comp_exists_in_co into l_exists;
1157: open csr_chk_comp_exists_in_co;
1158: fetch csr_chk_comp_exists_in_co into l_exists;
1159: if csr_chk_comp_exists_in_co%found then
1160: close csr_chk_comp_exists_in_co;
1161: hr_utility.set_message(800,'HR_449134_QUA_FWK_COMP_TAB_REF');
1162: hr_utility.raise_error;
1163: hr_utility.set_location(l_proc, 4);
1164: end if;
1165: close csr_chk_comp_exists_in_co;
1158: fetch csr_chk_comp_exists_in_co into l_exists;
1159: if csr_chk_comp_exists_in_co%found then
1160: close csr_chk_comp_exists_in_co;
1161: hr_utility.set_message(800,'HR_449134_QUA_FWK_COMP_TAB_REF');
1162: hr_utility.raise_error;
1163: hr_utility.set_location(l_proc, 4);
1164: end if;
1165: close csr_chk_comp_exists_in_co;
1166: end if;
1159: if csr_chk_comp_exists_in_co%found then
1160: close csr_chk_comp_exists_in_co;
1161: hr_utility.set_message(800,'HR_449134_QUA_FWK_COMP_TAB_REF');
1162: hr_utility.raise_error;
1163: hr_utility.set_location(l_proc, 4);
1164: end if;
1165: close csr_chk_comp_exists_in_co;
1166: end if;
1167: --
1164: end if;
1165: close csr_chk_comp_exists_in_co;
1166: end if;
1167: --
1168: hr_utility.set_location('Leaving: '|| l_proc, 10);
1169: --
1170: end chk_competence_delete;
1171: --
1172: -- -----------------------------------------------------------------------------
1264: l_proc varchar2(72) := g_package||'chk_competence_cluster';
1265: l_api_updating boolean;
1266: --
1267: begin
1268: hr_utility.set_location('Entering:'|| l_proc, 10);
1269: --
1270: -- Only proceed with validation if :
1271: -- a) The current g_old_rec is current and
1272: -- b) The value for cluster name has changed
1282: ) or
1283: (NOT l_api_updating)
1284: ) then
1285: --
1286: hr_utility.set_location(l_proc, 20);
1287: --
1288: -- Check that the category exists in HR_LOOKUPS
1289: --
1290: IF hr_api.not_exists_in_hr_lookups
1291: (p_effective_date => p_effective_date
1292: ,p_lookup_type => 'PER_COMPETENCE_CLUSTER'
1293: ,p_lookup_code => p_competence_cluster) THEN
1294: --
1295: hr_utility.set_location(l_proc, 30);
1296: --
1297: hr_utility.set_message(800, 'HR_449088_COMPETENCE_CLSTR_LKP');
1298: hr_utility.raise_error;
1299: --
1293: ,p_lookup_code => p_competence_cluster) THEN
1294: --
1295: hr_utility.set_location(l_proc, 30);
1296: --
1297: hr_utility.set_message(800, 'HR_449088_COMPETENCE_CLSTR_LKP');
1298: hr_utility.raise_error;
1299: --
1300: END IF;
1301: end if;
1294: --
1295: hr_utility.set_location(l_proc, 30);
1296: --
1297: hr_utility.set_message(800, 'HR_449088_COMPETENCE_CLSTR_LKP');
1298: hr_utility.raise_error;
1299: --
1300: END IF;
1301: end if;
1302: end if;
1300: END IF;
1301: end if;
1302: end if;
1303: --
1304: hr_utility.set_location('Leaving: '|| l_proc, 40);
1305: --
1306: end chk_competence_cluster;
1307: --
1308: -------------------------------------------------------------------------------
1360: l_api_updating boolean;
1361: l_exists varchar2(1);
1362: --
1363: begin
1364: hr_utility.set_location('Entering:'|| l_proc, 10);
1365: --
1366: -- Only proceed with validation if :
1367: -- a) The current g_old_rec is current and
1368: -- b) The value for unit_standard_id has changed
1379: (NOT l_api_updating)
1380: ) then
1381: --
1382: if p_business_group_id is not NULL then
1383: hr_utility.set_location(l_proc, 20);
1384: --
1385: -- Local competence
1386: --
1387: open csr_local_unit_standard_id;
1388: fetch csr_local_unit_standard_id into l_exists;
1389: if csr_local_unit_standard_id%FOUND then
1390: close csr_local_unit_standard_id;
1391: --
1392: hr_utility.set_location(l_proc, 30);
1393: --
1394: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1395: hr_utility.raise_error;
1396: --
1390: close csr_local_unit_standard_id;
1391: --
1392: hr_utility.set_location(l_proc, 30);
1393: --
1394: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1395: hr_utility.raise_error;
1396: --
1397: END IF;
1398: close csr_local_unit_standard_id;
1391: --
1392: hr_utility.set_location(l_proc, 30);
1393: --
1394: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1395: hr_utility.raise_error;
1396: --
1397: END IF;
1398: close csr_local_unit_standard_id;
1399: else
1396: --
1397: END IF;
1398: close csr_local_unit_standard_id;
1399: else
1400: hr_utility.set_location(l_proc, 40);
1401: --
1402: -- Global competence
1403: --
1404: open csr_global_unit_standard_id;
1405: fetch csr_global_unit_standard_id into l_exists;
1406: if csr_global_unit_standard_id%FOUND then
1407: close csr_global_unit_standard_id;
1408: --
1409: hr_utility.set_location(l_proc, 50);
1410: --
1411: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1412: hr_utility.raise_error;
1413: --
1407: close csr_global_unit_standard_id;
1408: --
1409: hr_utility.set_location(l_proc, 50);
1410: --
1411: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1412: hr_utility.raise_error;
1413: --
1414: END IF;
1415: close csr_global_unit_standard_id;
1408: --
1409: hr_utility.set_location(l_proc, 50);
1410: --
1411: hr_utility.set_message(800, 'HR_449089_UNIT_STD_ID_EXISTS');
1412: hr_utility.raise_error;
1413: --
1414: END IF;
1415: close csr_global_unit_standard_id;
1416: end if;
1416: end if;
1417: end if;
1418: end if;
1419: --
1420: hr_utility.set_location('Leaving: '|| l_proc, 60);
1421: --
1422: end chk_unit_standard_id;
1423: --
1424: -------------------------------------------------------------------------------
1460: l_proc varchar2(72) := g_package||'chk_credit_type';
1461: l_api_updating boolean;
1462: --
1463: begin
1464: hr_utility.set_location('Entering:'|| l_proc, 10);
1465: --
1466: -- Only proceed with validation if :
1467: -- a) The current g_old_rec is current and
1468: -- b) The value for credit type has changed
1478: ) or
1479: (NOT l_api_updating)
1480: ) then
1481: --
1482: hr_utility.set_location(l_proc, 20);
1483: --
1484: -- Check that the category 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 => 'PER_QUAL_FWK_CREDIT_TYPE'
1489: ,p_lookup_code => p_credit_type) THEN
1490: --
1491: hr_utility.set_location(l_proc, 30);
1492: --
1493: hr_utility.set_message(800, 'HR_449092_QUA_FWK_CRDT_TYP_LKP');
1494: hr_utility.raise_error;
1495: --
1489: ,p_lookup_code => p_credit_type) THEN
1490: --
1491: hr_utility.set_location(l_proc, 30);
1492: --
1493: hr_utility.set_message(800, 'HR_449092_QUA_FWK_CRDT_TYP_LKP');
1494: hr_utility.raise_error;
1495: --
1496: END IF;
1497: end if;
1490: --
1491: hr_utility.set_location(l_proc, 30);
1492: --
1493: hr_utility.set_message(800, 'HR_449092_QUA_FWK_CRDT_TYP_LKP');
1494: hr_utility.raise_error;
1495: --
1496: END IF;
1497: end if;
1498: end if;
1496: END IF;
1497: end if;
1498: end if;
1499: --
1500: hr_utility.set_location('Leaving: '|| l_proc, 40);
1501: --
1502: end chk_credit_type;
1503: --
1504: --
1541: l_proc varchar2(72) := g_package||'chk_level_type';
1542: l_api_updating boolean;
1543: --
1544: begin
1545: hr_utility.set_location('Entering:'|| l_proc, 10);
1546: --
1547: -- Only proceed with validation if :
1548: -- a) The current g_old_rec is current and
1549: -- b) The value for level type has changed
1559: ) or
1560: (NOT l_api_updating)
1561: ) then
1562: --
1563: hr_utility.set_location(l_proc, 20);
1564: --
1565: -- Check that the category exists in HR_LOOKUPS
1566: --
1567: IF hr_api.not_exists_in_hr_lookups
1568: (p_effective_date => p_effective_date
1569: ,p_lookup_type => 'PER_QUAL_FWK_LEVEL_TYPE'
1570: ,p_lookup_code => p_level_type) THEN
1571: --
1572: hr_utility.set_location(l_proc, 30);
1573: --
1574: hr_utility.set_message(800, 'HR_449090_QUA_FWK_LVL_TYP_LKP');
1575: hr_utility.raise_error;
1576: --
1570: ,p_lookup_code => p_level_type) THEN
1571: --
1572: hr_utility.set_location(l_proc, 30);
1573: --
1574: hr_utility.set_message(800, 'HR_449090_QUA_FWK_LVL_TYP_LKP');
1575: hr_utility.raise_error;
1576: --
1577: END IF;
1578: end if;
1571: --
1572: hr_utility.set_location(l_proc, 30);
1573: --
1574: hr_utility.set_message(800, 'HR_449090_QUA_FWK_LVL_TYP_LKP');
1575: hr_utility.raise_error;
1576: --
1577: END IF;
1578: end if;
1579: end if;
1577: END IF;
1578: end if;
1579: end if;
1580: --
1581: hr_utility.set_location('Leaving: '|| l_proc, 40);
1582: --
1583: end chk_level_type;
1584: --
1585: --
1622: l_proc varchar2(72) := g_package||'chk_level_number';
1623: l_api_updating boolean;
1624: --
1625: begin
1626: hr_utility.set_location('Entering:'|| l_proc, 10);
1627: --
1628: -- Only proceed with validation if :
1629: -- a) The current g_old_rec is current and
1630: -- b) The value for level has changed
1640: ) or
1641: (NOT l_api_updating)
1642: ) then
1643: --
1644: hr_utility.set_location(l_proc, 20);
1645: --
1646: -- Check that the category exists in HR_LOOKUPS
1647: --
1648: IF hr_api.not_exists_in_hr_lookups
1649: (p_effective_date => p_effective_date
1650: ,p_lookup_type => 'PER_QUAL_FWK_LEVEL'
1651: ,p_lookup_code => p_level_number) THEN
1652: --
1653: hr_utility.set_location(l_proc, 30);
1654: --
1655: hr_utility.set_message(800, 'HR_449091_QUA_FWK_LEVEL_LKP');
1656: hr_utility.raise_error;
1657: --
1651: ,p_lookup_code => p_level_number) THEN
1652: --
1653: hr_utility.set_location(l_proc, 30);
1654: --
1655: hr_utility.set_message(800, 'HR_449091_QUA_FWK_LEVEL_LKP');
1656: hr_utility.raise_error;
1657: --
1658: END IF;
1659: end if;
1652: --
1653: hr_utility.set_location(l_proc, 30);
1654: --
1655: hr_utility.set_message(800, 'HR_449091_QUA_FWK_LEVEL_LKP');
1656: hr_utility.raise_error;
1657: --
1658: END IF;
1659: end if;
1660: end if;
1658: END IF;
1659: end if;
1660: end if;
1661: --
1662: hr_utility.set_location('Leaving: '|| l_proc, 40);
1663: --
1664: end chk_level_number;
1665: --
1666: --
1703: l_proc varchar2(72) := g_package||'chk_field';
1704: l_api_updating boolean;
1705: --
1706: begin
1707: hr_utility.set_location('Entering:'|| l_proc, 10);
1708: --
1709: -- Only proceed with validation if :
1710: -- a) The current g_old_rec is current and
1711: -- b) The value for field has changed
1721: ) or
1722: (NOT l_api_updating)
1723: ) then
1724: --
1725: hr_utility.set_location(l_proc, 20);
1726: --
1727: -- Check that the category exists in HR_LOOKUPS
1728: --
1729: IF hr_api.not_exists_in_hr_lookups
1730: (p_effective_date => p_effective_date
1731: ,p_lookup_type => 'PER_QUAL_FWK_FIELD'
1732: ,p_lookup_code => p_field) THEN
1733: --
1734: hr_utility.set_location(l_proc, 30);
1735: --
1736: hr_utility.set_message(800, 'HR_449093_QUA_FWK_FIELD_LKP');
1737: hr_utility.raise_error;
1738: --
1732: ,p_lookup_code => p_field) THEN
1733: --
1734: hr_utility.set_location(l_proc, 30);
1735: --
1736: hr_utility.set_message(800, 'HR_449093_QUA_FWK_FIELD_LKP');
1737: hr_utility.raise_error;
1738: --
1739: END IF;
1740: end if;
1733: --
1734: hr_utility.set_location(l_proc, 30);
1735: --
1736: hr_utility.set_message(800, 'HR_449093_QUA_FWK_FIELD_LKP');
1737: hr_utility.raise_error;
1738: --
1739: END IF;
1740: end if;
1741: end if;
1739: END IF;
1740: end if;
1741: end if;
1742: --
1743: hr_utility.set_location('Leaving: '|| l_proc, 40);
1744: --
1745: end chk_field;
1746: --
1747: --
1784: l_proc varchar2(72) := g_package||'chk_sub_field';
1785: l_api_updating boolean;
1786: --
1787: begin
1788: hr_utility.set_location('Entering:'|| l_proc, 10);
1789: --
1790: -- Only proceed with validation if :
1791: -- a) The current g_old_rec is current and
1792: -- b) The value for sub field has changed
1802: ) or
1803: (NOT l_api_updating)
1804: ) then
1805: --
1806: hr_utility.set_location(l_proc, 20);
1807: --
1808: -- Check that the category exists in HR_LOOKUPS
1809: --
1810: IF hr_api.not_exists_in_hr_lookups
1811: (p_effective_date => p_effective_date
1812: ,p_lookup_type => 'PER_QUAL_FWK_SUB_FIELD'
1813: ,p_lookup_code => p_sub_field) THEN
1814: --
1815: hr_utility.set_location(l_proc, 30);
1816: --
1817: hr_utility.set_message(800, 'HR_449094_QUA_FWK_SUB_FLD_LKP');
1818: hr_utility.raise_error;
1819: --
1813: ,p_lookup_code => p_sub_field) THEN
1814: --
1815: hr_utility.set_location(l_proc, 30);
1816: --
1817: hr_utility.set_message(800, 'HR_449094_QUA_FWK_SUB_FLD_LKP');
1818: hr_utility.raise_error;
1819: --
1820: END IF;
1821: end if;
1814: --
1815: hr_utility.set_location(l_proc, 30);
1816: --
1817: hr_utility.set_message(800, 'HR_449094_QUA_FWK_SUB_FLD_LKP');
1818: hr_utility.raise_error;
1819: --
1820: END IF;
1821: end if;
1822: end if;
1820: END IF;
1821: end if;
1822: end if;
1823: --
1824: hr_utility.set_location('Leaving: '|| l_proc, 40);
1825: --
1826: end chk_sub_field;
1827: --
1828: --
1865: l_proc varchar2(72) := g_package||'chk_provider';
1866: l_api_updating boolean;
1867: --
1868: begin
1869: hr_utility.set_location('Entering:'|| l_proc, 10);
1870: --
1871: -- Only proceed with validation if :
1872: -- a) The current g_old_rec is current and
1873: -- b) The value for provider has changed
1883: ) or
1884: (NOT l_api_updating)
1885: ) then
1886: --
1887: hr_utility.set_location(l_proc, 20);
1888: --
1889: -- Check that the category exists in HR_LOOKUPS
1890: --
1891: IF hr_api.not_exists_in_hr_lookups
1892: (p_effective_date => p_effective_date
1893: ,p_lookup_type => 'PER_QUAL_FWK_PROVIDER'
1894: ,p_lookup_code => p_provider) THEN
1895: --
1896: hr_utility.set_location(l_proc, 30);
1897: --
1898: hr_utility.set_message(800, 'HR_449095_QUA_FWK_PROVIDER_LKP');
1899: hr_utility.raise_error;
1900: --
1894: ,p_lookup_code => p_provider) THEN
1895: --
1896: hr_utility.set_location(l_proc, 30);
1897: --
1898: hr_utility.set_message(800, 'HR_449095_QUA_FWK_PROVIDER_LKP');
1899: hr_utility.raise_error;
1900: --
1901: END IF;
1902: end if;
1895: --
1896: hr_utility.set_location(l_proc, 30);
1897: --
1898: hr_utility.set_message(800, 'HR_449095_QUA_FWK_PROVIDER_LKP');
1899: hr_utility.raise_error;
1900: --
1901: END IF;
1902: end if;
1903: end if;
1901: END IF;
1902: end if;
1903: end if;
1904: --
1905: hr_utility.set_location('Leaving: '|| l_proc, 40);
1906: --
1907: end chk_provider;
1908: --
1909: --
1946: l_proc varchar2(72) := g_package||'chk_qa_organization';
1947: l_api_updating boolean;
1948: --
1949: begin
1950: hr_utility.set_location('Entering:'|| l_proc, 10);
1951: --
1952: -- Only proceed with validation if :
1953: -- a) The current g_old_rec is current and
1954: -- b) The value for qa organization has changed
1964: ) or
1965: (NOT l_api_updating)
1966: ) then
1967: --
1968: hr_utility.set_location(l_proc, 20);
1969: --
1970: -- Check that the category exists in HR_LOOKUPS
1971: --
1972: IF hr_api.not_exists_in_hr_lookups
1973: (p_effective_date => p_effective_date
1974: ,p_lookup_type => 'PER_QUAL_FWK_QA_ORG'
1975: ,p_lookup_code => p_qa_organization) THEN
1976: --
1977: hr_utility.set_location(l_proc, 30);
1978: --
1979: hr_utility.set_message(800, 'HR_449096_QUA_FWK_QA_ORG_LKP');
1980: hr_utility.raise_error;
1981: --
1975: ,p_lookup_code => p_qa_organization) THEN
1976: --
1977: hr_utility.set_location(l_proc, 30);
1978: --
1979: hr_utility.set_message(800, 'HR_449096_QUA_FWK_QA_ORG_LKP');
1980: hr_utility.raise_error;
1981: --
1982: END IF;
1983: end if;
1976: --
1977: hr_utility.set_location(l_proc, 30);
1978: --
1979: hr_utility.set_message(800, 'HR_449096_QUA_FWK_QA_ORG_LKP');
1980: hr_utility.raise_error;
1981: --
1982: END IF;
1983: end if;
1984: end if;
1982: END IF;
1983: end if;
1984: end if;
1985: --
1986: hr_utility.set_location('Leaving: '|| l_proc, 40);
1987: --
1988: end chk_qa_organization;
1989: --
1990: -- -----------------------------------------------------------------------
2019: --
2020: l_proc varchar2(72) := g_package||'chk_df';
2021: --
2022: begin
2023: hr_utility.set_location('Entering:'||l_proc, 10);
2024: --
2025: if (((p_rec.competence_id is not null) and (
2026: nvl(per_cpn_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
2027: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
2120: ,p_attribute20_value => p_rec.attribute20
2121: );
2122: end if;
2123: --
2124: hr_utility.set_location(' Leaving:'||l_proc, 20);
2125:
2126: end chk_df;
2127: --
2128: -- ----------------------------------------------------------------------------
2159: --
2160: l_proc varchar2(72) := g_package || 'chk_ddf';
2161: --
2162: begin
2163: hr_utility.set_location('Entering:'||l_proc,10);
2164: --
2165: if (((p_rec.competence_id is not null) and (
2166: nvl(per_cpn_shd.g_old_rec.information_category, hr_api.g_varchar2) <>
2167: nvl(p_rec.information_category, hr_api.g_varchar2) or
2255: ,p_attribute19_value => p_rec.information20
2256: );
2257: end if;
2258: --
2259: hr_utility.set_location(' Leaving:'||l_proc,20);
2260: end chk_ddf;
2261: -- ---------------------------------------------------------------------------
2262: -- |---------------------------< insert_validate >----------------------------|
2263: -- ---------------------------------------------------------------------------
2267: --
2268: l_proc varchar2(72) := g_package||'insert_validate';
2269: --
2270: Begin
2271: hr_utility.set_location('Entering:'||l_proc, 5);
2272: --
2273: -- Call all supporting business operations
2274: --
2275: --
2278: if p_rec.business_group_id is not null then
2279: hr_api.validate_bus_grp_id(p_rec.business_group_id);
2280: end if;
2281: -- ngundura end of changes.
2282: hr_utility.set_location(l_proc, 10);
2283: --
2284: -- Rule Check unique competence name
2285: --
2286: per_cpn_bus.chk_definition_id
2288: ,p_business_group_id => p_rec.business_group_id
2289: ,p_competence_definition_id => p_rec.competence_definition_id
2290: ,p_object_version_number => p_rec.object_version_number
2291: );
2292: hr_utility.set_location(l_proc, 15);
2293: --
2294: -- Rule Check if rating scale exists and is in same business group as
2295: -- as that of competence
2296: --
2298: (p_competence_id => p_rec.competence_id
2299: ,p_object_version_number => p_rec.object_version_number
2300: ,p_rating_scale_id => p_rec.rating_scale_id
2301: ,p_business_group_id => p_rec.business_group_id);
2302: hr_utility.set_location(l_proc, 16);
2303: --
2304: -- Rule Check if rating scale is valid
2305: --
2306: per_cpn_bus.chk_rating_scale_type
2323: ,p_object_version_number => p_rec.object_version_number
2324: ,p_certification_required => p_rec.certification_required
2325: ,p_effective_date => p_effective_date
2326: );
2327: hr_utility.set_location(l_proc, 25);
2328: --
2329: -- Rule check Evaluation Method
2330: --
2331: per_cpn_bus.chk_evaluation_method
2333: ,p_object_version_number => p_rec.object_version_number
2334: ,p_evaluation_method => p_rec.evaluation_method
2335: ,p_effective_date => p_effective_date
2336: );
2337: hr_utility.set_location(l_proc, 30);
2338: --
2339: -- Rule check Renewal period units
2340: --
2341: per_cpn_bus.chk_renewal_period_units
2343: ,p_object_version_number => p_rec.object_version_number
2344: ,P_renewal_period_units => p_rec.renewal_period_units
2345: ,p_effective_date => p_effective_date
2346: );
2347: hr_utility.set_location(l_proc, 35);
2348: --
2349: -- Rule check dependency of period units and period frquency
2350: --
2351: per_cpn_bus.chk_renewable_unit_frequency
2358: hr_api.mandatory_arg_error (p_api_name => l_proc,
2359: p_argument => 'competence_definition_id',
2360: p_argument_value => p_rec.competence_definition_id );
2361:
2362: hr_utility.set_location(l_proc, 40);
2363: --
2364: -- Rule check competence cluster
2365: --
2366: per_cpn_bus.chk_competence_cluster
2368: ,p_competence_cluster => p_rec.competence_cluster
2369: ,p_object_version_number => p_rec.object_version_number
2370: ,p_effective_date => p_effective_date
2371: );
2372: hr_utility.set_location(l_proc, 50);
2373:
2374: --
2375: -- Rule check unit_standard_id
2376: --
2380: ,p_business_group_id => p_rec.business_group_id
2381: ,p_object_version_number => p_rec.object_version_number
2382: ,p_effective_date => p_effective_date
2383: );
2384: hr_utility.set_location(l_proc, 60);
2385:
2386: --
2387: -- Rule check credit type
2388: --
2391: ,p_credit_type => p_rec.credit_type
2392: ,p_object_version_number => p_rec.object_version_number
2393: ,p_effective_date => p_effective_date
2394: );
2395: hr_utility.set_location(l_proc, 70);
2396: --
2397: -- Rule check level type
2398: --
2399: per_cpn_bus.chk_level_type
2401: ,p_level_type => p_rec.level_type
2402: ,p_object_version_number => p_rec.object_version_number
2403: ,p_effective_date => p_effective_date
2404: );
2405: hr_utility.set_location(l_proc, 80);
2406: --
2407: -- Rule check level
2408: --
2409: per_cpn_bus.chk_level_number
2411: ,p_level_number => p_rec.level_number
2412: ,p_object_version_number => p_rec.object_version_number
2413: ,p_effective_date => p_effective_date
2414: );
2415: hr_utility.set_location(l_proc, 90);
2416:
2417: --
2418: -- Rule check field
2419: --
2422: ,p_field => p_rec.field
2423: ,p_object_version_number => p_rec.object_version_number
2424: ,p_effective_date => p_effective_date
2425: );
2426: hr_utility.set_location(l_proc, 100);
2427:
2428: --
2429: -- Rule check sub field
2430: --
2433: ,p_sub_field => p_rec.sub_field
2434: ,p_object_version_number => p_rec.object_version_number
2435: ,p_effective_date => p_effective_date
2436: );
2437: hr_utility.set_location(l_proc, 110);
2438:
2439: --
2440: -- Rule check provider
2441: --
2444: ,p_provider => p_rec.provider
2445: ,p_object_version_number => p_rec.object_version_number
2446: ,p_effective_date => p_effective_date
2447: );
2448: hr_utility.set_location(l_proc, 120);
2449:
2450: --
2451: -- Rule check qa organization
2452: --
2455: ,p_qa_organization => p_rec.qa_organization
2456: ,p_object_version_number => p_rec.object_version_number
2457: ,p_effective_date => p_effective_date
2458: );
2459: hr_utility.set_location(l_proc, 130);
2460:
2461: --
2462: --
2463: -- Call descriptive flexfield validation routines
2463: -- Call descriptive flexfield validation routines
2464: --
2465: per_cpn_bus.chk_ddf(p_rec => p_rec); -- BUG3356369
2466: --
2467: hr_utility.set_location(l_proc, 140);
2468: --
2469: per_cpn_bus.chk_df(p_rec => p_rec);
2470: --
2471: --
2468: --
2469: per_cpn_bus.chk_df(p_rec => p_rec);
2470: --
2471: --
2472: hr_utility.set_location(' Leaving:'||l_proc, 150);
2473: End insert_validate;
2474: --
2475: -- ----------------------------------------------------------------------------
2476: -- |---------------------------< update_validate >----------------------------|
2480: --
2481: l_proc varchar2(72) := g_package||'update_validate';
2482: --
2483: Begin
2484: hr_utility.set_location('Entering:'||l_proc, 5);
2485: --
2486: -- Call all supporting business operations
2487: --
2488: --
2497: ,p_business_group_id => p_rec.business_group_id
2498: ,p_competence_definition_id => p_rec.competence_definition_id
2499: ,p_object_version_number => p_rec.object_version_number
2500: );
2501: hr_utility.set_location(l_proc, 15);
2502: --
2503: -- Rule Check Dates
2504: --
2505: per_cpn_bus.chk_competence_dates
2515: ,p_object_version_number => p_rec.object_version_number
2516: ,p_certification_required => p_rec.certification_required
2517: ,p_effective_date => p_effective_date
2518: );
2519: hr_utility.set_location(l_proc, 25);
2520: --
2521: -- Rule check Evaluation Method
2522: --
2523: per_cpn_bus.chk_evaluation_method
2525: ,p_object_version_number => p_rec.object_version_number
2526: ,p_evaluation_method => p_rec.evaluation_method
2527: ,p_effective_date => p_effective_date
2528: );
2529: hr_utility.set_location(l_proc, 30);
2530: --
2531: -- Rule check Renewal period units
2532: --
2533: per_cpn_bus.chk_renewal_period_units
2535: ,p_object_version_number => p_rec.object_version_number
2536: ,p_renewal_period_units => p_rec.renewal_period_units
2537: ,p_effective_date => p_effective_date
2538: );
2539: hr_utility.set_location(l_proc, 35);
2540: --
2541: -- Rule check dependency of period units and period frquency
2542: --
2543: per_cpn_bus.chk_renewable_unit_frequency
2545: ,p_object_version_number => p_rec.object_version_number
2546: ,p_renewal_period_units => p_rec.renewal_period_units
2547: ,p_renewal_period_frequency => p_rec.renewal_period_frequency
2548: );
2549: hr_utility.set_location(l_proc, 36);
2550: --
2551: --
2552: -- Rule Check if rating scale exists and is in same business group as
2553: -- as that of competence
2556: (p_competence_id => p_rec.competence_id
2557: ,p_object_version_number => p_rec.object_version_number
2558: ,p_rating_scale_id => p_rec.rating_scale_id
2559: ,p_business_group_id => p_rec.business_group_id);
2560: hr_utility.set_location(l_proc, 37);
2561: --
2562: --
2563: -- Rule Check if rating scale is valid
2564: --
2567: ,p_object_version_number => p_rec.object_version_number
2568: ,p_rating_scale_id => p_rec.rating_scale_id
2569: );
2570: --
2571: hr_utility.set_location(l_proc, 40);
2572: --
2573: -- Rule check if competence has any Proficiency levels. If it has
2574: -- then do not allow any rating scales to be assinged to this competence.
2575: per_cpn_bus.chk_competence_has_prof
2577: ,p_object_version_number => p_rec.object_version_number
2578: ,p_rating_scale_id => p_rec.rating_scale_id
2579: );
2580: --
2581: hr_utility.set_location(l_proc, 45);
2582: --
2583: -- Rule check competence rating scale cannot be updated if the rating
2584: -- level for that rating scale is used in competence element
2585: per_cpn_bus.chk_competence_rating_update
2587: ,p_object_version_number => p_rec.object_version_number
2588: ,p_rating_scale_id => p_rec.rating_scale_id
2589: );
2590: --
2591: hr_utility.set_location(l_proc, 50);
2592: --
2593: hr_api.mandatory_arg_error (p_api_name => l_proc,
2594: p_argument => 'competence_definition_id',
2595: p_argument_value => p_rec.competence_definition_id );
2592: --
2593: hr_api.mandatory_arg_error (p_api_name => l_proc,
2594: p_argument => 'competence_definition_id',
2595: p_argument_value => p_rec.competence_definition_id );
2596: hr_utility.set_location(l_proc, 60);
2597: --
2598: -- Rule check competence cluster
2599: --
2600: per_cpn_bus.chk_competence_cluster
2602: ,p_competence_cluster => p_rec.competence_cluster
2603: ,p_object_version_number => p_rec.object_version_number
2604: ,p_effective_date => p_effective_date
2605: );
2606: hr_utility.set_location(l_proc, 70);
2607:
2608: --
2609: -- Rule check unit_standard_id
2610: --
2614: ,p_business_group_id => p_rec.business_group_id
2615: ,p_object_version_number => p_rec.object_version_number
2616: ,p_effective_date => p_effective_date
2617: );
2618: hr_utility.set_location(l_proc, 80);
2619:
2620: --
2621: -- Rule check credit type
2622: --
2625: ,p_credit_type => p_rec.credit_type
2626: ,p_object_version_number => p_rec.object_version_number
2627: ,p_effective_date => p_effective_date
2628: );
2629: hr_utility.set_location(l_proc, 90);
2630:
2631: --
2632: -- Rule check level type
2633: --
2636: ,p_level_type => p_rec.level_type
2637: ,p_object_version_number => p_rec.object_version_number
2638: ,p_effective_date => p_effective_date
2639: );
2640: hr_utility.set_location(l_proc, 100);
2641:
2642: --
2643: -- Rule check level
2644: --
2647: ,p_level_number => p_rec.level_number
2648: ,p_object_version_number => p_rec.object_version_number
2649: ,p_effective_date => p_effective_date
2650: );
2651: hr_utility.set_location(l_proc, 110);
2652:
2653: --
2654: -- Rule check field
2655: --
2658: ,p_field => p_rec.field
2659: ,p_object_version_number => p_rec.object_version_number
2660: ,p_effective_date => p_effective_date
2661: );
2662: hr_utility.set_location(l_proc, 120);
2663:
2664: --
2665: -- Rule check sub field
2666: --
2669: ,p_sub_field => p_rec.sub_field
2670: ,p_object_version_number => p_rec.object_version_number
2671: ,p_effective_date => p_effective_date
2672: );
2673: hr_utility.set_location(l_proc, 130);
2674:
2675: --
2676: -- Rule check provider
2677: --
2681: ,p_object_version_number => p_rec.object_version_number
2682: ,p_effective_date => p_effective_date
2683: );
2684:
2685: hr_utility.set_location(l_proc, 140);
2686: --
2687: -- Rule check qa organization
2688: --
2689: per_cpn_bus.chk_qa_organization
2691: ,p_qa_organization => p_rec.qa_organization
2692: ,p_object_version_number => p_rec.object_version_number
2693: ,p_effective_date => p_effective_date
2694: );
2695: hr_utility.set_location(l_proc, 150);
2696: --
2697: --
2698: -- Call descriptive flexfield validation routines
2699: --
2698: -- Call descriptive flexfield validation routines
2699: --
2700: per_cpn_bus.chk_ddf(p_rec => p_rec); -- BUG3356369
2701: --
2702: hr_utility.set_location(l_proc, 160);
2703: --
2704: per_cpn_bus.chk_df(p_rec => p_rec);
2705: --
2706: --
2703: --
2704: per_cpn_bus.chk_df(p_rec => p_rec);
2705: --
2706: --
2707: hr_utility.set_location(' Leaving:'||l_proc, 180);
2708: End update_validate;
2709: --
2710: -- ----------------------------------------------------------------------------
2711: -- |---------------------------< delete_validate >----------------------------|
2714: --
2715: l_proc varchar2(72) := g_package||'delete_validate';
2716: --
2717: Begin
2718: hr_utility.set_location('Entering:'||l_proc, 5);
2719: --
2720: -- Call all supporting business operations
2721: --
2722: -- Validate Delete of Competence
2727: (p_competence_id => p_rec.competence_id
2728: ,p_object_version_number => p_rec.object_version_number
2729: );
2730: --
2731: hr_utility.set_location(' Leaving:'||l_proc, 10);
2732: End delete_validate;
2733: --
2734: -- ----------------------------------------------------------------------------
2735: -- |-----------------------< return_legislation_code >-------------------------|
2753: -- Bug #2536636
2754: l_business_group_id per_business_groups.business_group_id%Type;
2755: --
2756: Begin
2757: hr_utility.set_location('Entering:'||l_proc, 5);
2758: --
2759: -- Ensure that all the mandatory parameters are not null
2760: --
2761: hr_api.mandatory_arg_error (p_api_name => l_proc,
2768: -- call to this function. Just return the value in the global
2769: -- variable.
2770: --
2771: l_legislation_code := g_legislation_code;
2772: hr_utility.set_location(l_proc, 10);
2773: else
2774: --
2775: -- The ID is different to the last call to this function
2776: -- or this is the first call to this function.
2781: close csr_leg_code;
2782: --
2783: -- The primary key is invalid therefore we must error out
2784: --
2785: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
2786: hr_utility.raise_error;
2787: end if;
2788: --
2789: close csr_leg_code;
2782: --
2783: -- The primary key is invalid therefore we must error out
2784: --
2785: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
2786: hr_utility.raise_error;
2787: end if;
2788: --
2789: close csr_leg_code;
2790: -- Bug #2536636
2797: --
2798: end if;
2799: return l_legislation_code;
2800: --
2801: hr_utility.set_location(' Leaving:'||l_proc, 10);
2802: --
2803: End return_legislation_code;
2804: --
2805: --