[Home] [Help]
PACKAGE BODY: APPS.PER_SUCCESSOR_IN_PLAN_API
Source
1 Package Body per_successor_in_plan_api as
2 /* $Header: pesipapi.pkb 120.1 2011/03/25 10:30:10 vkodedal noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' per_successor_in_plan_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< create_successor_in_plan >--------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_successor_in_plan
13 (p_validate in boolean default false
14 ,p_effective_date in date
15 ,p_plan_id in number
16 ,p_successor_id in number
17 ,p_business_group_id in number
18 ,p_status in varchar2
19 ,p_rank in number
20 ,p_potential in varchar2 default null
21 ,p_performance_rating in varchar2 default null
22 ,p_risk_of_loss in varchar2 default null
23 ,p_impact_of_loss in varchar2 default null
24 ,p_readiness_pct in number default null
25 ,p_eligible_for_promotion in varchar2 default null
26 ,p_earliest_succession_date in date default null
27 ,p_latest_succession_date in date default null
28 ,p_comments in varchar2 default null
29 ,p_attribute_category in varchar2 default null
30 ,p_attribute1 in varchar2 default null
31 ,p_attribute2 in varchar2 default null
32 ,p_attribute3 in varchar2 default null
33 ,p_attribute4 in varchar2 default null
34 ,p_attribute5 in varchar2 default null
35 ,p_attribute6 in varchar2 default null
36 ,p_attribute7 in varchar2 default null
37 ,p_attribute8 in varchar2 default null
38 ,p_attribute9 in varchar2 default null
39 ,p_attribute10 in varchar2 default null
40 ,p_attribute11 in varchar2 default null
41 ,p_attribute12 in varchar2 default null
42 ,p_attribute13 in varchar2 default null
43 ,p_attribute14 in varchar2 default null
44 ,p_attribute15 in varchar2 default null
45 ,p_attribute16 in varchar2 default null
46 ,p_attribute17 in varchar2 default null
47 ,p_attribute18 in varchar2 default null
48 ,p_attribute19 in varchar2 default null
49 ,p_attribute20 in varchar2 default null
50 ,p_planned_date in date default null
51 ,p_assignment_id in number default null
52 ,p_supervisor_id in number default null
53 ,p_grade_id in number default null
54 ,p_grade_ladder_id in number default null
55 ,p_grade_step_id in number default null
56 ,p_grade_point_id in number default null
57 ,p_position_id in number default null
58 ,p_job_id in number default null
59 ,p_assignment_status_type_id in number default null
60 ,p_organization_id in number default null
61 ,p_people_group_id in number default null
62 ,p_pay_basis_id in number default null
63 ,p_employee_category in varchar2 default null
64 ,p_bargaining_unit_code in varchar2 default null
65 ,p_labour_union_member_flag in varchar2 default null
66 ,p_collective_agreement_id in number default null
67 ,p_assignment_category in varchar2 default null
68 ,p_location_id in number default null
69 ,p_contract_id in number default null
70 ,p_successor_in_plan_id out nocopy number
71 ,p_object_version_number out nocopy number
72 ) is
73 --
74 -- Declare cursors and local variables
75 --
76 l_effective_date date;
77 l_proc varchar2(72) := g_package||'create_successor_in_plan';
78 l_successor_in_plan_id per_sp_successor_in_plan.successor_in_plan_id%TYPE;
79 l_object_version_number per_sp_successor_in_plan.object_version_number%TYPE;
80 begin
81 hr_utility.set_location('Entering:'|| l_proc, 10);
82 --
83 -- Issue a savepoint
84 --
85 savepoint create_successor_in_plan;
86
87 --
88 -- Truncate the time portion from all IN date parameters
89 --
90 l_effective_date := trunc(p_effective_date);
91 hr_utility.set_location(l_proc, 20);
92
93 --
94 -- Call Before Process User Hook
95 --
96 begin
97 per_successor_in_plan_bk1.create_successor_in_plan_b
98 (p_effective_date => l_effective_date
99 ,p_plan_id => p_plan_id
100 ,p_successor_id => p_successor_id
101 ,p_business_group_id => p_business_group_id
102 ,p_status => p_status
103 ,p_rank => p_rank
104 ,p_potential => p_potential
105 ,p_performance_rating => p_performance_rating
106 ,p_risk_of_loss => p_risk_of_loss
107 ,p_impact_of_loss => p_impact_of_loss
108 ,p_readiness_pct => p_readiness_pct
109 ,p_eligible_for_promotion => p_eligible_for_promotion
110 ,p_earliest_succession_date => p_earliest_succession_date
111 ,p_latest_succession_date => p_latest_succession_date
112 ,p_comments => p_comments
113 ,p_attribute_category => p_attribute_category
114 ,p_attribute1 => p_attribute1
115 ,p_attribute2 => p_attribute2
116 ,p_attribute3 => p_attribute3
117 ,p_attribute4 => p_attribute4
118 ,p_attribute5 => p_attribute5
119 ,p_attribute6 => p_attribute6
120 ,p_attribute7 => p_attribute7
121 ,p_attribute8 => p_attribute8
122 ,p_attribute9 => p_attribute9
123 ,p_attribute10 => p_attribute10
124 ,p_attribute11 => p_attribute11
125 ,p_attribute12 => p_attribute12
126 ,p_attribute13 => p_attribute13
127 ,p_attribute14 => p_attribute14
128 ,p_attribute15 => p_attribute15
129 ,p_attribute16 => p_attribute16
130 ,p_attribute17 => p_attribute17
131 ,p_attribute18 => p_attribute18
132 ,p_attribute19 => p_attribute19
133 ,p_attribute20 => p_attribute20
134 ,p_planned_date => p_planned_date
135 ,p_assignment_id => p_assignment_id
136 ,p_supervisor_id => p_supervisor_id
137 ,p_grade_id => p_grade_id
138 ,p_grade_ladder_id => p_grade_ladder_id
139 ,p_grade_step_id => p_grade_step_id
140 ,p_grade_point_id => p_grade_point_id
141 ,p_position_id => p_position_id
142 ,p_job_id => p_job_id
143 ,p_assignment_status_type_id => p_assignment_status_type_id
144 ,p_organization_id => p_organization_id
145 ,p_people_group_id => p_people_group_id
146 ,p_pay_basis_id => p_pay_basis_id
147 ,p_employee_category => p_employee_category
148 ,p_bargaining_unit_code => p_bargaining_unit_code
149 ,p_labour_union_member_flag => p_labour_union_member_flag
150 ,p_collective_agreement_id => p_collective_agreement_id
151 ,p_assignment_category => p_assignment_category
152 ,p_location_id => p_location_id
153 ,p_contract_id => p_contract_id );
154 exception
155 when hr_api.cannot_find_prog_unit then
156 hr_api.cannot_find_prog_unit_error
157 (p_module_name => 'create_successor_in_plan_b'
158 ,p_hook_type => 'BP'
159 );
160 end;
161 --
162 -- Validation in addition to Row Handlers
163 --
164
165
166 hr_utility.set_location(l_proc, 30);
167
168 --
169 -- Process Logic
170 --
171
172 hr_utility.set_location(l_proc, 40);
173 per_sip_ins.ins( p_effective_date => l_effective_date
174 ,p_successor_in_plan_id => l_successor_in_plan_id
175 ,p_plan_id => p_plan_id
176 ,p_successor_id => p_successor_id
177 ,p_business_group_id => p_business_group_id
178 ,p_status => p_status
179 ,p_rank => p_rank
180 ,p_potential => p_potential
181 ,p_performance_rating => p_performance_rating
182 ,p_risk_of_loss => p_risk_of_loss
183 ,p_impact_of_loss => p_impact_of_loss
184 ,p_readiness_pct => p_readiness_pct
185 ,p_eligible_for_promotion => p_eligible_for_promotion
186 ,p_earliest_succession_date => p_earliest_succession_date
187 ,p_latest_succession_date => p_latest_succession_date
188 ,p_comments => p_comments
189 ,p_attribute_category => p_attribute_category
190 ,p_attribute1 => p_attribute1
191 ,p_attribute2 => p_attribute2
192 ,p_attribute3 => p_attribute3
193 ,p_attribute4 => p_attribute4
194 ,p_attribute5 => p_attribute5
195 ,p_attribute6 => p_attribute6
196 ,p_attribute7 => p_attribute7
197 ,p_attribute8 => p_attribute8
198 ,p_attribute9 => p_attribute9
199 ,p_attribute10 => p_attribute10
200 ,p_attribute11 => p_attribute11
201 ,p_attribute12 => p_attribute12
202 ,p_attribute13 => p_attribute13
203 ,p_attribute14 => p_attribute14
204 ,p_attribute15 => p_attribute15
205 ,p_attribute16 => p_attribute16
206 ,p_attribute17 => p_attribute17
207 ,p_attribute18 => p_attribute18
208 ,p_attribute19 => p_attribute19
209 ,p_attribute20 => p_attribute20
210 ,p_planned_date => p_planned_date
211 ,p_assignment_id => p_assignment_id
212 ,p_supervisor_id => p_supervisor_id
213 ,p_grade_id => p_grade_id
214 ,p_grade_ladder_id => p_grade_ladder_id
215 ,p_grade_step_id => p_grade_step_id
216 ,p_grade_point_id => p_grade_point_id
217 ,p_position_id => p_position_id
218 ,p_job_id => p_job_id
219 ,p_assignment_status_type_id => p_assignment_status_type_id
220 ,p_organization_id => p_organization_id
221 ,p_people_group_id => p_people_group_id
222 ,p_pay_basis_id => p_pay_basis_id
223 ,p_employee_category => p_employee_category
224 ,p_bargaining_unit_code => p_bargaining_unit_code
225 ,p_labour_union_member_flag => p_labour_union_member_flag
226 ,p_collective_agreement_id => p_collective_agreement_id
227 ,p_assignment_category => p_assignment_category
228 ,p_location_id => p_location_id
229 ,p_contract_id => p_contract_id
230 ,p_object_version_number => l_object_version_number);
231
232
233 --
234 -- Call After Process User Hook
235 --
236 begin
237 per_successor_in_plan_bk1.create_successor_in_plan_a
238 (p_effective_date => l_effective_date
239 ,p_successor_in_plan_id => l_successor_in_plan_id
240 ,p_plan_id => p_plan_id
241 ,p_successor_id => p_successor_id
242 ,p_business_group_id => p_business_group_id
243 ,p_status => p_status
244 ,p_rank => p_rank
245 ,p_potential => p_potential
246 ,p_performance_rating => p_performance_rating
247 ,p_risk_of_loss => p_risk_of_loss
248 ,p_impact_of_loss => p_impact_of_loss
249 ,p_readiness_pct => p_readiness_pct
250 ,p_eligible_for_promotion => p_eligible_for_promotion
251 ,p_earliest_succession_date => p_earliest_succession_date
252 ,p_latest_succession_date => p_latest_succession_date
253 ,p_comments => p_comments
254 ,p_attribute_category => p_attribute_category
255 ,p_attribute1 => p_attribute1
256 ,p_attribute2 => p_attribute2
257 ,p_attribute3 => p_attribute3
258 ,p_attribute4 => p_attribute4
259 ,p_attribute5 => p_attribute5
260 ,p_attribute6 => p_attribute6
261 ,p_attribute7 => p_attribute7
262 ,p_attribute8 => p_attribute8
263 ,p_attribute9 => p_attribute9
264 ,p_attribute10 => p_attribute10
265 ,p_attribute11 => p_attribute11
266 ,p_attribute12 => p_attribute12
267 ,p_attribute13 => p_attribute13
268 ,p_attribute14 => p_attribute14
269 ,p_attribute15 => p_attribute15
270 ,p_attribute16 => p_attribute16
271 ,p_attribute17 => p_attribute17
272 ,p_attribute18 => p_attribute18
273 ,p_attribute19 => p_attribute19
274 ,p_attribute20 => p_attribute20
275 ,p_planned_date => p_planned_date
276 ,p_assignment_id => p_assignment_id
277 ,p_supervisor_id => p_supervisor_id
278 ,p_grade_id => p_grade_id
279 ,p_grade_ladder_id => p_grade_ladder_id
280 ,p_grade_step_id => p_grade_step_id
281 ,p_grade_point_id => p_grade_point_id
282 ,p_position_id => p_position_id
283 ,p_job_id => p_job_id
284 ,p_assignment_status_type_id => p_assignment_status_type_id
285 ,p_organization_id => p_organization_id
286 ,p_people_group_id => p_people_group_id
287 ,p_pay_basis_id => p_pay_basis_id
288 ,p_employee_category => p_employee_category
289 ,p_bargaining_unit_code => p_bargaining_unit_code
290 ,p_labour_union_member_flag => p_labour_union_member_flag
291 ,p_collective_agreement_id => p_collective_agreement_id
292 ,p_assignment_category => p_assignment_category
293 ,p_location_id => p_location_id
294 ,p_contract_id => p_contract_id
295 );
296 exception
297 when hr_api.cannot_find_prog_unit then
298 hr_api.cannot_find_prog_unit_error
299 (p_module_name => 'create_successor_in_plan_b'
300 ,p_hook_type => 'AP'
301 );
302 end;
303 hr_utility.set_location(l_proc, 50);
304
305 --
306 -- When in validation only mode raise the Validate_Enabled exception
307 --
308 if p_validate then
309 raise hr_api.validate_enabled;
310 end if;
311 --
312 -- Set all IN OUT and OUT parameters with out values
313 --
314 p_successor_in_plan_id := l_successor_in_plan_id;
315 p_object_version_number := l_object_version_number;
316 --
317 hr_utility.set_location(' Leaving:'||l_proc, 70);
318 exception
319 when hr_api.validate_enabled then
320 --
321 -- As the Validate_Enabled exception has been raised
322 -- we must rollback to the savepoint
323 --
324 rollback to create_successor_in_plan;
325 --
326 -- Reset IN OUT parameters and set OUT parameters
327 -- (Any key or derived arguments must be set to null
328 -- when validation only mode is being used.)
329 --
330 p_successor_in_plan_id := null;
331 p_object_version_number := null;
332 hr_utility.set_location(' Leaving:'||l_proc, 80);
333 when others then
334 --
335 -- A validation or unexpected error has occured
336 --
337 rollback to create_successor_in_plan;
338 --
339 -- Reset IN OUT parameters and set all
340 -- OUT parameters, including warnings, to null
341 --
342 p_successor_in_plan_id := null;
343 p_object_version_number := null;
344 hr_utility.set_location(' Leaving:'||l_proc, 90);
345 raise;
346 end create_successor_in_plan;
347 --
348 --
349 -- ----------------------------------------------------------------------------
350 -- |--------------------------< update_successor_in_plan >--------------------------|
351 -- ----------------------------------------------------------------------------
352 --
353 procedure update_successor_in_plan
354 (p_validate in boolean default false
355 ,p_effective_date in date
356 ,p_successor_in_plan_id in number
357 ,p_object_version_number in out nocopy number
358 ,p_plan_id in number default hr_api.g_number
359 ,p_successor_id in number default hr_api.g_number
360 ,p_business_group_id in number default hr_api.g_number
361 ,p_status in varchar2 default hr_api.g_varchar2
362 ,p_rank in number default hr_api.g_number
363 ,p_potential in varchar2 default hr_api.g_varchar2
364 ,p_performance_rating in varchar2 default hr_api.g_varchar2
365 ,p_risk_of_loss in varchar2 default hr_api.g_varchar2
366 ,p_impact_of_loss in varchar2 default hr_api.g_varchar2
367 ,p_readiness_pct in number default hr_api.g_number
368 ,p_eligible_for_promotion in varchar2 default hr_api.g_varchar2
369 ,p_earliest_succession_date in date default hr_api.g_date
370 ,p_latest_succession_date in date default hr_api.g_date
371 ,p_comments in varchar2 default hr_api.g_varchar2
372 ,p_attribute_category in varchar2 default hr_api.g_varchar2
373 ,p_attribute1 in varchar2 default hr_api.g_varchar2
374 ,p_attribute2 in varchar2 default hr_api.g_varchar2
375 ,p_attribute3 in varchar2 default hr_api.g_varchar2
376 ,p_attribute4 in varchar2 default hr_api.g_varchar2
377 ,p_attribute5 in varchar2 default hr_api.g_varchar2
378 ,p_attribute6 in varchar2 default hr_api.g_varchar2
379 ,p_attribute7 in varchar2 default hr_api.g_varchar2
380 ,p_attribute8 in varchar2 default hr_api.g_varchar2
381 ,p_attribute9 in varchar2 default hr_api.g_varchar2
382 ,p_attribute10 in varchar2 default hr_api.g_varchar2
383 ,p_attribute11 in varchar2 default hr_api.g_varchar2
384 ,p_attribute12 in varchar2 default hr_api.g_varchar2
385 ,p_attribute13 in varchar2 default hr_api.g_varchar2
386 ,p_attribute14 in varchar2 default hr_api.g_varchar2
387 ,p_attribute15 in varchar2 default hr_api.g_varchar2
388 ,p_attribute16 in varchar2 default hr_api.g_varchar2
389 ,p_attribute17 in varchar2 default hr_api.g_varchar2
390 ,p_attribute18 in varchar2 default hr_api.g_varchar2
391 ,p_attribute19 in varchar2 default hr_api.g_varchar2
392 ,p_attribute20 in varchar2 default hr_api.g_varchar2
393 ,p_planned_date in date default hr_api.g_date
394 ,p_assignment_id in number default hr_api.g_number
395 ,p_supervisor_id in number default hr_api.g_number
396 ,p_grade_id in number default hr_api.g_number
397 ,p_grade_ladder_id in number default hr_api.g_number
398 ,p_grade_step_id in number default hr_api.g_number
399 ,p_grade_point_id in number default hr_api.g_number
400 ,p_position_id in number default hr_api.g_number
401 ,p_job_id in number default hr_api.g_number
402 ,p_assignment_status_type_id in number default hr_api.g_number
403 ,p_organization_id in number default hr_api.g_number
404 ,p_people_group_id in number default hr_api.g_number
405 ,p_pay_basis_id in number default hr_api.g_number
406 ,p_employee_category in varchar2 default hr_api.g_varchar2
407 ,p_bargaining_unit_code in varchar2 default hr_api.g_varchar2
408 ,p_labour_union_member_flag in varchar2 default hr_api.g_varchar2
409 ,p_collective_agreement_id in number default hr_api.g_number
410 ,p_assignment_category in varchar2 default hr_api.g_varchar2
411 ,p_location_id in number default hr_api.g_number
412 ,p_contract_id in number default hr_api.g_number)
413 is
414 --
415 -- Declare cursors and local variables
416 --
417 l_effective_date date;
418 l_proc varchar2(72) := g_package||'update_successor_in_plan';
419 l_object_version_number per_sp_successor_in_plan.object_version_number%TYPE;
420 begin
421 hr_utility.set_location('Entering:'|| l_proc, 10);
422 --
423 -- Issue a savepoint
424 --
425 savepoint update_successor_in_plan;
426 --
427 --
428 l_object_version_number := p_object_version_number;
429 --
430 -- Truncate the time portion from all IN date parameters
431 --
432 l_effective_date := trunc(p_effective_date);
433 hr_utility.set_location(l_proc, 20);
434
435 --
436 -- Call Before Process User Hook
437 --
438 begin
439 per_successor_in_plan_bk2.update_successor_in_plan_b
440 (p_effective_date => l_effective_date
441 ,p_successor_in_plan_id => p_successor_in_plan_id
442 ,p_plan_id => p_plan_id
443 ,p_successor_id => p_successor_id
444 ,p_business_group_id => p_business_group_id
445 ,p_status => p_status
446 ,p_rank => p_rank
447 ,p_potential => p_potential
448 ,p_performance_rating => p_performance_rating
449 ,p_risk_of_loss => p_risk_of_loss
450 ,p_impact_of_loss => p_impact_of_loss
451 ,p_readiness_pct => p_readiness_pct
452 ,p_eligible_for_promotion => p_eligible_for_promotion
453 ,p_earliest_succession_date => p_earliest_succession_date
454 ,p_latest_succession_date => p_latest_succession_date
455 ,p_comments => p_comments
456 ,p_attribute_category => p_attribute_category
457 ,p_attribute1 => p_attribute1
458 ,p_attribute2 => p_attribute2
459 ,p_attribute3 => p_attribute3
460 ,p_attribute4 => p_attribute4
461 ,p_attribute5 => p_attribute5
462 ,p_attribute6 => p_attribute6
463 ,p_attribute7 => p_attribute7
464 ,p_attribute8 => p_attribute8
465 ,p_attribute9 => p_attribute9
466 ,p_attribute10 => p_attribute10
467 ,p_attribute11 => p_attribute11
468 ,p_attribute12 => p_attribute12
469 ,p_attribute13 => p_attribute13
470 ,p_attribute14 => p_attribute14
471 ,p_attribute15 => p_attribute15
472 ,p_attribute16 => p_attribute16
473 ,p_attribute17 => p_attribute17
474 ,p_attribute18 => p_attribute18
475 ,p_attribute19 => p_attribute19
476 ,p_attribute20 => p_attribute20
477 ,p_planned_date => p_planned_date
478 ,p_assignment_id => p_assignment_id
479 ,p_supervisor_id => p_supervisor_id
480 ,p_grade_id => p_grade_id
481 ,p_grade_ladder_id => p_grade_ladder_id
482 ,p_grade_step_id => p_grade_step_id
483 ,p_grade_point_id => p_grade_point_id
484 ,p_position_id => p_position_id
485 ,p_job_id => p_job_id
486 ,p_assignment_status_type_id => p_assignment_status_type_id
487 ,p_organization_id => p_organization_id
488 ,p_people_group_id => p_people_group_id
489 ,p_pay_basis_id => p_pay_basis_id
490 ,p_employee_category => p_employee_category
491 ,p_bargaining_unit_code => p_bargaining_unit_code
492 ,p_labour_union_member_flag => p_labour_union_member_flag
493 ,p_collective_agreement_id => p_collective_agreement_id
494 ,p_assignment_category => p_assignment_category
495 ,p_location_id => p_location_id
496 ,p_contract_id => p_contract_id );
497 exception
498 when hr_api.cannot_find_prog_unit then
499 hr_api.cannot_find_prog_unit_error
500 (p_module_name => 'update_successor_in_plan_b'
501 ,p_hook_type => 'BP'
502 );
503 end;
504 --
505 -- Validation in addition to Row Handlers
506 --
507
508
509 hr_utility.set_location(l_proc, 30);
510
511 --
512 -- Process Logic
513 --
514
515 hr_utility.set_location(l_proc, 40);
516 per_sip_upd.upd( p_effective_date => l_effective_date
517 ,p_successor_in_plan_id => p_successor_in_plan_id
518 ,p_plan_id => p_plan_id
519 ,p_successor_id => p_successor_id
520 ,p_business_group_id => p_business_group_id
521 ,p_status => p_status
522 ,p_rank => p_rank
523 ,p_potential => p_potential
524 ,p_performance_rating => p_performance_rating
525 ,p_risk_of_loss => p_risk_of_loss
526 ,p_impact_of_loss => p_impact_of_loss
527 ,p_readiness_pct => p_readiness_pct
528 ,p_eligible_for_promotion => p_eligible_for_promotion
529 ,p_earliest_succession_date => p_earliest_succession_date
530 ,p_latest_succession_date => p_latest_succession_date
531 ,p_comments => p_comments
532 ,p_attribute_category => p_attribute_category
533 ,p_attribute1 => p_attribute1
534 ,p_attribute2 => p_attribute2
535 ,p_attribute3 => p_attribute3
536 ,p_attribute4 => p_attribute4
537 ,p_attribute5 => p_attribute5
538 ,p_attribute6 => p_attribute6
539 ,p_attribute7 => p_attribute7
540 ,p_attribute8 => p_attribute8
541 ,p_attribute9 => p_attribute9
542 ,p_attribute10 => p_attribute10
543 ,p_attribute11 => p_attribute11
544 ,p_attribute12 => p_attribute12
545 ,p_attribute13 => p_attribute13
546 ,p_attribute14 => p_attribute14
547 ,p_attribute15 => p_attribute15
548 ,p_attribute16 => p_attribute16
549 ,p_attribute17 => p_attribute17
550 ,p_attribute18 => p_attribute18
551 ,p_attribute19 => p_attribute19
552 ,p_attribute20 => p_attribute20
553 ,p_planned_date => p_planned_date
554 ,p_assignment_id => p_assignment_id
555 ,p_supervisor_id => p_supervisor_id
556 ,p_grade_id => p_grade_id
557 ,p_grade_ladder_id => p_grade_ladder_id
558 ,p_grade_step_id => p_grade_step_id
559 ,p_grade_point_id => p_grade_point_id
560 ,p_position_id => p_position_id
561 ,p_job_id => p_job_id
562 ,p_assignment_status_type_id => p_assignment_status_type_id
563 ,p_organization_id => p_organization_id
564 ,p_people_group_id => p_people_group_id
565 ,p_pay_basis_id => p_pay_basis_id
566 ,p_employee_category => p_employee_category
567 ,p_bargaining_unit_code => p_bargaining_unit_code
568 ,p_labour_union_member_flag => p_labour_union_member_flag
569 ,p_collective_agreement_id => p_collective_agreement_id
570 ,p_assignment_category => p_assignment_category
571 ,p_location_id => p_location_id
572 ,p_contract_id => p_contract_id
573 ,p_object_version_number => l_object_version_number);
574
575 --
576 -- Call After Process User Hook
577 --
578 begin
579 per_successor_in_plan_bk2.update_successor_in_plan_a
580 ( p_effective_date => l_effective_date
581 ,p_successor_in_plan_id => p_successor_in_plan_id
582 ,p_plan_id => p_plan_id
583 ,p_successor_id => p_successor_id
584 ,p_business_group_id => p_business_group_id
585 ,p_status => p_status
586 ,p_rank => p_rank
587 ,p_potential => p_potential
588 ,p_performance_rating => p_performance_rating
589 ,p_risk_of_loss => p_risk_of_loss
590 ,p_impact_of_loss => p_impact_of_loss
591 ,p_readiness_pct => p_readiness_pct
592 ,p_eligible_for_promotion => p_eligible_for_promotion
593 ,p_earliest_succession_date => p_earliest_succession_date
594 ,p_latest_succession_date => p_latest_succession_date
595 ,p_comments => p_comments
596 ,p_attribute_category => p_attribute_category
597 ,p_attribute1 => p_attribute1
598 ,p_attribute2 => p_attribute2
599 ,p_attribute3 => p_attribute3
600 ,p_attribute4 => p_attribute4
601 ,p_attribute5 => p_attribute5
602 ,p_attribute6 => p_attribute6
603 ,p_attribute7 => p_attribute7
604 ,p_attribute8 => p_attribute8
605 ,p_attribute9 => p_attribute9
606 ,p_attribute10 => p_attribute10
607 ,p_attribute11 => p_attribute11
608 ,p_attribute12 => p_attribute12
609 ,p_attribute13 => p_attribute13
610 ,p_attribute14 => p_attribute14
611 ,p_attribute15 => p_attribute15
612 ,p_attribute16 => p_attribute16
613 ,p_attribute17 => p_attribute17
614 ,p_attribute18 => p_attribute18
615 ,p_attribute19 => p_attribute19
616 ,p_attribute20 => p_attribute20
617 ,p_planned_date => p_planned_date
618 ,p_assignment_id => p_assignment_id
619 ,p_supervisor_id => p_supervisor_id
620 ,p_grade_id => p_grade_id
621 ,p_grade_ladder_id => p_grade_ladder_id
622 ,p_grade_step_id => p_grade_step_id
623 ,p_grade_point_id => p_grade_point_id
624 ,p_position_id => p_position_id
625 ,p_job_id => p_job_id
626 ,p_assignment_status_type_id => p_assignment_status_type_id
627 ,p_organization_id => p_organization_id
628 ,p_people_group_id => p_people_group_id
629 ,p_pay_basis_id => p_pay_basis_id
630 ,p_employee_category => p_employee_category
631 ,p_bargaining_unit_code => p_bargaining_unit_code
632 ,p_labour_union_member_flag => p_labour_union_member_flag
633 ,p_collective_agreement_id => p_collective_agreement_id
634 ,p_assignment_category => p_assignment_category
635 ,p_location_id => p_location_id
636 ,p_contract_id => p_contract_id );
637 exception
638 when hr_api.cannot_find_prog_unit then
639 hr_api.cannot_find_prog_unit_error
640 (p_module_name => 'update_successor_in_plan_b'
641 ,p_hook_type => 'AP'
642 );
643 end;
644 hr_utility.set_location(l_proc, 50);
645
646 --
647 -- When in validation only mode raise the Validate_Enabled exception
648 --
649 if p_validate then
650 raise hr_api.validate_enabled;
651 end if;
652 --
653 -- Set all IN OUT and OUT parameters with out values
654 --
655 p_object_version_number := l_object_version_number;
656 --
657 hr_utility.set_location(' Leaving:'||l_proc, 70);
658 exception
659 when hr_api.validate_enabled then
660 --
661 -- As the Validate_Enabled exception has been raised
662 -- we must rollback to the savepoint
663 --
664 rollback to update_successor_in_plan;
665 --
666 -- Reset IN OUT parameters and set OUT parameters
667 -- (Any key or derived arguments must be set to null
668 -- when validation only mode is being used.)
669 --
670 p_object_version_number := l_object_version_number;
671 hr_utility.set_location(' Leaving:'||l_proc, 80);
672 when others then
673 --
674 -- A validation or unexpected error has occured
675 --
676 rollback to update_successor_in_plan;
677 --
678 -- Reset IN OUT parameters and set all
679 -- OUT parameters, including warnings, to null
680 --
681 p_object_version_number := l_object_version_number;
682 hr_utility.set_location(' Leaving:'||l_proc, 90);
683 raise;
684 end update_successor_in_plan;
685 --
686 --
687 procedure delete_successor_in_plan
688 (p_validate in boolean default false
689 ,p_successor_in_plan_id in number
690 ,p_object_version_number in number) is
691 --
692 -- Declare cursors and local variables
693 --
694 l_proc varchar2(72) := g_package||'delete_successor_in_plan';
695 begin
696 hr_utility.set_location('Entering:'|| l_proc, 5);
697 --
698 -- Issue a savepoint.
699 --
700 savepoint delete_successor_in_plan;
701 hr_utility.set_location(l_proc, 10);
702 per_successor_in_plan_bk3.delete_successor_in_plan_b(p_successor_in_plan_id => p_successor_in_plan_id);
703 hr_utility.set_location(l_proc, 20);
704 per_sip_del.del(p_successor_in_plan_id => p_successor_in_plan_id
705 ,p_object_version_number => p_object_version_number);
706 hr_utility.set_location(l_proc, 30);
707 per_successor_in_plan_bk3.delete_successor_in_plan_a(p_successor_in_plan_id => p_successor_in_plan_id);
708 hr_utility.set_location(l_proc, 50);
709 --
710 -- When in validation only mode raise the Validate_Enabled exception
711 --
712 if p_validate then
713 raise hr_api.validate_enabled;
714 end if;
715 --
716 -- Set all IN OUT and OUT parameters with out values
717 --
718 --
719 hr_utility.set_location(' Leaving:'||l_proc, 70);
720 exception
721 when hr_api.validate_enabled then
722 --
723 -- As the Validate_Enabled exception has been raised
724 -- we must rollback to the savepoint
725 --
726 rollback to delete_successor_in_plan;
727 --
728 -- Reset IN OUT parameters and set OUT parameters
729 -- (Any key or derived arguments must be set to null
730 -- when validation only mode is being used.)
731 --
732 hr_utility.set_location(' Leaving:'||l_proc, 80);
733 when others then
734 --
735 -- A validation or unexpected error has occured
736 --
737 rollback to delete_successor_in_plan;
738 --
739 -- Reset IN OUT parameters and set all
740 -- OUT parameters, including warnings, to null
741 --
742 hr_utility.set_location(' Leaving:'||l_proc, 90);
743 raise;
744
745 end delete_successor_in_plan;
746 --
747 end per_successor_in_plan_api;