63: where pbg.business_group_id = l_business_group_id;
64: --
65: begin
66: --
67: hr_utility.set_location('Entering:'|| l_proc, 10);
68: --
69: -- Issue a savepoint if operating in validation only mode
70: --
71: savepoint update_sa_pds_details;
69: -- Issue a savepoint if operating in validation only mode
70: --
71: savepoint update_sa_pds_details;
72: --
73: hr_utility.set_location(l_proc, 20);
74: --
75: -- Process Logic
76: --
77: -- Get person details.
81: into l_business_group_id;
82: --
83: if csr_get_business_group_id%NOTFOUND then
84: close csr_get_business_group_id;
85: hr_utility.set_location(l_proc, 30);
86: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
87: hr_utility.raise_error;
88: end if;
89: close csr_get_business_group_id;
82: --
83: if csr_get_business_group_id%NOTFOUND then
84: close csr_get_business_group_id;
85: hr_utility.set_location(l_proc, 30);
86: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
87: hr_utility.raise_error;
88: end if;
89: close csr_get_business_group_id;
90: --
83: if csr_get_business_group_id%NOTFOUND then
84: close csr_get_business_group_id;
85: hr_utility.set_location(l_proc, 30);
86: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
87: hr_utility.raise_error;
88: end if;
89: close csr_get_business_group_id;
90: --
91: hr_utility.set_location(l_proc, 40);
87: hr_utility.raise_error;
88: end if;
89: close csr_get_business_group_id;
90: --
91: hr_utility.set_location(l_proc, 40);
92: --
93: -- Check that the specified business group is valid.
94: --
95: open csr_bg;
96: fetch csr_bg
97: into l_legislation_code;
98: if csr_bg%notfound then
99: close csr_bg;
100: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
101: hr_utility.raise_error;
102: end if;
103: close csr_bg;
104: --
97: into l_legislation_code;
98: if csr_bg%notfound then
99: close csr_bg;
100: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
101: hr_utility.raise_error;
102: end if;
103: close csr_bg;
104: --
105: hr_utility.set_location(l_proc, 50);
101: hr_utility.raise_error;
102: end if;
103: close csr_bg;
104: --
105: hr_utility.set_location(l_proc, 50);
106: --
107: -- Check that the legislation of the specified business group is 'SA'.
108: --
109: if l_legislation_code <> 'SA' then
106: --
107: -- Check that the legislation of the specified business group is 'SA'.
108: --
109: if l_legislation_code <> 'SA' then
110: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
111: hr_utility.set_message_token('LEG_CODE','SA');
112: hr_utility.raise_error;
113: end if;
114: hr_utility.set_location(l_proc, 60);
107: -- Check that the legislation of the specified business group is 'SA'.
108: --
109: if l_legislation_code <> 'SA' then
110: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
111: hr_utility.set_message_token('LEG_CODE','SA');
112: hr_utility.raise_error;
113: end if;
114: hr_utility.set_location(l_proc, 60);
115: --
108: --
109: if l_legislation_code <> 'SA' then
110: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
111: hr_utility.set_message_token('LEG_CODE','SA');
112: hr_utility.raise_error;
113: end if;
114: hr_utility.set_location(l_proc, 60);
115: --
116: -- Call the contract business process
110: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
111: hr_utility.set_message_token('LEG_CODE','SA');
112: hr_utility.raise_error;
113: end if;
114: hr_utility.set_location(l_proc, 60);
115: --
116: -- Call the contract business process
117: --
118: hr_periods_of_service_api.update_pds_details
149: ,p_attribute20 => p_attribute20
150: ,p_pds_information_category => 'SA'
151: ,p_pds_information1 => p_hijrah_termination_date);
152: --
153: hr_utility.set_location(' Leaving:'||l_proc, 70);
154: --
155: end update_sa_pds_details;
156: --
157: end hr_sa_periods_of_service_api;