116: where pbg.business_group_id = l_business_group_id;
117: --
118: begin
119:
120: hr_utility.set_location('Entering:'|| l_proc, 10);
121: --
122: -- Issue a savepoint if operating in validation only mode
123: --
124: savepoint create_kw_work_incident;
122: -- Issue a savepoint if operating in validation only mode
123: --
124: savepoint create_kw_work_incident;
125: --
126: hr_utility.set_location(l_proc, 20);
127: --
128: -- Process Logic
129: --
130: -- Get person details.
134: into l_business_group_id;
135: --
136: if csr_get_business_group_id%NOTFOUND then
137: close csr_get_business_group_id;
138: hr_utility.set_location(l_proc, 30);
139: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
140: hr_utility.raise_error;
141: end if;
142: close csr_get_business_group_id;
135: --
136: if csr_get_business_group_id%NOTFOUND then
137: close csr_get_business_group_id;
138: hr_utility.set_location(l_proc, 30);
139: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
140: hr_utility.raise_error;
141: end if;
142: close csr_get_business_group_id;
143: --
136: if csr_get_business_group_id%NOTFOUND then
137: close csr_get_business_group_id;
138: hr_utility.set_location(l_proc, 30);
139: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
140: hr_utility.raise_error;
141: end if;
142: close csr_get_business_group_id;
143: --
144: hr_utility.set_location(l_proc, 40);
140: hr_utility.raise_error;
141: end if;
142: close csr_get_business_group_id;
143: --
144: hr_utility.set_location(l_proc, 40);
145: --
146: -- Check that the specified business group is valid.
147: --
148: open csr_bg;
149: fetch csr_bg
150: into l_legislation_code;
151: if csr_bg%notfound then
152: close csr_bg;
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: end if;
156: close csr_bg;
157: hr_utility.set_location(l_proc, 50);
150: into l_legislation_code;
151: if csr_bg%notfound then
152: close csr_bg;
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: end if;
156: close csr_bg;
157: hr_utility.set_location(l_proc, 50);
158: --
153: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
154: hr_utility.raise_error;
155: end if;
156: close csr_bg;
157: hr_utility.set_location(l_proc, 50);
158: --
159: -- Check that the legislation of the specified business group is 'KW'.
160: --
161: if l_legislation_code <> 'KW' then
158: --
159: -- Check that the legislation of the specified business group is 'KW'.
160: --
161: if l_legislation_code <> 'KW' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','KW');
164: hr_utility.raise_error;
165: end if;
166: hr_utility.set_location(l_proc, 60);
159: -- Check that the legislation of the specified business group is 'KW'.
160: --
161: if l_legislation_code <> 'KW' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','KW');
164: hr_utility.raise_error;
165: end if;
166: hr_utility.set_location(l_proc, 60);
167: --
160: --
161: if l_legislation_code <> 'KW' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','KW');
164: hr_utility.raise_error;
165: end if;
166: hr_utility.set_location(l_proc, 60);
167: --
168: -- Call the Work Incident business process
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','KW');
164: hr_utility.raise_error;
165: end if;
166: hr_utility.set_location(l_proc, 60);
167: --
168: -- Call the Work Incident business process
169: --
170: per_work_incident_api.create_work_incident
256: ,p_object_version_number => p_object_version_number
257: );
258:
259: --
260: hr_utility.set_location(' Leaving:'||l_proc, 70);
261: --
262: end create_kw_work_incident;
263: --
264: -- ----------------------------------------------------------------------
373: where pbg.business_group_id = l_business_group_id;
374: --
375: begin
376: --
377: hr_utility.set_location('Entering:'|| l_proc, 10);
378: --
379: -- Issue a savepoint if operating in validation only mode
380: --
381: savepoint update_kw_work_incident;
379: -- Issue a savepoint if operating in validation only mode
380: --
381: savepoint update_kw_work_incident;
382: --
383: hr_utility.set_location(l_proc, 20);
384: --
385: -- Process Logic
386: --
387: -- Get person details.
391: into l_business_group_id;
392: --
393: if csr_get_business_group_id%NOTFOUND then
394: close csr_get_business_group_id;
395: hr_utility.set_location(l_proc, 30);
396: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
397: hr_utility.raise_error;
398: end if;
399: close csr_get_business_group_id;
392: --
393: if csr_get_business_group_id%NOTFOUND then
394: close csr_get_business_group_id;
395: hr_utility.set_location(l_proc, 30);
396: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
397: hr_utility.raise_error;
398: end if;
399: close csr_get_business_group_id;
400: --
393: if csr_get_business_group_id%NOTFOUND then
394: close csr_get_business_group_id;
395: hr_utility.set_location(l_proc, 30);
396: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
397: hr_utility.raise_error;
398: end if;
399: close csr_get_business_group_id;
400: --
401: hr_utility.set_location(l_proc, 40);
397: hr_utility.raise_error;
398: end if;
399: close csr_get_business_group_id;
400: --
401: hr_utility.set_location(l_proc, 40);
402: --
403: -- Check that the specified business group is valid.
404: --
405: open csr_bg;
406: fetch csr_bg
407: into l_legislation_code;
408: if csr_bg%notfound then
409: close csr_bg;
410: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
411: hr_utility.raise_error;
412: end if;
413: close csr_bg;
414: --
407: into l_legislation_code;
408: if csr_bg%notfound then
409: close csr_bg;
410: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
411: hr_utility.raise_error;
412: end if;
413: close csr_bg;
414: --
415: hr_utility.set_location(l_proc, 50);
411: hr_utility.raise_error;
412: end if;
413: close csr_bg;
414: --
415: hr_utility.set_location(l_proc, 50);
416: --
417: -- Check that the legislation of the specified business group is 'KW'.
418: --
419: if l_legislation_code <> 'KW' then
416: --
417: -- Check that the legislation of the specified business group is 'KW'.
418: --
419: if l_legislation_code <> 'KW' then
420: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
421: hr_utility.set_message_token('LEG_CODE','KW');
422: hr_utility.raise_error;
423: end if;
424: hr_utility.set_location(l_proc, 60);
417: -- Check that the legislation of the specified business group is 'KW'.
418: --
419: if l_legislation_code <> 'KW' then
420: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
421: hr_utility.set_message_token('LEG_CODE','KW');
422: hr_utility.raise_error;
423: end if;
424: hr_utility.set_location(l_proc, 60);
425: --
418: --
419: if l_legislation_code <> 'KW' then
420: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
421: hr_utility.set_message_token('LEG_CODE','KW');
422: hr_utility.raise_error;
423: end if;
424: hr_utility.set_location(l_proc, 60);
425: --
426: -- Call the contract business process
420: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
421: hr_utility.set_message_token('LEG_CODE','KW');
422: hr_utility.raise_error;
423: end if;
424: hr_utility.set_location(l_proc, 60);
425: --
426: -- Call the contract business process
427: --
428: per_work_incident_api.update_work_incident
512: ,p_inc_information1 => p_length_of_treatment
513: ,p_inc_information2 => p_units
514: );
515: --
516: hr_utility.set_location(' Leaving:'||l_proc, 70);
517: --
518: end update_kw_work_incident;
519: --
520: end per_kw_work_incident_api;