46: if p_name = l_pay_value_name and
47: p_classification_type = 'N' and
48: p_uom <> 'M' then
49: --
50: hr_utility.set_message(801,'');
51: hr_utility.raise_error;
52: --
53: end if;
54:
47: p_classification_type = 'N' and
48: p_uom <> 'M' then
49: --
50: hr_utility.set_message(801,'');
51: hr_utility.raise_error;
52: --
53: end if;
54:
55: if p_insert_update_flag = 'INSERT' then
67: when NO_DATA_FOUND then NULL;
68: end;
69: if v_num_input_values >= 6 then
70: --
71: hr_utility.set_message(801,'PAY_6167_INPVAL_ONLY_6');
72: hr_utility.raise_error;
73: --
74: end if;
75: --
68: end;
69: if v_num_input_values >= 6 then
70: --
71: hr_utility.set_message(801,'PAY_6167_INPVAL_ONLY_6');
72: hr_utility.raise_error;
73: --
74: end if;
75: --
76: v_validation_check := 'Y';
99: end;
100: --
101: if v_validation_check = 'N' then
102: --
103: hr_utility.set_message(801,'PAY_6197_INPVAL_NO_ENTRY');
104: hr_utility.raise_error;
105: --
106: end if;
107: --
100: --
101: if v_validation_check = 'N' then
102: --
103: hr_utility.set_message(801,'PAY_6197_INPVAL_NO_ENTRY');
104: hr_utility.raise_error;
105: --
106: end if;
107: --
108: end if;-- In INSERT mode
128: end;
129:
130: if v_validation_check = 'N' then
131: --
132: hr_utility.set_message(801,'PAY_6168_INPVAL_DUP_NAME');
133: hr_utility.raise_error;
134: --
135: end if;
136: --
129:
130: if v_validation_check = 'N' then
131: --
132: hr_utility.set_message(801,'PAY_6168_INPVAL_DUP_NAME');
133: hr_utility.raise_error;
134: --
135: end if;
136: --
137: -- Hot defaulted values must be mandatory.
137: -- Hot defaulted values must be mandatory.
138: --
139: if (p_hot_default_flag = 'Y' and p_mandatory_flag = 'N') then
140: --
141: hr_utility.set_message(801,'PAY_6609_ELEMENT_HOT_DEF_MAN');
142: hr_utility.raise_error;
143: --
144: end if;
145: --
138: --
139: if (p_hot_default_flag = 'Y' and p_mandatory_flag = 'N') then
140: --
141: hr_utility.set_message(801,'PAY_6609_ELEMENT_HOT_DEF_MAN');
142: hr_utility.raise_error;
143: --
144: end if;
145: --
146: -- Hot defaulted values must have default, max and min less than 59
150: ((length(p_default_value) > 58) or
151: (length(p_min_value) > 58) or
152: (length(p_max_value) > 58)) then
153: --
154: hr_utility.set_message(801,'PAY_6616_INPVAL_HOT_LESS_58');
155: hr_utility.raise_error;
156: --
157: end if;
158: --
151: (length(p_min_value) > 58) or
152: (length(p_max_value) > 58)) then
153: --
154: hr_utility.set_message(801,'PAY_6616_INPVAL_HOT_LESS_58');
155: hr_utility.raise_error;
156: --
157: end if;
158: --
159: -- If the element is nonrecurring then do not allow any non-numeric input
163: p_generate_db_items_flag = 'Y') and
164: ((p_uom = 'C') or
165: (p_uom like 'D%'))) then
166: --
167: hr_utility.set_message(801,'PAY_6169_INPVAL_ONLY_NUM');
168: hr_utility.raise_error;
169: --
170: end if;
171: --
164: ((p_uom = 'C') or
165: (p_uom like 'D%'))) then
166: --
167: hr_utility.set_message(801,'PAY_6169_INPVAL_ONLY_NUM');
168: hr_utility.raise_error;
169: --
170: end if;
171: --
172: -- Makes sure that the validation specified for the input value is correct
179: p_min_value is not NULL or
180: p_max_value is not NULL or
181: p_warning_or_error is NULL) then
182: --
183: hr_utility.set_message(801,'PAY_6905_INPVAL_FORMULA_VAL');
184: hr_utility.raise_error;
185: --
186: end if;
187: --
180: p_max_value is not NULL or
181: p_warning_or_error is NULL) then
182: --
183: hr_utility.set_message(801,'PAY_6905_INPVAL_FORMULA_VAL');
184: hr_utility.raise_error;
185: --
186: end if;
187: --
188: elsif p_lookup_type is not NULL then
191: p_max_value is not NULL or
192: p_formula_id is not NULL or
193: p_warning_or_error is not NULL) then
194: --
195: hr_utility.set_message(801,'PAY_6906_INPVAL_LOOKUP_VAL');
196: hr_utility.raise_error;
197: --
198: end if;
199: --
192: p_formula_id is not NULL or
193: p_warning_or_error is not NULL) then
194: --
195: hr_utility.set_message(801,'PAY_6906_INPVAL_LOOKUP_VAL');
196: hr_utility.raise_error;
197: --
198: end if;
199: --
200: elsif (p_min_value is not NULL or p_max_value is not NULL) then
201: --
202: if (p_lookup_type is not NULL or
203: p_formula_id is not NULL) then
204: --
205: hr_utility.set_message(801,'PAY_6907_INPVAL_MIN_MAX_VAL');
206: hr_utility.raise_error;
207: --
208: elsif (p_warning_or_error is null) then
209: --
202: if (p_lookup_type is not NULL or
203: p_formula_id is not NULL) then
204: --
205: hr_utility.set_message(801,'PAY_6907_INPVAL_MIN_MAX_VAL');
206: hr_utility.raise_error;
207: --
208: elsif (p_warning_or_error is null) then
209: --
210: hr_utility.set_message(801,'PAY_6907_INPVAL_MIN_MAX_VAL');
206: hr_utility.raise_error;
207: --
208: elsif (p_warning_or_error is null) then
209: --
210: hr_utility.set_message(801,'PAY_6907_INPVAL_MIN_MAX_VAL');
211: hr_utility.raise_error;
212: --
213: end if;
214:
207: --
208: elsif (p_warning_or_error is null) then
209: --
210: hr_utility.set_message(801,'PAY_6907_INPVAL_MIN_MAX_VAL');
211: hr_utility.raise_error;
212: --
213: end if;
214:
215: end if;
218: p_min_value is null and
219: p_max_value is null and
220: p_formula_id is null) then
221: --
222: hr_utility.set_message(801,'PAY_6908_INPVAL_ERROR_VAL');
223: hr_utility.raise_error;
224: --
225: end if;
226: --
219: p_max_value is null and
220: p_formula_id is null) then
221: --
222: hr_utility.set_message(801,'PAY_6908_INPVAL_ERROR_VAL');
223: hr_utility.raise_error;
224: --
225: end if;
226: --
227: -- Mkae sure that when lookup validation is being used that the default when
246: end;
247: --
248: if v_validation_check = 'N' then
249: --
250: hr_utility.set_message(801,'PAY_6171_INPVAL_NO_LOOKUP');
251: hr_utility.raise_error;
252: --
253: end if;
254: --
247: --
248: if v_validation_check = 'N' then
249: --
250: hr_utility.set_message(801,'PAY_6171_INPVAL_NO_LOOKUP');
251: hr_utility.raise_error;
252: --
253: end if;
254: --
255: end if;
270: when NO_DATA_FOUND then null;
271: end;
272: --
273: if v_validation_check = 'N' then
274: hr_utility.set_message(801,'PAY_6913_INPVAL_NO_INS_RUN_RES');
275: hr_utility.raise_error;
276: end if;
277:
278: end chk_input_value;
271: end;
272: --
273: if v_validation_check = 'N' then
274: hr_utility.set_message(801,'PAY_6913_INPVAL_NO_INS_RUN_RES');
275: hr_utility.raise_error;
276: end if;
277:
278: end chk_input_value;
279: --
396: when NO_DATA_FOUND then null;
397: end;
398: --
399: if l_min_value_missing = 'Y' then
400: hr_utility.set_message(801,'PAY_6192_INPVAL_NO_MIN_DEFS');
401: hr_utility.raise_error;
402: end if;
403: end if;
404: --
397: end;
398: --
399: if l_min_value_missing = 'Y' then
400: hr_utility.set_message(801,'PAY_6192_INPVAL_NO_MIN_DEFS');
401: hr_utility.raise_error;
402: end if;
403: end if;
404: --
405: if (p_max_delete = 'Y') then
420: when NO_DATA_FOUND then null;
421: end;
422: --
423: if l_max_value_missing = 'Y' then
424: hr_utility.set_message(801,'PAY_6193_INPVAL_NO_MAX_DEFS');
425: hr_utility.raise_error;
426: end if;
427: --
428: end if;
421: end;
422: --
423: if l_max_value_missing = 'Y' then
424: hr_utility.set_message(801,'PAY_6193_INPVAL_NO_MAX_DEFS');
425: hr_utility.raise_error;
426: end if;
427: --
428: end if;
429: --
455: (p_input_value_id,
456: p_element_link_id,
457: p_val_start_date,
458: p_val_end_date) then
459: hr_utility.set_message(801,'PAY_6191_INPVAL_NO_ENTRY_DEFS');
460: hr_utility.raise_error;
461: end if;
462: end if;
463: --
456: p_element_link_id,
457: p_val_start_date,
458: p_val_end_date) then
459: hr_utility.set_message(801,'PAY_6191_INPVAL_NO_ENTRY_DEFS');
460: hr_utility.raise_error;
461: end if;
462: end if;
463: --
464: end if;
513: if hr_input_values.chk_entry_default(p_input_value_id,
514: chk_default.element_link_id,
515: chk_default.effective_start_date,
516: chk_default.effective_end_date) then
517: hr_utility.set_message(801,'PAY_6191_INPVAL_NO_ENTRY_DEFS');
518: hr_utility.raise_error;
519: end if;
520: end loop;
521: end if;
514: chk_default.element_link_id,
515: chk_default.effective_start_date,
516: chk_default.effective_end_date) then
517: hr_utility.set_message(801,'PAY_6191_INPVAL_NO_ENTRY_DEFS');
518: hr_utility.raise_error;
519: end if;
520: end loop;
521: end if;
522: --
538: when NO_DATA_FOUND then null;
539: end;
540: --
541: if null_links_found = 'Y' then
542: hr_utility.set_message(801,'PAY_6192_INPVAL_NO_MIN_DEFS');
543: hr_utility.raise_error;
544: end if;
545: --
546: end if;
539: end;
540: --
541: if null_links_found = 'Y' then
542: hr_utility.set_message(801,'PAY_6192_INPVAL_NO_MIN_DEFS');
543: hr_utility.raise_error;
544: end if;
545: --
546: end if;
547: --
563: when NO_DATA_FOUND then null;
564: end;
565: --
566: if null_links_found = 'Y' then
567: hr_utility.set_message(801,'PAY_6193_INPVAL_NO_MAX_DEFS');
568: hr_utility.raise_error;
569: end if;
570: --
571: end if; -- of 'if default is null' statement
564: end;
565: --
566: if null_links_found = 'Y' then
567: hr_utility.set_message(801,'PAY_6193_INPVAL_NO_MAX_DEFS');
568: hr_utility.raise_error;
569: end if;
570: --
571: end if; -- of 'if default is null' statement
572: --
596: begin
597: --
598: -- Delete future change not allowed for input values
599: if p_delete_mode = 'FUTURE_CHANGE' then
600: hr_utility.set_message(801,'PAY_6209_ELEMENT_NO_FC_DEL');
601: hr_utility.raise_error;
602: --
603: -- the following checks only need to be made for date effective delete or
604: -- ZAP delete. Delete next change requires different processing
597: --
598: -- Delete future change not allowed for input values
599: if p_delete_mode = 'FUTURE_CHANGE' then
600: hr_utility.set_message(801,'PAY_6209_ELEMENT_NO_FC_DEL');
601: hr_utility.raise_error;
602: --
603: -- the following checks only need to be made for date effective delete or
604: -- ZAP delete. Delete next change requires different processing
605: elsif p_delete_mode = 'ZAP' then
632: when NO_DATA_FOUND then NULL;
633: end;
634: --
635: if v_links_exist_flag = 'Y' then
636: hr_utility.set_message(801,'PAY_6210_INPVAL_NO_LINKS_DEL');
637: hr_utility.raise_error;
638: end if;
639: --
640: --
633: end;
634: --
635: if v_links_exist_flag = 'Y' then
636: hr_utility.set_message(801,'PAY_6210_INPVAL_NO_LINKS_DEL');
637: hr_utility.raise_error;
638: end if;
639: --
640: --
641: end if;
660: when NO_DATA_FOUND then NULL;
661: end;
662: --
663: if v_entries_exist_flag = 'Y' then
664: hr_utility.set_message(801,'PAY_6211_INPVAL_NO_DEL_ENTRY');
665: hr_utility.raise_error;
666: end if;
667: --
668: begin
661: end;
662: --
663: if v_entries_exist_flag = 'Y' then
664: hr_utility.set_message(801,'PAY_6211_INPVAL_NO_DEL_ENTRY');
665: hr_utility.raise_error;
666: end if;
667: --
668: begin
669: -- Test to see if any formula result rules target this input value during
683: when NO_DATA_FOUND then NULL;
684: end;
685: --
686: if v_results_exist_flag = 'Y' then
687: hr_utility.set_message(801,'PAY_6213_INPVAL_NO_FRR_DEL');
688: hr_utility.raise_error;
689: end if;
690: --
691: begin
684: end;
685: --
686: if v_results_exist_flag = 'Y' then
687: hr_utility.set_message(801,'PAY_6213_INPVAL_NO_FRR_DEL');
688: hr_utility.raise_error;
689: end if;
690: --
691: begin
692: -- Test to see if any run_result_values are in existence during the validation
713: when NO_DATA_FOUND then NULL;
714: end;
715: --
716: if v_run_results_exist_flag = 'Y' then
717: hr_utility.set_message(801,'PAY_6212_INPVAL_NO_RR_DEL');
718: hr_utility.raise_error;
719: end if;
720: --
721: begin
714: end;
715: --
716: if v_run_results_exist_flag = 'Y' then
717: hr_utility.set_message(801,'PAY_6212_INPVAL_NO_RR_DEL');
718: hr_utility.raise_error;
719: end if;
720: --
721: begin
722: -- You cannot delete an input value if any absence_attendance types access
736: when NO_DATA_FOUND then NULL;
737: end;
738: --
739: if v_results_exist_flag = 'Y' then
740: hr_utility.set_message(801,'PAY_6214_INPVAL_NO_ABS_DEL');
741: hr_utility.raise_error;
742: end if;
743: --
744: begin
737: end;
738: --
739: if v_results_exist_flag = 'Y' then
740: hr_utility.set_message(801,'PAY_6214_INPVAL_NO_ABS_DEL');
741: hr_utility.raise_error;
742: end if;
743: --
744: begin
745: -- You cannot delete an input value if any absence_attendance types access
757: when NO_DATA_FOUND then NULL;
758: end;
759: --
760: if v_results_exist_flag = 'Y' then
761: hr_utility.set_message(801,'PAY_6215_INPVAL_NO_DEL_BP');
762: hr_utility.raise_error;
763: end if;
764: --
765: end if; -- of check delete mode condition.
758: end;
759: --
760: if v_results_exist_flag = 'Y' then
761: hr_utility.set_message(801,'PAY_6215_INPVAL_NO_DEL_BP');
762: hr_utility.raise_error;
763: end if;
764: --
765: end if; -- of check delete mode condition.
766: --
833: and lookup_code = 'PAY VALUE';
834: --
835: exception
836: when NO_DATA_FOUND then
837: hr_utility.set_message(801,'PAY_6162_ELEMENT_NO_NAME_TRANS');
838: hr_utility.raise_error;
839: end;
840: --
841: return(l_pay_value_name);
834: --
835: exception
836: when NO_DATA_FOUND then
837: hr_utility.set_message(801,'PAY_6162_ELEMENT_NO_NAME_TRANS');
838: hr_utility.raise_error;
839: end;
840: --
841: return(l_pay_value_name);
842: --
891: begin
892: --
893: -- We need to clear the warning flag as this may still be in force from
894: -- a previous update
895: hr_utility.clear_warning;
896: --
897: -- Do checks if the following fields have been updated.
898: if (p_old_uom <> p_uom)
899: or (p_old_db_items_flag <> p_db_items_flag)
912: ((p_update_mode <> 'CORRECTION') or
913: (p_old_name = l_pay_value_name) or
914: (p_name = l_pay_value_name) or
915: (p_business_group_id is null)) then
916: hr_utility.set_message(801,'PAY_6177_INPVAL_NO_NAME_CHANGE');
917: hr_utility.raise_error;
918: end if;
919: --
920: -- Unit of measure can only be changed if non_payment_flag on
913: (p_old_name = l_pay_value_name) or
914: (p_name = l_pay_value_name) or
915: (p_business_group_id is null)) then
916: hr_utility.set_message(801,'PAY_6177_INPVAL_NO_NAME_CHANGE');
917: hr_utility.raise_error;
918: end if;
919: --
920: -- Unit of measure can only be changed if non_payment_flag on
921: -- Classification is 'N' or the change keeps within the Unit of measure
922: -- type. This can be found by comparing the first two letters.
923: if (p_old_uom <> p_uom) and
924: (p_classification_type = 'N') and
925: (substr(p_old_uom, 1, 2) <> substr(p_uom, 1, 2)) then
926: hr_utility.set_message(801,'PAY_6178_INPVAL_NO_UOM_CHANGE');
927: hr_utility.raise_error;
928: end if;
929: --
930: -- The mandatory flag can only ever be changed from mandatory to non mandatory -- otherwise the entries might be invalidated.
923: if (p_old_uom <> p_uom) and
924: (p_classification_type = 'N') and
925: (substr(p_old_uom, 1, 2) <> substr(p_uom, 1, 2)) then
926: hr_utility.set_message(801,'PAY_6178_INPVAL_NO_UOM_CHANGE');
927: hr_utility.raise_error;
928: end if;
929: --
930: -- The mandatory flag can only ever be changed from mandatory to non mandatory -- otherwise the entries might be invalidated.
931: if ((p_mandatory_flag = 'Y') and (p_old_mandatory_flag = 'N')) then
929: --
930: -- The mandatory flag can only ever be changed from mandatory to non mandatory -- otherwise the entries might be invalidated.
931: if ((p_mandatory_flag = 'Y') and (p_old_mandatory_flag = 'N')) then
932: --
933: hr_utility.set_message(801,'PAY_6179_INPVAL_MAND_NO_CHANGE');
934: hr_utility.raise_error;
935: --
936: elsif (p_mandatory_flag <> p_old_mandatory_flag) then
937: -- we must also check to see if the mandatory flag will ever
930: -- The mandatory flag can only ever be changed from mandatory to non mandatory -- otherwise the entries might be invalidated.
931: if ((p_mandatory_flag = 'Y') and (p_old_mandatory_flag = 'N')) then
932: --
933: hr_utility.set_message(801,'PAY_6179_INPVAL_MAND_NO_CHANGE');
934: hr_utility.raise_error;
935: --
936: elsif (p_mandatory_flag <> p_old_mandatory_flag) then
937: -- we must also check to see if the mandatory flag will ever
938: -- become mandatory in the future.
952: when NO_DATA_FOUND then NULL;
953: end;
954: --
955: if l_validation_check = 'Y' then
956: hr_utility.set_message(801,'PAY_6179_INPVAL_MAND_NO_CHANGE');
957: hr_utility.raise_error;
958: end if;
959: --
960: end if;
953: end;
954: --
955: if l_validation_check = 'Y' then
956: hr_utility.set_message(801,'PAY_6179_INPVAL_MAND_NO_CHANGE');
957: hr_utility.raise_error;
958: end if;
959: --
960: end if;
961: --
984: when NO_DATA_FOUND then NULL;
985: end;
986: --
987: if v_entries_exist_flag = 'Y' then
988: hr_utility.set_message(801,'PAY_6181_INPVAL_ERR_FLAG_UPD');
989: hr_utility.raise_error;
990: end if;
991: end if; -- error flag checks
992: --
985: end;
986: --
987: if v_entries_exist_flag = 'Y' then
988: hr_utility.set_message(801,'PAY_6181_INPVAL_ERR_FLAG_UPD');
989: hr_utility.raise_error;
990: end if;
991: end if; -- error flag checks
992: --
993: if chk_field_update(p_input_value_id,
996: p_update_mode) = FALSE then
997: --
998: if (p_old_name <> p_name) then
999: --
1000: hr_utility.set_message(801,'PAY_6632_INPVAL_NO_NAME_UPD');
1001: hr_utility.raise_error;
1002: --
1003: elsif (p_old_db_items_flag <> p_db_items_flag) then
1004: --
997: --
998: if (p_old_name <> p_name) then
999: --
1000: hr_utility.set_message(801,'PAY_6632_INPVAL_NO_NAME_UPD');
1001: hr_utility.raise_error;
1002: --
1003: elsif (p_old_db_items_flag <> p_db_items_flag) then
1004: --
1005: hr_utility.set_message(801,'PAY_6633_INPVAL_NO_DB_UPD');
1001: hr_utility.raise_error;
1002: --
1003: elsif (p_old_db_items_flag <> p_db_items_flag) then
1004: --
1005: hr_utility.set_message(801,'PAY_6633_INPVAL_NO_DB_UPD');
1006: hr_utility.raise_error;
1007: --
1008: elsif (p_uom <> p_old_uom) then
1009: --
1002: --
1003: elsif (p_old_db_items_flag <> p_db_items_flag) then
1004: --
1005: hr_utility.set_message(801,'PAY_6633_INPVAL_NO_DB_UPD');
1006: hr_utility.raise_error;
1007: --
1008: elsif (p_uom <> p_old_uom) then
1009: --
1010: hr_utility.set_message(801,'PAY_6634_INPVAL_NO_UOM_UPD');
1006: hr_utility.raise_error;
1007: --
1008: elsif (p_uom <> p_old_uom) then
1009: --
1010: hr_utility.set_message(801,'PAY_6634_INPVAL_NO_UOM_UPD');
1011: hr_utility.raise_error;
1012: --
1013: end if;
1014: end if;
1007: --
1008: elsif (p_uom <> p_old_uom) then
1009: --
1010: hr_utility.set_message(801,'PAY_6634_INPVAL_NO_UOM_UPD');
1011: hr_utility.raise_error;
1012: --
1013: end if;
1014: end if;
1015: --
1039: end;
1040: --
1041: if l_link_inputs_exist = 'Y' then
1042: --
1043: hr_utility.set_message(801, 'PAY_INPVAL_LINK_UPD_WARN');
1044: hr_utility.set_warning;
1045: --
1046: end if;
1047: end if;
1040: --
1041: if l_link_inputs_exist = 'Y' then
1042: --
1043: hr_utility.set_message(801, 'PAY_INPVAL_LINK_UPD_WARN');
1044: hr_utility.set_warning;
1045: --
1046: end if;
1047: end if;
1048: --