[Home] [Help]
PACKAGE BODY: APPS.PER_PML_UPD
Source
1 Package Body per_pml_upd as
2 /* $Header: pepmlrhi.pkb 120.5.12010000.2 2008/11/24 14:49:19 rsykam ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_pml_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_pml_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 --
68 -- Update the per_objectives_library Row
69 --
70 update per_objectives_library
71 set
72 objective_id = p_rec.objective_id
73 ,object_version_number = p_rec.object_version_number
74 ,objective_name = p_rec.objective_name
75 ,valid_from = p_rec.valid_from
76 ,valid_to = p_rec.valid_to
77 ,target_date = p_rec.target_date
78 ,next_review_date = p_rec.next_review_date
79 ,group_code = p_rec.group_code
80 ,priority_code = p_rec.priority_code
81 ,appraise_flag = p_rec.appraise_flag
82 ,weighting_percent = p_rec.weighting_percent
83 ,measurement_style_code = p_rec.measurement_style_code
84 ,measure_name = p_rec.measure_name
85 ,target_value = p_rec.target_value
86 ,uom_code = p_rec.uom_code
87 ,measure_type_code = p_rec.measure_type_code
88 ,measure_comments = p_rec.measure_comments
89 ,eligibility_type_code = p_rec.eligibility_type_code
90 ,details = p_rec.details
91 ,success_criteria = p_rec.success_criteria
92 ,comments = p_rec.comments
93 ,attribute_category = p_rec.attribute_category
94 ,attribute1 = p_rec.attribute1
95 ,attribute2 = p_rec.attribute2
96 ,attribute3 = p_rec.attribute3
97 ,attribute4 = p_rec.attribute4
98 ,attribute5 = p_rec.attribute5
99 ,attribute6 = p_rec.attribute6
100 ,attribute7 = p_rec.attribute7
101 ,attribute8 = p_rec.attribute8
102 ,attribute9 = p_rec.attribute9
103 ,attribute10 = p_rec.attribute10
104 ,attribute11 = p_rec.attribute11
105 ,attribute12 = p_rec.attribute12
106 ,attribute13 = p_rec.attribute13
107 ,attribute14 = p_rec.attribute14
108 ,attribute15 = p_rec.attribute15
109 ,attribute16 = p_rec.attribute16
110 ,attribute17 = p_rec.attribute17
111 ,attribute18 = p_rec.attribute18
112 ,attribute19 = p_rec.attribute19
113 ,attribute20 = p_rec.attribute20
114 ,attribute21 = p_rec.attribute21
115 ,attribute22 = p_rec.attribute22
116 ,attribute23 = p_rec.attribute23
117 ,attribute24 = p_rec.attribute24
118 ,attribute25 = p_rec.attribute25
119 ,attribute26 = p_rec.attribute26
120 ,attribute27 = p_rec.attribute27
121 ,attribute28 = p_rec.attribute28
122 ,attribute29 = p_rec.attribute29
123 ,attribute30 = p_rec.attribute30
124 where objective_id = p_rec.objective_id;
125 --
126 --
127 --
128 hr_utility.set_location(' Leaving:'||l_proc, 10);
129 --
130 Exception
131 When hr_api.check_integrity_violated Then
132 -- A check constraint has been violated
133 --
134 per_pml_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When hr_api.parent_integrity_violated Then
137 -- Parent integrity has been violated
138 --
139 per_pml_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When hr_api.unique_integrity_violated Then
142 -- Unique integrity has been violated
143 --
144 per_pml_shd.constraint_error
145 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
146 When Others Then
147 --
148 Raise;
149 End update_dml;
150 --
151 -- ----------------------------------------------------------------------------
152 -- |------------------------------< pre_update >------------------------------|
153 -- ----------------------------------------------------------------------------
154 -- {Start Of Comments}
155 --
156 -- Description:
157 -- This private procedure contains any processing which is required before
158 -- the update dml.
159 --
160 -- Prerequisites:
161 -- This is an internal procedure which is called from the upd procedure.
162 --
163 -- In Parameters:
164 -- A Pl/Sql record structure.
165 --
166 -- Post Success:
167 -- Processing continues.
168 --
169 -- Post Failure:
170 -- If an error has occurred, an error message and exception wil be raised
171 -- but not handled.
172 --
173 -- Developer Implementation Notes:
174 -- Any pre-processing required before the update dml is issued should be
175 -- coded within this procedure. It is important to note that any 3rd party
176 -- maintenance should be reviewed before placing in this procedure.
177 --
178 -- Access Status:
179 -- Internal Row Handler Use Only.
180 --
181 -- {End Of Comments}
182 -- ----------------------------------------------------------------------------
183 Procedure pre_update
184 (p_rec in per_pml_shd.g_rec_type
185 ) is
186 --
187 l_proc varchar2(72) := g_package||'pre_update';
188 --
189 Begin
190 hr_utility.set_location('Entering:'||l_proc, 5);
191 --
192 hr_utility.set_location(' Leaving:'||l_proc, 10);
193 End pre_update;
194 --
195 -- ----------------------------------------------------------------------------
196 -- |-----------------------------< post_update >------------------------------|
197 -- ----------------------------------------------------------------------------
198 -- {Start Of Comments}
199 --
200 -- Description:
201 -- This private procedure contains any processing which is required after
202 -- the update dml.
203 --
204 -- Prerequisites:
205 -- This is an internal procedure which is called from the upd procedure.
206 --
207 -- In Parameters:
208 -- A Pl/Sql record structure.
209 --
210 -- Post Success:
211 -- Processing continues.
212 --
213 -- Post Failure:
214 -- If an error has occurred, an error message and exception will be raised
215 -- but not handled.
216 --
217 -- Developer Implementation Notes:
218 -- Any post-processing required after the update dml is issued should be
219 -- coded within this procedure. It is important to note that any 3rd party
220 -- maintenance should be reviewed before placing in this procedure.
221 --
222 -- Access Status:
223 -- Internal Row Handler Use Only.
224 --
225 -- {End Of Comments}
226 -- ----------------------------------------------------------------------------
227 Procedure post_update
228 (p_effective_date in date
229 ,p_rec in per_pml_shd.g_rec_type
230 ,p_duplicate_name_warning in boolean
231 ,p_weighting_over_100_warning in boolean
232 ,p_weighting_appraisal_warning in boolean
233 ) is
234 --
235 l_proc varchar2(72) := g_package||'post_update';
236 --
237 Begin
238 hr_utility.set_location('Entering:'||l_proc, 5);
239 begin
240 --
241 per_pml_rku.after_update
242 (p_effective_date => p_effective_date
243 ,p_objective_id
244 => p_rec.objective_id
245 ,p_object_version_number
246 => p_rec.object_version_number
247 ,p_objective_name
248 => p_rec.objective_name
249 ,p_valid_from
250 => p_rec.valid_from
251 ,p_valid_to
252 => p_rec.valid_to
253 ,p_target_date
254 => p_rec.target_date
255 ,p_next_review_date
256 => p_rec.next_review_date
257 ,p_group_code
258 => p_rec.group_code
259 ,p_priority_code
260 => p_rec.priority_code
261 ,p_appraise_flag
262 => p_rec.appraise_flag
263 ,p_weighting_percent
264 => p_rec.weighting_percent
265 ,p_measurement_style_code
266 => p_rec.measurement_style_code
267 ,p_measure_name
268 => p_rec.measure_name
269 ,p_target_value
270 => p_rec.target_value
271 ,p_uom_code
272 => p_rec.uom_code
273 ,p_measure_type_code
274 => p_rec.measure_type_code
275 ,p_measure_comments
276 => p_rec.measure_comments
277 ,p_eligibility_type_code
278 => p_rec.eligibility_type_code
279 ,p_details
280 => p_rec.details
281 ,p_success_criteria
282 => p_rec.success_criteria
283 ,p_comments
284 => p_rec.comments
285 ,p_attribute_category
286 => p_rec.attribute_category
287 ,p_attribute1
288 => p_rec.attribute1
289 ,p_attribute2
290 => p_rec.attribute2
291 ,p_attribute3
292 => p_rec.attribute3
293 ,p_attribute4
294 => p_rec.attribute4
295 ,p_attribute5
296 => p_rec.attribute5
297 ,p_attribute6
298 => p_rec.attribute6
299 ,p_attribute7
300 => p_rec.attribute7
301 ,p_attribute8
302 => p_rec.attribute8
303 ,p_attribute9
304 => p_rec.attribute9
305 ,p_attribute10
306 => p_rec.attribute10
307 ,p_attribute11
308 => p_rec.attribute11
309 ,p_attribute12
310 => p_rec.attribute12
311 ,p_attribute13
312 => p_rec.attribute13
313 ,p_attribute14
314 => p_rec.attribute14
315 ,p_attribute15
316 => p_rec.attribute15
317 ,p_attribute16
318 => p_rec.attribute16
319 ,p_attribute17
320 => p_rec.attribute17
321 ,p_attribute18
322 => p_rec.attribute18
323 ,p_attribute19
324 => p_rec.attribute19
325 ,p_attribute20
326 => p_rec.attribute20
327 ,p_attribute21
328 => p_rec.attribute21
329 ,p_attribute22
330 => p_rec.attribute22
331 ,p_attribute23
332 => p_rec.attribute23
333 ,p_attribute24
334 => p_rec.attribute24
335 ,p_attribute25
336 => p_rec.attribute25
337 ,p_attribute26
338 => p_rec.attribute26
339 ,p_attribute27
340 => p_rec.attribute27
341 ,p_attribute28
342 => p_rec.attribute28
343 ,p_attribute29
344 => p_rec.attribute29
345 ,p_attribute30
346 => p_rec.attribute30
347 ,p_duplicate_name_warning
348 => p_duplicate_name_warning
349 ,p_weighting_over_100_warning
350 => p_weighting_over_100_warning
351 ,p_weighting_appraisal_warning
352 => p_weighting_appraisal_warning
353 ,p_object_version_number_o
354 => per_pml_shd.g_old_rec.object_version_number
355 ,p_objective_name_o
356 => per_pml_shd.g_old_rec.objective_name
357 ,p_valid_from_o
358 => per_pml_shd.g_old_rec.valid_from
359 ,p_valid_to_o
360 => per_pml_shd.g_old_rec.valid_to
361 ,p_target_date_o
362 => per_pml_shd.g_old_rec.target_date
363 ,p_next_review_date_o
364 => per_pml_shd.g_old_rec.next_review_date
365 ,p_group_code_o
366 => per_pml_shd.g_old_rec.group_code
367 ,p_priority_code_o
368 => per_pml_shd.g_old_rec.priority_code
369 ,p_appraise_flag_o
370 => per_pml_shd.g_old_rec.appraise_flag
371 ,p_weighting_percent_o
372 => per_pml_shd.g_old_rec.weighting_percent
373 ,p_measurement_style_code_o
374 => per_pml_shd.g_old_rec.measurement_style_code
375 ,p_measure_name_o
376 => per_pml_shd.g_old_rec.measure_name
377 ,p_target_value_o
378 => per_pml_shd.g_old_rec.target_value
379 ,p_uom_code_o
380 => per_pml_shd.g_old_rec.uom_code
381 ,p_measure_type_code_o
382 => per_pml_shd.g_old_rec.measure_type_code
383 ,p_measure_comments_o
384 => per_pml_shd.g_old_rec.measure_comments
385 ,p_eligibility_type_code_o
386 => per_pml_shd.g_old_rec.eligibility_type_code
387 ,p_details_o
388 => per_pml_shd.g_old_rec.details
389 ,p_success_criteria_o
390 => per_pml_shd.g_old_rec.success_criteria
391 ,p_comments_o
392 => per_pml_shd.g_old_rec.comments
393 ,p_attribute_category_o
394 => per_pml_shd.g_old_rec.attribute_category
395 ,p_attribute1_o
396 => per_pml_shd.g_old_rec.attribute1
397 ,p_attribute2_o
398 => per_pml_shd.g_old_rec.attribute2
399 ,p_attribute3_o
400 => per_pml_shd.g_old_rec.attribute3
401 ,p_attribute4_o
402 => per_pml_shd.g_old_rec.attribute4
403 ,p_attribute5_o
404 => per_pml_shd.g_old_rec.attribute5
405 ,p_attribute6_o
406 => per_pml_shd.g_old_rec.attribute6
407 ,p_attribute7_o
408 => per_pml_shd.g_old_rec.attribute7
409 ,p_attribute8_o
410 => per_pml_shd.g_old_rec.attribute8
411 ,p_attribute9_o
412 => per_pml_shd.g_old_rec.attribute9
413 ,p_attribute10_o
414 => per_pml_shd.g_old_rec.attribute10
415 ,p_attribute11_o
416 => per_pml_shd.g_old_rec.attribute11
417 ,p_attribute12_o
418 => per_pml_shd.g_old_rec.attribute12
419 ,p_attribute13_o
420 => per_pml_shd.g_old_rec.attribute13
421 ,p_attribute14_o
422 => per_pml_shd.g_old_rec.attribute14
423 ,p_attribute15_o
424 => per_pml_shd.g_old_rec.attribute15
425 ,p_attribute16_o
426 => per_pml_shd.g_old_rec.attribute16
427 ,p_attribute17_o
428 => per_pml_shd.g_old_rec.attribute17
429 ,p_attribute18_o
430 => per_pml_shd.g_old_rec.attribute18
431 ,p_attribute19_o
432 => per_pml_shd.g_old_rec.attribute19
433 ,p_attribute20_o
434 => per_pml_shd.g_old_rec.attribute20
435 ,p_attribute21_o
436 => per_pml_shd.g_old_rec.attribute21
437 ,p_attribute22_o
438 => per_pml_shd.g_old_rec.attribute22
439 ,p_attribute23_o
440 => per_pml_shd.g_old_rec.attribute23
441 ,p_attribute24_o
442 => per_pml_shd.g_old_rec.attribute24
443 ,p_attribute25_o
444 => per_pml_shd.g_old_rec.attribute25
445 ,p_attribute26_o
446 => per_pml_shd.g_old_rec.attribute26
447 ,p_attribute27_o
448 => per_pml_shd.g_old_rec.attribute27
449 ,p_attribute28_o
450 => per_pml_shd.g_old_rec.attribute28
451 ,p_attribute29_o
452 => per_pml_shd.g_old_rec.attribute29
453 ,p_attribute30_o
454 => per_pml_shd.g_old_rec.attribute30
455 );
456 --
457 exception
458 --
459 when hr_api.cannot_find_prog_unit then
460 --
461 hr_api.cannot_find_prog_unit_error
462 (p_module_name => 'PER_OBJECTIVES_LIBRARY'
463 ,p_hook_type => 'AU');
464 --
465 end;
466 --
467 hr_utility.set_location(' Leaving:'||l_proc, 10);
468 End post_update;
469 --
470 -- ----------------------------------------------------------------------------
471 -- |-----------------------------< convert_defs >-----------------------------|
472 -- ----------------------------------------------------------------------------
473 -- {Start Of Comments}
474 --
475 -- Description:
476 -- The Convert_Defs procedure has one very important function:
477 -- It must return the record structure for the row with all system defaulted
478 -- values converted into its corresponding parameter value for update. When
479 -- we attempt to update a row through the Upd process , certain
480 -- parameters can be defaulted which enables flexibility in the calling of
481 -- the upd process (e.g. only attributes which need to be updated need to be
482 -- specified). For the upd process to determine which attributes
483 -- have NOT been specified we need to check if the parameter has a reserved
484 -- system default value. Therefore, for all parameters which have a
485 -- corresponding reserved system default mechanism specified we need to
486 -- check if a system default is being used. If a system default is being
487 -- used then we convert the defaulted value into its corresponding attribute
488 -- value held in the g_old_rec data structure.
489 --
490 -- Prerequisites:
491 -- This private function can only be called from the upd process.
492 --
493 -- In Parameters:
494 -- A Pl/Sql record structure.
495 --
496 -- Post Success:
497 -- The record structure will be returned with all system defaulted parameter
498 -- values converted into its current row attribute value.
499 --
500 -- Post Failure:
501 -- No direct error handling is required within this function. Any possible
502 -- errors within this procedure will be a PL/SQL value error due to
503 -- conversion of datatypes or data lengths.
504 --
505 -- Developer Implementation Notes:
506 -- None.
507 --
508 -- Access Status:
509 -- Internal Row Handler Use Only.
510 --
511 -- {End Of Comments}
512 -- ----------------------------------------------------------------------------
513 Procedure convert_defs
514 (p_rec in out nocopy per_pml_shd.g_rec_type
515 ) is
516 --
517 Begin
518 --
519 -- We must now examine each argument value in the
520 -- p_rec plsql record structure
521 -- to see if a system default is being used. If a system default
522 -- is being used then we must set to the 'current' argument value.
523 --
524 If (p_rec.objective_name = hr_api.g_varchar2) then
525 p_rec.objective_name :=
526 per_pml_shd.g_old_rec.objective_name;
527 End If;
528 If (p_rec.valid_from = hr_api.g_date) then
529 p_rec.valid_from :=
530 per_pml_shd.g_old_rec.valid_from;
531 End If;
532 If (p_rec.valid_to = hr_api.g_date) then
533 p_rec.valid_to :=
534 per_pml_shd.g_old_rec.valid_to;
535 End If;
536 If (p_rec.target_date = hr_api.g_date) then
537 p_rec.target_date :=
538 per_pml_shd.g_old_rec.target_date;
539 End If;
540 If (p_rec.next_review_date = hr_api.g_date) then
541 p_rec.next_review_date :=
542 per_pml_shd.g_old_rec.next_review_date;
543 End If;
544 If (p_rec.group_code = hr_api.g_varchar2) then
545 p_rec.group_code :=
546 per_pml_shd.g_old_rec.group_code;
547 End If;
548 If (p_rec.priority_code = hr_api.g_varchar2) then
549 p_rec.priority_code :=
550 per_pml_shd.g_old_rec.priority_code;
551 End If;
552 If (p_rec.appraise_flag = hr_api.g_varchar2) then
553 p_rec.appraise_flag :=
554 per_pml_shd.g_old_rec.appraise_flag;
555 End If;
556 If (p_rec.weighting_percent = hr_api.g_number) then
557 p_rec.weighting_percent :=
558 per_pml_shd.g_old_rec.weighting_percent;
559 End If;
560 If (p_rec.measurement_style_code = hr_api.g_varchar2) then
561 p_rec.measurement_style_code :=
562 per_pml_shd.g_old_rec.measurement_style_code;
563 End If;
564 If (p_rec.measure_name = hr_api.g_varchar2) then
565 p_rec.measure_name :=
566 per_pml_shd.g_old_rec.measure_name;
567 End If;
568 If (p_rec.target_value = hr_api.g_number) then
569 p_rec.target_value :=
570 per_pml_shd.g_old_rec.target_value;
571 End If;
572 If (p_rec.uom_code = hr_api.g_varchar2) then
573 p_rec.uom_code :=
574 per_pml_shd.g_old_rec.uom_code;
575 End If;
576 If (p_rec.measure_type_code = hr_api.g_varchar2) then
577 p_rec.measure_type_code :=
578 per_pml_shd.g_old_rec.measure_type_code;
579 End If;
580 If (p_rec.measure_comments = hr_api.g_varchar2) then
581 p_rec.measure_comments :=
582 per_pml_shd.g_old_rec.measure_comments;
583 End If;
584 If (p_rec.eligibility_type_code = hr_api.g_varchar2) then
585 p_rec.eligibility_type_code :=
586 per_pml_shd.g_old_rec.eligibility_type_code;
587 End If;
588 If (p_rec.details = hr_api.g_varchar2) then
589 p_rec.details :=
590 per_pml_shd.g_old_rec.details;
591 End If;
592 If (p_rec.success_criteria = hr_api.g_varchar2) then
593 p_rec.success_criteria :=
594 per_pml_shd.g_old_rec.success_criteria;
595 End If;
596 If (p_rec.comments = hr_api.g_varchar2) then
597 p_rec.comments :=
598 per_pml_shd.g_old_rec.comments;
599 End If;
600 If (p_rec.attribute_category = hr_api.g_varchar2) then
601 p_rec.attribute_category :=
602 per_pml_shd.g_old_rec.attribute_category;
603 End If;
604 If (p_rec.attribute1 = hr_api.g_varchar2) then
605 p_rec.attribute1 :=
606 per_pml_shd.g_old_rec.attribute1;
607 End If;
608 If (p_rec.attribute2 = hr_api.g_varchar2) then
609 p_rec.attribute2 :=
610 per_pml_shd.g_old_rec.attribute2;
611 End If;
612 If (p_rec.attribute3 = hr_api.g_varchar2) then
613 p_rec.attribute3 :=
614 per_pml_shd.g_old_rec.attribute3;
615 End If;
616 If (p_rec.attribute4 = hr_api.g_varchar2) then
617 p_rec.attribute4 :=
618 per_pml_shd.g_old_rec.attribute4;
619 End If;
620 If (p_rec.attribute5 = hr_api.g_varchar2) then
621 p_rec.attribute5 :=
622 per_pml_shd.g_old_rec.attribute5;
623 End If;
624 If (p_rec.attribute6 = hr_api.g_varchar2) then
625 p_rec.attribute6 :=
626 per_pml_shd.g_old_rec.attribute6;
627 End If;
628 If (p_rec.attribute7 = hr_api.g_varchar2) then
629 p_rec.attribute7 :=
630 per_pml_shd.g_old_rec.attribute7;
631 End If;
632 If (p_rec.attribute8 = hr_api.g_varchar2) then
633 p_rec.attribute8 :=
634 per_pml_shd.g_old_rec.attribute8;
635 End If;
636 If (p_rec.attribute9 = hr_api.g_varchar2) then
637 p_rec.attribute9 :=
638 per_pml_shd.g_old_rec.attribute9;
639 End If;
640 If (p_rec.attribute10 = hr_api.g_varchar2) then
641 p_rec.attribute10 :=
642 per_pml_shd.g_old_rec.attribute10;
643 End If;
644 If (p_rec.attribute11 = hr_api.g_varchar2) then
645 p_rec.attribute11 :=
646 per_pml_shd.g_old_rec.attribute11;
647 End If;
648 If (p_rec.attribute12 = hr_api.g_varchar2) then
649 p_rec.attribute12 :=
650 per_pml_shd.g_old_rec.attribute12;
651 End If;
652 If (p_rec.attribute13 = hr_api.g_varchar2) then
653 p_rec.attribute13 :=
654 per_pml_shd.g_old_rec.attribute13;
655 End If;
656 If (p_rec.attribute14 = hr_api.g_varchar2) then
657 p_rec.attribute14 :=
658 per_pml_shd.g_old_rec.attribute14;
659 End If;
660 If (p_rec.attribute15 = hr_api.g_varchar2) then
661 p_rec.attribute15 :=
662 per_pml_shd.g_old_rec.attribute15;
663 End If;
664 If (p_rec.attribute16 = hr_api.g_varchar2) then
665 p_rec.attribute16 :=
666 per_pml_shd.g_old_rec.attribute16;
667 End If;
668 If (p_rec.attribute17 = hr_api.g_varchar2) then
669 p_rec.attribute17 :=
670 per_pml_shd.g_old_rec.attribute17;
671 End If;
672 If (p_rec.attribute18 = hr_api.g_varchar2) then
673 p_rec.attribute18 :=
674 per_pml_shd.g_old_rec.attribute18;
675 End If;
676 If (p_rec.attribute19 = hr_api.g_varchar2) then
677 p_rec.attribute19 :=
678 per_pml_shd.g_old_rec.attribute19;
679 End If;
680 If (p_rec.attribute20 = hr_api.g_varchar2) then
681 p_rec.attribute20 :=
682 per_pml_shd.g_old_rec.attribute20;
683 End If;
684 If (p_rec.attribute21 = hr_api.g_varchar2) then
685 p_rec.attribute21 :=
686 per_pml_shd.g_old_rec.attribute21;
687 End If;
688 If (p_rec.attribute22 = hr_api.g_varchar2) then
689 p_rec.attribute22 :=
690 per_pml_shd.g_old_rec.attribute22;
691 End If;
692 If (p_rec.attribute23 = hr_api.g_varchar2) then
693 p_rec.attribute23 :=
694 per_pml_shd.g_old_rec.attribute23;
695 End If;
696 If (p_rec.attribute24 = hr_api.g_varchar2) then
697 p_rec.attribute24 :=
698 per_pml_shd.g_old_rec.attribute24;
699 End If;
700 If (p_rec.attribute25 = hr_api.g_varchar2) then
701 p_rec.attribute25 :=
702 per_pml_shd.g_old_rec.attribute25;
703 End If;
704 If (p_rec.attribute26 = hr_api.g_varchar2) then
705 p_rec.attribute26 :=
706 per_pml_shd.g_old_rec.attribute26;
707 End If;
708 If (p_rec.attribute27 = hr_api.g_varchar2) then
709 p_rec.attribute27 :=
710 per_pml_shd.g_old_rec.attribute27;
711 End If;
712 If (p_rec.attribute28 = hr_api.g_varchar2) then
713 p_rec.attribute28 :=
714 per_pml_shd.g_old_rec.attribute28;
715 End If;
716 If (p_rec.attribute29 = hr_api.g_varchar2) then
717 p_rec.attribute29 :=
718 per_pml_shd.g_old_rec.attribute29;
719 End If;
720 If (p_rec.attribute30 = hr_api.g_varchar2) then
721 p_rec.attribute30 :=
722 per_pml_shd.g_old_rec.attribute30;
723 End If;
724 --
725 End convert_defs;
726 --
727 -- ----------------------------------------------------------------------------
728 -- |---------------------------------< upd >----------------------------------|
729 -- ----------------------------------------------------------------------------
730 Procedure upd
731 (p_effective_date in date
732 ,p_rec in out nocopy per_pml_shd.g_rec_type
733 ,p_duplicate_name_warning out nocopy boolean
734 ,p_weighting_over_100_warning out nocopy boolean
735 ,p_weighting_appraisal_warning out nocopy boolean
736 ) is
737 --
738 l_proc varchar2(72) := g_package||'upd';
739 --
740 Begin
741 hr_utility.set_location('Entering:'||l_proc, 5);
742 --
743 -- We must lock the row which we need to update.
744 --
745 per_pml_shd.lck
746 (p_rec.objective_id
747 ,p_rec.object_version_number
748 );
749 --
750 -- 1. During an update system defaults are used to determine if
751 -- arguments have been defaulted or not. We must therefore
752 -- derive the full record structure values to be updated.
753 --
754 -- 2. Call the supporting update validate operations.
755 --
756 convert_defs(p_rec);
757 per_pml_bus.update_validate
758 (p_effective_date
759 ,p_rec
760 ,p_duplicate_name_warning
761 ,p_weighting_over_100_warning
762 ,p_weighting_appraisal_warning
763 );
764 --
765 -- Call to raise any errors on multi-message list
766 hr_multi_message.end_validation_set;
767 --
768 -- Call the supporting pre-update operation
769 --
770 per_pml_upd.pre_update(p_rec);
771 --
772 -- Update the row.
773 --
774 per_pml_upd.update_dml(p_rec);
775 --
776 -- Call the supporting post-update operation
777 --
778 per_pml_upd.post_update
779 (p_effective_date => p_effective_date
780 ,p_rec => p_rec
781 ,p_duplicate_name_warning => p_duplicate_name_warning
782 ,p_weighting_over_100_warning => p_weighting_over_100_warning
783 ,p_weighting_appraisal_warning => p_weighting_appraisal_warning
784 );
785 --
786 -- Call to raise any errors on multi-message list
787 hr_multi_message.end_validation_set;
788 --
789 End upd;
790 --
791 -- ----------------------------------------------------------------------------
792 -- |---------------------------------< upd >----------------------------------|
793 -- ----------------------------------------------------------------------------
794 Procedure upd
795 (p_effective_date in date
796 ,p_objective_id in number
797 ,p_object_version_number in out nocopy number
798 ,p_objective_name in varchar2 default hr_api.g_varchar2
799 ,p_measurement_style_code in varchar2 default hr_api.g_varchar2
800 ,p_eligibility_type_code in varchar2 default hr_api.g_varchar2
801 ,p_valid_from in date default hr_api.g_date
802 ,p_valid_to in date default hr_api.g_date
803 ,p_target_date in date default hr_api.g_date
804 ,p_next_review_date in date default hr_api.g_date
805 ,p_group_code in varchar2 default hr_api.g_varchar2
806 ,p_priority_code in varchar2 default hr_api.g_varchar2
807 ,p_appraise_flag in varchar2 default hr_api.g_varchar2
808 ,p_weighting_percent in number default hr_api.g_number
809 ,p_measure_name in varchar2 default hr_api.g_varchar2
810 ,p_target_value in number default hr_api.g_number
811 ,p_uom_code in varchar2 default hr_api.g_varchar2
812 ,p_measure_type_code in varchar2 default hr_api.g_varchar2
813 ,p_measure_comments in varchar2 default hr_api.g_varchar2
814 ,p_details in varchar2 default hr_api.g_varchar2
815 ,p_success_criteria in varchar2 default hr_api.g_varchar2
816 ,p_comments in varchar2 default hr_api.g_varchar2
817 ,p_attribute_category in varchar2 default hr_api.g_varchar2
818 ,p_attribute1 in varchar2 default hr_api.g_varchar2
819 ,p_attribute2 in varchar2 default hr_api.g_varchar2
820 ,p_attribute3 in varchar2 default hr_api.g_varchar2
821 ,p_attribute4 in varchar2 default hr_api.g_varchar2
822 ,p_attribute5 in varchar2 default hr_api.g_varchar2
823 ,p_attribute6 in varchar2 default hr_api.g_varchar2
824 ,p_attribute7 in varchar2 default hr_api.g_varchar2
825 ,p_attribute8 in varchar2 default hr_api.g_varchar2
826 ,p_attribute9 in varchar2 default hr_api.g_varchar2
827 ,p_attribute10 in varchar2 default hr_api.g_varchar2
828 ,p_attribute11 in varchar2 default hr_api.g_varchar2
829 ,p_attribute12 in varchar2 default hr_api.g_varchar2
830 ,p_attribute13 in varchar2 default hr_api.g_varchar2
831 ,p_attribute14 in varchar2 default hr_api.g_varchar2
832 ,p_attribute15 in varchar2 default hr_api.g_varchar2
833 ,p_attribute16 in varchar2 default hr_api.g_varchar2
834 ,p_attribute17 in varchar2 default hr_api.g_varchar2
835 ,p_attribute18 in varchar2 default hr_api.g_varchar2
836 ,p_attribute19 in varchar2 default hr_api.g_varchar2
837 ,p_attribute20 in varchar2 default hr_api.g_varchar2
838 ,p_attribute21 in varchar2 default hr_api.g_varchar2
839 ,p_attribute22 in varchar2 default hr_api.g_varchar2
840 ,p_attribute23 in varchar2 default hr_api.g_varchar2
841 ,p_attribute24 in varchar2 default hr_api.g_varchar2
842 ,p_attribute25 in varchar2 default hr_api.g_varchar2
843 ,p_attribute26 in varchar2 default hr_api.g_varchar2
844 ,p_attribute27 in varchar2 default hr_api.g_varchar2
845 ,p_attribute28 in varchar2 default hr_api.g_varchar2
846 ,p_attribute29 in varchar2 default hr_api.g_varchar2
847 ,p_attribute30 in varchar2 default hr_api.g_varchar2
848 ,p_duplicate_name_warning out nocopy boolean
849 ,p_weighting_over_100_warning out nocopy boolean
850 ,p_weighting_appraisal_warning out nocopy boolean
851 ) is
852 --
853 l_rec per_pml_shd.g_rec_type;
854 l_proc varchar2(72) := g_package||'upd';
855 l_duplicate_name_warning boolean;
856 l_weighting_over_100_warning boolean;
857 l_weighting_appraisal_warning boolean;
858
859 --
860 Begin
861 hr_utility.set_location('Entering:'||l_proc, 5);
862 --
863 -- Call conversion function to turn arguments into the
864 -- l_rec structure.
865 --
866 l_rec :=
867 per_pml_shd.convert_args
868 (p_objective_id
869 ,p_object_version_number
870 ,p_objective_name
871 ,p_valid_from
872 ,p_valid_to
873 ,p_target_date
874 ,p_next_review_date
875 ,p_group_code
876 ,p_priority_code
877 ,p_appraise_flag
878 ,p_weighting_percent
879 ,p_measurement_style_code
880 ,p_measure_name
881 ,p_target_value
882 ,p_uom_code
883 ,p_measure_type_code
884 ,p_measure_comments
885 ,p_eligibility_type_code
886 ,p_details
887 ,p_success_criteria
888 ,p_comments
889 ,p_attribute_category
890 ,p_attribute1
891 ,p_attribute2
892 ,p_attribute3
893 ,p_attribute4
894 ,p_attribute5
895 ,p_attribute6
896 ,p_attribute7
897 ,p_attribute8
898 ,p_attribute9
899 ,p_attribute10
900 ,p_attribute11
901 ,p_attribute12
902 ,p_attribute13
903 ,p_attribute14
904 ,p_attribute15
905 ,p_attribute16
906 ,p_attribute17
907 ,p_attribute18
908 ,p_attribute19
909 ,p_attribute20
910 ,p_attribute21
911 ,p_attribute22
912 ,p_attribute23
913 ,p_attribute24
914 ,p_attribute25
915 ,p_attribute26
916 ,p_attribute27
917 ,p_attribute28
918 ,p_attribute29
919 ,p_attribute30
920 );
921 --
922 -- Having converted the arguments into the
923 -- plsql record structure we call the corresponding record
924 -- business process.
925 --
926 per_pml_upd.upd
927 (p_effective_date
928 ,l_rec
929 ,l_duplicate_name_warning
930 ,l_weighting_over_100_warning
931 ,l_weighting_appraisal_warning
932 );
933 p_object_version_number := l_rec.object_version_number;
934 p_duplicate_name_warning := l_duplicate_name_warning;
935 p_weighting_over_100_warning := l_weighting_over_100_warning;
936 p_weighting_appraisal_warning := l_weighting_appraisal_warning;
937
938 --
939 hr_utility.set_location(' Leaving:'||l_proc, 10);
940 End upd;
941 --
942 end per_pml_upd;