162: from per_business_groups pbg
163: where pbg.business_group_id = p_business_group_id;
164: --
165: begin
166: hr_utility.set_location('Entering:'|| l_proc, 5);
167: --
168: -- Validation in addition to Row Handlers
169: --
170: -- Check that the specified business group is valid.
173: fetch csr_bg
174: into l_legislation_code;
175: if csr_bg%notfound then
176: close csr_bg;
177: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
178: hr_utility.raise_error;
179: end if;
180: close csr_bg;
181: --
174: into l_legislation_code;
175: if csr_bg%notfound then
176: close csr_bg;
177: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
178: hr_utility.raise_error;
179: end if;
180: close csr_bg;
181: --
182: -- Check that the legislation of the specified business group is 'ES'.
181: --
182: -- Check that the legislation of the specified business group is 'ES'.
183: --
184: if l_legislation_code <> 'ES' then
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','ES');
187: hr_utility.raise_error;
188: end if;
189:
182: -- Check that the legislation of the specified business group is 'ES'.
183: --
184: if l_legislation_code <> 'ES' then
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','ES');
187: hr_utility.raise_error;
188: end if;
189:
190:
183: --
184: if l_legislation_code <> 'ES' then
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','ES');
187: hr_utility.raise_error;
188: end if;
189:
190:
191: hr_utility.set_location(l_proc, 6);
187: hr_utility.raise_error;
188: end if;
189:
190:
191: hr_utility.set_location(l_proc, 6);
192:
193:
194: --
195: -- Call the person business process