144: from per_business_groups pbg
145: where pbg.business_group_id = p_business_group_id;
146: --
147: begin
148: hr_utility.set_location('Entering:'|| l_proc, 5);
149: --
150: -- Validation in addition to Row Handlers
151: --
152: -- Check that the specified business group is valid.
155: fetch csr_bg
156: into l_legislation_code;
157: if csr_bg%notfound then
158: close csr_bg;
159: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
160: hr_utility.raise_error;
161: end if;
162: close csr_bg;
163: --
156: into l_legislation_code;
157: if csr_bg%notfound then
158: close csr_bg;
159: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
160: hr_utility.raise_error;
161: end if;
162: close csr_bg;
163: --
164: -- Check that the legislation of the specified business group is 'ES'.
163: --
164: -- Check that the legislation of the specified business group is 'ES'.
165: --
166: if l_legislation_code <> 'ES' then
167: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
168: hr_utility.set_message_token('LEG_CODE','ES');
169: hr_utility.raise_error;
170: end if;
171:
164: -- Check that the legislation of the specified business group is 'ES'.
165: --
166: if l_legislation_code <> 'ES' then
167: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
168: hr_utility.set_message_token('LEG_CODE','ES');
169: hr_utility.raise_error;
170: end if;
171:
172:
165: --
166: if l_legislation_code <> 'ES' then
167: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
168: hr_utility.set_message_token('LEG_CODE','ES');
169: hr_utility.raise_error;
170: end if;
171:
172:
173: hr_utility.set_location(l_proc, 6);
169: hr_utility.raise_error;
170: end if;
171:
172:
173: hr_utility.set_location(l_proc, 6);
174:
175: hr_applicant_api.create_applicant
176: (p_validate => p_validate
177: ,p_date_received => p_date_received