16: l_error exception;
17: l_argument varchar2(30);
18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: -- Only proceed with validation if a row exists for
23: -- the current record in the HR Schema
24: --
25: if not per_rtl_shd.api_updating
26: (p_rating_level_id => p_rec.rating_level_id
27: ,p_object_version_number => p_rec.object_version_number
28: ) then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP', '5');
32: end if;
33: hr_utility.set_location(l_proc, 6);
26: (p_rating_level_id => p_rec.rating_level_id
27: ,p_object_version_number => p_rec.object_version_number
28: ) then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP', '5');
32: end if;
33: hr_utility.set_location(l_proc, 6);
34: --
27: ,p_object_version_number => p_rec.object_version_number
28: ) then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP', '5');
32: end if;
33: hr_utility.set_location(l_proc, 6);
34: --
35: if p_rec.business_group_id <> per_rtl_shd.g_old_rec.business_group_id then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP', '5');
32: end if;
33: hr_utility.set_location(l_proc, 6);
34: --
35: if p_rec.business_group_id <> per_rtl_shd.g_old_rec.business_group_id then
36: l_argument := 'business_group_id';
37: raise l_error;
35: if p_rec.business_group_id <> per_rtl_shd.g_old_rec.business_group_id then
36: l_argument := 'business_group_id';
37: raise l_error;
38: end if;
39: hr_utility.set_location(l_proc, 7);
40: --
41: if p_rec.step_value <> per_rtl_shd.g_old_rec.step_value then
42: l_argument := 'step_value';
43: raise l_error;
41: if p_rec.step_value <> per_rtl_shd.g_old_rec.step_value then
42: l_argument := 'step_value';
43: raise l_error;
44: end if;
45: hr_utility.set_location(l_proc, 8);
46: --
47: if p_rec.competence_id <> per_rtl_shd.g_old_rec.competence_id then
48: l_argument := 'competence_id';
49: raise l_error;
47: if p_rec.competence_id <> per_rtl_shd.g_old_rec.competence_id then
48: l_argument := 'competence_id';
49: raise l_error;
50: end if;
51: hr_utility.set_location(l_proc, 9);
52: --
53: if p_rec.rating_scale_id <> per_rtl_shd.g_old_rec.rating_scale_id then
54: l_argument := 'rating_scale_id';
55: raise l_error;
53: if p_rec.rating_scale_id <> per_rtl_shd.g_old_rec.rating_scale_id then
54: l_argument := 'rating_scale_id';
55: raise l_error;
56: end if;
57: hr_utility.set_location(l_proc, 8);
58: --
59: exception
60: when l_error then
61: hr_api.argument_changed_error
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: -----------------------------------------------------------------------------
129: from per_competences
130: where competence_id = p_competence_id;
131: --
132: begin
133: hr_utility.set_location('Entering:'|| l_proc, 1);
134: --
135: -- Only proceed with validation if :
136: -- a) The current g_old_rec is current
137: --
139: (p_rating_level_id => p_rating_level_id
140: ,p_object_version_number => p_object_version_number);
141:
142: --
143: hr_utility.set_location(l_proc, 2);
144: --
145: if p_rating_scale_id is not null then
146: open csr_rat_scale_bus_grp_exist;
147: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
146: open csr_rat_scale_bus_grp_exist;
147: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
148: if csr_rat_scale_bus_grp_exist%notfound then
149: close csr_rat_scale_bus_grp_exist;
150: hr_utility.set_message(801,'HR_51471_RTL_RSC_NOT_EXIST');
151: hr_utility.raise_error;
152: end if;
153: close csr_rat_scale_bus_grp_exist;
154: -- check if rating scale is in the same business group
147: fetch csr_rat_scale_bus_grp_exist into l_business_group_id;
148: if csr_rat_scale_bus_grp_exist%notfound then
149: close csr_rat_scale_bus_grp_exist;
150: hr_utility.set_message(801,'HR_51471_RTL_RSC_NOT_EXIST');
151: hr_utility.raise_error;
152: end if;
153: close csr_rat_scale_bus_grp_exist;
154: -- check if rating scale is in the same business group
155: -- ngundura changes done for pa requirements.
159: fnd_message.raise_error;
160: end if;
161: else
162: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id then
163: hr_utility.set_message(801,'HR_51470_RTL_RSC_DIFF_BUS_GRP');
164: hr_utility.raise_error;
165: end if;
166: end if;
167: -- ngundura changes done for pa requirements.
160: end if;
161: else
162: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id then
163: hr_utility.set_message(801,'HR_51470_RTL_RSC_DIFF_BUS_GRP');
164: hr_utility.raise_error;
165: end if;
166: end if;
167: -- ngundura changes done for pa requirements.
168: end if;
166: end if;
167: -- ngundura changes done for pa requirements.
168: end if;
169: --
170: hr_utility.set_location(l_proc, 3);
171: --
172: if p_competence_id is not null then
173: open csr_competence_bus_grp_exist;
174: fetch csr_competence_bus_grp_exist into l_business_group_id;
173: open csr_competence_bus_grp_exist;
174: fetch csr_competence_bus_grp_exist into l_business_group_id;
175: if csr_competence_bus_grp_exist%notfound then
176: close csr_competence_bus_grp_exist;
177: hr_utility.set_message(801,'HR_51472_RTL_CPN_NOT_EXIST');
178: hr_utility.raise_error;
179: end if;
180: close csr_competence_bus_grp_exist;
181: -- check if rating scale is in the same business group
174: fetch csr_competence_bus_grp_exist into l_business_group_id;
175: if csr_competence_bus_grp_exist%notfound then
176: close csr_competence_bus_grp_exist;
177: hr_utility.set_message(801,'HR_51472_RTL_CPN_NOT_EXIST');
178: hr_utility.raise_error;
179: end if;
180: close csr_competence_bus_grp_exist;
181: -- check if rating scale is in the same business group
182: -- ngundura changes for pa requirements..
186: fnd_message.raise_error;
187: end if;
188: else
189: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id then
190: hr_utility.set_message(801,'HR_51473_RTL_CPN_DIFF_BUS_GRP');
191: hr_utility.raise_error;
192: end if;
193: end if;
194: -- ngundura end of changes.
187: end if;
188: else
189: if nvl(l_business_group_id,hr_api.g_number) <> p_business_group_id then
190: hr_utility.set_message(801,'HR_51473_RTL_CPN_DIFF_BUS_GRP');
191: hr_utility.raise_error;
192: end if;
193: end if;
194: -- ngundura end of changes.
195: end if;
193: end if;
194: -- ngundura end of changes.
195: end if;
196: --
197: hr_utility.set_location(l_proc, 4);
198: --
199: hr_utility.set_location('Leaving: '|| l_proc, 10);
200: --
201: end chk_rat_comp_bg_exists;
195: end if;
196: --
197: hr_utility.set_location(l_proc, 4);
198: --
199: hr_utility.set_location('Leaving: '|| l_proc, 10);
200: --
201: end chk_rat_comp_bg_exists;
202: --
203: -------------------------------------------------------------------------------
260: = nvl(p_rating_scale_id,hr_api.g_number))
261: );
262: --
263: begin
264: hr_utility.set_location('Entering:'|| l_proc, 1);
265: --
266: -- Only proceed with validation if :
267: -- a) The current g_old_rec is current and
268: -- b) The value for name has changed
276: ) or
277: (NOT l_api_updating)
278: ) then
279: --
280: hr_utility.set_location(l_proc, 2);
281: --
282: -- check if the user has entered a name, as name is
283: -- is mandatory column.
284: --
282: -- check if the user has entered a name, as name is
283: -- is mandatory column.
284: --
285: if p_name is null then
286: hr_utility.set_message(801,'HR_51475_RTL_NAME_MANDATORY');
287: hr_utility.raise_error;
288: end if;
289: --
290: -- check if name is unique
283: -- is mandatory column.
284: --
285: if p_name is null then
286: hr_utility.set_message(801,'HR_51475_RTL_NAME_MANDATORY');
287: hr_utility.raise_error;
288: end if;
289: --
290: -- check if name is unique
291: --
291: --
292: open csr_chk_name_unique;
293: fetch csr_chk_name_unique into l_exists;
294: if csr_chk_name_unique%found then
295: hr_utility.set_location(l_proc, 3);
296: -- name is not unique
297: close csr_chk_name_unique;
298: hr_utility.set_message(801,'HR_51474_RTL_NOT_UNIQUE');
299: hr_utility.raise_error;
294: if csr_chk_name_unique%found then
295: hr_utility.set_location(l_proc, 3);
296: -- name is not unique
297: close csr_chk_name_unique;
298: hr_utility.set_message(801,'HR_51474_RTL_NOT_UNIQUE');
299: hr_utility.raise_error;
300: end if;
301: close csr_chk_name_unique;
302: end if;
295: hr_utility.set_location(l_proc, 3);
296: -- name is not unique
297: close csr_chk_name_unique;
298: hr_utility.set_message(801,'HR_51474_RTL_NOT_UNIQUE');
299: hr_utility.raise_error;
300: end if;
301: close csr_chk_name_unique;
302: end if;
303: hr_utility.set_location('Leaving:'|| l_proc, 10);
299: hr_utility.raise_error;
300: end if;
301: close csr_chk_name_unique;
302: end if;
303: hr_utility.set_location('Leaving:'|| l_proc, 10);
304: end not_used_chk_name;
305: --
306: -------------------------------------------------------------------------------
307: -- |----------------------< chk_step_value>--------------------------------| --
355: or(rating_scale_id = p_rating_scale_id)
356: );
357: --
358: begin
359: hr_utility.set_location ('Entering '||l_proc, 1);
360: --
361: -- check if the user has entered a step value, as it
362: -- is a mandatory column.
363: --
361: -- check if the user has entered a step value, as it
362: -- is a mandatory column.
363: --
364: if p_step_value is null then
365: hr_utility.set_message(801,'HR_51476_RTL_STEP_MANDATORY');
366: hr_utility.raise_error;
367: end if;
368: --
369: -- Check that step value is an integer
362: -- is a mandatory column.
363: --
364: if p_step_value is null then
365: hr_utility.set_message(801,'HR_51476_RTL_STEP_MANDATORY');
366: hr_utility.raise_error;
367: end if;
368: --
369: -- Check that step value is an integer
370: --
370: --
371: l_intnum := to_char(p_step_value);
372: l_decpoint := substr(to_char(1/2),1,1); -- get dec point character.
373: if (instr(l_intnum, l_decpoint) <> 0) then
374: hr_utility.set_location (l_proc, 2);
375: hr_utility.set_message (801, 'HR_51483_RTL_STEP_NOT_INT');
376: hr_utility.raise_error;
377: end if;
378: --
371: l_intnum := to_char(p_step_value);
372: l_decpoint := substr(to_char(1/2),1,1); -- get dec point character.
373: if (instr(l_intnum, l_decpoint) <> 0) then
374: hr_utility.set_location (l_proc, 2);
375: hr_utility.set_message (801, 'HR_51483_RTL_STEP_NOT_INT');
376: hr_utility.raise_error;
377: end if;
378: --
379: -- Check if step value is unique for rating scale or competence
372: l_decpoint := substr(to_char(1/2),1,1); -- get dec point character.
373: if (instr(l_intnum, l_decpoint) <> 0) then
374: hr_utility.set_location (l_proc, 2);
375: hr_utility.set_message (801, 'HR_51483_RTL_STEP_NOT_INT');
376: hr_utility.raise_error;
377: end if;
378: --
379: -- Check if step value is unique for rating scale or competence
380: --
380: --
381: open csr_chk_step_unique;
382: fetch csr_chk_step_unique into l_exists;
383: if csr_chk_step_unique%found then
384: hr_utility.set_location(l_proc, 3);
385: -- step value is not unique
386: close csr_chk_step_unique;
387: hr_utility.set_message(801,'HR_51477_RTL_STEP_NOT_UNIQUE');
388: hr_utility.raise_error;
383: if csr_chk_step_unique%found then
384: hr_utility.set_location(l_proc, 3);
385: -- step value is not unique
386: close csr_chk_step_unique;
387: hr_utility.set_message(801,'HR_51477_RTL_STEP_NOT_UNIQUE');
388: hr_utility.raise_error;
389: end if;
390: close csr_chk_step_unique;
391: hr_utility.set_location ('Leaving '||l_proc, 3);
384: hr_utility.set_location(l_proc, 3);
385: -- step value is not unique
386: close csr_chk_step_unique;
387: hr_utility.set_message(801,'HR_51477_RTL_STEP_NOT_UNIQUE');
388: hr_utility.raise_error;
389: end if;
390: close csr_chk_step_unique;
391: hr_utility.set_location ('Leaving '||l_proc, 3);
392: --
387: hr_utility.set_message(801,'HR_51477_RTL_STEP_NOT_UNIQUE');
388: hr_utility.raise_error;
389: end if;
390: close csr_chk_step_unique;
391: hr_utility.set_location ('Leaving '||l_proc, 3);
392: --
393: end chk_step_value;
394: --
395: -------------------------------------------------------------------------------
490: or(rsc.rating_scale_id = aty.weighting_scale_id)
491: );
492: --
493: begin
494: hr_utility.set_location('Entering: '||l_proc, 1);
495: --
496: -- Check if the rating scale is being used as a proficiency scale
497: -- for a competence
498: --
495: --
496: -- Check if the rating scale is being used as a proficiency scale
497: -- for a competence
498: --
499: hr_utility.set_location (l_proc, 2);
500: if p_competence_id is not null and p_mode = 'ADD' then
501: open csr_chk_rating_in_competence;
502: fetch csr_chk_rating_in_competence into l_exists;
503: if csr_chk_rating_in_competence%found then
500: if p_competence_id is not null and p_mode = 'ADD' then
501: open csr_chk_rating_in_competence;
502: fetch csr_chk_rating_in_competence into l_exists;
503: if csr_chk_rating_in_competence%found then
504: hr_utility.set_message (801,'HR_51438_COMP_PROF_LVL_EXIST');
505: hr_utility.raise_error;
506: end if;
507: close csr_chk_rating_in_competence;
508: end if;
501: open csr_chk_rating_in_competence;
502: fetch csr_chk_rating_in_competence into l_exists;
503: if csr_chk_rating_in_competence%found then
504: hr_utility.set_message (801,'HR_51438_COMP_PROF_LVL_EXIST');
505: hr_utility.raise_error;
506: end if;
507: close csr_chk_rating_in_competence;
508: end if;
509: --
509: --
510: -- Check if rating level is for competence that is used in competence
511: -- element.
512: --
513: hr_utility.set_location (l_proc, 3);
514: open csr_chk_competence;
515: fetch csr_chk_competence into l_exists;
516: if csr_chk_competence%found then
517: close csr_chk_competence;
514: open csr_chk_competence;
515: fetch csr_chk_competence into l_exists;
516: if csr_chk_competence%found then
517: close csr_chk_competence;
518: hr_utility.set_message (801,'HR_51479_RTL_CPN_EXIST_IN_ELE');
519: hr_utility.raise_error;
520: end if;
521: close csr_chk_competence;
522: --
515: fetch csr_chk_competence into l_exists;
516: if csr_chk_competence%found then
517: close csr_chk_competence;
518: hr_utility.set_message (801,'HR_51479_RTL_CPN_EXIST_IN_ELE');
519: hr_utility.raise_error;
520: end if;
521: close csr_chk_competence;
522: --
523: -- Check if rating level is for a Rating Scale that is used in a
522: --
523: -- Check if rating level is for a Rating Scale that is used in a
524: -- Competence
525: --
526: hr_utility.set_location (l_proc, 4);
527: open csr_chk_rat_competence;
528: fetch csr_chk_rat_competence into l_exists;
529: if csr_chk_rat_competence%found then
530: close csr_chk_rat_competence;
527: open csr_chk_rat_competence;
528: fetch csr_chk_rat_competence into l_exists;
529: if csr_chk_rat_competence%found then
530: close csr_chk_rat_competence;
531: hr_utility.set_message (801,'HR_51480_RTL_RSC_IN_CPN');
532: hr_utility.raise_error;
533: end if;
534: close csr_chk_rat_competence;
535: --
528: fetch csr_chk_rat_competence into l_exists;
529: if csr_chk_rat_competence%found then
530: close csr_chk_rat_competence;
531: hr_utility.set_message (801,'HR_51480_RTL_RSC_IN_CPN');
532: hr_utility.raise_error;
533: end if;
534: close csr_chk_rat_competence;
535: --
536: -- Check if rating level is for a Rating Scale that is used
535: --
536: -- Check if rating level is for a Rating Scale that is used
537: -- in an Assessment Type
538: --
539: hr_utility.set_location (l_proc, 5);
540: open csr_chk_ass_types;
541: fetch csr_chk_ass_types into l_exists;
542: if csr_chk_ass_types%found then
543: close csr_chk_ass_types;
540: open csr_chk_ass_types;
541: fetch csr_chk_ass_types into l_exists;
542: if csr_chk_ass_types%found then
543: close csr_chk_ass_types;
544: hr_utility.set_message (801,'HR_51481_RTL_RSC_IN_AST');
545: hr_utility.raise_error;
546: end if;
547: close csr_chk_ass_types;
548: --
541: fetch csr_chk_ass_types into l_exists;
542: if csr_chk_ass_types%found then
543: close csr_chk_ass_types;
544: hr_utility.set_message (801,'HR_51481_RTL_RSC_IN_AST');
545: hr_utility.raise_error;
546: end if;
547: close csr_chk_ass_types;
548: --
549: end chk_rating_level_add_del;
598:
599: --
600: begin
601: -- check if rating level is used in competence element
602: hr_utility.set_location (l_proc, 1);
603: l_error := 'N';
604: l_sql_stmt := 'select null
605: from per_rating_levels rtl,per_competence_elements perce
606: where rtl.rating_level_id = '||p_rating_level_id||
607: ' and rtl.rating_level_id = ';
608: l_sql_stmt1 := l_sql_stmt||'perce.rating_level_id';
609:
610: -- check if rating level is used in competence element
611: hr_utility.set_location (l_proc, 1);
612:
613: open cmp_csr for l_sql_stmt1;
614: fetch cmp_csr into l_exists;
615: if cmp_csr%notfound then
650: l_error := 'Y';
651: end if;
652: --
653: if l_error = 'Y' then
654: hr_utility.set_message (801,'HR_51479_RTL_CPN_EXIST_IN_ELE');
655: hr_utility.raise_error;
656: end if;
657: --
658: --
651: end if;
652: --
653: if l_error = 'Y' then
654: hr_utility.set_message (801,'HR_51479_RTL_CPN_EXIST_IN_ELE');
655: hr_utility.raise_error;
656: end if;
657: --
658: --
659: end chk_rating_level_in_ele;
695: --
696: l_proc varchar2(72) := g_package||'chk_df';
697: --
698: begin
699: hr_utility.set_location('Entering:'||l_proc, 10);
700: --
701: if (((p_rec.rating_level_id is not null) and (
702: nvl(per_rtl_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
703: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
795: ,p_attribute20_name => 'ATTRIBUTE20'
796: ,p_attribute20_value => p_rec.attribute20);
797: end if;
798: --
799: hr_utility.set_location(' Leaving:'||l_proc, 20);
800: end chk_df;
801: --
802: -- ----------------------------------------------------------------------------
803: -- |---------------------------< insert_validate >----------------------------|
807: --
808: l_proc varchar2(72) := g_package||'insert_validate';
809: --
810: Begin
811: hr_utility.set_location('Entering:'||l_proc, 5);
812: --
813: -- Call all supporting business operations
814: --
815: -- ngundura changes done as per pa requirements.
812: --
813: -- Call all supporting business operations
814: --
815: -- ngundura changes done as per pa requirements.
816: hr_utility.set_location('p_rec.business_group_id :'|| to_char(p_rec.business_group_id),99);
817: if p_rec.business_group_id is not null then
818: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
819: end if;
820: -- end of changes
827: if ( ( p_rec.rating_scale_id is not null and p_rec.competence_id is not null )
828: or ( p_rec.rating_scale_id is null and p_rec.competence_id is null )
829: )
830: then
831: hr_utility.set_message(801,'HR_51482_RTL_RSC_OR_CPN');
832: hr_utility.raise_error;
833: end if;
834: --
835: -- chk rating scale or competence exist within the
828: or ( p_rec.rating_scale_id is null and p_rec.competence_id is null )
829: )
830: then
831: hr_utility.set_message(801,'HR_51482_RTL_RSC_OR_CPN');
832: hr_utility.raise_error;
833: end if;
834: --
835: -- chk rating scale or competence exist within the
836: -- same business group
834: --
835: -- chk rating scale or competence exist within the
836: -- same business group
837: --
838: hr_utility.set_location('Entering per_rtl_bus.chk_rat_comp_bg_exists',9999);
839: per_rtl_bus.chk_rat_comp_bg_exists
840: (p_rating_level_id => p_rec.rating_level_id
841: ,p_object_version_number => p_rec.object_version_number
842: ,p_business_group_id => p_rec.business_group_id
845: );
846: --
847: -- Rule check step value is not null and is an integer value
848: --
849: hr_utility.set_location('Entering per_rtl_bus.chk_step_value',99);
850: per_rtl_bus.chk_step_value
851: (p_step_value => p_rec.step_value
852: ,p_rating_level_id => p_rec.rating_level_id
853: ,p_rating_scale_id => p_rec.rating_scale_id
886: */
887: --
888: per_rtl_bus.chk_df(p_rec => p_rec);
889: --
890: hr_utility.set_location(' Leaving:'||l_proc, 10);
891: End insert_validate;
892: --
893: -- ----------------------------------------------------------------------------
894: -- |---------------------------< update_validate >----------------------------|
898: --
899: l_proc varchar2(72) := g_package||'update_validate';
900: --
901: Begin
902: hr_utility.set_location('Entering:'||l_proc, 5);
903: --
904: -- Call all supporting business operations
905: --
906: if p_rec.business_group_id is not null then
932: */
933: --
934: per_rtl_bus.chk_df(p_rec => p_rec);
935: --
936: hr_utility.set_location(' Leaving:'||l_proc, 10);
937: End update_validate;
938: --
939: -- ----------------------------------------------------------------------------
940: -- |---------------------------< delete_validate >----------------------------|
943: --
944: l_proc varchar2(72) := g_package||'delete_validate';
945: --
946: Begin
947: hr_utility.set_location('Entering:'||l_proc, 5);
948: --
949: -- check if rating level exists in competence element
950: --
951: per_rtl_bus.chk_rating_level_in_ele
961: ,p_competence_id => per_rtl_shd.g_old_rec.competence_id
962: ,p_rating_scale_id => per_rtl_shd.g_old_rec.rating_scale_id
963: );
964: --
965: hr_utility.set_location(' Leaving:'||l_proc, 10);
966: End delete_validate;
967: --
968: --
969: -- ----------------------------------------------------------------------------
986: l_legislation_code varchar2(150);
987: l_business_group_flag varchar2(1);
988: --
989: Begin
990: hr_utility.set_location('Entering:'||l_proc, 5);
991: -- ngundura changes for pa requirement
992: select 'Y' into l_business_group_flag
993: from per_rating_levels
994: where rating_level_id = p_rating_level_id
1010: close csr_leg_code;
1011: --
1012: -- The primary key is invalid therefore we must error out
1013: --
1014: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
1015: hr_utility.raise_error;
1016: end if;
1017: --
1018: close csr_leg_code;
1011: --
1012: -- The primary key is invalid therefore we must error out
1013: --
1014: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
1015: hr_utility.raise_error;
1016: end if;
1017: --
1018: close csr_leg_code;
1019: return l_legislation_code;
1017: --
1018: close csr_leg_code;
1019: return l_legislation_code;
1020: --
1021: hr_utility.set_location(' Leaving:'||l_proc, 10);
1022: --
1023: End return_legislation_code;
1024: --
1025: --