33: and business_group_id = p_business_group_id;
34: --
35: begin
36: --
37: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',1);
38: --
39: open csr_matching_name;
40: fetch csr_matching_name into g_dummy;
41: v_match_found := csr_matching_name%found;
41: v_match_found := csr_matching_name%found;
42: close csr_matching_name;
43: --
44: if v_match_found then
45: hr_utility.set_message (801,'HR_6310_ELE_CLASS_NAME');
46: hr_utility.raise_error;
47: end if;
48: --
49: return v_match_found;
42: close csr_matching_name;
43: --
44: if v_match_found then
45: hr_utility.set_message (801,'HR_6310_ELE_CLASS_NAME');
46: hr_utility.raise_error;
47: end if;
48: --
49: return v_match_found;
50: --
99: BEGIN
100: l_package_name := 'PAY_ELEMENT_CLASS_PKG.VALIDATE_TRANSLATION';
101: l_business_group_id := nvl(p_business_group_id, g_business_group_id);
102: l_legislation_code := nvl(p_legislation_code, g_legislation_code);
103: hr_utility.set_location (l_package_name,10);
104: OPEN c_translation(language, classification_name,classification_id,
105: l_business_group_id,l_legislation_code);
106: hr_utility.set_location (l_package_name,50);
107: FETCH c_translation INTO g_dummy;
102: l_legislation_code := nvl(p_legislation_code, g_legislation_code);
103: hr_utility.set_location (l_package_name,10);
104: OPEN c_translation(language, classification_name,classification_id,
105: l_business_group_id,l_legislation_code);
106: hr_utility.set_location (l_package_name,50);
107: FETCH c_translation INTO g_dummy;
108:
109: IF c_translation%NOTFOUND THEN
110: hr_utility.set_location (l_package_name,60);
106: hr_utility.set_location (l_package_name,50);
107: FETCH c_translation INTO g_dummy;
108:
109: IF c_translation%NOTFOUND THEN
110: hr_utility.set_location (l_package_name,60);
111: CLOSE c_translation;
112: ELSE
113: hr_utility.set_location (l_package_name,70);
114: CLOSE c_translation;
109: IF c_translation%NOTFOUND THEN
110: hr_utility.set_location (l_package_name,60);
111: CLOSE c_translation;
112: ELSE
113: hr_utility.set_location (l_package_name,70);
114: CLOSE c_translation;
115: fnd_message.set_name('PAY','HR_TRANSLATION_EXISTS');
116: fnd_message.raise_error;
117: END IF;
114: CLOSE c_translation;
115: fnd_message.set_name('PAY','HR_TRANSLATION_EXISTS');
116: fnd_message.raise_error;
117: END IF;
118: hr_utility.set_location ('Leaving:'||l_package_name,80);
119: END validate_translation;
120: --------------------------------------------------------------------------------
121: function DELETION_ALLOWED (
122: --
149: from pay_element_classifications
150: where parent_classification_id = p_classification_id;
151: --
152: begin
153: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',3);
154: open csr_2ndary_classifications;
155: fetch csr_2ndary_classifications into g_dummy;
156: children_found := csr_2ndary_classifications%found;
157: close csr_2ndary_classifications;
155: fetch csr_2ndary_classifications into g_dummy;
156: children_found := csr_2ndary_classifications%found;
157: close csr_2ndary_classifications;
158: if children_found then
159: hr_utility.set_message (801,'HR_6313_ELE_CLASS_DEL_EC');
160: end if;
161: return children_found;
162: end child_classifications;
163: --
168: from pay_element_types_f
169: where classification_id = p_classification_id;
170: --
171: begin
172: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',4);
173: open csr_element_types;
174: fetch csr_element_types into g_dummy;
175: children_found := csr_element_types%found;
176: close csr_element_types;
174: fetch csr_element_types into g_dummy;
175: children_found := csr_element_types%found;
176: close csr_element_types;
177: if children_found then
178: hr_utility.set_message (801,'HR_6314_ELE_CLASS_DEL_ET');
179: end if;
180: return children_found;
181: end child_elements;
182: --
187: from pay_ele_classification_rules
188: where classification_id = p_classification_id;
189: --
190: begin
191: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',5);
192: open csr_class_rules;
193: fetch csr_class_rules into g_dummy;
194: children_found := csr_class_rules%found;
195: close csr_class_rules;
193: fetch csr_class_rules into g_dummy;
194: children_found := csr_class_rules%found;
195: close csr_class_rules;
196: if children_found then
197: hr_utility.set_message (801,'HR_6315_ELE_CLASS_DEL_ECR');
198: end if;
199: return children_found;
200: end child_class_rules;
201: --
206: from pay_balance_classifications
207: where classification_id = p_classification_id;
208: --
209: begin
210: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',6);
211: open csr_balance_classes;
212: fetch csr_balance_classes into g_dummy;
213: children_found := csr_balance_classes%found;
214: close csr_balance_classes;
212: fetch csr_balance_classes into g_dummy;
213: children_found := csr_balance_classes%found;
214: close csr_balance_classes;
215: if children_found then
216: hr_utility.set_message (801,'HR_6316_ELE_CLASS_DEL_BC');
217: end if;
218: return children_found;
219: end child_balance_classes;
220: --
225: from pay_sub_classification_rules_f
226: where classification_id = p_classification_id;
227: --
228: begin
229: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',7);
230: open csr_sub_class_rules;
231: fetch csr_sub_class_rules into g_dummy;
232: children_found := csr_sub_class_rules%found;
233: close csr_sub_class_rules;
231: fetch csr_sub_class_rules into g_dummy;
232: children_found := csr_sub_class_rules%found;
233: close csr_sub_class_rules;
234: if children_found then
235: hr_utility.set_message (801,'HR_6317_ELE_CLASS_DEL_SCR');
236: end if;
237: return children_found;
238: end child_sub_class_rules;
239: --
238: end child_sub_class_rules;
239: --
240: begin
241: --
242: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',1);
243: --
244: -- Find out whether this is a primary or secondary classification
245: --
246: open csr_class_type;
248: primary_classification := (classification_type = 'PRIMARY');
249: secondary_classification := (classification_type = 'SECONDARY');
250: close csr_class_type;
251: --
252: hr_utility.set_location ('PAY_ELEMENT_CLASSIFICATIONS_PKG',2);
253: --
254: -- Checks for deletion permission
255: --
256: if child_balance_classes
262: --
263: or ( secondary_classification
264: and child_sub_class_rules)) then
265: --
266: hr_utility.trace ('Deletion not allowed');
267: hr_utility.raise_error;
268: return FALSE;
269: --
270: else
263: or ( secondary_classification
264: and child_sub_class_rules)) then
265: --
266: hr_utility.trace ('Deletion not allowed');
267: hr_utility.raise_error;
268: return FALSE;
269: --
270: else
271: hr_utility.trace ('Deletion allowed');
267: hr_utility.raise_error;
268: return FALSE;
269: --
270: else
271: hr_utility.trace ('Deletion allowed');
272: return TRUE;
273: end if;
274: --
275: end deletion_allowed;
302: v_local varchar2(1);
303: --
304: begin
305: --
306: hr_utility.set_location ('PAY_ELEMENT_CLASS_PKG',1);
307: --
308: open csr_personnel;
309: open csr_seeded_data;
310: --
328: else
329: v_modifiable := FALSE;
330: end if;
331: --
332: hr_utility.set_location ('PAY_ELEMENT_CLASS_PKG',10);
333: return v_modifiable;
334: --
335: end user_can_modify_primary;
336: --------------------------------------------------------------------------------
744: and nvl(LEGISLATION_CODE,'~null~') = nvl(E_LEGISLATION_CODE,'~null~')
745: and BUSINESS_GROUP_ID is NULL;
746: --
747: IF (result>1) THEN
748: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
749: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
750: hr_utility.set_message_token('STEP','1');
751: hr_utility.raise_error;
752: END IF;
745: and BUSINESS_GROUP_ID is NULL;
746: --
747: IF (result>1) THEN
748: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
749: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
750: hr_utility.set_message_token('STEP','1');
751: hr_utility.raise_error;
752: END IF;
753: EXCEPTION
746: --
747: IF (result>1) THEN
748: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
749: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
750: hr_utility.set_message_token('STEP','1');
751: hr_utility.raise_error;
752: END IF;
753: EXCEPTION
754: when NO_DATA_FOUND then
747: IF (result>1) THEN
748: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
749: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
750: hr_utility.set_message_token('STEP','1');
751: hr_utility.raise_error;
752: END IF;
753: EXCEPTION
754: when NO_DATA_FOUND then
755: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
751: hr_utility.raise_error;
752: END IF;
753: EXCEPTION
754: when NO_DATA_FOUND then
755: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
756: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
757: hr_utility.set_message_token('STEP','1');
758: hr_utility.raise_error;
759: end unique_chk;
752: END IF;
753: EXCEPTION
754: when NO_DATA_FOUND then
755: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
756: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
757: hr_utility.set_message_token('STEP','1');
758: hr_utility.raise_error;
759: end unique_chk;
760: --------------------------------------------------------------------------------
753: EXCEPTION
754: when NO_DATA_FOUND then
755: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
756: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
757: hr_utility.set_message_token('STEP','1');
758: hr_utility.raise_error;
759: end unique_chk;
760: --------------------------------------------------------------------------------
761: procedure TRANSLATE_ROW (
754: when NO_DATA_FOUND then
755: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
756: hr_utility.set_message_token('PROCEDURE','PAY_ELEMENT_CLASS_PKB.UNIQUE_CHK');
757: hr_utility.set_message_token('STEP','1');
758: hr_utility.raise_error;
759: end unique_chk;
760: --------------------------------------------------------------------------------
761: procedure TRANSLATE_ROW (
762: X_E_CLASSIFICATION_NAME in VARCHAR2,
782: and nvl(LEGISLATION_CODE,'~null~') = nvl(X_E_LEGISLATION_CODE,'~null~')
783: and BUSINESS_GROUP_ID is NULL);
784: --
785: if (sql%notfound) then -- trap system errors during update
786: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
787: -- hr_utility.set_message_token ('PROCEDURE','PAY_ELEMENT_CLASS_PKB.TRANSLATE_ROW');
788: -- hr_utility.set_message_token('STEP','1');
789: -- hr_utility.raise_error;
790: null;
783: and BUSINESS_GROUP_ID is NULL);
784: --
785: if (sql%notfound) then -- trap system errors during update
786: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
787: -- hr_utility.set_message_token ('PROCEDURE','PAY_ELEMENT_CLASS_PKB.TRANSLATE_ROW');
788: -- hr_utility.set_message_token('STEP','1');
789: -- hr_utility.raise_error;
790: null;
791: end if;
784: --
785: if (sql%notfound) then -- trap system errors during update
786: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
787: -- hr_utility.set_message_token ('PROCEDURE','PAY_ELEMENT_CLASS_PKB.TRANSLATE_ROW');
788: -- hr_utility.set_message_token('STEP','1');
789: -- hr_utility.raise_error;
790: null;
791: end if;
792: end TRANSLATE_ROW;
785: if (sql%notfound) then -- trap system errors during update
786: -- hr_utility.set_message (801,'HR_6153_ALL_PROCEDURE_FAIL');
787: -- hr_utility.set_message_token ('PROCEDURE','PAY_ELEMENT_CLASS_PKB.TRANSLATE_ROW');
788: -- hr_utility.set_message_token('STEP','1');
789: -- hr_utility.raise_error;
790: null;
791: end if;
792: end TRANSLATE_ROW;
793: --------------------------------------------------------------------------------