158: and c_effective_date
159: between per.effective_start_date and per.effective_end_date;
160: --
161: BEGIN
162: hr_utility.set_location('Entering:'|| l_proc, 5);
163: --
164: -- Initialise local variables
165: --
166: l_effective_date := trunc(p_effective_date);
172: OPEN check_legislation(p_person_id, l_effective_date);
173: FETCH check_legislation into l_legislation_code;
174: IF check_legislation%notfound THEN
175: CLOSE check_legislation;
176: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: END IF;
179: CLOSE check_legislation;
180: hr_utility.set_location(l_proc, 20);
173: FETCH check_legislation into l_legislation_code;
174: IF check_legislation%notfound THEN
175: CLOSE check_legislation;
176: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: END IF;
179: CLOSE check_legislation;
180: hr_utility.set_location(l_proc, 20);
181: --
176: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: END IF;
179: CLOSE check_legislation;
180: hr_utility.set_location(l_proc, 20);
181: --
182: -- Check that the legislation of the specified business group is 'AU'.
183: --
184: IF l_legislation_code <> 'AU' THEN
181: --
182: -- Check that the legislation of the specified business group is 'AU'.
183: --
184: IF l_legislation_code <> 'AU' THEN
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','AU');
187: hr_utility.raise_error;
188: END IF;
189: hr_utility.set_location(l_proc, 30);
182: -- Check that the legislation of the specified business group is 'AU'.
183: --
184: IF l_legislation_code <> 'AU' THEN
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','AU');
187: hr_utility.raise_error;
188: END IF;
189: hr_utility.set_location(l_proc, 30);
190: --
183: --
184: IF l_legislation_code <> 'AU' THEN
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','AU');
187: hr_utility.raise_error;
188: END IF;
189: hr_utility.set_location(l_proc, 30);
190: --
191: -- Update the person record using the update_person BP
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE','AU');
187: hr_utility.raise_error;
188: END IF;
189: hr_utility.set_location(l_proc, 30);
190: --
191: -- Update the person record using the update_person BP
192: --
193: hr_person_api.update_person
293: ,p_assign_payroll_warning => p_assign_payroll_warning
294: ,p_orig_hire_warning => p_orig_hire_warning
295: );
296: --
297: hr_utility.set_location(' Leaving:'||l_proc, 7);
298: --
299: END update_AU_person;
300: END hr_au_person_api;