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_no_work_incident;
122: -- Issue a savepoint if operating in validation only mode
123: --
124: savepoint create_no_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 'NO'.
160: --
161: if l_legislation_code <> 'NO' then
158: --
159: -- Check that the legislation of the specified business group is 'NO'.
160: --
161: if l_legislation_code <> 'NO' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','NO');
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 'NO'.
160: --
161: if l_legislation_code <> 'NO' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','NO');
164: hr_utility.raise_error;
165: end if;
166: hr_utility.set_location(l_proc, 60);
167: --
160: --
161: if l_legislation_code <> 'NO' then
162: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
163: hr_utility.set_message_token('LEG_CODE','NO');
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','NO');
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_no_work_incident;
263: --
264: -- ----------------------------------------------------------------------
374: where pbg.business_group_id = l_business_group_id;
375: --
376: begin
377: --
378: hr_utility.set_location('Entering:'|| l_proc, 10);
379: --
380: -- Issue a savepoint if operating in validation only mode
381: --
382: savepoint update_no_work_incident;
380: -- Issue a savepoint if operating in validation only mode
381: --
382: savepoint update_no_work_incident;
383: --
384: hr_utility.set_location(l_proc, 20);
385: --
386: -- Process Logic
387: --
388: -- Get person details.
392: into l_business_group_id;
393: --
394: if csr_get_business_group_id%NOTFOUND then
395: close csr_get_business_group_id;
396: hr_utility.set_location(l_proc, 30);
397: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
398: hr_utility.raise_error;
399: end if;
400: close csr_get_business_group_id;
393: --
394: if csr_get_business_group_id%NOTFOUND then
395: close csr_get_business_group_id;
396: hr_utility.set_location(l_proc, 30);
397: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
398: hr_utility.raise_error;
399: end if;
400: close csr_get_business_group_id;
401: --
394: if csr_get_business_group_id%NOTFOUND then
395: close csr_get_business_group_id;
396: hr_utility.set_location(l_proc, 30);
397: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
398: hr_utility.raise_error;
399: end if;
400: close csr_get_business_group_id;
401: --
402: hr_utility.set_location(l_proc, 40);
398: hr_utility.raise_error;
399: end if;
400: close csr_get_business_group_id;
401: --
402: hr_utility.set_location(l_proc, 40);
403: --
404: -- Check that the specified business group is valid.
405: --
406: open csr_bg;
407: fetch csr_bg
408: into l_legislation_code;
409: if csr_bg%notfound then
410: close csr_bg;
411: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
412: hr_utility.raise_error;
413: end if;
414: close csr_bg;
415: --
408: into l_legislation_code;
409: if csr_bg%notfound then
410: close csr_bg;
411: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
412: hr_utility.raise_error;
413: end if;
414: close csr_bg;
415: --
416: hr_utility.set_location(l_proc, 50);
412: hr_utility.raise_error;
413: end if;
414: close csr_bg;
415: --
416: hr_utility.set_location(l_proc, 50);
417: --
418: -- Check that the legislation of the specified business group is 'NO'.
419: --
420: if l_legislation_code <> 'NO' then
417: --
418: -- Check that the legislation of the specified business group is 'NO'.
419: --
420: if l_legislation_code <> 'NO' then
421: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
422: hr_utility.set_message_token('LEG_CODE','NO');
423: hr_utility.raise_error;
424: end if;
425: hr_utility.set_location(l_proc, 60);
418: -- Check that the legislation of the specified business group is 'NO'.
419: --
420: if l_legislation_code <> 'NO' then
421: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
422: hr_utility.set_message_token('LEG_CODE','NO');
423: hr_utility.raise_error;
424: end if;
425: hr_utility.set_location(l_proc, 60);
426: --
419: --
420: if l_legislation_code <> 'NO' then
421: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
422: hr_utility.set_message_token('LEG_CODE','NO');
423: hr_utility.raise_error;
424: end if;
425: hr_utility.set_location(l_proc, 60);
426: --
427: -- Call the contract business process
421: hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
422: hr_utility.set_message_token('LEG_CODE','NO');
423: hr_utility.raise_error;
424: end if;
425: hr_utility.set_location(l_proc, 60);
426: --
427: -- Call the contract business process
428: --
429: per_work_incident_api.update_work_incident
514: ,p_inc_information2 => p_date_rep_labor_inspection
515:
516: );
517: --
518: hr_utility.set_location(' Leaving:'||l_proc, 70);
519: --
520: end update_no_work_incident;
521: --
522: end per_no_work_incident_api;