166: AND pbg.legislation_code = 'SA';
167: --
168: --
169: BEGIN
170: hr_utility.set_location('Entering:'|| l_proc, 10);
171: --
172: -- Initialise local variable
173: --
174: l_effective_date := trunc(p_effective_date);
181: FETCH csr_legislation
182: INTO l_legislation_code;
183: IF csr_legislation%notfound THEN
184: CLOSE csr_legislation;
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE', 'SA');
187: hr_utility.raise_error;
188: END IF;
189: CLOSE csr_legislation;
182: INTO l_legislation_code;
183: IF csr_legislation%notfound THEN
184: CLOSE csr_legislation;
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE', 'SA');
187: hr_utility.raise_error;
188: END IF;
189: CLOSE csr_legislation;
190: --
183: IF csr_legislation%notfound THEN
184: CLOSE csr_legislation;
185: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
186: hr_utility.set_message_token('LEG_CODE', 'SA');
187: hr_utility.raise_error;
188: END IF;
189: CLOSE csr_legislation;
190: --
191: --
310: ,p_group_name => p_group_name
311: ,p_other_manager_warning => p_other_manager_warning
312: );
313: --
314: hr_utility.set_location(' Leaving:'||l_proc, 30);
315: --
316: END create_sa_secondary_emp_asg;
317:
318: -- ----------------------------------------------------------------------------
419: --
420:
421:
422: BEGIN
423: hr_utility.set_location('Entering:'|| l_proc, 10);
424:
425: --
426: -- Truncate DATE variables
427: --
434: OPEN check_legislation(p_assignment_id, l_effective_date);
435: FETCH check_legislation into l_legislation_code;
436: IF check_legislation%notfound THEN
437: CLOSE check_legislation;
438: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
439: hr_utility.raise_error;
440: END IF;
441: CLOSE check_legislation;
442: hr_utility.set_location(l_proc, 20);
435: FETCH check_legislation into l_legislation_code;
436: IF check_legislation%notfound THEN
437: CLOSE check_legislation;
438: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
439: hr_utility.raise_error;
440: END IF;
441: CLOSE check_legislation;
442: hr_utility.set_location(l_proc, 20);
443: --
438: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
439: hr_utility.raise_error;
440: END IF;
441: CLOSE check_legislation;
442: hr_utility.set_location(l_proc, 20);
443: --
444: -- Check that the legislation of the specified business group IS 'SA'.
445: --
446: IF l_legislation_code <> 'SA' THEN
443: --
444: -- Check that the legislation of the specified business group IS 'SA'.
445: --
446: IF l_legislation_code <> 'SA' THEN
447: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
448: hr_utility.set_message_token('LEG_CODE','SA');
449: hr_utility.raise_error;
450: END IF;
451: hr_utility.set_location(l_proc, 30);
444: -- Check that the legislation of the specified business group IS 'SA'.
445: --
446: IF l_legislation_code <> 'SA' THEN
447: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
448: hr_utility.set_message_token('LEG_CODE','SA');
449: hr_utility.raise_error;
450: END IF;
451: hr_utility.set_location(l_proc, 30);
452: --
445: --
446: IF l_legislation_code <> 'SA' THEN
447: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
448: hr_utility.set_message_token('LEG_CODE','SA');
449: hr_utility.raise_error;
450: END IF;
451: hr_utility.set_location(l_proc, 30);
452: --
453: --
447: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
448: hr_utility.set_message_token('LEG_CODE','SA');
449: hr_utility.raise_error;
450: END IF;
451: hr_utility.set_location(l_proc, 30);
452: --
453: --
454: -- Call update_emp_asg business process
455: --
529: ,p_other_manager_warning => p_other_manager_warning
530: );
531:
532:
533: hr_utility.set_location(' Leaving:'||l_proc, 40);
534: END update_sa_emp_asg;
535:
536:
537: END hr_sa_assignment_api;