96: if p_condition_type not in(ame_util.ordinaryConditionType
97: ,ame_util.exceptionConditionType
98: ,ame_util.listModConditionType
99: ) then
100: fnd_message.set_name('PER','AME_400496_INV_CON_TYPE');
101: fnd_message.raise_error;
102: end if;
103: hr_utility.set_location(' Leaving:'||l_proc,30);
104: exception
97: ,ame_util.exceptionConditionType
98: ,ame_util.listModConditionType
99: ) then
100: fnd_message.set_name('PER','AME_400496_INV_CON_TYPE');
101: fnd_message.raise_error;
102: end if;
103: hr_utility.set_location(' Leaving:'||l_proc,30);
104: exception
105: when app_exception.application_exception then
174: open csr_name;
175: fetch csr_name into l_key;
176: if(csr_name%notfound) then
177: close csr_name;
178: fnd_message.set_name('PER','AME_400473_INV_ATTRIBUTE_ID');
179: fnd_message.raise_error;
180: end if;
181: close csr_name;
182: else
175: fetch csr_name into l_key;
176: if(csr_name%notfound) then
177: close csr_name;
178: fnd_message.set_name('PER','AME_400473_INV_ATTRIBUTE_ID');
179: fnd_message.raise_error;
180: end if;
181: close csr_name;
182: else
183: if(p_attribute_id <> 0) then
180: end if;
181: close csr_name;
182: else
183: if(p_attribute_id <> 0) then
184: fnd_message.set_name('PER','AME_400497_ATTR_ID_NOT_ZERO');
185: fnd_message.raise_error;
186: end if;
187: end if;
188: end if;
181: close csr_name;
182: else
183: if(p_attribute_id <> 0) then
184: fnd_message.set_name('PER','AME_400497_ATTR_ID_NOT_ZERO');
185: fnd_message.raise_error;
186: end if;
187: end if;
188: end if;
189: hr_utility.set_location(' Leaving:'||l_proc,30);
263: ,p_argument_value => p_parameter_one
264: );
265: elsif(l_key <> ame_util.stringAttributeType) then
266: if(p_parameter_one is null and p_parameter_two is null) then
267: fnd_message.set_name('PER','AME_400330_CND_NULL_LUB');
268: fnd_message.raise_error;
269: end if;
270: end if;
271: end if;
264: );
265: elsif(l_key <> ame_util.stringAttributeType) then
266: if(p_parameter_one is null and p_parameter_two is null) then
267: fnd_message.set_name('PER','AME_400330_CND_NULL_LUB');
268: fnd_message.raise_error;
269: end if;
270: end if;
271: end if;
272: hr_utility.set_location(' Leaving:'||l_proc,30);
367: -- than parameter2 or they must be equal.
368: if(to_date(nvl(p_parameter_one,p_parameter_two),'yyyy:mm:dd:hh24:mi:ss')
369: >to_date(nvl(p_parameter_two,p_parameter_one),'yyyy:mm:dd:hh24:mi:ss'))
370: then
371: fnd_message.set_name('PER','AME_400186_CON_START_LESS_END');
372: fnd_message.raise_error;
373: end if;
374: elsif(l_key = ame_util.currencyAttributeType) then
375: -- Either one parameter ( of parameter1 or parametr2) can exist with
368: if(to_date(nvl(p_parameter_one,p_parameter_two),'yyyy:mm:dd:hh24:mi:ss')
369: >to_date(nvl(p_parameter_two,p_parameter_one),'yyyy:mm:dd:hh24:mi:ss'))
370: then
371: fnd_message.set_name('PER','AME_400186_CON_START_LESS_END');
372: fnd_message.raise_error;
373: end if;
374: elsif(l_key = ame_util.currencyAttributeType) then
375: -- Either one parameter ( of parameter1 or parametr2) can exist with
376: -- the other being null.If both exist, then parameter1 must be less
376: -- the other being null.If both exist, then parameter1 must be less
377: -- than parameter2 or they must be equal.
378: if(to_number(nvl(p_parameter_one, p_parameter_two))> to_number(nvl(p_parameter_two, p_parameter_one)))
379: then
380: fnd_message.set_name('PER','AME_400187_CON_LWR_LESS_UPP');
381: fnd_message.raise_error;
382: end if;
383: elsif(l_key = ame_util.numberAttributeType) then
384: -- When there is no approver, Either one parameter ( of parameter1 or
377: -- than parameter2 or they must be equal.
378: if(to_number(nvl(p_parameter_one, p_parameter_two))> to_number(nvl(p_parameter_two, p_parameter_one)))
379: then
380: fnd_message.set_name('PER','AME_400187_CON_LWR_LESS_UPP');
381: fnd_message.raise_error;
382: end if;
383: elsif(l_key = ame_util.numberAttributeType) then
384: -- When there is no approver, Either one parameter ( of parameter1 or
385: -- parameter2) can exist with the other being null.If both exist, then
386: -- parameter1 must be less than parameter2 or they must be equal.
387: if(l_key_approver is null) then
388: if(to_number(nvl(p_parameter_one, p_parameter_two))> to_number(nvl(p_parameter_two, p_parameter_one)))
389: then
390: fnd_message.set_name('PER','AME_400187_CON_LWR_LESS_UPP');
391: fnd_message.raise_error;
392: end if;
393: else
394: if(p_parameter_one <> p_parameter_two) then
387: if(l_key_approver is null) then
388: if(to_number(nvl(p_parameter_one, p_parameter_two))> to_number(nvl(p_parameter_two, p_parameter_one)))
389: then
390: fnd_message.set_name('PER','AME_400187_CON_LWR_LESS_UPP');
391: fnd_message.raise_error;
392: end if;
393: else
394: if(p_parameter_one <> p_parameter_two) then
395: fnd_message.set_name('PER','AME_400498_INV_APPROVER_PARAMS');
391: fnd_message.raise_error;
392: end if;
393: else
394: if(p_parameter_one <> p_parameter_two) then
395: fnd_message.set_name('PER','AME_400498_INV_APPROVER_PARAMS');
396: fnd_message.raise_error;
397: end if;
398: end if;
399: elsif(l_key = ame_util.stringAttributeType) and
392: end if;
393: else
394: if(p_parameter_one <> p_parameter_two) then
395: fnd_message.set_name('PER','AME_400498_INV_APPROVER_PARAMS');
396: fnd_message.raise_error;
397: end if;
398: end if;
399: elsif(l_key = ame_util.stringAttributeType) and
400: not (p_parameter_one is null and p_parameter_two is null) then
397: end if;
398: end if;
399: elsif(l_key = ame_util.stringAttributeType) and
400: not (p_parameter_one is null and p_parameter_two is null) then
401: fnd_message.set_name('PER','AME_400499_INV_STR_PARAMS');
402: fnd_message.raise_error;
403: elsif(l_key = ame_util.booleanAttributeType) and
404: not (p_parameter_one in (ame_util.booleanAttributeTrue,ame_util.booleanAttributeFalse)
405: and p_parameter_two is null) then
398: end if;
399: elsif(l_key = ame_util.stringAttributeType) and
400: not (p_parameter_one is null and p_parameter_two is null) then
401: fnd_message.set_name('PER','AME_400499_INV_STR_PARAMS');
402: fnd_message.raise_error;
403: elsif(l_key = ame_util.booleanAttributeType) and
404: not (p_parameter_one in (ame_util.booleanAttributeTrue,ame_util.booleanAttributeFalse)
405: and p_parameter_two is null) then
406: fnd_message.set_name('PER','AME_400500_INV_BOOL_PARAMS');
402: fnd_message.raise_error;
403: elsif(l_key = ame_util.booleanAttributeType) and
404: not (p_parameter_one in (ame_util.booleanAttributeTrue,ame_util.booleanAttributeFalse)
405: and p_parameter_two is null) then
406: fnd_message.set_name('PER','AME_400500_INV_BOOL_PARAMS');
407: fnd_message.raise_error;
408: end if;
409: elsif(p_condition_type = ame_util.listModConditionType) then
410: open csr_wf_role(p_parameter_two,p_effective_date);
403: elsif(l_key = ame_util.booleanAttributeType) and
404: not (p_parameter_one in (ame_util.booleanAttributeTrue,ame_util.booleanAttributeFalse)
405: and p_parameter_two is null) then
406: fnd_message.set_name('PER','AME_400500_INV_BOOL_PARAMS');
407: fnd_message.raise_error;
408: end if;
409: elsif(p_condition_type = ame_util.listModConditionType) then
410: open csr_wf_role(p_parameter_two,p_effective_date);
411: fetch csr_wf_role into l_key;
412: if(csr_wf_role%notfound) or
413: not (p_parameter_one in (ame_util.anyApprover
414: ,ame_util.finalApprover)) then
415: close csr_wf_role;
416: fnd_message.set_name('PER','AME_400501_INV_LMCOND_PARAM');
417: fnd_message.raise_error;
418: end if;
419: close csr_wf_role;
420: end if;
413: not (p_parameter_one in (ame_util.anyApprover
414: ,ame_util.finalApprover)) then
415: close csr_wf_role;
416: fnd_message.set_name('PER','AME_400501_INV_LMCOND_PARAM');
417: fnd_message.raise_error;
418: end if;
419: close csr_wf_role;
420: end if;
421: end if;
502: open csr_cur_code(p_parameter_three);
503: fetch csr_cur_code into l_key;
504: if(csr_cur_code%notfound) then
505: close csr_cur_code;
506: fnd_message.set_name('PER','AME_400502_INV_CURR_CODE');
507: fnd_message.raise_error;
508: end if;
509: close csr_cur_code;
510: elsif(p_parameter_three is not null) then
503: fetch csr_cur_code into l_key;
504: if(csr_cur_code%notfound) then
505: close csr_cur_code;
506: fnd_message.set_name('PER','AME_400502_INV_CURR_CODE');
507: fnd_message.raise_error;
508: end if;
509: close csr_cur_code;
510: elsif(p_parameter_three is not null) then
511: fnd_message.set_name('PER','AME_400503_COND_PAR3_NOT_NULL');
507: fnd_message.raise_error;
508: end if;
509: close csr_cur_code;
510: elsif(p_parameter_three is not null) then
511: fnd_message.set_name('PER','AME_400503_COND_PAR3_NOT_NULL');
512: fnd_message.raise_error;
513: end if;
514: end if;
515: end if;
508: end if;
509: close csr_cur_code;
510: elsif(p_parameter_three is not null) then
511: fnd_message.set_name('PER','AME_400503_COND_PAR3_NOT_NULL');
512: fnd_message.raise_error;
513: end if;
514: end if;
515: end if;
516: hr_utility.set_location(' Leaving:'||l_proc,30);
604: if l_key = p_rec.condition_id then
605: null;
606: else
607: close csr_name;
608: fnd_message.set_name('PER','AME_400183_CON_ALRDY_EXISTS');
609: fnd_message.raise_error;
610: end if;
611: end if;
612: close csr_name;
605: null;
606: else
607: close csr_name;
608: fnd_message.set_name('PER','AME_400183_CON_ALRDY_EXISTS');
609: fnd_message.raise_error;
610: end if;
611: end if;
612: close csr_name;
613: end if;
691: close csr_atr_type;
692: if (l_key = ame_util.booleanAttributeType) then
693: if not(p_include_lower_limit is null and p_include_upper_limit is null)
694: then
695: fnd_message.set_name('PER','AME_400504_INV_BOOL_LIMITS');
696: fnd_message.raise_error;
697: end if;
698: else
699: -- The parameters 1 and 2 decide the existence of the appopriate limits
692: if (l_key = ame_util.booleanAttributeType) then
693: if not(p_include_lower_limit is null and p_include_upper_limit is null)
694: then
695: fnd_message.set_name('PER','AME_400504_INV_BOOL_LIMITS');
696: fnd_message.raise_error;
697: end if;
698: else
699: -- The parameters 1 and 2 decide the existence of the appopriate limits
700: if(p_parameter_one is null and p_include_lower_limit is not null)
700: if(p_parameter_one is null and p_include_lower_limit is not null)
701: or(p_parameter_one is not null and (p_include_lower_limit is null
702: or p_include_lower_limit not in
703: (ame_util.booleanTrue,ame_util.booleanFalse))) then
704: fnd_message.set_name('PER','AME_400506_INV_LOWER_LIMIT');
705: fnd_message.raise_error;
706: end if;
707: if(p_parameter_two is null and p_include_upper_limit is not null)
708: or (p_parameter_two is not null and (p_include_upper_limit is null
701: or(p_parameter_one is not null and (p_include_lower_limit is null
702: or p_include_lower_limit not in
703: (ame_util.booleanTrue,ame_util.booleanFalse))) then
704: fnd_message.set_name('PER','AME_400506_INV_LOWER_LIMIT');
705: fnd_message.raise_error;
706: end if;
707: if(p_parameter_two is null and p_include_upper_limit is not null)
708: or (p_parameter_two is not null and (p_include_upper_limit is null
709: or p_include_upper_limit not in
707: if(p_parameter_two is null and p_include_upper_limit is not null)
708: or (p_parameter_two is not null and (p_include_upper_limit is null
709: or p_include_upper_limit not in
710: (ame_util.booleanTrue,ame_util.booleanFalse))) then
711: fnd_message.set_name('PER','AME_400505_INV_UPPER_LIMIT');
712: fnd_message.raise_error;
713: end if;
714: if((p_parameter_one = p_parameter_two) and
715: (p_include_lower_limit <> ame_util.booleanTrue or
708: or (p_parameter_two is not null and (p_include_upper_limit is null
709: or p_include_upper_limit not in
710: (ame_util.booleanTrue,ame_util.booleanFalse))) then
711: fnd_message.set_name('PER','AME_400505_INV_UPPER_LIMIT');
712: fnd_message.raise_error;
713: end if;
714: if((p_parameter_one = p_parameter_two) and
715: (p_include_lower_limit <> ame_util.booleanTrue or
716: p_include_upper_limit <> ame_util.booleanTrue)
714: if((p_parameter_one = p_parameter_two) and
715: (p_include_lower_limit <> ame_util.booleanTrue or
716: p_include_upper_limit <> ame_util.booleanTrue)
717: ) then
718: fnd_message.set_name('PER','AME_400678_CON_LMT_VAL_YES');
719: fnd_message.raise_error;
720: end if;
721: end if;
722: else
715: (p_include_lower_limit <> ame_util.booleanTrue or
716: p_include_upper_limit <> ame_util.booleanTrue)
717: ) then
718: fnd_message.set_name('PER','AME_400678_CON_LMT_VAL_YES');
719: fnd_message.raise_error;
720: end if;
721: end if;
722: else
723: if not(p_include_lower_limit is null and p_include_upper_limit is null)
721: end if;
722: else
723: if not(p_include_lower_limit is null and p_include_upper_limit is null)
724: then
725: fnd_message.set_name('PER','AME_400507_INV_LMCOND_LIMITS');
726: fnd_message.raise_error;
727: end if;
728: end if;
729: end if;
722: else
723: if not(p_include_lower_limit is null and p_include_upper_limit is null)
724: then
725: fnd_message.set_name('PER','AME_400507_INV_LMCOND_LIMITS');
726: fnd_message.raise_error;
727: end if;
728: end if;
729: end if;
730: --
792: open csr_name;
793: fetch csr_name into l_key;
794: if(csr_name%found) then
795: close csr_name;
796: fnd_message.set_name('PER','AME_400360_CND_KEY_EXIST');
797: fnd_message.raise_error;
798: elsif(substr(p_condition_key,1,1) = '@') then
799: close csr_name;
800: fnd_message.set_name('PER','AME_400364_COND_KEY_SYMBOL');
793: fetch csr_name into l_key;
794: if(csr_name%found) then
795: close csr_name;
796: fnd_message.set_name('PER','AME_400360_CND_KEY_EXIST');
797: fnd_message.raise_error;
798: elsif(substr(p_condition_key,1,1) = '@') then
799: close csr_name;
800: fnd_message.set_name('PER','AME_400364_COND_KEY_SYMBOL');
801: fnd_message.raise_error;
796: fnd_message.set_name('PER','AME_400360_CND_KEY_EXIST');
797: fnd_message.raise_error;
798: elsif(substr(p_condition_key,1,1) = '@') then
799: close csr_name;
800: fnd_message.set_name('PER','AME_400364_COND_KEY_SYMBOL');
801: fnd_message.raise_error;
802: end if;
803: close csr_name;
804: hr_utility.set_location(' Leaving:'||l_proc,30);
797: fnd_message.raise_error;
798: elsif(substr(p_condition_key,1,1) = '@') then
799: close csr_name;
800: fnd_message.set_name('PER','AME_400364_COND_KEY_SYMBOL');
801: fnd_message.raise_error;
802: end if;
803: close csr_name;
804: hr_utility.set_location(' Leaving:'||l_proc,30);
805: exception
873: open csr_name;
874: fetch csr_name into l_key;
875: if(csr_name%found) then
876: close csr_name;
877: fnd_message.set_name('PER','AME_400193_CON_IN_USE');
878: fnd_message.raise_error;
879: end if;
880: close csr_name;
881:
874: fetch csr_name into l_key;
875: if(csr_name%found) then
876: close csr_name;
877: fnd_message.set_name('PER','AME_400193_CON_IN_USE');
878: fnd_message.raise_error;
879: end if;
880: close csr_name;
881:
882: -- open c_sel2;
882: -- open c_sel2;
883: -- fetch c_sel2 into l_key;
884: -- if c_sel2%found then
885: -- close c_sel2;
886: -- fnd_message.set_name('PER', 'AME_400477_CANNOT_DEL_SEEDED');
887: -- fnd_message.set_token('OBJECT', 'CONDITION');
888: -- fnd_message.raise_error;
889: -- end if;
890: -- close c_sel2;
883: -- fetch c_sel2 into l_key;
884: -- if c_sel2%found then
885: -- close c_sel2;
886: -- fnd_message.set_name('PER', 'AME_400477_CANNOT_DEL_SEEDED');
887: -- fnd_message.set_token('OBJECT', 'CONDITION');
888: -- fnd_message.raise_error;
889: -- end if;
890: -- close c_sel2;
891:
884: -- if c_sel2%found then
885: -- close c_sel2;
886: -- fnd_message.set_name('PER', 'AME_400477_CANNOT_DEL_SEEDED');
887: -- fnd_message.set_token('OBJECT', 'CONDITION');
888: -- fnd_message.raise_error;
889: -- end if;
890: -- close c_sel2;
891:
892: hr_utility.set_location(' Leaving:'||l_proc,30);
944: (p_condition_id => p_rec.condition_id
945: ,p_effective_date => p_effective_date
946: ,p_object_version_number => p_rec.object_version_number
947: ) THEN
948: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
949: fnd_message.set_token('PROCEDURE ', l_proc);
950: fnd_message.set_token('STEP ', '5');
951: fnd_message.raise_error;
952: END IF;
945: ,p_effective_date => p_effective_date
946: ,p_object_version_number => p_rec.object_version_number
947: ) THEN
948: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
949: fnd_message.set_token('PROCEDURE ', l_proc);
950: fnd_message.set_token('STEP ', '5');
951: fnd_message.raise_error;
952: END IF;
953: --
946: ,p_object_version_number => p_rec.object_version_number
947: ) THEN
948: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
949: fnd_message.set_token('PROCEDURE ', l_proc);
950: fnd_message.set_token('STEP ', '5');
951: fnd_message.raise_error;
952: END IF;
953: --
954: -- EDIT_HERE: Add checks to ensure non-updateable args have
947: ) THEN
948: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
949: fnd_message.set_token('PROCEDURE ', l_proc);
950: fnd_message.set_token('STEP ', '5');
951: fnd_message.raise_error;
952: END IF;
953: --
954: -- EDIT_HERE: Add checks to ensure non-updateable args have
955: -- not been updated.
1054: --
1055: -- An unhandled or unexpected error has occurred which
1056: -- we must report
1057: --
1058: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1059: fnd_message.set_token('PROCEDURE', l_proc);
1060: fnd_message.set_token('STEP','15');
1061: fnd_message.raise_error;
1062: End dt_update_validate;
1055: -- An unhandled or unexpected error has occurred which
1056: -- we must report
1057: --
1058: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1059: fnd_message.set_token('PROCEDURE', l_proc);
1060: fnd_message.set_token('STEP','15');
1061: fnd_message.raise_error;
1062: End dt_update_validate;
1063: --
1056: -- we must report
1057: --
1058: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1059: fnd_message.set_token('PROCEDURE', l_proc);
1060: fnd_message.set_token('STEP','15');
1061: fnd_message.raise_error;
1062: End dt_update_validate;
1063: --
1064: -- ----------------------------------------------------------------------------
1057: --
1058: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1059: fnd_message.set_token('PROCEDURE', l_proc);
1060: fnd_message.set_token('STEP','15');
1061: fnd_message.raise_error;
1062: End dt_update_validate;
1063: --
1064: -- ----------------------------------------------------------------------------
1065: -- |--------------------------< dt_delete_validate >--------------------------|
1151: --
1152: -- An unhandled or unexpected error has occurred which
1153: -- we must report
1154: --
1155: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1156: fnd_message.set_token('PROCEDURE', l_proc);
1157: fnd_message.set_token('STEP','15');
1158: fnd_message.raise_error;
1159: --
1152: -- An unhandled or unexpected error has occurred which
1153: -- we must report
1154: --
1155: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1156: fnd_message.set_token('PROCEDURE', l_proc);
1157: fnd_message.set_token('STEP','15');
1158: fnd_message.raise_error;
1159: --
1160: End dt_delete_validate;
1153: -- we must report
1154: --
1155: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1156: fnd_message.set_token('PROCEDURE', l_proc);
1157: fnd_message.set_token('STEP','15');
1158: fnd_message.raise_error;
1159: --
1160: End dt_delete_validate;
1161: --
1154: --
1155: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1156: fnd_message.set_token('PROCEDURE', l_proc);
1157: fnd_message.set_token('STEP','15');
1158: fnd_message.raise_error;
1159: --
1160: End dt_delete_validate;
1161: --
1162: -- ----------------------------------------------------------------------------