[Home] [Help]
PACKAGE BODY: APPS.PER_PMP_UPD
Source
1 Package Body per_pmp_upd as
2 /* $Header: pepmprhi.pkb 120.8 2006/07/28 22:03:57 svittal noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_pmp_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55 (p_rec in out nocopy per_pmp_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc, 5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 --
67 -- Update the per_perf_mgmt_plans Row
68 --
69 update per_perf_mgmt_plans
70 set
71 plan_id = p_rec.plan_id
72 ,object_version_number = p_rec.object_version_number
73 ,plan_name = p_rec.plan_name
74 ,administrator_person_id = p_rec.administrator_person_id
75 ,previous_plan_id = p_rec.previous_plan_id
76 ,start_date = p_rec.start_date
77 ,end_date = p_rec.end_date
78 ,status_code = p_rec.status_code
79 ,hierarchy_type_code = p_rec.hierarchy_type_code
80 ,supervisor_id = p_rec.supervisor_id
81 ,supervisor_assignment_id = p_rec.supervisor_assignment_id
82 ,organization_structure_id = p_rec.organization_structure_id
83 ,org_structure_version_id = p_rec.org_structure_version_id
84 ,top_organization_id = p_rec.top_organization_id
85 ,position_structure_id = p_rec.position_structure_id
86 ,pos_structure_version_id = p_rec.pos_structure_version_id
87 ,top_position_id = p_rec.top_position_id
88 ,hierarchy_levels = p_rec.hierarchy_levels
89 ,automatic_enrollment_flag = p_rec.automatic_enrollment_flag
90 ,assignment_types_code = p_rec.assignment_types_code
91 ,primary_asg_only_flag = p_rec.primary_asg_only_flag
92 ,include_obj_setting_flag = p_rec.include_obj_setting_flag
93 ,obj_setting_start_date = p_rec.obj_setting_start_date
94 ,obj_setting_deadline = p_rec.obj_setting_deadline
95 ,obj_set_outside_period_flag = p_rec.obj_set_outside_period_flag
96 ,method_code = p_rec.method_code
97 ,notify_population_flag = p_rec.notify_population_flag
98 ,automatic_allocation_flag = p_rec.automatic_allocation_flag
99 ,copy_past_objectives_flag = p_rec.copy_past_objectives_flag
100 ,sharing_alignment_task_flag = p_rec.sharing_alignment_task_flag
101 ,include_appraisals_flag = p_rec.include_appraisals_flag
102 ,change_sc_status_flag = p_rec.change_sc_status_flag
103 ,attribute_category = p_rec.attribute_category
104 ,attribute1 = p_rec.attribute1
105 ,attribute2 = p_rec.attribute2
106 ,attribute3 = p_rec.attribute3
107 ,attribute4 = p_rec.attribute4
108 ,attribute5 = p_rec.attribute5
109 ,attribute6 = p_rec.attribute6
110 ,attribute7 = p_rec.attribute7
111 ,attribute8 = p_rec.attribute8
112 ,attribute9 = p_rec.attribute9
113 ,attribute10 = p_rec.attribute10
114 ,attribute11 = p_rec.attribute11
115 ,attribute12 = p_rec.attribute12
116 ,attribute13 = p_rec.attribute13
117 ,attribute14 = p_rec.attribute14
118 ,attribute15 = p_rec.attribute15
119 ,attribute16 = p_rec.attribute16
120 ,attribute17 = p_rec.attribute17
121 ,attribute18 = p_rec.attribute18
122 ,attribute19 = p_rec.attribute19
123 ,attribute20 = p_rec.attribute20
124 ,attribute21 = p_rec.attribute21
125 ,attribute22 = p_rec.attribute22
126 ,attribute23 = p_rec.attribute23
127 ,attribute24 = p_rec.attribute24
128 ,attribute25 = p_rec.attribute25
129 ,attribute26 = p_rec.attribute26
130 ,attribute27 = p_rec.attribute27
131 ,attribute28 = p_rec.attribute28
132 ,attribute29 = p_rec.attribute29
133 ,attribute30 = p_rec.attribute30
134 where plan_id = p_rec.plan_id;
135 --
136 --
137 hr_utility.set_location(' Leaving:'||l_proc, 10);
138 --
139 Exception
140 When hr_api.check_integrity_violated Then
141 -- A check constraint has been violated
142 --
143 per_pmp_shd.constraint_error
144 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
145 When hr_api.parent_integrity_violated Then
146 -- Parent integrity has been violated
147 --
148 per_pmp_shd.constraint_error
149 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
150 When hr_api.unique_integrity_violated Then
151 -- Unique integrity has been violated
152 --
153 per_pmp_shd.constraint_error
154 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
155 When Others Then
156 --
157 Raise;
158 End update_dml;
159 --
160 -- ----------------------------------------------------------------------------
161 -- |------------------------------< pre_update >------------------------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 -- This private procedure contains any processing which is required before
167 -- the update dml.
168 --
169 -- Prerequisites:
170 -- This is an internal procedure which is called from the upd procedure.
171 --
172 -- In Parameters:
173 -- A Pl/Sql record structure.
174 --
175 -- Post Success:
176 -- Processing continues.
177 --
178 -- Post Failure:
179 -- If an error has occurred, an error message and exception wil be raised
180 -- but not handled.
181 --
182 -- Developer Implementation Notes:
183 -- Any pre-processing required before the update dml is issued should be
184 -- coded within this procedure. It is important to note that any 3rd party
185 -- maintenance should be reviewed before placing in this procedure.
186 --
187 -- Access Status:
188 -- Internal Row Handler Use Only.
189 --
190 -- {End Of Comments}
191 -- ----------------------------------------------------------------------------
192 Procedure pre_update
193 (p_rec in per_pmp_shd.g_rec_type
194 ) is
195 --
196 l_proc varchar2(72) := g_package||'pre_update';
197 --
198 Begin
199 hr_utility.set_location('Entering:'||l_proc, 5);
200 --
201 hr_utility.set_location(' Leaving:'||l_proc, 10);
202 End pre_update;
203 --
204 -- ----------------------------------------------------------------------------
205 -- |-----------------------------< post_update >------------------------------|
206 -- ----------------------------------------------------------------------------
207 -- {Start Of Comments}
208 --
209 -- Description:
210 -- This private procedure contains any processing which is required after
211 -- the update dml.
212 --
213 -- Prerequisites:
214 -- This is an internal procedure which is called from the upd procedure.
215 --
216 -- In Parameters:
217 -- A Pl/Sql record structure.
218 --
219 -- Post Success:
220 -- Processing continues.
221 --
222 -- Post Failure:
223 -- If an error has occurred, an error message and exception will be raised
224 -- but not handled.
225 --
226 -- Developer Implementation Notes:
227 -- Any post-processing required after the update dml is issued should be
228 -- coded within this procedure. It is important to note that any 3rd party
229 -- maintenance should be reviewed before placing in this procedure.
230 --
231 -- Access Status:
232 -- Internal Row Handler Use Only.
233 --
234 -- {End Of Comments}
235 -- ----------------------------------------------------------------------------
236 Procedure post_update
237 (p_effective_date in date
238 ,p_rec in per_pmp_shd.g_rec_type
239 ,p_duplicate_name_warning in boolean
240 ,p_no_life_events_warning in boolean
241 ) is
242 --
243 l_proc varchar2(72) := g_package||'post_update';
244 --
245 Begin
246 hr_utility.set_location('Entering:'||l_proc, 5);
247 begin
248 --
249 per_pmp_rku.after_update
250 (p_effective_date
251 => p_effective_date
252 ,p_plan_id
253 => p_rec.plan_id
254 ,p_object_version_number
255 => p_rec.object_version_number
256 ,p_plan_name
257 => p_rec.plan_name
258 ,p_administrator_person_id
259 => p_rec.administrator_person_id
260 ,p_previous_plan_id
261 => p_rec.previous_plan_id
262 ,p_start_date
263 => p_rec.start_date
264 ,p_end_date
265 => p_rec.end_date
266 ,p_status_code
267 => p_rec.status_code
268 ,p_hierarchy_type_code
269 => p_rec.hierarchy_type_code
270 ,p_supervisor_id
271 => p_rec.supervisor_id
272 ,p_supervisor_assignment_id
273 => p_rec.supervisor_assignment_id
274 ,p_organization_structure_id
275 => p_rec.organization_structure_id
276 ,p_org_structure_version_id
277 => p_rec.org_structure_version_id
278 ,p_top_organization_id
279 => p_rec.top_organization_id
280 ,p_position_structure_id
281 => p_rec.position_structure_id
282 ,p_pos_structure_version_id
283 => p_rec.pos_structure_version_id
284 ,p_top_position_id
285 => p_rec.top_position_id
286 ,p_hierarchy_levels
287 => p_rec.hierarchy_levels
288 ,p_automatic_enrollment_flag
289 => p_rec.automatic_enrollment_flag
290 ,p_assignment_types_code
291 => p_rec.assignment_types_code
292 ,p_primary_asg_only_flag
293 => p_rec.primary_asg_only_flag
294 ,p_include_obj_setting_flag
295 => p_rec.include_obj_setting_flag
296 ,p_obj_setting_start_date
297 => p_rec.obj_setting_start_date
298 ,p_obj_setting_deadline
299 => p_rec.obj_setting_deadline
300 ,p_obj_set_outside_period_flag
301 => p_rec.obj_set_outside_period_flag
302 ,p_method_code
303 => p_rec.method_code
304 ,p_notify_population_flag
305 => p_rec.notify_population_flag
306 ,p_automatic_allocation_flag
307 => p_rec.automatic_allocation_flag
308 ,p_copy_past_objectives_flag
309 => p_rec.copy_past_objectives_flag
310 ,p_sharing_alignment_task_flag
311 => p_rec.sharing_alignment_task_flag
312 ,p_include_appraisals_flag
313 => p_rec.include_appraisals_flag
314 ,p_change_sc_status_flag => p_rec.change_sc_status_flag
315 ,p_attribute_category
316 => p_rec.attribute_category
317 ,p_attribute1
318 => p_rec.attribute1
319 ,p_attribute2
320 => p_rec.attribute2
321 ,p_attribute3
322 => p_rec.attribute3
323 ,p_attribute4
324 => p_rec.attribute4
325 ,p_attribute5
326 => p_rec.attribute5
327 ,p_attribute6
328 => p_rec.attribute6
329 ,p_attribute7
330 => p_rec.attribute7
331 ,p_attribute8
332 => p_rec.attribute8
333 ,p_attribute9
334 => p_rec.attribute9
335 ,p_attribute10
336 => p_rec.attribute10
337 ,p_attribute11
338 => p_rec.attribute11
339 ,p_attribute12
340 => p_rec.attribute12
341 ,p_attribute13
342 => p_rec.attribute13
343 ,p_attribute14
344 => p_rec.attribute14
345 ,p_attribute15
346 => p_rec.attribute15
347 ,p_attribute16
348 => p_rec.attribute16
349 ,p_attribute17
350 => p_rec.attribute17
351 ,p_attribute18
352 => p_rec.attribute18
353 ,p_attribute19
354 => p_rec.attribute19
355 ,p_attribute20
356 => p_rec.attribute20
357 ,p_attribute21
358 => p_rec.attribute21
359 ,p_attribute22
360 => p_rec.attribute22
361 ,p_attribute23
362 => p_rec.attribute23
363 ,p_attribute24
364 => p_rec.attribute24
365 ,p_attribute25
366 => p_rec.attribute25
367 ,p_attribute26
368 => p_rec.attribute26
369 ,p_attribute27
370 => p_rec.attribute27
371 ,p_attribute28
372 => p_rec.attribute28
373 ,p_attribute29
374 => p_rec.attribute29
375 ,p_attribute30
376 => p_rec.attribute30
377 ,p_object_version_number_o
378 => per_pmp_shd.g_old_rec.object_version_number
379 ,p_plan_name_o
380 => per_pmp_shd.g_old_rec.plan_name
381 ,p_administrator_person_id_o
382 => per_pmp_shd.g_old_rec.administrator_person_id
383 ,p_previous_plan_id_o
384 => per_pmp_shd.g_old_rec.previous_plan_id
385 ,p_start_date_o
386 => per_pmp_shd.g_old_rec.start_date
387 ,p_end_date_o
388 => per_pmp_shd.g_old_rec.end_date
389 ,p_status_code_o
390 => per_pmp_shd.g_old_rec.status_code
391 ,p_hierarchy_type_code_o
392 => per_pmp_shd.g_old_rec.hierarchy_type_code
393 ,p_supervisor_id_o
394 => per_pmp_shd.g_old_rec.supervisor_id
395 ,p_supervisor_assignment_id_o
396 => per_pmp_shd.g_old_rec.supervisor_assignment_id
397 ,p_organization_structure_id_o
398 => per_pmp_shd.g_old_rec.organization_structure_id
399 ,p_org_structure_version_id_o
400 => per_pmp_shd.g_old_rec.org_structure_version_id
401 ,p_top_organization_id_o
402 => per_pmp_shd.g_old_rec.top_organization_id
403 ,p_position_structure_id_o
404 => per_pmp_shd.g_old_rec.position_structure_id
405 ,p_pos_structure_version_id_o
406 => per_pmp_shd.g_old_rec.pos_structure_version_id
407 ,p_top_position_id_o
408 => per_pmp_shd.g_old_rec.top_position_id
409 ,p_hierarchy_levels_o
410 => per_pmp_shd.g_old_rec.hierarchy_levels
411 ,p_automatic_enrollment_flag_o
412 => per_pmp_shd.g_old_rec.automatic_enrollment_flag
413 ,p_assignment_types_code_o
414 => per_pmp_shd.g_old_rec.assignment_types_code
415 ,p_primary_asg_only_flag_o
416 => per_pmp_shd.g_old_rec.primary_asg_only_flag
417 ,p_include_obj_setting_flag_o
418 => per_pmp_shd.g_old_rec.include_obj_setting_flag
419 ,p_obj_setting_start_date_o
420 => per_pmp_shd.g_old_rec.obj_setting_start_date
421 ,p_obj_setting_deadline_o
422 => per_pmp_shd.g_old_rec.obj_setting_deadline
423 ,p_obj_set_outside_period_fla_o
424 => per_pmp_shd.g_old_rec.obj_set_outside_period_flag
425 ,p_method_code_o
426 => per_pmp_shd.g_old_rec.method_code
427 ,p_notify_population_flag_o
428 => per_pmp_shd.g_old_rec.notify_population_flag
429 ,p_automatic_allocation_flag_o
430 => per_pmp_shd.g_old_rec.automatic_allocation_flag
431 ,p_copy_past_objectives_flag_o
432 => per_pmp_shd.g_old_rec.copy_past_objectives_flag
433 ,p_sharing_alignment_task_fla_o
434 => per_pmp_shd.g_old_rec.sharing_alignment_task_flag
435 ,p_include_appraisals_flag_o
436 => per_pmp_shd.g_old_rec.include_appraisals_flag
437 ,p_change_sc_status_flag_o => per_pmp_shd.g_old_rec.change_sc_status_flag
438 ,p_attribute_category_o
439 => per_pmp_shd.g_old_rec.attribute_category
440 ,p_attribute1_o
441 => per_pmp_shd.g_old_rec.attribute1
442 ,p_attribute2_o
443 => per_pmp_shd.g_old_rec.attribute2
444 ,p_attribute3_o
445 => per_pmp_shd.g_old_rec.attribute3
446 ,p_attribute4_o
447 => per_pmp_shd.g_old_rec.attribute4
448 ,p_attribute5_o
449 => per_pmp_shd.g_old_rec.attribute5
450 ,p_attribute6_o
451 => per_pmp_shd.g_old_rec.attribute6
452 ,p_attribute7_o
453 => per_pmp_shd.g_old_rec.attribute7
454 ,p_attribute8_o
455 => per_pmp_shd.g_old_rec.attribute8
456 ,p_attribute9_o
457 => per_pmp_shd.g_old_rec.attribute9
458 ,p_attribute10_o
459 => per_pmp_shd.g_old_rec.attribute10
460 ,p_attribute11_o
461 => per_pmp_shd.g_old_rec.attribute11
462 ,p_attribute12_o
463 => per_pmp_shd.g_old_rec.attribute12
464 ,p_attribute13_o
465 => per_pmp_shd.g_old_rec.attribute13
466 ,p_attribute14_o
467 => per_pmp_shd.g_old_rec.attribute14
468 ,p_attribute15_o
469 => per_pmp_shd.g_old_rec.attribute15
470 ,p_attribute16_o
471 => per_pmp_shd.g_old_rec.attribute16
472 ,p_attribute17_o
473 => per_pmp_shd.g_old_rec.attribute17
474 ,p_attribute18_o
475 => per_pmp_shd.g_old_rec.attribute18
476 ,p_attribute19_o
477 => per_pmp_shd.g_old_rec.attribute19
478 ,p_attribute20_o
479 => per_pmp_shd.g_old_rec.attribute20
480 ,p_attribute21_o
481 => per_pmp_shd.g_old_rec.attribute21
482 ,p_attribute22_o
483 => per_pmp_shd.g_old_rec.attribute22
484 ,p_attribute23_o
485 => per_pmp_shd.g_old_rec.attribute23
486 ,p_attribute24_o
487 => per_pmp_shd.g_old_rec.attribute24
488 ,p_attribute25_o
489 => per_pmp_shd.g_old_rec.attribute25
490 ,p_attribute26_o
491 => per_pmp_shd.g_old_rec.attribute26
492 ,p_attribute27_o
493 => per_pmp_shd.g_old_rec.attribute27
494 ,p_attribute28_o
495 => per_pmp_shd.g_old_rec.attribute28
496 ,p_attribute29_o
497 => per_pmp_shd.g_old_rec.attribute29
498 ,p_attribute30_o
499 => per_pmp_shd.g_old_rec.attribute30
500 );
501 --
502 exception
503 --
504 when hr_api.cannot_find_prog_unit then
505 --
506 hr_api.cannot_find_prog_unit_error
507 (p_module_name => 'PER_PERF_MGMT_PLANS'
508 ,p_hook_type => 'AU');
509 --
510 end;
511 --
512 hr_utility.set_location(' Leaving:'||l_proc, 10);
513 End post_update;
514 --
515 -- ----------------------------------------------------------------------------
516 -- |-----------------------------< convert_defs >-----------------------------|
517 -- ----------------------------------------------------------------------------
518 -- {Start Of Comments}
519 --
520 -- Description:
521 -- The Convert_Defs procedure has one very important function:
522 -- It must return the record structure for the row with all system defaulted
523 -- values converted into its corresponding parameter value for update. When
524 -- we attempt to update a row through the Upd process , certain
525 -- parameters can be defaulted which enables flexibility in the calling of
526 -- the upd process (e.g. only attributes which need to be updated need to be
527 -- specified). For the upd process to determine which attributes
528 -- have NOT been specified we need to check if the parameter has a reserved
529 -- system default value. Therefore, for all parameters which have a
530 -- corresponding reserved system default mechanism specified we need to
531 -- check if a system default is being used. If a system default is being
532 -- used then we convert the defaulted value into its corresponding attribute
533 -- value held in the g_old_rec data structure.
534 --
535 -- Prerequisites:
536 -- This private function can only be called from the upd process.
537 --
538 -- In Parameters:
539 -- A Pl/Sql record structure.
540 --
541 -- Post Success:
542 -- The record structure will be returned with all system defaulted parameter
543 -- values converted into its current row attribute value.
544 --
545 -- Post Failure:
546 -- No direct error handling is required within this function. Any possible
547 -- errors within this procedure will be a PL/SQL value error due to
548 -- conversion of datatypes or data lengths.
549 --
550 -- Developer Implementation Notes:
551 -- None.
552 --
553 -- Access Status:
554 -- Internal Row Handler Use Only.
555 --
556 -- {End Of Comments}
557 -- ----------------------------------------------------------------------------
558 Procedure convert_defs
559 (p_rec in out nocopy per_pmp_shd.g_rec_type
560 ) is
561 --
562 Begin
563 --
564 -- We must now examine each argument value in the
565 -- p_rec plsql record structure
566 -- to see if a system default is being used. If a system default
567 -- is being used then we must set to the 'current' argument value.
568 --
569 If (p_rec.plan_name = hr_api.g_varchar2) then
570 p_rec.plan_name :=
571 per_pmp_shd.g_old_rec.plan_name;
572 End If;
573 If (p_rec.administrator_person_id = hr_api.g_number) then
574 p_rec.administrator_person_id :=
575 per_pmp_shd.g_old_rec.administrator_person_id;
576 End If;
577 If (p_rec.previous_plan_id = hr_api.g_number) then
578 p_rec.previous_plan_id :=
579 per_pmp_shd.g_old_rec.previous_plan_id;
580 End If;
581 If (p_rec.start_date = hr_api.g_date) then
582 p_rec.start_date :=
583 per_pmp_shd.g_old_rec.start_date;
584 End If;
585 If (p_rec.end_date = hr_api.g_date) then
586 p_rec.end_date :=
587 per_pmp_shd.g_old_rec.end_date;
588 End If;
589 If (p_rec.status_code = hr_api.g_varchar2) then
590 p_rec.status_code :=
591 per_pmp_shd.g_old_rec.status_code;
592 End If;
593 If (p_rec.hierarchy_type_code = hr_api.g_varchar2) then
594 p_rec.hierarchy_type_code :=
595 per_pmp_shd.g_old_rec.hierarchy_type_code;
596 End If;
597 If (p_rec.supervisor_id = hr_api.g_number) then
598 p_rec.supervisor_id :=
599 per_pmp_shd.g_old_rec.supervisor_id;
600 End If;
601 If (p_rec.supervisor_assignment_id = hr_api.g_number) then
602 p_rec.supervisor_assignment_id :=
603 per_pmp_shd.g_old_rec.supervisor_assignment_id;
604 End If;
605 If (p_rec.organization_structure_id = hr_api.g_number) then
606 p_rec.organization_structure_id :=
607 per_pmp_shd.g_old_rec.organization_structure_id;
608 End If;
609 If (p_rec.org_structure_version_id = hr_api.g_number) then
610 p_rec.org_structure_version_id :=
611 per_pmp_shd.g_old_rec.org_structure_version_id;
612 End If;
613 If (p_rec.top_organization_id = hr_api.g_number) then
614 p_rec.top_organization_id :=
615 per_pmp_shd.g_old_rec.top_organization_id;
616 End If;
617 If (p_rec.position_structure_id = hr_api.g_number) then
618 p_rec.position_structure_id :=
619 per_pmp_shd.g_old_rec.position_structure_id;
620 End If;
621 If (p_rec.pos_structure_version_id = hr_api.g_number) then
622 p_rec.pos_structure_version_id :=
623 per_pmp_shd.g_old_rec.pos_structure_version_id;
624 End If;
625 If (p_rec.top_position_id = hr_api.g_number) then
626 p_rec.top_position_id :=
627 per_pmp_shd.g_old_rec.top_position_id;
628 End If;
629 If (p_rec.hierarchy_levels = hr_api.g_number) then
630 p_rec.hierarchy_levels :=
631 per_pmp_shd.g_old_rec.hierarchy_levels;
632 End If;
633 If (p_rec.automatic_enrollment_flag = hr_api.g_varchar2) then
634 p_rec.automatic_enrollment_flag :=
635 per_pmp_shd.g_old_rec.automatic_enrollment_flag;
636 End If;
637 If (p_rec.assignment_types_code = hr_api.g_varchar2) then
638 p_rec.assignment_types_code :=
639 per_pmp_shd.g_old_rec.assignment_types_code;
640 End If;
641 If (p_rec.primary_asg_only_flag = hr_api.g_varchar2) then
642 p_rec.primary_asg_only_flag :=
643 per_pmp_shd.g_old_rec.primary_asg_only_flag;
644 End If;
645 If (p_rec.include_obj_setting_flag = hr_api.g_varchar2) then
646 p_rec.include_obj_setting_flag :=
647 per_pmp_shd.g_old_rec.include_obj_setting_flag;
648 End If;
649 If (p_rec.obj_setting_start_date = hr_api.g_date) then
650 p_rec.obj_setting_start_date :=
651 per_pmp_shd.g_old_rec.obj_setting_start_date;
652 End If;
653 If (p_rec.obj_setting_deadline = hr_api.g_date) then
654 p_rec.obj_setting_deadline :=
655 per_pmp_shd.g_old_rec.obj_setting_deadline;
656 End If;
657 If (p_rec.obj_set_outside_period_flag = hr_api.g_varchar2) then
658 p_rec.obj_set_outside_period_flag :=
659 per_pmp_shd.g_old_rec.obj_set_outside_period_flag;
660 End If;
661 If (p_rec.method_code = hr_api.g_varchar2) then
662 p_rec.method_code :=
663 per_pmp_shd.g_old_rec.method_code;
664 End If;
665 If (p_rec.notify_population_flag = hr_api.g_varchar2) then
666 p_rec.notify_population_flag :=
667 per_pmp_shd.g_old_rec.notify_population_flag;
668 End If;
669 If (p_rec.automatic_allocation_flag = hr_api.g_varchar2) then
670 p_rec.automatic_allocation_flag :=
671 per_pmp_shd.g_old_rec.automatic_allocation_flag;
672 End If;
673 If (p_rec.copy_past_objectives_flag = hr_api.g_varchar2) then
674 p_rec.copy_past_objectives_flag :=
675 per_pmp_shd.g_old_rec.copy_past_objectives_flag;
676 End If;
677 If (p_rec.sharing_alignment_task_flag = hr_api.g_varchar2) then
678 p_rec.sharing_alignment_task_flag :=
679 per_pmp_shd.g_old_rec.sharing_alignment_task_flag;
680 End If;
681 If (p_rec.include_appraisals_flag = hr_api.g_varchar2) then
682 p_rec.include_appraisals_flag :=
683 per_pmp_shd.g_old_rec.include_appraisals_flag;
684 End If;
685
686 If (p_rec.change_sc_status_flag = hr_api.g_varchar2) then
687 p_rec.change_sc_status_flag :=
688 per_pmp_shd.g_old_rec.change_sc_status_flag;
689 End If;
690
691 If (p_rec.attribute_category = hr_api.g_varchar2) then
692 p_rec.attribute_category :=
693 per_pmp_shd.g_old_rec.attribute_category;
694 End If;
695 If (p_rec.attribute1 = hr_api.g_varchar2) then
696 p_rec.attribute1 :=
697 per_pmp_shd.g_old_rec.attribute1;
698 End If;
699 If (p_rec.attribute2 = hr_api.g_varchar2) then
700 p_rec.attribute2 :=
701 per_pmp_shd.g_old_rec.attribute2;
702 End If;
703 If (p_rec.attribute3 = hr_api.g_varchar2) then
704 p_rec.attribute3 :=
705 per_pmp_shd.g_old_rec.attribute3;
706 End If;
707 If (p_rec.attribute4 = hr_api.g_varchar2) then
708 p_rec.attribute4 :=
709 per_pmp_shd.g_old_rec.attribute4;
710 End If;
711 If (p_rec.attribute5 = hr_api.g_varchar2) then
712 p_rec.attribute5 :=
713 per_pmp_shd.g_old_rec.attribute5;
714 End If;
715 If (p_rec.attribute6 = hr_api.g_varchar2) then
716 p_rec.attribute6 :=
717 per_pmp_shd.g_old_rec.attribute6;
718 End If;
719 If (p_rec.attribute7 = hr_api.g_varchar2) then
720 p_rec.attribute7 :=
721 per_pmp_shd.g_old_rec.attribute7;
722 End If;
723 If (p_rec.attribute8 = hr_api.g_varchar2) then
724 p_rec.attribute8 :=
725 per_pmp_shd.g_old_rec.attribute8;
726 End If;
727 If (p_rec.attribute9 = hr_api.g_varchar2) then
728 p_rec.attribute9 :=
729 per_pmp_shd.g_old_rec.attribute9;
730 End If;
731 If (p_rec.attribute10 = hr_api.g_varchar2) then
732 p_rec.attribute10 :=
733 per_pmp_shd.g_old_rec.attribute10;
734 End If;
735 If (p_rec.attribute11 = hr_api.g_varchar2) then
736 p_rec.attribute11 :=
737 per_pmp_shd.g_old_rec.attribute11;
738 End If;
739 If (p_rec.attribute12 = hr_api.g_varchar2) then
740 p_rec.attribute12 :=
741 per_pmp_shd.g_old_rec.attribute12;
742 End If;
743 If (p_rec.attribute13 = hr_api.g_varchar2) then
744 p_rec.attribute13 :=
745 per_pmp_shd.g_old_rec.attribute13;
746 End If;
747 If (p_rec.attribute14 = hr_api.g_varchar2) then
748 p_rec.attribute14 :=
749 per_pmp_shd.g_old_rec.attribute14;
750 End If;
751 If (p_rec.attribute15 = hr_api.g_varchar2) then
752 p_rec.attribute15 :=
753 per_pmp_shd.g_old_rec.attribute15;
754 End If;
755 If (p_rec.attribute16 = hr_api.g_varchar2) then
756 p_rec.attribute16 :=
757 per_pmp_shd.g_old_rec.attribute16;
758 End If;
759 If (p_rec.attribute17 = hr_api.g_varchar2) then
760 p_rec.attribute17 :=
761 per_pmp_shd.g_old_rec.attribute17;
762 End If;
763 If (p_rec.attribute18 = hr_api.g_varchar2) then
764 p_rec.attribute18 :=
765 per_pmp_shd.g_old_rec.attribute18;
766 End If;
767 If (p_rec.attribute19 = hr_api.g_varchar2) then
768 p_rec.attribute19 :=
769 per_pmp_shd.g_old_rec.attribute19;
770 End If;
771 If (p_rec.attribute20 = hr_api.g_varchar2) then
772 p_rec.attribute20 :=
773 per_pmp_shd.g_old_rec.attribute20;
774 End If;
775 If (p_rec.attribute21 = hr_api.g_varchar2) then
776 p_rec.attribute21 :=
777 per_pmp_shd.g_old_rec.attribute21;
778 End If;
779 If (p_rec.attribute22 = hr_api.g_varchar2) then
780 p_rec.attribute22 :=
781 per_pmp_shd.g_old_rec.attribute22;
782 End If;
783 If (p_rec.attribute23 = hr_api.g_varchar2) then
784 p_rec.attribute23 :=
785 per_pmp_shd.g_old_rec.attribute23;
786 End If;
787 If (p_rec.attribute24 = hr_api.g_varchar2) then
788 p_rec.attribute24 :=
789 per_pmp_shd.g_old_rec.attribute24;
790 End If;
791 If (p_rec.attribute25 = hr_api.g_varchar2) then
792 p_rec.attribute25 :=
793 per_pmp_shd.g_old_rec.attribute25;
794 End If;
795 If (p_rec.attribute26 = hr_api.g_varchar2) then
796 p_rec.attribute26 :=
797 per_pmp_shd.g_old_rec.attribute26;
798 End If;
799 If (p_rec.attribute27 = hr_api.g_varchar2) then
800 p_rec.attribute27 :=
801 per_pmp_shd.g_old_rec.attribute27;
802 End If;
803 If (p_rec.attribute28 = hr_api.g_varchar2) then
804 p_rec.attribute28 :=
805 per_pmp_shd.g_old_rec.attribute28;
806 End If;
807 If (p_rec.attribute29 = hr_api.g_varchar2) then
808 p_rec.attribute29 :=
809 per_pmp_shd.g_old_rec.attribute29;
810 End If;
811 If (p_rec.attribute30 = hr_api.g_varchar2) then
812 p_rec.attribute30 :=
813 per_pmp_shd.g_old_rec.attribute30;
814 End If;
815 --
816 End convert_defs;
817 --
818 -- ----------------------------------------------------------------------------
819 -- |---------------------------------< upd >----------------------------------|
820 -- ----------------------------------------------------------------------------
821 Procedure upd
822 (p_effective_date in date
823 ,p_rec in out nocopy per_pmp_shd.g_rec_type
824 ,p_duplicate_name_warning out nocopy boolean
825 ,p_no_life_events_warning out nocopy boolean
826 ) is
827 --
828 l_proc varchar2(72) := g_package||'upd';
829 --
830 Begin
831 hr_utility.set_location('Entering:'||l_proc, 5);
832 --
833 -- We must lock the row which we need to update.
834 --
835 per_pmp_shd.lck
836 (p_rec.plan_id
837 ,p_rec.object_version_number
838 );
839
840 --
841 -- 1. During an update system defaults are used to determine if
842 -- arguments have been defaulted or not. We must therefore
843 -- derive the full record structure values to be updated.
844 --
845 -- 2. Call the supporting update validate operations.
846 --
847 convert_defs(p_rec);
848 per_pmp_bus.update_validate
849 (p_effective_date
850 ,p_rec
851 ,p_duplicate_name_warning
852 ,p_no_life_events_warning
853 );
854 --
855 -- Call to raise any errors on multi-message list
856 hr_multi_message.end_validation_set;
857 --
858 -- Call the supporting pre-update operation
859 --
860 per_pmp_upd.pre_update(p_rec);
861 --
862 -- Update the row.
863 --
864 per_pmp_upd.update_dml(p_rec);
865 --
866 -- Call the supporting post-update operation
867 --
868 per_pmp_upd.post_update
869 (p_effective_date
870 ,p_rec
871 ,p_duplicate_name_warning
872 ,p_no_life_events_warning
873 );
874 --
875 -- Call to raise any errors on multi-message list
876 hr_multi_message.end_validation_set;
877 End upd;
878 --
879 -- ----------------------------------------------------------------------------
880 -- |---------------------------------< upd >----------------------------------|
881 -- ----------------------------------------------------------------------------
882 Procedure upd
883 (p_effective_date in date
884 ,p_plan_id in number
885 ,p_object_version_number in out nocopy number
886 ,p_plan_name in varchar2 default hr_api.g_varchar2
887 ,p_administrator_person_id in number default hr_api.g_number
888 ,p_previous_plan_id in number default hr_api.g_number
889 ,p_start_date in date default hr_api.g_date
890 ,p_end_date in date default hr_api.g_date
891 ,p_automatic_enrollment_flag in varchar2 default hr_api.g_varchar2
892 ,p_assignment_types_code in varchar2 default hr_api.g_varchar2
893 ,p_primary_asg_only_flag in varchar2 default hr_api.g_varchar2
894 ,p_include_obj_setting_flag in varchar2 default hr_api.g_varchar2
895 ,p_obj_set_outside_period_flag in varchar2 default hr_api.g_varchar2
896 ,p_method_code in varchar2 default hr_api.g_varchar2
897 ,p_notify_population_flag in varchar2 default hr_api.g_varchar2
898 ,p_automatic_allocation_flag in varchar2 default hr_api.g_varchar2
899 ,p_copy_past_objectives_flag in varchar2 default hr_api.g_varchar2
900 ,p_sharing_alignment_task_flag in varchar2 default hr_api.g_varchar2
901 ,p_include_appraisals_flag in varchar2 default hr_api.g_varchar2
902 ,p_hierarchy_type_code in varchar2 default hr_api.g_varchar2
903 ,p_supervisor_id in number default hr_api.g_number
904 ,p_supervisor_assignment_id in number default hr_api.g_number
905 ,p_organization_structure_id in number default hr_api.g_number
906 ,p_org_structure_version_id in number default hr_api.g_number
907 ,p_top_organization_id in number default hr_api.g_number
908 ,p_position_structure_id in number default hr_api.g_number
909 ,p_pos_structure_version_id in number default hr_api.g_number
910 ,p_top_position_id in number default hr_api.g_number
911 ,p_hierarchy_levels in number default hr_api.g_number
912 ,p_obj_setting_start_date in date default hr_api.g_date
913 ,p_obj_setting_deadline in date default hr_api.g_date
914 ,p_change_sc_status_flag in varchar2 default hr_api.g_varchar2
915 ,p_attribute_category in varchar2 default hr_api.g_varchar2
916 ,p_attribute1 in varchar2 default hr_api.g_varchar2
917 ,p_attribute2 in varchar2 default hr_api.g_varchar2
918 ,p_attribute3 in varchar2 default hr_api.g_varchar2
919 ,p_attribute4 in varchar2 default hr_api.g_varchar2
920 ,p_attribute5 in varchar2 default hr_api.g_varchar2
921 ,p_attribute6 in varchar2 default hr_api.g_varchar2
922 ,p_attribute7 in varchar2 default hr_api.g_varchar2
923 ,p_attribute8 in varchar2 default hr_api.g_varchar2
924 ,p_attribute9 in varchar2 default hr_api.g_varchar2
925 ,p_attribute10 in varchar2 default hr_api.g_varchar2
926 ,p_attribute11 in varchar2 default hr_api.g_varchar2
927 ,p_attribute12 in varchar2 default hr_api.g_varchar2
928 ,p_attribute13 in varchar2 default hr_api.g_varchar2
929 ,p_attribute14 in varchar2 default hr_api.g_varchar2
930 ,p_attribute15 in varchar2 default hr_api.g_varchar2
931 ,p_attribute16 in varchar2 default hr_api.g_varchar2
932 ,p_attribute17 in varchar2 default hr_api.g_varchar2
933 ,p_attribute18 in varchar2 default hr_api.g_varchar2
934 ,p_attribute19 in varchar2 default hr_api.g_varchar2
935 ,p_attribute20 in varchar2 default hr_api.g_varchar2
936 ,p_attribute21 in varchar2 default hr_api.g_varchar2
937 ,p_attribute22 in varchar2 default hr_api.g_varchar2
938 ,p_attribute23 in varchar2 default hr_api.g_varchar2
939 ,p_attribute24 in varchar2 default hr_api.g_varchar2
940 ,p_attribute25 in varchar2 default hr_api.g_varchar2
941 ,p_attribute26 in varchar2 default hr_api.g_varchar2
942 ,p_attribute27 in varchar2 default hr_api.g_varchar2
943 ,p_attribute28 in varchar2 default hr_api.g_varchar2
944 ,p_attribute29 in varchar2 default hr_api.g_varchar2
945 ,p_attribute30 in varchar2 default hr_api.g_varchar2
946 ,p_status_code in out nocopy varchar2
947 ,p_duplicate_name_warning out nocopy boolean
948 ,p_no_life_events_warning out nocopy boolean
949 ) is
950 --
951 l_rec per_pmp_shd.g_rec_type;
952 l_proc varchar2(72) := g_package||'upd';
953 l_duplicate_name_warning boolean;
954 l_no_life_events_warning boolean;
955
956 --
957 Begin
958 hr_utility.set_location('Entering:'||l_proc, 5);
959 --
960 -- Call conversion function to turn arguments into the
961 -- l_rec structure.
962 --
963 l_rec :=
964 per_pmp_shd.convert_args
965 (p_plan_id
966 ,p_object_version_number
967 ,p_plan_name
968 ,p_administrator_person_id
969 ,p_previous_plan_id
970 ,p_start_date
971 ,p_end_date
972 ,p_status_code
973 ,p_hierarchy_type_code
974 ,p_supervisor_id
975 ,p_supervisor_assignment_id
976 ,p_organization_structure_id
977 ,p_org_structure_version_id
978 ,p_top_organization_id
979 ,p_position_structure_id
980 ,p_pos_structure_version_id
981 ,p_top_position_id
982 ,p_hierarchy_levels
983 ,p_automatic_enrollment_flag
984 ,p_assignment_types_code
985 ,p_primary_asg_only_flag
986 ,p_include_obj_setting_flag
987 ,p_obj_setting_start_date
988 ,p_obj_setting_deadline
989 ,p_obj_set_outside_period_flag
990 ,p_method_code
991 ,p_notify_population_flag
992 ,p_automatic_allocation_flag
993 ,p_copy_past_objectives_flag
994 ,p_sharing_alignment_task_flag
995 ,p_include_appraisals_flag
996 ,p_change_sc_status_flag
997 ,p_attribute_category
998 ,p_attribute1
999 ,p_attribute2
1000 ,p_attribute3
1001 ,p_attribute4
1002 ,p_attribute5
1003 ,p_attribute6
1004 ,p_attribute7
1005 ,p_attribute8
1006 ,p_attribute9
1007 ,p_attribute10
1008 ,p_attribute11
1009 ,p_attribute12
1010 ,p_attribute13
1011 ,p_attribute14
1012 ,p_attribute15
1013 ,p_attribute16
1014 ,p_attribute17
1015 ,p_attribute18
1016 ,p_attribute19
1017 ,p_attribute20
1018 ,p_attribute21
1019 ,p_attribute22
1020 ,p_attribute23
1021 ,p_attribute24
1022 ,p_attribute25
1023 ,p_attribute26
1024 ,p_attribute27
1025 ,p_attribute28
1026 ,p_attribute29
1027 ,p_attribute30
1028 );
1029 --
1030 -- Having converted the arguments into the
1031 -- plsql record structure we call the corresponding record
1032 -- business process.
1033 --
1034 per_pmp_upd.upd
1035 (p_effective_date
1036 ,l_rec
1037 ,l_duplicate_name_warning
1038 ,l_no_life_events_warning
1039 );
1040 p_object_version_number := l_rec.object_version_number;
1041 p_status_code := l_rec.status_code;
1042 p_duplicate_name_warning := l_duplicate_name_warning;
1043 p_no_life_events_warning := l_no_life_events_warning;
1044 --
1045 hr_utility.set_location(' Leaving:'||l_proc, 10);
1046 End upd;
1047 --
1048 end per_pmp_upd;