36: l_proc varchar2(72) := g_package||'set_security_group_id';
37: --
38: begin
39: --
40: hr_utility.set_location('Entering:'|| l_proc, 10);
41: --
42: -- Ensure that all the mandatory parameter are not null
43: --
44: hr_api.mandatory_arg_error
67: hr_api.set_security_group_id
68: (p_security_group_id => l_security_group_id
69: );
70: --
71: hr_utility.set_location(' Leaving:'|| l_proc, 20);
72: --
73: end set_security_group_id;
74: --
75: -- ---------------------------------------------------------------------------
96: l_proc varchar2(72) := g_package||'return_legislation_code';
97: --
98: Begin
99: --
100: hr_utility.set_location('Entering:'|| l_proc, 10);
101: --
102: -- Ensure that all the mandatory parameter are not null
103: --
104: hr_api.mandatory_arg_error
114: -- call to this function. Just return the value in the global
115: -- variable.
116: --
117: l_legislation_code := per_pgh_bus.g_legislation_code;
118: hr_utility.set_location(l_proc, 20);
119: else
120: --
121: -- The ID is different to the last call to this function
122: -- or this is the first call to this function.
131: close csr_leg_code;
132: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
133: fnd_message.raise_error;
134: end if;
135: hr_utility.set_location(l_proc,30);
136: --
137: -- Set the global variables so the values are
138: -- available for the next call to this function.
139: --
140: close csr_leg_code;
141: per_pgh_bus.g_hierarchy_id := p_hierarchy_id;
142: per_pgh_bus.g_legislation_code := l_legislation_code;
143: end if;
144: hr_utility.set_location(' Leaving:'|| l_proc, 40);
145: return l_legislation_code;
146: end return_legislation_code;
147: --
148:
181: l_proc varchar2(72) := g_package||'chk_ddf';
182: l_error exception;
183: --
184: Begin
185: hr_utility.set_location('Entering:'||l_proc, 5);
186: --
187: -- Check if the row is being inserted or updated and a
188: -- value has changed
189: --
321: );
322: --
323: end if;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
326: end chk_ddf;
327: --
328: --
329: --
361: --
362: l_proc varchar2(72) := g_package || 'chk_df';
363: --
364: begin
365: hr_utility.set_location('Entering:'||l_proc,10);
366: --
367: if ((p_rec.hierarchy_id is not null) and (
368: nvl(per_pgh_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
369: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
501: ,p_attribute30_value => p_rec.attribute30
502: );
503: end if;
504: --
505: hr_utility.set_location(' Leaving:'||l_proc,20);
506: end chk_df;
507: --
508: -- ----------------------------------------------------------------------------
509: -- |-----------------------< chk_non_updateable_args >------------------------|
618: l_proc VARCHAR2(72) := g_package||'chk_hierarchy_id';
619: --
620: BEGIN
621: --
622: hr_utility.set_location('Entering:'|| l_proc, 10);
623: --
624: if p_hierarchy_id is not null then
625: --
626: fnd_message.set_name('PER', 'HR_289056_PGH_PK_NOT_NULL');
627: fnd_message.raise_error;
628: --
629: end if;
630: --
631: hr_utility.set_location('Leaving:'||l_proc, 30);
632: --
633: END chk_hierarchy_id;
634: --
635: -- ----------------------------------------------------------------------------
686: AND name = p_name;
687: --
688: BEGIN
689: --
690: hr_utility.set_location('Entering:'|| l_proc, 10);
691: --
692: hr_api.mandatory_arg_error
693: (p_api_name => l_proc
694: ,p_argument => 'NAME'
708: OPEN csr_unique_name;
709: --
710: FETCH csr_unique_name INTO l_exists;
711: --
712: hr_utility.set_location(l_proc, 20);
713: --
714: IF csr_unique_name%notfound THEN
715: --
716: CLOSE csr_unique_name;
724: END IF;
725: --
726: end if;
727: --
728: hr_utility.set_location('Leaving:'||l_proc, 30);
729: --
730: END chk_name;
731: --
732: -- ----------------------------------------------------------------------------
773: l_proc VARCHAR2(72) := g_package||'chk_type';
774: --
775: BEGIN
776: --
777: hr_utility.set_location('Entering:'|| l_proc, 10);
778: --
779: hr_api.mandatory_arg_error
780: (p_api_name => l_proc
781: ,p_argument => 'effective_date'
804: end if;
805: end if;
806: end if;
807: --
808: hr_utility.set_location('Leaving:'||l_proc, 20);
809: --
810: END chk_type;
811: --
812: --
868: l_proc Varchar2(72):= 'chk_duplicate_name';
869: --
870: BEGIN
871: --
872: hr_utility.set_location('Entering:'||l_proc, 10);
873: --
874: Open csr_duplicate_name_flag;
875: Fetch csr_duplicate_name_flag into l_duplicate_name;
876: Close csr_duplicate_name_flag;
874: Open csr_duplicate_name_flag;
875: Fetch csr_duplicate_name_flag into l_duplicate_name;
876: Close csr_duplicate_name_flag;
877: --
878: hr_utility.set_location(l_proc, 20);
879: --
880: Open csr_hierarchy_exists;
881: Fetch csr_hierarchy_exists into l_hierarchy_exists;
882: If csr_hierarchy_exists%found and l_duplicate_name = 'N'
880: Open csr_hierarchy_exists;
881: Fetch csr_hierarchy_exists into l_hierarchy_exists;
882: If csr_hierarchy_exists%found and l_duplicate_name = 'N'
883: then
884: hr_utility.set_location(l_proc, 30);
885: Close csr_hierarchy_exists;
886: fnd_message.set_name('PER','HR_449062_PGH_DUPLICATE_NAME');
887: fnd_message.raise_error;
888: else
888: else
889: Close csr_hierarchy_exists;
890: End if;
891: --
892: hr_utility.set_location('Leaving:'||l_proc, 40);
893: --
894: end chk_duplicate_name;
895: --
896: -- ----------------------------------------------------------------------------
915: where hierarchy_id = p_hierarchy_id;
916: --
917: Begin
918: --
919: hr_utility.set_location('Entering: '||l_proc, 5);
920: --
921: hr_api.mandatory_arg_error
922: (p_api_name => l_proc
923: ,p_argument => 'hierarchy_id'
924: ,p_argument_value => p_hierarchy_id);
925: --
926: -- Check if versions of the hierarchy exist
927: --
928: hr_utility.set_location(l_proc, 20);
929: --
930: open csr_vers_exists;
931: --
932: fetch csr_vers_exists into l_exists;
954: fnd_message.raise_error;
955: end if;
956:
957: --
958: hr_utility.set_location('Leaving :'||l_proc, 30);
959: --
960: end chk_delete;
961: --
962: -- ----------------------------------------------------------------------------
969: --
970: l_proc varchar2(72) := g_package||'insert_validate';
971: --
972: Begin
973: hr_utility.set_location('Entering:'||l_proc, 5);
974: --
975: -- Call all supporting business operations
976: --
977: if p_rec.business_group_id is not null then
987: --
988: -- Validate hierarchy_id
989: -- =====================
990: --
991: hr_utility.set_location(l_proc, 10);
992: --
993: chk_hierarchy_id
994: (p_hierarchy_id => p_rec.hierarchy_id);
995: --
993: chk_hierarchy_id
994: (p_hierarchy_id => p_rec.hierarchy_id);
995: --
996: --
997: hr_utility.set_location(l_proc, 20);
998: --
999: --
1000: -- Validate name
1001: -- =================
1006: , p_business_group_id => p_rec.business_group_id
1007: , p_object_version_number => p_rec.object_version_number
1008: );
1009: --
1010: hr_utility.set_location(l_proc, 30);
1011: --
1012: --
1013: -- Validate type
1014: -- ======================
1023: chk_duplicate_name
1024: (p_type => p_rec.type
1025: );
1026: --
1027: hr_utility.set_location('Leaving: '||l_proc, 40);
1028: --
1029: End insert_validate;
1030: --
1031: -- ----------------------------------------------------------------------------
1038: --
1039: l_proc varchar2(72) := g_package||'update_validate';
1040: --
1041: Begin
1042: hr_utility.set_location('Entering:'||l_proc, 5);
1043: --
1044: -- Call all supporting business operations
1045: --
1046: if p_rec.business_group_id is not null then
1046: if p_rec.business_group_id is not null then
1047: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
1048: end if;
1049: --
1050: hr_utility.set_location(l_proc, 10);
1051: chk_non_updateable_args
1052: (p_effective_date => p_effective_date
1053: ,p_rec => p_rec
1054: );
1053: ,p_rec => p_rec
1054: );
1055: --
1056: --
1057: hr_utility.set_location(l_proc, 20);
1058: --
1059: -- Validate name
1060: -- =================
1061: --
1065: , p_business_group_id => p_rec.business_group_id
1066: , p_object_version_number => p_rec.object_version_number
1067: );
1068: --
1069: hr_utility.set_location(l_proc, 30);
1070: --
1071: -- Call developer descriptive flexfield validation routines
1072: --
1073: per_pgh_bus.chk_ddf(p_rec);
1071: -- Call developer descriptive flexfield validation routines
1072: --
1073: per_pgh_bus.chk_ddf(p_rec);
1074: --
1075: hr_utility.set_location(l_proc, 40);
1076: --
1077: --
1078: per_pgh_bus.chk_df(p_rec);
1079: --
1076: --
1077: --
1078: per_pgh_bus.chk_df(p_rec);
1079: --
1080: hr_utility.set_location(' Leaving:'||l_proc, 50);
1081: End update_validate;
1082: --
1083: -- ----------------------------------------------------------------------------
1084: -- |---------------------------< delete_validate >----------------------------|
1089: --
1090: l_proc varchar2(72) := g_package||'delete_validate';
1091: --
1092: Begin
1093: hr_utility.set_location('Entering:'||l_proc, 5);
1094: --
1095: -- Call all supporting business operations
1096: --
1097: hr_utility.set_location(l_proc, 10);
1093: hr_utility.set_location('Entering:'||l_proc, 5);
1094: --
1095: -- Call all supporting business operations
1096: --
1097: hr_utility.set_location(l_proc, 10);
1098: --
1099: chk_delete
1100: (p_hierarchy_id => p_rec.hierarchy_id
1101: );
1099: chk_delete
1100: (p_hierarchy_id => p_rec.hierarchy_id
1101: );
1102: --
1103: hr_utility.set_location(' Leaving:'||l_proc, 20);
1104: End delete_validate;
1105: --
1106: end per_pgh_bus;