122: from per_business_groups pbg
123: where pbg.business_group_id = p_business_group_id;
124: --
125: begin
126: hr_utility.set_location('Entering:'|| l_proc, 5);
127: --
128: -- Validation in addition to Row Handlers
129: --
130: -- Check that the specified business group is valid.
133: fetch csr_bg
134: into l_legislation_code;
135: if csr_bg%notfound then
136: close csr_bg;
137: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
138: hr_utility.raise_error;
139: end if;
140: close csr_bg;
141: --
134: into l_legislation_code;
135: if csr_bg%notfound then
136: close csr_bg;
137: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
138: hr_utility.raise_error;
139: end if;
140: close csr_bg;
141: --
142: -- Check that the legislation of the specified business group is 'HU'.
141: --
142: -- Check that the legislation of the specified business group is 'HU'.
143: --
144: if l_legislation_code <> 'HU' then
145: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
146: hr_utility.set_message_token('LEG_CODE','HU');
147: hr_utility.raise_error;
148: end if;
149:
142: -- Check that the legislation of the specified business group is 'HU'.
143: --
144: if l_legislation_code <> 'HU' then
145: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
146: hr_utility.set_message_token('LEG_CODE','HU');
147: hr_utility.raise_error;
148: end if;
149:
150:
143: --
144: if l_legislation_code <> 'HU' then
145: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
146: hr_utility.set_message_token('LEG_CODE','HU');
147: hr_utility.raise_error;
148: end if;
149:
150:
151: hr_utility.set_location(l_proc, 6);
147: hr_utility.raise_error;
148: end if;
149:
150:
151: hr_utility.set_location(l_proc, 6);
152:
153: --
154: -- Call the person business process
155: hr_contact_api.create_person