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