54: )
55: IS
56: BEGIN
57:
58: hr_utility.set_location(p_message, p_step);
59:
60: END set_location;
61:
62: ----------------------------------------------------------------------------
104: FETCH csr_lookup INTO l_lookup_code;
105:
106: IF csr_lookup%NOTFOUND THEN
107: CLOSE csr_lookup;
108: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
109: hr_utility.set_message_token('VALUE',p_argument_value);
110: hr_utility.set_message_token('FIELD',p_argument);
111: hr_utility.raise_error;
112: END IF;
105:
106: IF csr_lookup%NOTFOUND THEN
107: CLOSE csr_lookup;
108: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
109: hr_utility.set_message_token('VALUE',p_argument_value);
110: hr_utility.set_message_token('FIELD',p_argument);
111: hr_utility.raise_error;
112: END IF;
113:
106: IF csr_lookup%NOTFOUND THEN
107: CLOSE csr_lookup;
108: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
109: hr_utility.set_message_token('VALUE',p_argument_value);
110: hr_utility.set_message_token('FIELD',p_argument);
111: hr_utility.raise_error;
112: END IF;
113:
114: CLOSE csr_lookup;
107: CLOSE csr_lookup;
108: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
109: hr_utility.set_message_token('VALUE',p_argument_value);
110: hr_utility.set_message_token('FIELD',p_argument);
111: hr_utility.raise_error;
112: END IF;
113:
114: CLOSE csr_lookup;
115:
427: OPEN csr_org_id (p_business_group_id, p_organization_id, p_effective_date);
428: FETCH csr_org_id into l_org_id;
429: IF csr_org_id%NOTFOUND THEN
430: CLOSE csr_org_id;
431: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
432: hr_utility.set_message_token('ORG',p_organization_id);
433: hr_utility.raise_error;
434: END IF;
435: CLOSE csr_org_id;
428: FETCH csr_org_id into l_org_id;
429: IF csr_org_id%NOTFOUND THEN
430: CLOSE csr_org_id;
431: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
432: hr_utility.set_message_token('ORG',p_organization_id);
433: hr_utility.raise_error;
434: END IF;
435: CLOSE csr_org_id;
436: EXCEPTION
429: IF csr_org_id%NOTFOUND THEN
430: CLOSE csr_org_id;
431: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
432: hr_utility.set_message_token('ORG',p_organization_id);
433: hr_utility.raise_error;
434: END IF;
435: CLOSE csr_org_id;
436: EXCEPTION
437: WHEN OTHERS THEN
477: OPEN csr_org_class(p_organization_id, p_classIFication);
478: FETCH csr_org_class into l_org_info_id;
479: IF csr_org_class%NOTFOUND THEN
480: CLOSE csr_org_class;
481: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
482: hr_utility.set_message_token('ORG',p_organization_id);
483: hr_utility.raise_error;
484: END IF;
485: CLOSE csr_org_class;
478: FETCH csr_org_class into l_org_info_id;
479: IF csr_org_class%NOTFOUND THEN
480: CLOSE csr_org_class;
481: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
482: hr_utility.set_message_token('ORG',p_organization_id);
483: hr_utility.raise_error;
484: END IF;
485: CLOSE csr_org_class;
486: EXCEPTION
479: IF csr_org_class%NOTFOUND THEN
480: CLOSE csr_org_class;
481: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
482: hr_utility.set_message_token('ORG',p_organization_id);
483: hr_utility.raise_error;
484: END IF;
485: CLOSE csr_org_class;
486: EXCEPTION
487: WHEN OTHERS THEN
529: OPEN csr_org_type(p_organization_id, p_type);
530: FETCH csr_org_type into l_org_info_id;
531: IF csr_org_type%NOTFOUND THEN
532: CLOSE csr_org_type;
533: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
534: hr_utility.set_message_token('ORG',p_organization_id);
535: hr_utility.raise_error;
536: END IF;
537: CLOSE csr_org_type;
530: FETCH csr_org_type into l_org_info_id;
531: IF csr_org_type%NOTFOUND THEN
532: CLOSE csr_org_type;
533: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
534: hr_utility.set_message_token('ORG',p_organization_id);
535: hr_utility.raise_error;
536: END IF;
537: CLOSE csr_org_type;
538: EXCEPTION
531: IF csr_org_type%NOTFOUND THEN
532: CLOSE csr_org_type;
533: hr_utility.set_message(800,'HR_374604_INVALID_ORG_CLASS');
534: hr_utility.set_message_token('ORG',p_organization_id);
535: hr_utility.raise_error;
536: END IF;
537: CLOSE csr_org_type;
538: EXCEPTION
539: WHEN OTHERS THEN
675: IF (p_tax_exemption_indicator IS NULL) or (p_tax_exemption_indicator = 'N') THEN
676: IF p_percentage IS NULL THEN
677: RETURN;
678: ELSE
679: hr_utility.set_message(800,'HR_374605_INV_TAX_DEPENDENCE');
680: hr_utility.raise_error;
681: END IF;
682: END IF;
683:
676: IF p_percentage IS NULL THEN
677: RETURN;
678: ELSE
679: hr_utility.set_message(800,'HR_374605_INV_TAX_DEPENDENCE');
680: hr_utility.raise_error;
681: END IF;
682: END IF;
683:
684:
723: INTO l_legislation_code;
724: --
725: IF csr_bg%NOTFOUND THEN
726: CLOSE csr_bg;
727: hr_utility.set_message(800, 'HR_7208_API_BUS_GRP_INVALID');
728: hr_utility.raise_error;
729: END IF;
730: CLOSE csr_bg;
731: --
724: --
725: IF csr_bg%NOTFOUND THEN
726: CLOSE csr_bg;
727: hr_utility.set_message(800, 'HR_7208_API_BUS_GRP_INVALID');
728: hr_utility.raise_error;
729: END IF;
730: CLOSE csr_bg;
731: --
732: IF l_legislation_code <> p_legislation_code THEN
729: END IF;
730: CLOSE csr_bg;
731: --
732: IF l_legislation_code <> p_legislation_code THEN
733: hr_utility.set_message(800, 'HR_7961_PER_BUS_GRP_INVALID');
734: hr_utility.set_message_token('LEG_CODE','CN');
735: hr_utility.raise_error;
736: END IF;
737: EXCEPTION
730: CLOSE csr_bg;
731: --
732: IF l_legislation_code <> p_legislation_code THEN
733: hr_utility.set_message(800, 'HR_7961_PER_BUS_GRP_INVALID');
734: hr_utility.set_message_token('LEG_CODE','CN');
735: hr_utility.raise_error;
736: END IF;
737: EXCEPTION
738: WHEN OTHERS THEN
731: --
732: IF l_legislation_code <> p_legislation_code THEN
733: hr_utility.set_message(800, 'HR_7961_PER_BUS_GRP_INVALID');
734: hr_utility.set_message_token('LEG_CODE','CN');
735: hr_utility.raise_error;
736: END IF;
737: EXCEPTION
738: WHEN OTHERS THEN
739: IF csr_bg%ISOPEN THEN
784: OPEN csr_emp_leg(p_person_id, trunc(p_effective_date));
785: FETCH csr_emp_leg into l_legislation_code;
786: IF csr_emp_leg%notfound THEN
787: CLOSE csr_emp_leg;
788: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
789: hr_utility.raise_error;
790: END IF;
791: CLOSE csr_emp_leg;
792:
785: FETCH csr_emp_leg into l_legislation_code;
786: IF csr_emp_leg%notfound THEN
787: CLOSE csr_emp_leg;
788: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
789: hr_utility.raise_error;
790: END IF;
791: CLOSE csr_emp_leg;
792:
793: --
793: --
794: -- Check that the legislation of the specIFied business group is 'CN'.
795: --
796: IF l_legislation_code <> p_legislation_code THEN
797: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
798: hr_utility.set_message_token('LEG_CODE','CN');
799: hr_utility.raise_error;
800: END IF;
801:
794: -- Check that the legislation of the specIFied business group is 'CN'.
795: --
796: IF l_legislation_code <> p_legislation_code THEN
797: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
798: hr_utility.set_message_token('LEG_CODE','CN');
799: hr_utility.raise_error;
800: END IF;
801:
802: EXCEPTION
795: --
796: IF l_legislation_code <> p_legislation_code THEN
797: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
798: hr_utility.set_message_token('LEG_CODE','CN');
799: hr_utility.raise_error;
800: END IF;
801:
802: EXCEPTION
803: WHEN OTHERS THEN
843: INTO l_style;
844: IF csr_add_style%notfound THEN
845: CLOSE csr_add_style;
846: --
847: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
848: hr_utility.raise_error;
849: END IF;
850: --
851: CLOSE csr_add_style;
844: IF csr_add_style%notfound THEN
845: CLOSE csr_add_style;
846: --
847: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
848: hr_utility.raise_error;
849: END IF;
850: --
851: CLOSE csr_add_style;
852: --
850: --
851: CLOSE csr_add_style;
852: --
853: IF l_style <> p_address_style THEN
854: hr_utility.set_message(801, 'HR_52505_INV_ADDRESS_STYLE');
855: hr_utility.raise_error;
856: END IF;
857:
858: EXCEPTION
851: CLOSE csr_add_style;
852: --
853: IF l_style <> p_address_style THEN
854: hr_utility.set_message(801, 'HR_52505_INV_ADDRESS_STYLE');
855: hr_utility.raise_error;
856: END IF;
857:
858: EXCEPTION
859: WHEN OTHERS THEN
912: -- bug 2748967 modIFications END
913:
914: IF legsel%notfound THEN
915: CLOSE legsel;
916: hr_utility.set_message(800, 'HR_7348_PPM_ASSIGNMENT_INVALID');
917: hr_utility.raise_error;
918: END IF;
919:
920: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
913:
914: IF legsel%notfound THEN
915: CLOSE legsel;
916: hr_utility.set_message(800, 'HR_7348_PPM_ASSIGNMENT_INVALID');
917: hr_utility.raise_error;
918: END IF;
919:
920: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
921: CLOSE legsel;
918: END IF;
919:
920: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
921: CLOSE legsel;
922: hr_utility.set_message(801, 'HR_374601_BUS_GRP_INVALID');
923: hr_utility.raise_error;
924: END IF;
925:
926: --
919:
920: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
921: CLOSE legsel;
922: hr_utility.set_message(801, 'HR_374601_BUS_GRP_INVALID');
923: hr_utility.raise_error;
924: END IF;
925:
926: --
927: CLOSE legsel;
976: INTO l_legislation_code;
977: --
978: IF legsel%notfound THEN
979: CLOSE legsel;
980: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
981: hr_utility.raise_error;
982: END IF;
983:
984: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
977: --
978: IF legsel%notfound THEN
979: CLOSE legsel;
980: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
981: hr_utility.raise_error;
982: END IF;
983:
984: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
985: CLOSE legsel;
982: END IF;
983:
984: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
985: CLOSE legsel;
986: hr_utility.set_message(801, 'HR_374601_BUS_GRP_INVALID');
987: hr_utility.raise_error;
988: END IF;
989: --
990: CLOSE legsel;
983:
984: IF legsel%found AND l_legislation_code <> p_legislation_code THEN
985: CLOSE legsel;
986: hr_utility.set_message(801, 'HR_374601_BUS_GRP_INVALID');
987: hr_utility.raise_error;
988: END IF;
989: --
990: CLOSE legsel;
991: --
1057: set_location('. Message Name: '||p_message_name,40);
1058: --
1059: -- Bug 3047273 Changed to 800 from 801
1060: --
1061: hr_utility.set_message(800,p_message_name);
1062: --
1063: -- Truncated the token value to 77 characters, bug 3198695
1064: --
1065: IF p_token1 IS NOT NULL THEN
1066: /* Obtain token 1 name and value */
1067: l_colon_position := INSTR(p_token1,':');
1068: l_token_name := SUBSTR(p_token1,1,l_colon_position-1);
1069: l_token_value := SUBSTR(SUBSTR(p_token1,l_colon_position+1,LENGTH(p_token1)) ,1,77);
1070: hr_utility.set_message_token(l_token_name,l_token_value);
1071: set_location('. Token1: '||l_token_name||'. Value: '||l_token_value,50);
1072: END IF;
1073:
1074: --
1078: /* Obtain token 2 name and value */
1079: l_colon_position := INSTR(p_token2,':');
1080: l_token_name := SUBSTR(p_token2,1,l_colon_position-1);
1081: l_token_value := SUBSTR(SUBSTR(p_token2,l_colon_position+1,LENGTH(p_token2)) ,1,77);
1082: hr_utility.set_message_token(l_token_name,l_token_value);
1083: set_location('. Token2: '||l_token_name||'. Value: '||l_token_value,60);
1084: END IF;
1085:
1086: --
1090: /* Obtain token 3 name and value */
1091: l_colon_position := INSTR(p_token3,':');
1092: l_token_name := SUBSTR(p_token3,1,l_colon_position-1);
1093: l_token_value := SUBSTR(SUBSTR(p_token3,l_colon_position+1,LENGTH(p_token3)) ,1,77);
1094: hr_utility.set_message_token(l_token_name,l_token_value);
1095: set_location('. Token3: '||l_token_name||'. Value: '||l_token_value,70);
1096: END IF;
1097:
1098: --
1108: /* Obtain token 4 name and value */
1109: l_colon_position := INSTR(p_token4,':');
1110: l_token_name := SUBSTR(p_token4,1,l_colon_position-1);
1111: l_token_value := SUBSTR(SUBSTR(p_token4,l_colon_position+1,LENGTH(p_token4)) ,1,77);
1112: hr_utility.set_message_token(l_token_name,l_token_value);
1113: set_location('. Token4: '||l_token_name||'. Value: '||l_token_value,80);
1114: END IF;
1115:
1116: --
1116: --
1117: -- End Bug 3038642
1118: --
1119:
1120: l_message := SUBSTRB(hr_utility.get_message,1,250);
1121:
1122: set_location('leaving '||l_proc,100);
1123: RETURN l_message;
1124:
1266: BEGIN
1267:
1268: IF p_message_name IS NOT NULL AND p_message_name <> 'SUCCESS' THEN
1269: cnt:= p_token_name.count;
1270: hr_utility.set_message(p_application_id, p_message_name);
1271: FOR i IN 1..cnt
1272: LOOP
1273: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
1274: END LOOP;
1269: cnt:= p_token_name.count;
1270: hr_utility.set_message(p_application_id, p_message_name);
1271: FOR i IN 1..cnt
1272: LOOP
1273: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
1274: END LOOP;
1275: hr_utility.raise_error;
1276: END IF;
1277:
1271: FOR i IN 1..cnt
1272: LOOP
1273: hr_utility.set_message_token(p_token_name(i),p_token_value(i));
1274: END LOOP;
1275: hr_utility.raise_error;
1276: END IF;
1277:
1278: END raise_message;
1279: