[Home] [Help]
PACKAGE BODY: APPS.PER_PAC_UPD
Source
1 Package Body per_pac_upd as
2 /* $Header: pepacrhi.pkb 120.3 2006/10/19 07:29:26 sturlapa noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_pac_upd.'; -- Global package name
9 g_debug boolean := hr_utility.debug_enabled;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------------< update_dml >------------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 -- This procedure controls the actual dml update logic. The processing of
18 -- this procedure is:
19 -- 1) Increment the object_version_number by 1 if the object_version_number
20 -- is defined as an attribute for this entity.
21 -- 2) To set and unset the g_api_dml status as required (as we are about to
22 -- perform dml).
23 -- 3) To update the specified row in the schema using the primary key in
24 -- the predicates.
25 -- 4) To trap any constraint violations that may have occurred.
26 -- 5) To raise any other errors.
27 --
28 -- Prerequisites:
29 -- This is an internal private procedure which must be called from the upd
30 -- procedure.
31 --
32 -- In Parameters:
33 -- A Pl/Sql record structre.
34 --
35 -- Post Success:
36 -- The specified row will be updated in the schema.
37 --
38 -- Post Failure:
39 -- On the update dml failure it is important to note that we always reset the
40 -- g_api_dml status to false.
41 -- If a check, unique or parent integrity constraint violation is raised the
42 -- constraint_error procedure will be called.
43 -- If any other error is reported, the error will be raised after the
44 -- g_api_dml status is reset.
45 --
46 -- Developer Implementation Notes:
47 -- The update 'set' attribute list should be modified if any of your
48 -- attributes are not updateable.
49 --
50 -- Access Status:
51 -- Internal Row Handler Use Only.
52 --
53 -- {End Of Comments}
54 -- ----------------------------------------------------------------------------
55 Procedure update_dml
56 (p_rec in out nocopy per_pac_shd.g_rec_type
57 ) is
58 --
59 l_proc varchar2(72) := g_package||'update_dml';
60 --
61 Begin
62 hr_utility.set_location('Entering:'||l_proc, 5);
63 --
64 -- Increment the object version
65 p_rec.object_version_number := p_rec.object_version_number + 1;
66 --
67 --
68 --
69 -- Update the per_allocated_checklists Row
70 --
71 update per_allocated_checklists
72 set
73 allocated_checklist_id = p_rec.allocated_checklist_id
74 ,checklist_id = p_rec.checklist_id
75 ,person_id = p_rec.person_id
76 ,assignment_id = p_rec.assignment_id
77 ,checklist_name = p_rec.checklist_name
78 ,description = p_rec.description
79 ,checklist_category = p_rec.checklist_category
80 ,object_version_number = p_rec.object_version_number
81 ,attribute_category = p_rec.attribute_category
82 ,attribute1 = p_rec.attribute1
83 ,attribute2 = p_rec.attribute2
84 ,attribute3 = p_rec.attribute3
85 ,attribute4 = p_rec.attribute4
86 ,attribute5 = p_rec.attribute5
87 ,attribute6 = p_rec.attribute6
88 ,attribute7 = p_rec.attribute7
89 ,attribute8 = p_rec.attribute8
90 ,attribute9 = p_rec.attribute9
91 ,attribute10 = p_rec.attribute10
92 ,attribute11 = p_rec.attribute11
93 ,attribute12 = p_rec.attribute12
94 ,attribute13 = p_rec.attribute13
95 ,attribute14 = p_rec.attribute14
96 ,attribute15 = p_rec.attribute15
97 ,attribute16 = p_rec.attribute16
98 ,attribute17 = p_rec.attribute17
99 ,attribute18 = p_rec.attribute18
100 ,attribute19 = p_rec.attribute19
101 ,attribute20 = p_rec.attribute20
102 ,information_category = p_rec.information_category
103 ,information1 = p_rec.information1
104 ,information2 = p_rec.information2
105 ,information3 = p_rec.information3
106 ,information4 = p_rec.information4
107 ,information5 = p_rec.information5
108 ,information6 = p_rec.information6
109 ,information7 = p_rec.information7
110 ,information8 = p_rec.information8
111 ,information9 = p_rec.information9
112 ,information10 = p_rec.information10
113 ,information11 = p_rec.information11
114 ,information12 = p_rec.information12
115 ,information13 = p_rec.information13
116 ,information14 = p_rec.information14
117 ,information15 = p_rec.information15
118 ,information16 = p_rec.information16
119 ,information17 = p_rec.information17
120 ,information18 = p_rec.information18
121 ,information19 = p_rec.information19
122 ,information20 = p_rec.information20
123 where allocated_checklist_id = p_rec.allocated_checklist_id;
124 --
125 --
126 --
127 hr_utility.set_location(' Leaving:'||l_proc, 10);
128 --
129 Exception
130 When hr_api.check_integrity_violated Then
131 -- A check constraint has been violated
132 --
133 per_pac_shd.constraint_error
134 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
135 When hr_api.parent_integrity_violated Then
136 -- Parent integrity has been violated
137 --
138 per_pac_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
140 When hr_api.unique_integrity_violated Then
141 -- Unique integrity has been violated
142 --
143 per_pac_shd.constraint_error
144 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
145 When Others Then
146 --
147 Raise;
148 End update_dml;
149 --
150 -- ----------------------------------------------------------------------------
151 -- |------------------------------< pre_update >------------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start Of Comments}
154 --
155 -- Description:
156 -- This private procedure contains any processing which is required before
157 -- the update dml.
158 --
159 -- Prerequisites:
160 -- This is an internal procedure which is called from the upd procedure.
161 --
162 -- In Parameters:
163 -- A Pl/Sql record structure.
164 --
165 -- Post Success:
166 -- Processing continues.
167 --
168 -- Post Failure:
169 -- If an error has occurred, an error message and exception wil be raised
170 -- but not handled.
171 --
172 -- Developer Implementation Notes:
173 -- Any pre-processing required before the update dml is issued should be
174 -- coded within this procedure. It is important to note that any 3rd party
175 -- maintenance should be reviewed before placing in this procedure.
176 --
177 -- Access Status:
178 -- Internal Row Handler Use Only.
179 --
180 -- {End Of Comments}
181 -- ----------------------------------------------------------------------------
182 Procedure pre_update
183 (p_rec in per_pac_shd.g_rec_type
184 ) is
185 --
186 l_proc varchar2(72) := g_package||'pre_update';
187 --
188 Begin
189 hr_utility.set_location('Entering:'||l_proc, 5);
190 --
191 hr_utility.set_location(' Leaving:'||l_proc, 10);
192 End pre_update;
193 --
194 -- ----------------------------------------------------------------------------
195 -- |-----------------------------< post_update >------------------------------|
196 -- ----------------------------------------------------------------------------
197 -- {Start Of Comments}
198 --
199 -- Description:
200 -- This private procedure contains any processing which is required after
201 -- the update dml.
202 --
203 -- Prerequisites:
204 -- This is an internal procedure which is called from the upd procedure.
205 --
206 -- In Parameters:
207 -- A Pl/Sql record structure.
208 --
209 -- Post Success:
210 -- Processing continues.
211 --
212 -- Post Failure:
213 -- If an error has occurred, an error message and exception will be raised
214 -- but not handled.
215 --
216 -- Developer Implementation Notes:
217 -- Any post-processing required after the update dml is issued should be
218 -- coded within this procedure. It is important to note that any 3rd party
219 -- maintenance should be reviewed before placing in this procedure.
220 --
221 -- Access Status:
222 -- Internal Row Handler Use Only.
223 --
224 -- {End Of Comments}
225 -- ----------------------------------------------------------------------------
226 Procedure post_update
227 (p_effective_date in date
228 ,p_rec in per_pac_shd.g_rec_type
229 ) is
230 --
231 l_proc varchar2(72) := g_package||'post_update';
232 --
233 Begin
234 hr_utility.set_location('Entering:'||l_proc, 5);
235 begin
236 --
237 per_pac_rku.after_update
238 (p_effective_date => p_effective_date
239 ,p_allocated_checklist_id
240 => p_rec.allocated_checklist_id
241 ,p_checklist_id
242 => p_rec.checklist_id
243 ,p_person_id
244 => p_rec.person_id
245 ,p_assignment_id
246 => p_rec.assignment_id
247 ,p_checklist_name
248 => p_rec.checklist_name
249 ,p_description
250 => p_rec.description
251 ,p_checklist_category
252 => p_rec.checklist_category
253 ,p_object_version_number
254 => p_rec.object_version_number
255 ,p_attribute_category
256 => p_rec.attribute_category
257 ,p_attribute1
258 => p_rec.attribute1
259 ,p_attribute2
260 => p_rec.attribute2
261 ,p_attribute3
262 => p_rec.attribute3
263 ,p_attribute4
264 => p_rec.attribute4
265 ,p_attribute5
266 => p_rec.attribute5
267 ,p_attribute6
268 => p_rec.attribute6
269 ,p_attribute7
270 => p_rec.attribute7
271 ,p_attribute8
272 => p_rec.attribute8
273 ,p_attribute9
274 => p_rec.attribute9
275 ,p_attribute10
276 => p_rec.attribute10
277 ,p_attribute11
278 => p_rec.attribute11
279 ,p_attribute12
280 => p_rec.attribute12
281 ,p_attribute13
282 => p_rec.attribute13
283 ,p_attribute14
284 => p_rec.attribute14
285 ,p_attribute15
286 => p_rec.attribute15
287 ,p_attribute16
288 => p_rec.attribute16
289 ,p_attribute17
290 => p_rec.attribute17
291 ,p_attribute18
292 => p_rec.attribute18
293 ,p_attribute19
294 => p_rec.attribute19
295 ,p_attribute20
296 => p_rec.attribute20
297 ,p_information_category
298 => p_rec.information_category
299 ,p_information1
300 => p_rec.information1
301 ,p_information2
302 => p_rec.information2
303 ,p_information3
304 => p_rec.information3
305 ,p_information4
306 => p_rec.information4
307 ,p_information5
308 => p_rec.information5
309 ,p_information6
310 => p_rec.information6
311 ,p_information7
312 => p_rec.information7
313 ,p_information8
314 => p_rec.information8
315 ,p_information9
316 => p_rec.information9
317 ,p_information10
318 => p_rec.information10
319 ,p_information11
320 => p_rec.information11
321 ,p_information12
322 => p_rec.information12
323 ,p_information13
324 => p_rec.information13
325 ,p_information14
326 => p_rec.information14
327 ,p_information15
328 => p_rec.information15
329 ,p_information16
330 => p_rec.information16
331 ,p_information17
332 => p_rec.information17
333 ,p_information18
334 => p_rec.information18
335 ,p_information19
336 => p_rec.information19
337 ,p_information20
338 => p_rec.information20
339 ,p_checklist_id_o
340 => per_pac_shd.g_old_rec.checklist_id
341 ,p_person_id_o
342 => per_pac_shd.g_old_rec.person_id
343 ,p_assignment_id_o
344 => per_pac_shd.g_old_rec.assignment_id
345 ,p_checklist_name_o
346 => per_pac_shd.g_old_rec.checklist_name
347 ,p_description_o
348 => per_pac_shd.g_old_rec.description
349 ,p_checklist_category_o
350 => per_pac_shd.g_old_rec.checklist_category
351 ,p_object_version_number_o
352 => per_pac_shd.g_old_rec.object_version_number
353 ,p_attribute_category_o
354 => per_pac_shd.g_old_rec.attribute_category
355 ,p_attribute1_o
356 => per_pac_shd.g_old_rec.attribute1
357 ,p_attribute2_o
358 => per_pac_shd.g_old_rec.attribute2
359 ,p_attribute3_o
360 => per_pac_shd.g_old_rec.attribute3
361 ,p_attribute4_o
362 => per_pac_shd.g_old_rec.attribute4
363 ,p_attribute5_o
364 => per_pac_shd.g_old_rec.attribute5
365 ,p_attribute6_o
366 => per_pac_shd.g_old_rec.attribute6
367 ,p_attribute7_o
368 => per_pac_shd.g_old_rec.attribute7
369 ,p_attribute8_o
370 => per_pac_shd.g_old_rec.attribute8
371 ,p_attribute9_o
372 => per_pac_shd.g_old_rec.attribute9
373 ,p_attribute10_o
374 => per_pac_shd.g_old_rec.attribute10
375 ,p_attribute11_o
376 => per_pac_shd.g_old_rec.attribute11
377 ,p_attribute12_o
378 => per_pac_shd.g_old_rec.attribute12
379 ,p_attribute13_o
380 => per_pac_shd.g_old_rec.attribute13
381 ,p_attribute14_o
382 => per_pac_shd.g_old_rec.attribute14
383 ,p_attribute15_o
384 => per_pac_shd.g_old_rec.attribute15
385 ,p_attribute16_o
386 => per_pac_shd.g_old_rec.attribute16
387 ,p_attribute17_o
388 => per_pac_shd.g_old_rec.attribute17
389 ,p_attribute18_o
390 => per_pac_shd.g_old_rec.attribute18
391 ,p_attribute19_o
392 => per_pac_shd.g_old_rec.attribute19
393 ,p_attribute20_o
394 => per_pac_shd.g_old_rec.attribute20
395 ,p_information_category_o
396 => per_pac_shd.g_old_rec.information_category
397 ,p_information1_o
398 => per_pac_shd.g_old_rec.information1
399 ,p_information2_o
400 => per_pac_shd.g_old_rec.information2
401 ,p_information3_o
402 => per_pac_shd.g_old_rec.information3
403 ,p_information4_o
404 => per_pac_shd.g_old_rec.information4
405 ,p_information5_o
406 => per_pac_shd.g_old_rec.information5
407 ,p_information6_o
408 => per_pac_shd.g_old_rec.information6
409 ,p_information7_o
410 => per_pac_shd.g_old_rec.information7
411 ,p_information8_o
412 => per_pac_shd.g_old_rec.information8
413 ,p_information9_o
414 => per_pac_shd.g_old_rec.information9
415 ,p_information10_o
416 => per_pac_shd.g_old_rec.information10
417 ,p_information11_o
418 => per_pac_shd.g_old_rec.information11
419 ,p_information12_o
420 => per_pac_shd.g_old_rec.information12
421 ,p_information13_o
422 => per_pac_shd.g_old_rec.information13
423 ,p_information14_o
424 => per_pac_shd.g_old_rec.information14
425 ,p_information15_o
426 => per_pac_shd.g_old_rec.information15
427 ,p_information16_o
428 => per_pac_shd.g_old_rec.information16
429 ,p_information17_o
430 => per_pac_shd.g_old_rec.information17
431 ,p_information18_o
432 => per_pac_shd.g_old_rec.information18
433 ,p_information19_o
434 => per_pac_shd.g_old_rec.information19
435 ,p_information20_o
436 => per_pac_shd.g_old_rec.information20
437 );
438 --
439 exception
440 --
441 when hr_api.cannot_find_prog_unit then
442 --
443 hr_api.cannot_find_prog_unit_error
444 (p_module_name => 'PER_ALLOCATED_CHECKLISTS'
445 ,p_hook_type => 'AU');
446 --
447 end;
448 --
449 hr_utility.set_location(' Leaving:'||l_proc, 10);
450 End post_update;
451 --
452 -- ----------------------------------------------------------------------------
453 -- |-----------------------------< convert_defs >-----------------------------|
454 -- ----------------------------------------------------------------------------
455 -- {Start Of Comments}
456 --
457 -- Description:
458 -- The Convert_Defs procedure has one very important function:
459 -- It must return the record structure for the row with all system defaulted
460 -- values converted into its corresponding parameter value for update. When
461 -- we attempt to update a row through the Upd process , certain
462 -- parameters can be defaulted which enables flexibility in the calling of
463 -- the upd process (e.g. only attributes which need to be updated need to be
464 -- specified). For the upd process to determine which attributes
465 -- have NOT been specified we need to check if the parameter has a reserved
466 -- system default value. Therefore, for all parameters which have a
467 -- corresponding reserved system default mechanism specified we need to
468 -- check if a system default is being used. If a system default is being
469 -- used then we convert the defaulted value into its corresponding attribute
470 -- value held in the g_old_rec data structure.
471 --
472 -- Prerequisites:
473 -- This private function can only be called from the upd process.
474 --
475 -- In Parameters:
476 -- A Pl/Sql record structure.
477 --
478 -- Post Success:
479 -- The record structure will be returned with all system defaulted parameter
480 -- values converted into its current row attribute value.
481 --
482 -- Post Failure:
483 -- No direct error handling is required within this function. Any possible
484 -- errors within this procedure will be a PL/SQL value error due to
485 -- conversion of datatypes or data lengths.
486 --
487 -- Developer Implementation Notes:
488 -- None.
489 --
490 -- Access Status:
491 -- Internal Row Handler Use Only.
492 --
493 -- {End Of Comments}
494 -- ----------------------------------------------------------------------------
495 Procedure convert_defs
496 (p_rec in out nocopy per_pac_shd.g_rec_type
497 ) is
498 --
499 Begin
500 --
501 -- We must now examine each argument value in the
502 -- p_rec plsql record structure
503 -- to see if a system default is being used. If a system default
504 -- is being used then we must set to the 'current' argument value.
505 --
506 If (p_rec.checklist_id = hr_api.g_number) then
507 p_rec.checklist_id :=
508 per_pac_shd.g_old_rec.checklist_id;
509 End If;
510 If (p_rec.person_id = hr_api.g_number) then
511 p_rec.person_id :=
512 per_pac_shd.g_old_rec.person_id;
513 End If;
514 If (p_rec.assignment_id = hr_api.g_number) then
515 p_rec.assignment_id :=
516 per_pac_shd.g_old_rec.assignment_id;
517 End If;
518 If (p_rec.checklist_name = hr_api.g_varchar2) then
519 p_rec.checklist_name :=
520 per_pac_shd.g_old_rec.checklist_name;
521 End If;
522 If (p_rec.description = hr_api.g_varchar2) then
523 p_rec.description :=
524 per_pac_shd.g_old_rec.description;
525 End If;
526 If (p_rec.checklist_category = hr_api.g_varchar2) then
527 p_rec.checklist_category :=
528 per_pac_shd.g_old_rec.checklist_category;
529 End If;
530 If (p_rec.attribute_category = hr_api.g_varchar2) then
531 p_rec.attribute_category :=
532 per_pac_shd.g_old_rec.attribute_category;
533 End If;
534 If (p_rec.attribute1 = hr_api.g_varchar2) then
535 p_rec.attribute1 :=
536 per_pac_shd.g_old_rec.attribute1;
537 End If;
538 If (p_rec.attribute2 = hr_api.g_varchar2) then
539 p_rec.attribute2 :=
540 per_pac_shd.g_old_rec.attribute2;
541 End If;
542 If (p_rec.attribute3 = hr_api.g_varchar2) then
543 p_rec.attribute3 :=
544 per_pac_shd.g_old_rec.attribute3;
545 End If;
546 If (p_rec.attribute4 = hr_api.g_varchar2) then
547 p_rec.attribute4 :=
548 per_pac_shd.g_old_rec.attribute4;
549 End If;
550 If (p_rec.attribute5 = hr_api.g_varchar2) then
551 p_rec.attribute5 :=
552 per_pac_shd.g_old_rec.attribute5;
553 End If;
554 If (p_rec.attribute6 = hr_api.g_varchar2) then
555 p_rec.attribute6 :=
556 per_pac_shd.g_old_rec.attribute6;
557 End If;
558 If (p_rec.attribute7 = hr_api.g_varchar2) then
559 p_rec.attribute7 :=
560 per_pac_shd.g_old_rec.attribute7;
561 End If;
562 If (p_rec.attribute8 = hr_api.g_varchar2) then
563 p_rec.attribute8 :=
564 per_pac_shd.g_old_rec.attribute8;
565 End If;
566 If (p_rec.attribute9 = hr_api.g_varchar2) then
567 p_rec.attribute9 :=
568 per_pac_shd.g_old_rec.attribute9;
569 End If;
570 If (p_rec.attribute10 = hr_api.g_varchar2) then
571 p_rec.attribute10 :=
572 per_pac_shd.g_old_rec.attribute10;
573 End If;
574 If (p_rec.attribute11 = hr_api.g_varchar2) then
575 p_rec.attribute11 :=
576 per_pac_shd.g_old_rec.attribute11;
577 End If;
578 If (p_rec.attribute12 = hr_api.g_varchar2) then
579 p_rec.attribute12 :=
580 per_pac_shd.g_old_rec.attribute12;
581 End If;
582 If (p_rec.attribute13 = hr_api.g_varchar2) then
583 p_rec.attribute13 :=
584 per_pac_shd.g_old_rec.attribute13;
585 End If;
586 If (p_rec.attribute14 = hr_api.g_varchar2) then
587 p_rec.attribute14 :=
588 per_pac_shd.g_old_rec.attribute14;
589 End If;
590 If (p_rec.attribute15 = hr_api.g_varchar2) then
591 p_rec.attribute15 :=
592 per_pac_shd.g_old_rec.attribute15;
593 End If;
594 If (p_rec.attribute16 = hr_api.g_varchar2) then
595 p_rec.attribute16 :=
596 per_pac_shd.g_old_rec.attribute16;
597 End If;
598 If (p_rec.attribute17 = hr_api.g_varchar2) then
599 p_rec.attribute17 :=
600 per_pac_shd.g_old_rec.attribute17;
601 End If;
602 If (p_rec.attribute18 = hr_api.g_varchar2) then
603 p_rec.attribute18 :=
604 per_pac_shd.g_old_rec.attribute18;
605 End If;
606 If (p_rec.attribute19 = hr_api.g_varchar2) then
607 p_rec.attribute19 :=
608 per_pac_shd.g_old_rec.attribute19;
609 End If;
610 If (p_rec.attribute20 = hr_api.g_varchar2) then
611 p_rec.attribute20 :=
612 per_pac_shd.g_old_rec.attribute20;
613 End If;
614 If (p_rec.information_category = hr_api.g_varchar2) then
615 p_rec.information_category :=
616 per_pac_shd.g_old_rec.information_category;
617 End If;
618 If (p_rec.information1 = hr_api.g_varchar2) then
619 p_rec.information1 :=
620 per_pac_shd.g_old_rec.information1;
621 End If;
622 If (p_rec.information2 = hr_api.g_varchar2) then
623 p_rec.information2 :=
624 per_pac_shd.g_old_rec.information2;
625 End If;
626 If (p_rec.information3 = hr_api.g_varchar2) then
627 p_rec.information3 :=
628 per_pac_shd.g_old_rec.information3;
629 End If;
630 If (p_rec.information4 = hr_api.g_varchar2) then
631 p_rec.information4 :=
632 per_pac_shd.g_old_rec.information4;
633 End If;
634 If (p_rec.information5 = hr_api.g_varchar2) then
635 p_rec.information5 :=
636 per_pac_shd.g_old_rec.information5;
637 End If;
638 If (p_rec.information6 = hr_api.g_varchar2) then
639 p_rec.information6 :=
640 per_pac_shd.g_old_rec.information6;
641 End If;
642 If (p_rec.information7 = hr_api.g_varchar2) then
643 p_rec.information7 :=
644 per_pac_shd.g_old_rec.information7;
645 End If;
646 If (p_rec.information8 = hr_api.g_varchar2) then
647 p_rec.information8 :=
648 per_pac_shd.g_old_rec.information8;
649 End If;
650 If (p_rec.information9 = hr_api.g_varchar2) then
651 p_rec.information9 :=
652 per_pac_shd.g_old_rec.information9;
653 End If;
654 If (p_rec.information10 = hr_api.g_varchar2) then
655 p_rec.information10 :=
656 per_pac_shd.g_old_rec.information10;
657 End If;
658 If (p_rec.information11 = hr_api.g_varchar2) then
659 p_rec.information11 :=
660 per_pac_shd.g_old_rec.information11;
661 End If;
662 If (p_rec.information12 = hr_api.g_varchar2) then
663 p_rec.information12 :=
664 per_pac_shd.g_old_rec.information12;
665 End If;
666 If (p_rec.information13 = hr_api.g_varchar2) then
667 p_rec.information13 :=
668 per_pac_shd.g_old_rec.information13;
669 End If;
670 If (p_rec.information14 = hr_api.g_varchar2) then
671 p_rec.information14 :=
672 per_pac_shd.g_old_rec.information14;
673 End If;
674 If (p_rec.information15 = hr_api.g_varchar2) then
675 p_rec.information15 :=
676 per_pac_shd.g_old_rec.information15;
677 End If;
678 If (p_rec.information16 = hr_api.g_varchar2) then
679 p_rec.information16 :=
680 per_pac_shd.g_old_rec.information16;
681 End If;
682 If (p_rec.information17 = hr_api.g_varchar2) then
683 p_rec.information17 :=
684 per_pac_shd.g_old_rec.information17;
685 End If;
686 If (p_rec.information18 = hr_api.g_varchar2) then
687 p_rec.information18 :=
688 per_pac_shd.g_old_rec.information18;
689 End If;
690 If (p_rec.information19 = hr_api.g_varchar2) then
691 p_rec.information19 :=
692 per_pac_shd.g_old_rec.information19;
693 End If;
694 If (p_rec.information20 = hr_api.g_varchar2) then
695 p_rec.information20 :=
696 per_pac_shd.g_old_rec.information20;
697 End If;
698 --
699 End convert_defs;
700 --
701 -- ----------------------------------------------------------------------------
702 -- |---------------------------------< upd >----------------------------------|
703 -- ----------------------------------------------------------------------------
704 Procedure upd
705 (p_effective_date in date
706 ,p_rec in out nocopy per_pac_shd.g_rec_type
707 ) is
708 --
709 l_proc varchar2(72) := g_package||'upd';
710 --
711 Begin
712 hr_utility.set_location('Entering:'||l_proc, 5);
713 --
714 -- We must lock the row which we need to update.
715 --
716 per_pac_shd.lck
717 (p_rec.allocated_checklist_id
718 ,p_rec.object_version_number
719 );
720 --
721 -- 1. During an update system defaults are used to determine if
722 -- arguments have been defaulted or not. We must therefore
723 -- derive the full record structure values to be updated.
724 --
725 -- 2. Call the supporting update validate operations.
726 --
727 convert_defs(p_rec);
728 per_pac_bus.update_validate
729 (p_effective_date
730 ,p_rec
731 );
732 --
733 -- Call to raise any errors on multi-message list
734 hr_multi_message.end_validation_set;
735 --
736 -- Call the supporting pre-update operation
737 --
738 per_pac_upd.pre_update(p_rec);
739 --
740 -- Update the row.
741 --
742 per_pac_upd.update_dml(p_rec);
743 --
744 -- Call the supporting post-update operation
745 --
746 per_pac_upd.post_update
747 (p_effective_date
748 ,p_rec
749 );
750 --
751 -- Call to raise any errors on multi-message list
752 hr_multi_message.end_validation_set;
753 End upd;
754 --
755 -- ----------------------------------------------------------------------------
756 -- |---------------------------------< upd >----------------------------------|
757 -- ----------------------------------------------------------------------------
758 Procedure upd
759 (p_effective_date in date
760 ,p_allocated_checklist_id in number
761 ,p_object_version_number in out nocopy number
762 ,p_checklist_id in number default hr_api.g_number
763 ,p_person_id in number default hr_api.g_number
764 ,p_assignment_id in number default hr_api.g_number
765 ,p_checklist_name in varchar2 default hr_api.g_varchar2
766 ,p_description in varchar2 default hr_api.g_varchar2
767 ,p_checklist_category in varchar2 default hr_api.g_varchar2
768 ,p_attribute_category in varchar2 default hr_api.g_varchar2
769 ,p_attribute1 in varchar2 default hr_api.g_varchar2
770 ,p_attribute2 in varchar2 default hr_api.g_varchar2
771 ,p_attribute3 in varchar2 default hr_api.g_varchar2
772 ,p_attribute4 in varchar2 default hr_api.g_varchar2
773 ,p_attribute5 in varchar2 default hr_api.g_varchar2
774 ,p_attribute6 in varchar2 default hr_api.g_varchar2
775 ,p_attribute7 in varchar2 default hr_api.g_varchar2
776 ,p_attribute8 in varchar2 default hr_api.g_varchar2
777 ,p_attribute9 in varchar2 default hr_api.g_varchar2
778 ,p_attribute10 in varchar2 default hr_api.g_varchar2
779 ,p_attribute11 in varchar2 default hr_api.g_varchar2
780 ,p_attribute12 in varchar2 default hr_api.g_varchar2
781 ,p_attribute13 in varchar2 default hr_api.g_varchar2
782 ,p_attribute14 in varchar2 default hr_api.g_varchar2
783 ,p_attribute15 in varchar2 default hr_api.g_varchar2
784 ,p_attribute16 in varchar2 default hr_api.g_varchar2
785 ,p_attribute17 in varchar2 default hr_api.g_varchar2
786 ,p_attribute18 in varchar2 default hr_api.g_varchar2
787 ,p_attribute19 in varchar2 default hr_api.g_varchar2
788 ,p_attribute20 in varchar2 default hr_api.g_varchar2
789 ,p_information_category in varchar2 default hr_api.g_varchar2
790 ,p_information1 in varchar2 default hr_api.g_varchar2
791 ,p_information2 in varchar2 default hr_api.g_varchar2
792 ,p_information3 in varchar2 default hr_api.g_varchar2
793 ,p_information4 in varchar2 default hr_api.g_varchar2
794 ,p_information5 in varchar2 default hr_api.g_varchar2
795 ,p_information6 in varchar2 default hr_api.g_varchar2
796 ,p_information7 in varchar2 default hr_api.g_varchar2
797 ,p_information8 in varchar2 default hr_api.g_varchar2
798 ,p_information9 in varchar2 default hr_api.g_varchar2
799 ,p_information10 in varchar2 default hr_api.g_varchar2
800 ,p_information11 in varchar2 default hr_api.g_varchar2
801 ,p_information12 in varchar2 default hr_api.g_varchar2
802 ,p_information13 in varchar2 default hr_api.g_varchar2
803 ,p_information14 in varchar2 default hr_api.g_varchar2
804 ,p_information15 in varchar2 default hr_api.g_varchar2
805 ,p_information16 in varchar2 default hr_api.g_varchar2
806 ,p_information17 in varchar2 default hr_api.g_varchar2
807 ,p_information18 in varchar2 default hr_api.g_varchar2
808 ,p_information19 in varchar2 default hr_api.g_varchar2
809 ,p_information20 in varchar2 default hr_api.g_varchar2
810 ) is
811 --
812 l_rec per_pac_shd.g_rec_type;
813 l_proc varchar2(72) := g_package||'upd';
814 --
815 Begin
816 hr_utility.set_location('Entering:'||l_proc, 5);
817 --
818 -- Call conversion function to turn arguments into the
819 -- l_rec structure.
820 --
821 l_rec :=
822 per_pac_shd.convert_args
823 (p_allocated_checklist_id
824 ,p_checklist_id
825 ,p_person_id
826 ,p_assignment_id
827 ,p_checklist_name
828 ,p_description
829 ,p_checklist_category
830 ,p_object_version_number
831 ,p_attribute_category
832 ,p_attribute1
833 ,p_attribute2
834 ,p_attribute3
835 ,p_attribute4
836 ,p_attribute5
837 ,p_attribute6
838 ,p_attribute7
839 ,p_attribute8
840 ,p_attribute9
841 ,p_attribute10
842 ,p_attribute11
843 ,p_attribute12
844 ,p_attribute13
845 ,p_attribute14
846 ,p_attribute15
847 ,p_attribute16
848 ,p_attribute17
849 ,p_attribute18
850 ,p_attribute19
851 ,p_attribute20
852 ,p_information_category
853 ,p_information1
854 ,p_information2
855 ,p_information3
856 ,p_information4
857 ,p_information5
858 ,p_information6
859 ,p_information7
860 ,p_information8
861 ,p_information9
862 ,p_information10
863 ,p_information11
864 ,p_information12
865 ,p_information13
866 ,p_information14
867 ,p_information15
868 ,p_information16
869 ,p_information17
870 ,p_information18
871 ,p_information19
872 ,p_information20
873 );
874 --
875 -- Having converted the arguments into the
876 -- plsql record structure we call the corresponding record
877 -- business process.
878 --
879 per_pac_upd.upd
880 (p_effective_date
881 ,l_rec
882 );
883 p_object_version_number := l_rec.object_version_number;
884 --
885 hr_utility.set_location(' Leaving:'||l_proc, 10);
886 End upd;
887 --
888 end per_pac_upd;