86: where pbg.business_group_id = l_business_group_id;
87: --
88: begin
89:
90: hr_utility.set_location('Entering:'|| l_proc, 10);
91: --
92: -- Issue a savepoint if operating in validation only mode
93: --
94: savepoint create_ae_disability;
92: -- Issue a savepoint if operating in validation only mode
93: --
94: savepoint create_ae_disability;
95: --
96: hr_utility.set_location(l_proc, 20);
97: --
98: -- Process Logic
99: --
100: -- Get person details.
104: into l_business_group_id;
105: --
106: if csr_get_business_group_id%NOTFOUND then
107: close csr_get_business_group_id;
108: hr_utility.set_location(l_proc, 30);
109: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
110: hr_utility.raise_error;
111: end if;
112: close csr_get_business_group_id;
105: --
106: if csr_get_business_group_id%NOTFOUND then
107: close csr_get_business_group_id;
108: hr_utility.set_location(l_proc, 30);
109: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
110: hr_utility.raise_error;
111: end if;
112: close csr_get_business_group_id;
113: --
106: if csr_get_business_group_id%NOTFOUND then
107: close csr_get_business_group_id;
108: hr_utility.set_location(l_proc, 30);
109: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
110: hr_utility.raise_error;
111: end if;
112: close csr_get_business_group_id;
113: --
114: hr_utility.set_location(l_proc, 40);
110: hr_utility.raise_error;
111: end if;
112: close csr_get_business_group_id;
113: --
114: hr_utility.set_location(l_proc, 40);
115: --
116: -- Check that the specified business group is valid.
117: --
118: open csr_bg;
119: fetch csr_bg
120: into l_legislation_code;
121: if csr_bg%notfound then
122: close csr_bg;
123: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
124: hr_utility.raise_error;
125: end if;
126: close csr_bg;
127: hr_utility.set_location(l_proc, 50);
120: into l_legislation_code;
121: if csr_bg%notfound then
122: close csr_bg;
123: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
124: hr_utility.raise_error;
125: end if;
126: close csr_bg;
127: hr_utility.set_location(l_proc, 50);
128: --
123: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
124: hr_utility.raise_error;
125: end if;
126: close csr_bg;
127: hr_utility.set_location(l_proc, 50);
128: --
129: -- Check that the legislation of the specified business group is 'AE'.
130: --
131: if l_legislation_code <> 'AE' then
128: --
129: -- Check that the legislation of the specified business group is 'AE'.
130: --
131: if l_legislation_code <> 'AE' then
132: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
133: hr_utility.set_message_token('LEG_CODE','AE');
134: hr_utility.raise_error;
135: end if;
136: hr_utility.set_location(l_proc, 60);
129: -- Check that the legislation of the specified business group is 'AE'.
130: --
131: if l_legislation_code <> 'AE' then
132: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
133: hr_utility.set_message_token('LEG_CODE','AE');
134: hr_utility.raise_error;
135: end if;
136: hr_utility.set_location(l_proc, 60);
137: --
130: --
131: if l_legislation_code <> 'AE' then
132: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
133: hr_utility.set_message_token('LEG_CODE','AE');
134: hr_utility.raise_error;
135: end if;
136: hr_utility.set_location(l_proc, 60);
137: --
138: -- Call the disability business process
132: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
133: hr_utility.set_message_token('LEG_CODE','AE');
134: hr_utility.raise_error;
135: end if;
136: hr_utility.set_location(l_proc, 60);
137: --
138: -- Call the disability business process
139: --
140: per_disability_api.create_disability
192: ,p_object_version_number => p_object_version_number
193: ,p_effective_start_date => p_effective_start_date
194: ,p_effective_end_date => p_effective_end_date);
195: --
196: hr_utility.set_location(' Leaving:'||l_proc, 70);
197: --
198: end create_ae_disability;
199: --
200: -- ----------------------------------------------------------------------
280: where pbg.business_group_id = l_business_group_id;
281: --
282: begin
283: --
284: hr_utility.set_location('Entering:'|| l_proc, 10);
285: --
286: -- Issue a savepoint if operating in validation only mode
287: --
288: savepoint update_ae_disability;
286: -- Issue a savepoint if operating in validation only mode
287: --
288: savepoint update_ae_disability;
289: --
290: hr_utility.set_location(l_proc, 20);
291: --
292: -- Process Logic
293: --
294: -- Get person details.
298: into l_business_group_id;
299: --
300: if csr_get_business_group_id%NOTFOUND then
301: close csr_get_business_group_id;
302: hr_utility.set_location(l_proc, 30);
303: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
304: hr_utility.raise_error;
305: end if;
306: close csr_get_business_group_id;
299: --
300: if csr_get_business_group_id%NOTFOUND then
301: close csr_get_business_group_id;
302: hr_utility.set_location(l_proc, 30);
303: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
304: hr_utility.raise_error;
305: end if;
306: close csr_get_business_group_id;
307: --
300: if csr_get_business_group_id%NOTFOUND then
301: close csr_get_business_group_id;
302: hr_utility.set_location(l_proc, 30);
303: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
304: hr_utility.raise_error;
305: end if;
306: close csr_get_business_group_id;
307: --
308: hr_utility.set_location(l_proc, 40);
304: hr_utility.raise_error;
305: end if;
306: close csr_get_business_group_id;
307: --
308: hr_utility.set_location(l_proc, 40);
309: --
310: -- Check that the specified business group is valid.
311: --
312: open csr_bg;
313: fetch csr_bg
314: into l_legislation_code;
315: if csr_bg%notfound then
316: close csr_bg;
317: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
318: hr_utility.raise_error;
319: end if;
320: close csr_bg;
321: --
314: into l_legislation_code;
315: if csr_bg%notfound then
316: close csr_bg;
317: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
318: hr_utility.raise_error;
319: end if;
320: close csr_bg;
321: --
322: hr_utility.set_location(l_proc, 50);
318: hr_utility.raise_error;
319: end if;
320: close csr_bg;
321: --
322: hr_utility.set_location(l_proc, 50);
323: --
324: -- Check that the legislation of the specified business group is 'AE'.
325: --
326: if l_legislation_code <> 'AE' then
323: --
324: -- Check that the legislation of the specified business group is 'AE'.
325: --
326: if l_legislation_code <> 'AE' then
327: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
328: hr_utility.set_message_token('LEG_CODE','AE');
329: hr_utility.raise_error;
330: end if;
331: hr_utility.set_location(l_proc, 60);
324: -- Check that the legislation of the specified business group is 'AE'.
325: --
326: if l_legislation_code <> 'AE' then
327: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
328: hr_utility.set_message_token('LEG_CODE','AE');
329: hr_utility.raise_error;
330: end if;
331: hr_utility.set_location(l_proc, 60);
332: --
325: --
326: if l_legislation_code <> 'AE' then
327: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
328: hr_utility.set_message_token('LEG_CODE','AE');
329: hr_utility.raise_error;
330: end if;
331: hr_utility.set_location(l_proc, 60);
332: --
333: -- Call the contract business process
327: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
328: hr_utility.set_message_token('LEG_CODE','AE');
329: hr_utility.raise_error;
330: end if;
331: hr_utility.set_location(l_proc, 60);
332: --
333: -- Call the contract business process
334: --
335: per_disability_api.update_disability
387: ,p_dis_information1 => p_relevant_to_social_security
388: ,p_effective_start_date => p_effective_start_date
389: ,p_effective_end_date => p_effective_end_date);
390: --
391: hr_utility.set_location(' Leaving:'||l_proc, 70);
392: --
393: end update_ae_disability;
394: --
395: end per_ae_disability_api;