61: --------------------------------------------------------------------------
62: -- Rev# Date Userid Description --
63: --------------------------------------------------------------------------
64: -- 1.0 09/04/03 bramajey Created this procedure --
65: -- 1.1 19/09/03 statkar Added the hr_utility.chk_product_install --
66: -- check for installed CN leg (3145322) --
67: -- 1.2 31/10/03 bramajey Changed value of token LOW in message --
68: -- HR_374603_INVALID_RANGE from 100000 to --
69: -- 000001 for bug 3226285 --
91: --
92: -- Bug 3145322 Check the leg-specific validations only if the legislation
93: -- is installed
94: --
95: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
96: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
97: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
98: RETURN;
99: END IF;
92: -- Bug 3145322 Check the leg-specific validations only if the legislation
93: -- is installed
94: --
95: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
96: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
97: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
98: RETURN;
99: END IF;
100:
137: FETCH csr_country INTO l_territory_code;
138: IF csr_country%NOTFOUND THEN
139: hr_cn_api.set_location (g_trace, l_proc, 50);
140: CLOSE csr_country;
141: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
142: hr_utility.set_message_token('VALUE',p_country);
143: hr_utility.set_message_token('FIELD','P_COUNTRY');
144: hr_utility.raise_error;
145: END IF;
138: IF csr_country%NOTFOUND THEN
139: hr_cn_api.set_location (g_trace, l_proc, 50);
140: CLOSE csr_country;
141: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
142: hr_utility.set_message_token('VALUE',p_country);
143: hr_utility.set_message_token('FIELD','P_COUNTRY');
144: hr_utility.raise_error;
145: END IF;
146: END IF;
139: hr_cn_api.set_location (g_trace, l_proc, 50);
140: CLOSE csr_country;
141: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
142: hr_utility.set_message_token('VALUE',p_country);
143: hr_utility.set_message_token('FIELD','P_COUNTRY');
144: hr_utility.raise_error;
145: END IF;
146: END IF;
147: --
140: CLOSE csr_country;
141: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
142: hr_utility.set_message_token('VALUE',p_country);
143: hr_utility.set_message_token('FIELD','P_COUNTRY');
144: hr_utility.raise_error;
145: END IF;
146: END IF;
147: --
148: -- Check the valid lookup values
159: hr_cn_api.set_location (g_trace, l_proc, 90);
160: IF p_postal_code <> hr_api.g_varchar2 THEN
161: IF NOT hr_cn_api.is_valid_postal_code(p_postal_code) THEN
162: hr_cn_api.set_location (g_trace, l_proc, 100);
163: hr_utility.set_message(800,'HR_374603_INVALID_RANGE');
164: hr_utility.set_message_token('NUMBER','P_POSTAL_CODE');
165: -- Bug 3226285
166: hr_utility.set_message_token('LOW','000001');
167: hr_utility.set_message_token('HIGH','999999');
160: IF p_postal_code <> hr_api.g_varchar2 THEN
161: IF NOT hr_cn_api.is_valid_postal_code(p_postal_code) THEN
162: hr_cn_api.set_location (g_trace, l_proc, 100);
163: hr_utility.set_message(800,'HR_374603_INVALID_RANGE');
164: hr_utility.set_message_token('NUMBER','P_POSTAL_CODE');
165: -- Bug 3226285
166: hr_utility.set_message_token('LOW','000001');
167: hr_utility.set_message_token('HIGH','999999');
168: hr_utility.raise_error;
162: hr_cn_api.set_location (g_trace, l_proc, 100);
163: hr_utility.set_message(800,'HR_374603_INVALID_RANGE');
164: hr_utility.set_message_token('NUMBER','P_POSTAL_CODE');
165: -- Bug 3226285
166: hr_utility.set_message_token('LOW','000001');
167: hr_utility.set_message_token('HIGH','999999');
168: hr_utility.raise_error;
169: END IF;
170: END IF;
163: hr_utility.set_message(800,'HR_374603_INVALID_RANGE');
164: hr_utility.set_message_token('NUMBER','P_POSTAL_CODE');
165: -- Bug 3226285
166: hr_utility.set_message_token('LOW','000001');
167: hr_utility.set_message_token('HIGH','999999');
168: hr_utility.raise_error;
169: END IF;
170: END IF;
171:
164: hr_utility.set_message_token('NUMBER','P_POSTAL_CODE');
165: -- Bug 3226285
166: hr_utility.set_message_token('LOW','000001');
167: hr_utility.set_message_token('HIGH','999999');
168: hr_utility.raise_error;
169: END IF;
170: END IF;
171:
172: END IF;