40: l_api_updating boolean;
41: --
42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := pqh_tat_shd.api_updating
47: (p_template_attribute_id => p_template_attribute_id,
48: p_object_version_number => p_object_version_number);
68: end if;
69: --
70: end if;
71: --
72: hr_utility.set_location('Leaving:'||l_proc, 10);
73: --
74: End chk_template_attribute_id;
75: --
76: -- ----------------------------------------------------------------------------
113: where a.template_id = p_template_id;
114: --
115: Begin
116: --
117: hr_utility.set_location('Entering:'||l_proc,5);
118: --
119: l_api_updating := pqh_tat_shd.api_updating
120: (p_template_attribute_id => p_template_attribute_id,
121: p_object_version_number => p_object_version_number);
146: --
147: end if;
148: --
149: if l_freeze_status_cd = 'FREEZE_TEMPLATE' then
150: hr_utility.set_message(8302,'PQH_INVALID_TAT_OPERATION');
151: hr_utility.raise_error;
152: end if;
153: --
154: hr_utility.set_location('Leaving:'||l_proc,10);
147: end if;
148: --
149: if l_freeze_status_cd = 'FREEZE_TEMPLATE' then
150: hr_utility.set_message(8302,'PQH_INVALID_TAT_OPERATION');
151: hr_utility.raise_error;
152: end if;
153: --
154: hr_utility.set_location('Leaving:'||l_proc,10);
155: --
150: hr_utility.set_message(8302,'PQH_INVALID_TAT_OPERATION');
151: hr_utility.raise_error;
152: end if;
153: --
154: hr_utility.set_location('Leaving:'||l_proc,10);
155: --
156: End chk_template_id;
157: --
158: -- ----------------------------------------------------------------------------
205: l_proc varchar2(72) := g_package||'chk_attribute_id';
206: --
207: Begin
208: --
209: hr_utility.set_location('Entering:'||l_proc,5);
210: --
211: l_api_updating := pqh_tat_shd.api_updating
212: (p_template_attribute_id => p_template_attribute_id,
213: p_object_version_number => p_object_version_number);
240: -- attribute id, check if the is enabled.
241: -- Cannot add a attribute that is not enabled to a template.
242: --
243: If l_enable_flag <> 'Y' then
244: hr_utility.set_message(8302,'PQH_ATTRIBUTE_NOT_ENABLED');
245: hr_utility.raise_error;
246: End if;
247: --
248: -- When trying to insert a template attribute or when modifying the
241: -- Cannot add a attribute that is not enabled to a template.
242: --
243: If l_enable_flag <> 'Y' then
244: hr_utility.set_message(8302,'PQH_ATTRIBUTE_NOT_ENABLED');
245: hr_utility.raise_error;
246: End if;
247: --
248: -- When trying to insert a template attribute or when modifying the
249: -- the attribute id , check if that attribute is not already attached
254: If c2%found then
255: --
256: -- Should not allow same attribute to be added twice to the template.
257: --
258: hr_utility.set_message(8302,'PQH_ATTR_ATTACHED_TO_TEM');
259: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
260: hr_utility.raise_error;
261: --
262: End if;
255: --
256: -- Should not allow same attribute to be added twice to the template.
257: --
258: hr_utility.set_message(8302,'PQH_ATTR_ATTACHED_TO_TEM');
259: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
260: hr_utility.raise_error;
261: --
262: End if;
263: Close c2;
256: -- Should not allow same attribute to be added twice to the template.
257: --
258: hr_utility.set_message(8302,'PQH_ATTR_ATTACHED_TO_TEM');
259: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
260: hr_utility.raise_error;
261: --
262: End if;
263: Close c2;
264: --
263: Close c2;
264: --
265: End if;
266: --
267: hr_utility.set_location('Leaving:'||l_proc,10);
268: --
269: End chk_attribute_id;
270: --
271: -- ----------------------------------------------------------------------------
316: AND att.attribute_id = tca.attribute_id
317: AND tca.transaction_category_id = l_tem_tct;
318: Begin
319: --
320: hr_utility.set_location('Entering:'||l_proc,5);
321: --
322: l_api_updating := pqh_tat_shd.api_updating
323: (p_template_attribute_id => p_template_attribute_id,
324: p_object_version_number => p_object_version_number);
339: fetch c2 into l_select_flag;
340: --
341: If c2%notfound then
342: Close c2;
343: hr_utility.set_message(8302,'PQH_TEM_ATTR_TCT_MISMATCH');
344: hr_utility.raise_error;
345: End if;
346: --
347: close c2;
340: --
341: If c2%notfound then
342: Close c2;
343: hr_utility.set_message(8302,'PQH_TEM_ATTR_TCT_MISMATCH');
344: hr_utility.raise_error;
345: End if;
346: --
347: close c2;
348: --
348: --
349: -- Cannot add an attribute that is not selectable , to a template
350: --
351: If l_select_flag <> 'Y' then
352: hr_utility.set_message(8302,'PQH_ATTRIBUTE_NOT_SELECTABLE');
353: hr_utility.raise_error;
354: End if;
355: --
356: --
349: -- Cannot add an attribute that is not selectable , to a template
350: --
351: If l_select_flag <> 'Y' then
352: hr_utility.set_message(8302,'PQH_ATTRIBUTE_NOT_SELECTABLE');
353: hr_utility.raise_error;
354: End if;
355: --
356: --
357:
354: End if;
355: --
356: --
357:
358: hr_utility.set_location('Leaving:'||l_proc,10);
359: --
360: End chk_att_tct;
361: --
362: -- Verifies that the template and attribute Legislations are compatible
385: where attribute_id = p_attribute_id;
386: --
387: Begin
388: --
389: hr_utility.set_location('Entering:'||l_proc,5);
390: --
391:
392: l_api_updating := pqh_tat_shd.api_updating
393: (p_template_attribute_id => p_template_attribute_id,
406: close c_attribute_leg_code;
407: --
408: if l_template_leg_code is null then
409: if l_attribute_leg_code is not null then
410: hr_utility.set_message(8302,'PQH_NO_LEG_TEM_ATT');
411: hr_utility.set_message_token('TEMPLATE', l_template_name);
412: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
413: hr_utility.raise_error;
414: end if;
407: --
408: if l_template_leg_code is null then
409: if l_attribute_leg_code is not null then
410: hr_utility.set_message(8302,'PQH_NO_LEG_TEM_ATT');
411: hr_utility.set_message_token('TEMPLATE', l_template_name);
412: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
413: hr_utility.raise_error;
414: end if;
415: else
408: if l_template_leg_code is null then
409: if l_attribute_leg_code is not null then
410: hr_utility.set_message(8302,'PQH_NO_LEG_TEM_ATT');
411: hr_utility.set_message_token('TEMPLATE', l_template_name);
412: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
413: hr_utility.raise_error;
414: end if;
415: else
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
409: if l_attribute_leg_code is not null then
410: hr_utility.set_message(8302,'PQH_NO_LEG_TEM_ATT');
411: hr_utility.set_message_token('TEMPLATE', l_template_name);
412: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
413: hr_utility.raise_error;
414: end if;
415: else
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
417: hr_utility.set_message(8302,'PQH_TEM_ATT_LEG_NE_TEM');
413: hr_utility.raise_error;
414: end if;
415: else
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
417: hr_utility.set_message(8302,'PQH_TEM_ATT_LEG_NE_TEM');
418: hr_utility.set_message_token('TEMPLATE', l_template_name);
419: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
420: hr_utility.raise_error;
421: end if;
414: end if;
415: else
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
417: hr_utility.set_message(8302,'PQH_TEM_ATT_LEG_NE_TEM');
418: hr_utility.set_message_token('TEMPLATE', l_template_name);
419: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
420: hr_utility.raise_error;
421: end if;
422: end if;
415: else
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
417: hr_utility.set_message(8302,'PQH_TEM_ATT_LEG_NE_TEM');
418: hr_utility.set_message_token('TEMPLATE', l_template_name);
419: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
420: hr_utility.raise_error;
421: end if;
422: end if;
423: --
416: if nvl(l_attribute_leg_code,l_template_leg_code) <> l_template_leg_code then
417: hr_utility.set_message(8302,'PQH_TEM_ATT_LEG_NE_TEM');
418: hr_utility.set_message_token('TEMPLATE', l_template_name);
419: hr_utility.set_message_token('ATTRIBUTE', l_attribute_name);
420: hr_utility.raise_error;
421: end if;
422: end if;
423: --
424: --
423: --
424: --
425: end if;
426: --
427: hr_utility.set_location('Leaving:'||l_proc,10);
428: --
429: End chk_legislation_code;
430: --
431: -- ----------------------------------------------------------------------------
463: l_api_updating boolean;
464: --
465: Begin
466: --
467: hr_utility.set_location('Entering:'||l_proc, 5);
468: --
469: l_api_updating := pqh_tat_shd.api_updating
470: (p_template_attribute_id => p_template_attribute_id,
471: p_object_version_number => p_object_version_number);
484: p_effective_date => p_effective_date) then
485: --
486: -- raise error as does not exist as lookup
487: --
488: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
489: hr_utility.raise_error;
490: --
491: end if;
492: --
485: --
486: -- raise error as does not exist as lookup
487: --
488: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
489: hr_utility.raise_error;
490: --
491: end if;
492: --
493: end if;
491: end if;
492: --
493: end if;
494: --
495: hr_utility.set_location('Leaving:'||l_proc,10);
496: --
497: end chk_edit_flag;
498: --
499: -- ----------------------------------------------------------------------------
531: l_api_updating boolean;
532: --
533: Begin
534: --
535: hr_utility.set_location('Entering:'||l_proc, 5);
536: --
537: l_api_updating := pqh_tat_shd.api_updating
538: (p_template_attribute_id => p_template_attribute_id,
539: p_object_version_number => p_object_version_number);
552: p_effective_date => p_effective_date) then
553: --
554: -- raise error as does not exist as lookup
555: --
556: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
557: hr_utility.raise_error;
558: --
559: end if;
560: --
553: --
554: -- raise error as does not exist as lookup
555: --
556: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
557: hr_utility.raise_error;
558: --
559: end if;
560: --
561: end if;
559: end if;
560: --
561: end if;
562: --
563: hr_utility.set_location('Leaving:'||l_proc,10);
564: --
565: end chk_view_flag;
566: --
567: -- ----------------------------------------------------------------------------
599: l_api_updating boolean;
600: --
601: Begin
602: --
603: hr_utility.set_location('Entering:'||l_proc, 5);
604: --
605: l_api_updating := pqh_tat_shd.api_updating
606: (p_template_attribute_id => p_template_attribute_id,
607: p_object_version_number => p_object_version_number);
620: p_effective_date => p_effective_date) then
621: --
622: -- raise error as does not exist as lookup
623: --
624: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
625: hr_utility.raise_error;
626: --
627: end if;
628: --
621: --
622: -- raise error as does not exist as lookup
623: --
624: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
625: hr_utility.raise_error;
626: --
627: end if;
628: --
629: end if;
627: end if;
628: --
629: end if;
630: --
631: hr_utility.set_location('Leaving:'||l_proc,10);
632: --
633: end chk_required_flag;
634: --
635: -- ----------------------------------------------------------------------------
668: --
669: --
670: Begin
671: --
672: hr_utility.set_location('Entering:'||l_proc,5);
673: --
674: if p_required_flag = 'Y' then
675: if p_edit_flag = 'Y' then
676: if p_view_flag = 'Y' then
675: if p_edit_flag = 'Y' then
676: if p_view_flag = 'Y' then
677: null;
678: else
679: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
680: hr_utility.raise_error;
681: end if;
682: else
683: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
676: if p_view_flag = 'Y' then
677: null;
678: else
679: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
680: hr_utility.raise_error;
681: end if;
682: else
683: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
684: hr_utility.raise_error;
679: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
680: hr_utility.raise_error;
681: end if;
682: else
683: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
684: hr_utility.raise_error;
685: end if;
686: end if;
687: --
680: hr_utility.raise_error;
681: end if;
682: else
683: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
684: hr_utility.raise_error;
685: end if;
686: end if;
687: --
688: if p_view_flag = 'N' then
689: if p_edit_flag = 'N' then
690: if p_required_flag = 'N' then
691: null;
692: else
693: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
694: hr_utility.raise_error;
695: end if;
696: else
697: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
690: if p_required_flag = 'N' then
691: null;
692: else
693: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
694: hr_utility.raise_error;
695: end if;
696: else
697: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
698: hr_utility.raise_error;
693: hr_utility.set_message(8302,'PQH_EDIT_REQD_MISMATCH');
694: hr_utility.raise_error;
695: end if;
696: else
697: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
698: hr_utility.raise_error;
699: end if;
700: end if;
701:
694: hr_utility.raise_error;
695: end if;
696: else
697: hr_utility.set_message(8302,'PQH_VIEW_EDIT_MISMATCH');
698: hr_utility.raise_error;
699: end if;
700: end if;
701:
702: hr_utility.set_location('Leaving:'||l_proc,10);
698: hr_utility.raise_error;
699: end if;
700: end if;
701:
702: hr_utility.set_location('Leaving:'||l_proc,10);
703: --
704: End chk_flags_mismatch;
705: -- ----------------------------------------------------------------------------
706: -- |---------------------------< insert_validate >----------------------------|
710: --
711: l_proc varchar2(72) := g_package||'insert_validate';
712: --
713: Begin
714: hr_utility.set_location('Entering:'||l_proc, 5);
715: --
716: -- Call all supporting business operations
717: --
718: chk_template_attribute_id
767: p_required_flag => p_rec.required_flag,
768: p_object_version_number => p_rec.object_version_number);
769: --
770: --
771: hr_utility.set_location(' Leaving:'||l_proc, 10);
772: End insert_validate;
773: --
774: -- ----------------------------------------------------------------------------
775: -- |---------------------------< update_validate >----------------------------|
779: --
780: l_proc varchar2(72) := g_package||'update_validate';
781: --
782: Begin
783: hr_utility.set_location('Entering:'||l_proc, 5);
784: --
785: -- Call all supporting business operations
786: --
787: chk_template_attribute_id
836: p_required_flag => p_rec.required_flag,
837: p_object_version_number => p_rec.object_version_number);
838: --
839: --
840: hr_utility.set_location(' Leaving:'||l_proc, 10);
841: End update_validate;
842: --
843: -- ----------------------------------------------------------------------------
844: -- |---------------------------< delete_validate >----------------------------|
848: --
849: l_proc varchar2(72) := g_package||'delete_validate';
850: --
851: Begin
852: hr_utility.set_location('Entering:'||l_proc, 5);
853: --
854: -- Call all supporting business operations
855: --
856: hr_utility.set_location(' Leaving:'||l_proc, 10);
852: hr_utility.set_location('Entering:'||l_proc, 5);
853: --
854: -- Call all supporting business operations
855: --
856: hr_utility.set_location(' Leaving:'||l_proc, 10);
857: End delete_validate;
858: --
859: --
860: --
870: l_proc varchar2(72) := g_package||'fetch_attribute_name';
871: --
872: Begin
873: --
874: hr_utility.set_location('Entering:'||l_proc, 5);
875: --
876: p_attribute_name := NULL;
877: --
878: Open csr_attr_name;
880: Fetch csr_attr_name into p_attribute_name;
881: --
882: Close csr_attr_name;
883: --
884: hr_utility.set_location(' Leaving:'||l_proc, 10);
885: --
886: End fetch_attribute_name;
887: --
888: --
900: l_proc varchar2(72) := g_package||'populate_attribute_name';
901: --
902: Begin
903: --
904: hr_utility.set_location('Entering:'||l_proc, 5);
905: --
906: If p_attr_table.count > 0 then
907: --
908: For cnt in p_attr_table.FIRST .. p_attr_table.LAST loop
945:
946: End loop;
947: --
948: --
949: hr_utility.set_location(' Leaving:'||l_proc, 10);
950: --
951: End populate_attribute_name;
952: --
953: end pqh_tat_bus;