130: fetch csr_disallow_update into l_disallow;
131: if csr_disallow_update%found then
132: hr_utility.set_location(l_proc, 20);
133: close csr_disallow_update;
134: fnd_message.set_name('PAY', 'PAY_50121_SIV_CORE_ROW_EXISTS');
135: fnd_message.raise_error;
136: end if;
137: close csr_disallow_update;
138: --
131: if csr_disallow_update%found then
132: hr_utility.set_location(l_proc, 20);
133: close csr_disallow_update;
134: fnd_message.set_name('PAY', 'PAY_50121_SIV_CORE_ROW_EXISTS');
135: fnd_message.raise_error;
136: end if;
137: close csr_disallow_update;
138: --
139: -- Check the otherwise non-updateable arguments.
222: fetch csr_element_type_exists into l_exists;
223: if csr_element_type_exists%notfound then
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: close csr_element_type_exists;
226: fnd_message.set_name('PAY', 'PAY_50095_ETM_INVALID_ELE_TYPE');
227: fnd_message.raise_error;
228: end if;
229: close csr_element_type_exists;
230: --
223: if csr_element_type_exists%notfound then
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: close csr_element_type_exists;
226: fnd_message.set_name('PAY', 'PAY_50095_ETM_INVALID_ELE_TYPE');
227: fnd_message.raise_error;
228: end if;
229: close csr_element_type_exists;
230: --
231: -- Count the number of input values for this element type.
235: if p_exclusion_rule_id is null and
236: l_count >= l_max_input_values then
237: hr_utility.set_location(' Leaving:'||l_proc, 15);
238: close csr_input_value_count;
239: fnd_message.set_name('PAY', 'PAY_50122_SIV_TOO_MANY_INPUTS');
240: fnd_message.set_token('MAX', l_max_input_values);
241: fnd_message.raise_error;
242: end if;
243: close csr_input_value_count;
236: l_count >= l_max_input_values then
237: hr_utility.set_location(' Leaving:'||l_proc, 15);
238: close csr_input_value_count;
239: fnd_message.set_name('PAY', 'PAY_50122_SIV_TOO_MANY_INPUTS');
240: fnd_message.set_token('MAX', l_max_input_values);
241: fnd_message.raise_error;
242: end if;
243: close csr_input_value_count;
244: hr_utility.set_location(' Leaving:'||l_proc, 20);
237: hr_utility.set_location(' Leaving:'||l_proc, 15);
238: close csr_input_value_count;
239: fnd_message.set_name('PAY', 'PAY_50122_SIV_TOO_MANY_INPUTS');
240: fnd_message.set_token('MAX', l_max_input_values);
241: fnd_message.raise_error;
242: end if;
243: close csr_input_value_count;
244: hr_utility.set_location(' Leaving:'||l_proc, 20);
245: exception
341: ,p_lookup_type => p_lookup_type
342: ,p_lookup_code => p_lookup_code
343: )
344: then
345: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
346: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
347: fnd_message.set_token('COLUMN', upper(p_argument_name));
348: fnd_message.raise_error;
349: end if;
342: ,p_lookup_code => p_lookup_code
343: )
344: then
345: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
346: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
347: fnd_message.set_token('COLUMN', upper(p_argument_name));
348: fnd_message.raise_error;
349: end if;
350: end if;
343: )
344: then
345: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
346: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
347: fnd_message.set_token('COLUMN', upper(p_argument_name));
348: fnd_message.raise_error;
349: end if;
350: end if;
351: end chk_lookup;
344: then
345: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
346: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
347: fnd_message.set_token('COLUMN', upper(p_argument_name));
348: fnd_message.raise_error;
349: end if;
350: end if;
351: end chk_lookup;
352: --
470: open csr_name_exists;
471: fetch csr_name_exists into l_exists;
472: if csr_name_exists%found then
473: close csr_name_exists;
474: fnd_message.set_name('PAY', 'PAY_50142_SIV_NAME_EXISTS');
475: fnd_message.set_token('NAME', p_name);
476: fnd_message.raise_error;
477: end if;
478: close csr_name_exists;
471: fetch csr_name_exists into l_exists;
472: if csr_name_exists%found then
473: close csr_name_exists;
474: fnd_message.set_name('PAY', 'PAY_50142_SIV_NAME_EXISTS');
475: fnd_message.set_token('NAME', p_name);
476: fnd_message.raise_error;
477: end if;
478: close csr_name_exists;
479: --
472: if csr_name_exists%found then
473: close csr_name_exists;
474: fnd_message.set_name('PAY', 'PAY_50142_SIV_NAME_EXISTS');
475: fnd_message.set_token('NAME', p_name);
476: fnd_message.raise_error;
477: end if;
478: close csr_name_exists;
479: --
480: -- Check that the name format is correct (not null payroll name).
548: -- UOM must be 'C' if lookup type is used for validation.
549: --
550: if p_uom <> 'C' then
551: hr_utility.set_location(' Leaving:'||l_proc, 10);
552: fnd_message.set_name('PAY', 'PAY_50132_SIV_BAD_LOOKUP_UOM');
553: fnd_message.set_token('UOM', 'C');
554: fnd_message.raise_error;
555: end if;
556: --
549: --
550: if p_uom <> 'C' then
551: hr_utility.set_location(' Leaving:'||l_proc, 10);
552: fnd_message.set_name('PAY', 'PAY_50132_SIV_BAD_LOOKUP_UOM');
553: fnd_message.set_token('UOM', 'C');
554: fnd_message.raise_error;
555: end if;
556: --
557: -- Check that the lookup type exists.
550: if p_uom <> 'C' then
551: hr_utility.set_location(' Leaving:'||l_proc, 10);
552: fnd_message.set_name('PAY', 'PAY_50132_SIV_BAD_LOOKUP_UOM');
553: fnd_message.set_token('UOM', 'C');
554: fnd_message.raise_error;
555: end if;
556: --
557: -- Check that the lookup type exists.
558: --
560: fetch csr_lookup_type_valid into l_valid;
561: if csr_lookup_type_valid%notfound then
562: hr_utility.set_location(' Leaving:'||l_proc, 15);
563: close csr_lookup_type_valid;
564: fnd_message.set_name('PAY', 'PAY_50133_SIV_BAD_LOOKUP_TYPE');
565: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
566: fnd_message.raise_error;
567: end if;
568: close csr_lookup_type_valid;
561: if csr_lookup_type_valid%notfound then
562: hr_utility.set_location(' Leaving:'||l_proc, 15);
563: close csr_lookup_type_valid;
564: fnd_message.set_name('PAY', 'PAY_50133_SIV_BAD_LOOKUP_TYPE');
565: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
566: fnd_message.raise_error;
567: end if;
568: close csr_lookup_type_valid;
569: --
562: hr_utility.set_location(' Leaving:'||l_proc, 15);
563: close csr_lookup_type_valid;
564: fnd_message.set_name('PAY', 'PAY_50133_SIV_BAD_LOOKUP_TYPE');
565: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
566: fnd_message.raise_error;
567: end if;
568: close csr_lookup_type_valid;
569: --
570: -- Flag the need to recheck the default value.
587: ,p_lookup_code => p_default_value
588: )
589: then
590: hr_utility.set_location(' Leaving:'||l_proc, 20);
591: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
592: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
593: fnd_message.set_token('COLUMN', 'DEFAULT_VALUE');
594: fnd_message.raise_error;
595: end if;
588: )
589: then
590: hr_utility.set_location(' Leaving:'||l_proc, 20);
591: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
592: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
593: fnd_message.set_token('COLUMN', 'DEFAULT_VALUE');
594: fnd_message.raise_error;
595: end if;
596: end if;
589: then
590: hr_utility.set_location(' Leaving:'||l_proc, 20);
591: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
592: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
593: fnd_message.set_token('COLUMN', 'DEFAULT_VALUE');
594: fnd_message.raise_error;
595: end if;
596: end if;
597: hr_utility.set_location(' Leaving:'||l_proc, 25);
590: hr_utility.set_location(' Leaving:'||l_proc, 20);
591: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
592: fnd_message.set_token('LOOKUP_TYPE', p_lookup_type);
593: fnd_message.set_token('COLUMN', 'DEFAULT_VALUE');
594: fnd_message.raise_error;
595: end if;
596: end if;
597: hr_utility.set_location(' Leaving:'||l_proc, 25);
598: End chk_lookup_type;
655: -- is not null.
656: --
657: if p_max_value is not null or p_min_value is not null then
658: hr_utility.set_location('Leaving:'||l_proc, 10);
659: fnd_message.set_name('PAY', 'PAY_50134_SIV_LOOKUP_AND_RANGE');
660: fnd_message.raise_error;
661: end if;
662: --
663: -- The formula_id and input_validation_formula must both be null if
656: --
657: if p_max_value is not null or p_min_value is not null then
658: hr_utility.set_location('Leaving:'||l_proc, 10);
659: fnd_message.set_name('PAY', 'PAY_50134_SIV_LOOKUP_AND_RANGE');
660: fnd_message.raise_error;
661: end if;
662: --
663: -- The formula_id and input_validation_formula must both be null if
664: -- lookup type is not null.
664: -- lookup type is not null.
665: --
666: if p_formula_id is not null or p_input_validation_formula is not null then
667: hr_utility.set_location('Leaving:'||l_proc, 15);
668: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
669: fnd_message.raise_error;
670: end if;
671: --
672: --
665: --
666: if p_formula_id is not null or p_input_validation_formula is not null then
667: hr_utility.set_location('Leaving:'||l_proc, 15);
668: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
669: fnd_message.raise_error;
670: end if;
671: --
672: --
673: hr_utility.set_location('Leaving:'||l_proc, 20);
680: -- is not null.
681: --
682: if p_max_value is not null or p_min_value is not null then
683: hr_utility.set_location('Leaving:'||l_proc, 25);
684: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
685: fnd_message.raise_error;
686: end if;
687: --
688: -- The input validation formula must be null when formula id is not null
681: --
682: if p_max_value is not null or p_min_value is not null then
683: hr_utility.set_location('Leaving:'||l_proc, 25);
684: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
685: fnd_message.raise_error;
686: end if;
687: --
688: -- The input validation formula must be null when formula id is not null
689: --
688: -- The input validation formula must be null when formula id is not null
689: --
690: if p_input_validation_formula is not null then
691: hr_utility.set_location('Leaving:'||l_proc, 30);
692: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
693: fnd_message.raise_error;
694: end if;
695: --
696: --
689: --
690: if p_input_validation_formula is not null then
691: hr_utility.set_location('Leaving:'||l_proc, 30);
692: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
693: fnd_message.raise_error;
694: end if;
695: --
696: --
697:
706: -- is not null.
707: --
708: if p_max_value is not null or p_min_value is not null then
709: hr_utility.set_location('Leaving:'||l_proc, 40);
710: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
711: fnd_message.raise_error;
712: end if;
713:
714: hr_utility.set_location('Leaving:'||l_proc, 45);
707: --
708: if p_max_value is not null or p_min_value is not null then
709: hr_utility.set_location('Leaving:'||l_proc, 40);
710: fnd_message.set_name('PAY', 'PAY_33184_SIV_VALID_COMB');
711: fnd_message.raise_error;
712: end if;
713:
714: hr_utility.set_location('Leaving:'||l_proc, 45);
715: return;
862: --
863: -- Range check failed.
864: --
865: hr_utility.set_location('Leaving:'||l_proc, 55);
866: fnd_message.set_name('PAY', 'PAY_50135_SIV_BAD_RANGE_VALUES');
867: fnd_message.raise_error;
868: end if;
869: hr_utility.set_location(' Leaving:'||l_proc, 60);
870: End chk_values;
863: -- Range check failed.
864: --
865: hr_utility.set_location('Leaving:'||l_proc, 55);
866: fnd_message.set_name('PAY', 'PAY_50135_SIV_BAD_RANGE_VALUES');
867: fnd_message.raise_error;
868: end if;
869: hr_utility.set_location(' Leaving:'||l_proc, 60);
870: End chk_values;
871: -- ----------------------------------------------------------------------------
945: -- format.
946: --
947: when others then
948: hr_utility.set_location(' Leaving:'||l_proc, 10);
949: fnd_message.set_name('PAY', 'PAY_50130_ETM_BAD_FLEX_COLUMN');
950: fnd_message.set_token('FLEXFIELD_COLUMN', p_default_value_column);
951: fnd_message.raise_error;
952: end;
953: --
946: --
947: when others then
948: hr_utility.set_location(' Leaving:'||l_proc, 10);
949: fnd_message.set_name('PAY', 'PAY_50130_ETM_BAD_FLEX_COLUMN');
950: fnd_message.set_token('FLEXFIELD_COLUMN', p_default_value_column);
951: fnd_message.raise_error;
952: end;
953: --
954: -- Check that the default value column does not clash with a
947: when others then
948: hr_utility.set_location(' Leaving:'||l_proc, 10);
949: fnd_message.set_name('PAY', 'PAY_50130_ETM_BAD_FLEX_COLUMN');
950: fnd_message.set_token('FLEXFIELD_COLUMN', p_default_value_column);
951: fnd_message.raise_error;
952: end;
953: --
954: -- Check that the default value column does not clash with a
955: -- flexfield column on PAY_TEMPLATE_EXCLUSION_RULES.
958: fetch csr_default_value_clash into l_clash;
959: if csr_default_value_clash%found then
960: hr_utility.set_location(' Leaving:'||l_proc, 15);
961: close csr_default_value_clash;
962: fnd_message.set_name('PAY', 'PAY_50131_TER_SIV_CLASH');
963: fnd_message.raise_error;
964: end if;
965: close csr_default_value_clash;
966: --
959: if csr_default_value_clash%found then
960: hr_utility.set_location(' Leaving:'||l_proc, 15);
961: close csr_default_value_clash;
962: fnd_message.set_name('PAY', 'PAY_50131_TER_SIV_CLASH');
963: fnd_message.raise_error;
964: end if;
965: close csr_default_value_clash;
966: --
967: -- Check that there are no consistency problems with the use of
971: fetch csr_inconsistent_def_val into l_inconsistent;
972: if csr_inconsistent_def_val%found then
973: hr_utility.set_location(' Leaving:'||l_proc, 20);
974: close csr_inconsistent_def_val;
975: fnd_message.set_name('PAY', 'PAY_50136_SIV_DEFVAL_DIFF_UOMS');
976: fnd_message.raise_error;
977: end if;
978: close csr_inconsistent_def_val;
979: end if;
972: if csr_inconsistent_def_val%found then
973: hr_utility.set_location(' Leaving:'||l_proc, 20);
974: close csr_inconsistent_def_val;
975: fnd_message.set_name('PAY', 'PAY_50136_SIV_DEFVAL_DIFF_UOMS');
976: fnd_message.raise_error;
977: end if;
978: close csr_inconsistent_def_val;
979: end if;
980: end if;
1017: fetch csr_exclusion_rule_id_valid into l_valid;
1018: if csr_exclusion_rule_id_valid%notfound then
1019: hr_utility.set_location('Leaving:'||l_proc, 10);
1020: close csr_exclusion_rule_id_valid;
1021: fnd_message.set_name('PAY', 'PAY_50100_ETM_INVALID_EXC_RULE');
1022: fnd_message.raise_error;
1023: end if;
1024: close csr_exclusion_rule_id_valid;
1025: end if;
1018: if csr_exclusion_rule_id_valid%notfound then
1019: hr_utility.set_location('Leaving:'||l_proc, 10);
1020: close csr_exclusion_rule_id_valid;
1021: fnd_message.set_name('PAY', 'PAY_50100_ETM_INVALID_EXC_RULE');
1022: fnd_message.raise_error;
1023: end if;
1024: close csr_exclusion_rule_id_valid;
1025: end if;
1026: end if;
1100: close csr_iterative_rules;
1101: hr_utility.set_location(' Leaving:'||l_proc, 30);
1102: exception
1103: when l_error then
1104: fnd_message.set_name('PAY', 'PAY_50123_SIV_INVALID_DELETE');
1105: fnd_message.raise_error;
1106: when others then
1107: hr_utility.set_location(' Leaving:'||l_proc, 35);
1108: raise;
1101: hr_utility.set_location(' Leaving:'||l_proc, 30);
1102: exception
1103: when l_error then
1104: fnd_message.set_name('PAY', 'PAY_50123_SIV_INVALID_DELETE');
1105: fnd_message.raise_error;
1106: when others then
1107: hr_utility.set_location(' Leaving:'||l_proc, 35);
1108: raise;
1109: End chk_delete;
1181:
1182: if csr_T_formula_valid%notfound then
1183: hr_utility.set_location(' Leaving:'||l_proc, 10);
1184: close csr_T_formula_valid;
1185: fnd_message.set_name('PAY', 'PAY_33185_SIV_BAD_FORMULA');
1186: fnd_message.raise_error;
1187: end if;
1188:
1189: close csr_T_formula_valid;
1182: if csr_T_formula_valid%notfound then
1183: hr_utility.set_location(' Leaving:'||l_proc, 10);
1184: close csr_T_formula_valid;
1185: fnd_message.set_name('PAY', 'PAY_33185_SIV_BAD_FORMULA');
1186: fnd_message.raise_error;
1187: end if;
1188:
1189: close csr_T_formula_valid;
1190:
1195:
1196: if csr_U_formula_valid%notfound then
1197: hr_utility.set_location(' Leaving:'||l_proc, 15);
1198: close csr_U_formula_valid;
1199: fnd_message.set_name('PAY', 'PAY_33185_SIV_BAD_FORMULA');
1200: fnd_message.raise_error;
1201: end if;
1202:
1203: close csr_U_formula_valid;
1196: if csr_U_formula_valid%notfound then
1197: hr_utility.set_location(' Leaving:'||l_proc, 15);
1198: close csr_U_formula_valid;
1199: fnd_message.set_name('PAY', 'PAY_33185_SIV_BAD_FORMULA');
1200: fnd_message.raise_error;
1201: end if;
1202:
1203: close csr_U_formula_valid;
1204: end if;