150: AND pbg.legislation_code = 'HK';
151: --
152: --
153: BEGIN
154: hr_utility.set_location('Entering:'|| l_proc, 10);
155: --
156: -- Initialise local variable
157: --
158: l_effective_date := trunc(p_effective_date);
165: FETCH csr_legislation
166: INTO l_legislation_code;
167: IF csr_legislation%notfound THEN
168: CLOSE csr_legislation;
169: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
170: hr_utility.set_message_token('LEG_CODE', 'HK');
171: hr_utility.raise_error;
172: END IF;
173: CLOSE csr_legislation;
166: INTO l_legislation_code;
167: IF csr_legislation%notfound THEN
168: CLOSE csr_legislation;
169: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
170: hr_utility.set_message_token('LEG_CODE', 'HK');
171: hr_utility.raise_error;
172: END IF;
173: CLOSE csr_legislation;
174: --
167: IF csr_legislation%notfound THEN
168: CLOSE csr_legislation;
169: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
170: hr_utility.set_message_token('LEG_CODE', 'HK');
171: hr_utility.raise_error;
172: END IF;
173: CLOSE csr_legislation;
174: --
175: -- Call create_secondary_emp_asg
293: ,p_group_name => p_group_name
294: ,p_other_manager_warning => p_other_manager_warning
295: );
296: --
297: hr_utility.set_location(' Leaving:'||l_proc, 30);
298: --
299: END create_hk_secondary_emp_asg;
300:
301: -- ----------------------------------------------------------------------------
396: AND asg.assignment_id = c_assignment_id
397: AND c_effective_date BETWEEN effective_start_date AND effective_end_date;
398: --
399: BEGIN
400: hr_utility.set_location('Entering:'|| l_proc, 10);
401: --
402: -- Truncate DATE variables
403: --
404: l_effective_date := trunc(p_effective_date);
410: OPEN check_legislation(p_assignment_id, l_effective_date);
411: FETCH check_legislation into l_legislation_code;
412: IF check_legislation%notfound THEN
413: CLOSE check_legislation;
414: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
415: hr_utility.raise_error;
416: END IF;
417: CLOSE check_legislation;
418: hr_utility.set_location(l_proc, 20);
411: FETCH check_legislation into l_legislation_code;
412: IF check_legislation%notfound THEN
413: CLOSE check_legislation;
414: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
415: hr_utility.raise_error;
416: END IF;
417: CLOSE check_legislation;
418: hr_utility.set_location(l_proc, 20);
419: --
414: hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
415: hr_utility.raise_error;
416: END IF;
417: CLOSE check_legislation;
418: hr_utility.set_location(l_proc, 20);
419: --
420: -- Check that the legislation of the specified business group IS 'HK'.
421: --
422: IF l_legislation_code <> 'HK' THEN
419: --
420: -- Check that the legislation of the specified business group IS 'HK'.
421: --
422: IF l_legislation_code <> 'HK' THEN
423: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
424: hr_utility.set_message_token('LEG_CODE','HK');
425: hr_utility.raise_error;
426: END IF;
427: hr_utility.set_location(l_proc, 30);
420: -- Check that the legislation of the specified business group IS 'HK'.
421: --
422: IF l_legislation_code <> 'HK' THEN
423: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
424: hr_utility.set_message_token('LEG_CODE','HK');
425: hr_utility.raise_error;
426: END IF;
427: hr_utility.set_location(l_proc, 30);
428: --
421: --
422: IF l_legislation_code <> 'HK' THEN
423: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
424: hr_utility.set_message_token('LEG_CODE','HK');
425: hr_utility.raise_error;
426: END IF;
427: hr_utility.set_location(l_proc, 30);
428: --
429: -- Call update_emp_asg business process
423: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
424: hr_utility.set_message_token('LEG_CODE','HK');
425: hr_utility.raise_error;
426: END IF;
427: hr_utility.set_location(l_proc, 30);
428: --
429: -- Call update_emp_asg business process
430: --
431: hr_assignment_api.update_emp_asg
503: ,p_concatenated_segments => p_concatenated_segments
504: ,p_no_managers_warning => p_no_managers_warning
505: ,p_other_manager_warning => p_other_manager_warning
506: );
507: hr_utility.set_location(' Leaving:'||l_proc, 40);
508: END update_hk_emp_asg;
509: --
510: END hr_hk_assignment_api;