138: FROM per_business_groups pbg
139: WHERE pbg.business_group_id = p_business_group_id;
140: --
141: BEGIN
142: hr_utility.set_location('Entering:'|| l_proc, 10);
143: --
144: -- Validation IN addition to Row Handlers
145: --
146: -- Check that the specified business group is valid.
149: FETCH csr_bg
150: INTO l_legislation_code;
151: IF csr_bg%notfound THEN
152: CLOSE csr_bg;
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: END IF;
156: CLOSE csr_bg;
157: hr_utility.set_location(l_proc, 20);
150: INTO l_legislation_code;
151: IF csr_bg%notfound THEN
152: CLOSE csr_bg;
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: END IF;
156: CLOSE csr_bg;
157: hr_utility.set_location(l_proc, 20);
158: --
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: END IF;
156: CLOSE csr_bg;
157: hr_utility.set_location(l_proc, 20);
158: --
159: -- Check that the legislation of the specified business group is 'AE'.
160: --
161: IF l_legislation_code <> 'AE' THEN
158: --
159: -- Check that the legislation of the specified business group is 'AE'.
160: --
161: IF l_legislation_code <> 'AE' THEN
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','AE');
164: hr_utility.raise_error;
165: END IF;
166: hr_utility.set_location(l_proc, 30);
159: -- Check that the legislation of the specified business group is 'AE'.
160: --
161: IF l_legislation_code <> 'AE' THEN
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','AE');
164: hr_utility.raise_error;
165: END IF;
166: hr_utility.set_location(l_proc, 30);
167: --
160: --
161: IF l_legislation_code <> 'AE' THEN
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','AE');
164: hr_utility.raise_error;
165: END IF;
166: hr_utility.set_location(l_proc, 30);
167: --
168: -- Call the person business process
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','AE');
164: hr_utility.raise_error;
165: END IF;
166: hr_utility.set_location(l_proc, 30);
167: --
168: -- Call the person business process
169: --
170: hr_employee_api.create_employee
289: ,p_name_combination_warning => p_name_combination_warning
290: ,p_assign_payroll_warning => p_assign_payroll_warning
291: ,p_orig_hire_warning => p_orig_hire_warning);
292: --
293: hr_utility.set_location(' Leaving:'||l_proc, 40);
294: --
295: end create_ae_employee;
296: end hr_ae_employee_api;