[Home] [Help]
PACKAGE BODY: APPS.PER_ABC_UPD
Source
1 Package Body per_abc_upd as
2 /* $Header: peabcrhi.pkb 120.1 2005/09/28 05:04 snukala noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_abc_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_abc_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 per_abc_shd.g_api_dml := true; -- Set the api dml status
67 --
68 -- Update the per_absence_cases Row
69 --
70 update per_absence_cases
71 set
72 absence_case_id = p_rec.absence_case_id
73 ,name = p_rec.name
74 ,person_id = p_rec.person_id
75 ,incident_id = p_rec.incident_id
76 ,absence_category = p_rec.absence_category
77 ,ac_information_category = p_rec.ac_information_category
78 ,ac_information1 = p_rec.ac_information1
79 ,ac_information2 = p_rec.ac_information2
80 ,ac_information3 = p_rec.ac_information3
81 ,ac_information4 = p_rec.ac_information4
82 ,ac_information5 = p_rec.ac_information5
83 ,ac_information6 = p_rec.ac_information6
84 ,ac_information7 = p_rec.ac_information7
85 ,ac_information8 = p_rec.ac_information8
86 ,ac_information9 = p_rec.ac_information9
87 ,ac_information10 = p_rec.ac_information10
88 ,ac_information11 = p_rec.ac_information11
89 ,ac_information12 = p_rec.ac_information12
90 ,ac_information13 = p_rec.ac_information13
91 ,ac_information14 = p_rec.ac_information14
92 ,ac_information15 = p_rec.ac_information15
93 ,ac_information16 = p_rec.ac_information16
94 ,ac_information17 = p_rec.ac_information17
95 ,ac_information18 = p_rec.ac_information18
96 ,ac_information19 = p_rec.ac_information19
97 ,ac_information20 = p_rec.ac_information20
98 ,ac_information21 = p_rec.ac_information21
99 ,ac_information22 = p_rec.ac_information22
100 ,ac_information23 = p_rec.ac_information23
101 ,ac_information24 = p_rec.ac_information24
102 ,ac_information25 = p_rec.ac_information25
103 ,ac_information26 = p_rec.ac_information26
104 ,ac_information27 = p_rec.ac_information27
105 ,ac_information28 = p_rec.ac_information28
106 ,ac_information29 = p_rec.ac_information29
107 ,ac_information30 = p_rec.ac_information30
108 ,ac_attribute_category = p_rec.ac_attribute_category
109 ,attribute1 = p_rec.attribute1
110 ,attribute2 = p_rec.attribute2
111 ,attribute3 = p_rec.attribute3
112 ,attribute4 = p_rec.attribute4
113 ,attribute5 = p_rec.attribute5
114 ,attribute6 = p_rec.attribute6
115 ,attribute7 = p_rec.attribute7
116 ,attribute8 = p_rec.attribute8
117 ,attribute9 = p_rec.attribute9
118 ,attribute10 = p_rec.attribute10
119 ,attribute11 = p_rec.attribute11
120 ,attribute12 = p_rec.attribute12
121 ,attribute13 = p_rec.attribute13
122 ,attribute14 = p_rec.attribute14
123 ,attribute15 = p_rec.attribute15
124 ,attribute16 = p_rec.attribute16
125 ,attribute17 = p_rec.attribute17
126 ,attribute18 = p_rec.attribute18
127 ,attribute19 = p_rec.attribute19
128 ,attribute20 = p_rec.attribute20
129 ,attribute21 = p_rec.attribute21
130 ,attribute22 = p_rec.attribute22
131 ,attribute23 = p_rec.attribute23
132 ,attribute24 = p_rec.attribute24
133 ,attribute25 = p_rec.attribute25
134 ,attribute26 = p_rec.attribute26
135 ,attribute27 = p_rec.attribute27
136 ,attribute28 = p_rec.attribute28
137 ,attribute29 = p_rec.attribute29
138 ,attribute30 = p_rec.attribute30
139 ,object_version_number = p_rec.object_version_number
140 ,business_group_id = p_rec.business_group_id
141 ,comments = p_rec.comments
142 where absence_case_id = p_rec.absence_case_id;
143 --
144 per_abc_shd.g_api_dml := false; -- Unset the api dml status
145 --
146 hr_utility.set_location(' Leaving:'||l_proc, 10);
147 --
148 Exception
149 When hr_api.check_integrity_violated Then
150 -- A check constraint has been violated
151 per_abc_shd.g_api_dml := false; -- Unset the api dml status
152 per_abc_shd.constraint_error
153 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
154 When hr_api.parent_integrity_violated Then
155 -- Parent integrity has been violated
156 per_abc_shd.g_api_dml := false; -- Unset the api dml status
157 per_abc_shd.constraint_error
158 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
159 When hr_api.unique_integrity_violated Then
160 -- Unique integrity has been violated
161 per_abc_shd.g_api_dml := false; -- Unset the api dml status
162 per_abc_shd.constraint_error
163 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
164 When Others Then
165 per_abc_shd.g_api_dml := false; -- Unset the api dml status
166 Raise;
167 End update_dml;
168 --
169 -- ----------------------------------------------------------------------------
170 -- |------------------------------< pre_update >------------------------------|
171 -- ----------------------------------------------------------------------------
172 -- {Start Of Comments}
173 --
174 -- Description:
175 -- This private procedure contains any processing which is required before
176 -- the update dml.
177 --
178 -- Prerequisites:
179 -- This is an internal procedure which is called from the upd procedure.
180 --
181 -- In Parameters:
182 -- A Pl/Sql record structure.
183 --
184 -- Post Success:
185 -- Processing continues.
186 --
187 -- Post Failure:
188 -- If an error has occurred, an error message and exception wil be raised
189 -- but not handled.
190 --
191 -- Developer Implementation Notes:
192 -- Any pre-processing required before the update dml is issued should be
193 -- coded within this procedure. It is important to note that any 3rd party
194 -- maintenance should be reviewed before placing in this procedure.
195 --
196 -- Access Status:
197 -- Internal Row Handler Use Only.
198 --
199 -- {End Of Comments}
200 -- ----------------------------------------------------------------------------
201 Procedure pre_update
202 (p_rec in per_abc_shd.g_rec_type
203 ) is
204 --
205 l_proc varchar2(72) := g_package||'pre_update';
206 --
207 Begin
208 hr_utility.set_location('Entering:'||l_proc, 5);
209 --
210 hr_utility.set_location(' Leaving:'||l_proc, 10);
211 End pre_update;
212 --
213 -- ----------------------------------------------------------------------------
214 -- |-----------------------------< post_update >------------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 -- This private procedure contains any processing which is required after
220 -- the update dml.
221 --
222 -- Prerequisites:
223 -- This is an internal procedure which is called from the upd procedure.
224 --
225 -- In Parameters:
226 -- A Pl/Sql record structure.
227 --
228 -- Post Success:
229 -- Processing continues.
230 --
231 -- Post Failure:
232 -- If an error has occurred, an error message and exception will be raised
233 -- but not handled.
234 --
235 -- Developer Implementation Notes:
236 -- Any post-processing required after the update dml is issued should be
237 -- coded within this procedure. It is important to note that any 3rd party
238 -- maintenance should be reviewed before placing in this procedure.
239 --
240 -- Access Status:
241 -- Internal Row Handler Use Only.
242 --
243 -- {End Of Comments}
244 -- ----------------------------------------------------------------------------
245 Procedure post_update
246 (p_rec in per_abc_shd.g_rec_type
247 ) is
248 --
249 l_proc varchar2(72) := g_package||'post_update';
250 --
251 Begin
252 hr_utility.set_location('Entering:'||l_proc, 5);
253 begin
254 --
255 per_abc_rku.after_update
256 (p_absence_case_id
257 => p_rec.absence_case_id
258 ,p_name
259 => p_rec.name
260 ,p_person_id
261 => p_rec.person_id
262 ,p_incident_id
263 => p_rec.incident_id
264 ,p_absence_category
265 => p_rec.absence_category
266 ,p_ac_information_category
267 => p_rec.ac_information_category
268 ,p_ac_information1
269 => p_rec.ac_information1
270 ,p_ac_information2
271 => p_rec.ac_information2
272 ,p_ac_information3
273 => p_rec.ac_information3
274 ,p_ac_information4
275 => p_rec.ac_information4
276 ,p_ac_information5
277 => p_rec.ac_information5
278 ,p_ac_information6
279 => p_rec.ac_information6
280 ,p_ac_information7
281 => p_rec.ac_information7
282 ,p_ac_information8
283 => p_rec.ac_information8
284 ,p_ac_information9
285 => p_rec.ac_information9
286 ,p_ac_information10
287 => p_rec.ac_information10
288 ,p_ac_information11
289 => p_rec.ac_information11
290 ,p_ac_information12
291 => p_rec.ac_information12
292 ,p_ac_information13
293 => p_rec.ac_information13
294 ,p_ac_information14
295 => p_rec.ac_information14
296 ,p_ac_information15
297 => p_rec.ac_information15
298 ,p_ac_information16
299 => p_rec.ac_information16
300 ,p_ac_information17
301 => p_rec.ac_information17
302 ,p_ac_information18
303 => p_rec.ac_information18
304 ,p_ac_information19
305 => p_rec.ac_information19
306 ,p_ac_information20
307 => p_rec.ac_information20
308 ,p_ac_information21
309 => p_rec.ac_information21
310 ,p_ac_information22
311 => p_rec.ac_information22
312 ,p_ac_information23
313 => p_rec.ac_information23
314 ,p_ac_information24
315 => p_rec.ac_information24
316 ,p_ac_information25
317 => p_rec.ac_information25
318 ,p_ac_information26
319 => p_rec.ac_information26
320 ,p_ac_information27
321 => p_rec.ac_information27
322 ,p_ac_information28
323 => p_rec.ac_information28
324 ,p_ac_information29
325 => p_rec.ac_information29
326 ,p_ac_information30
327 => p_rec.ac_information30
328 ,p_ac_attribute_category
329 => p_rec.ac_attribute_category
330 ,p_attribute1
331 => p_rec.attribute1
332 ,p_attribute2
333 => p_rec.attribute2
334 ,p_attribute3
335 => p_rec.attribute3
336 ,p_attribute4
337 => p_rec.attribute4
338 ,p_attribute5
339 => p_rec.attribute5
340 ,p_attribute6
341 => p_rec.attribute6
342 ,p_attribute7
343 => p_rec.attribute7
344 ,p_attribute8
345 => p_rec.attribute8
346 ,p_attribute9
347 => p_rec.attribute9
348 ,p_attribute10
349 => p_rec.attribute10
350 ,p_attribute11
351 => p_rec.attribute11
352 ,p_attribute12
353 => p_rec.attribute12
354 ,p_attribute13
355 => p_rec.attribute13
356 ,p_attribute14
357 => p_rec.attribute14
358 ,p_attribute15
359 => p_rec.attribute15
360 ,p_attribute16
361 => p_rec.attribute16
362 ,p_attribute17
363 => p_rec.attribute17
364 ,p_attribute18
365 => p_rec.attribute18
366 ,p_attribute19
367 => p_rec.attribute19
368 ,p_attribute20
369 => p_rec.attribute20
370 ,p_attribute21
371 => p_rec.attribute21
372 ,p_attribute22
373 => p_rec.attribute22
374 ,p_attribute23
375 => p_rec.attribute23
376 ,p_attribute24
377 => p_rec.attribute24
378 ,p_attribute25
379 => p_rec.attribute25
380 ,p_attribute26
381 => p_rec.attribute26
382 ,p_attribute27
383 => p_rec.attribute27
384 ,p_attribute28
385 => p_rec.attribute28
386 ,p_attribute29
387 => p_rec.attribute29
388 ,p_attribute30
389 => p_rec.attribute30
390 ,p_object_version_number
391 => p_rec.object_version_number
392 ,p_business_group_id
393 => p_rec.business_group_id
394 ,p_comments
395 => p_rec.comments
396 ,p_name_o
397 => per_abc_shd.g_old_rec.name
398 ,p_person_id_o
399 => per_abc_shd.g_old_rec.person_id
400 ,p_incident_id_o
401 => per_abc_shd.g_old_rec.incident_id
402 ,p_absence_category_o
403 => per_abc_shd.g_old_rec.absence_category
404 ,p_ac_information_category_o
405 => per_abc_shd.g_old_rec.ac_information_category
406 ,p_ac_information1_o
407 => per_abc_shd.g_old_rec.ac_information1
408 ,p_ac_information2_o
409 => per_abc_shd.g_old_rec.ac_information2
410 ,p_ac_information3_o
411 => per_abc_shd.g_old_rec.ac_information3
412 ,p_ac_information4_o
413 => per_abc_shd.g_old_rec.ac_information4
414 ,p_ac_information5_o
415 => per_abc_shd.g_old_rec.ac_information5
416 ,p_ac_information6_o
417 => per_abc_shd.g_old_rec.ac_information6
418 ,p_ac_information7_o
419 => per_abc_shd.g_old_rec.ac_information7
420 ,p_ac_information8_o
421 => per_abc_shd.g_old_rec.ac_information8
422 ,p_ac_information9_o
423 => per_abc_shd.g_old_rec.ac_information9
424 ,p_ac_information10_o
425 => per_abc_shd.g_old_rec.ac_information10
426 ,p_ac_information11_o
427 => per_abc_shd.g_old_rec.ac_information11
428 ,p_ac_information12_o
429 => per_abc_shd.g_old_rec.ac_information12
430 ,p_ac_information13_o
431 => per_abc_shd.g_old_rec.ac_information13
432 ,p_ac_information14_o
433 => per_abc_shd.g_old_rec.ac_information14
434 ,p_ac_information15_o
435 => per_abc_shd.g_old_rec.ac_information15
436 ,p_ac_information16_o
437 => per_abc_shd.g_old_rec.ac_information16
438 ,p_ac_information17_o
439 => per_abc_shd.g_old_rec.ac_information17
440 ,p_ac_information18_o
441 => per_abc_shd.g_old_rec.ac_information18
442 ,p_ac_information19_o
443 => per_abc_shd.g_old_rec.ac_information19
444 ,p_ac_information20_o
445 => per_abc_shd.g_old_rec.ac_information20
446 ,p_ac_information21_o
447 => per_abc_shd.g_old_rec.ac_information21
448 ,p_ac_information22_o
449 => per_abc_shd.g_old_rec.ac_information22
450 ,p_ac_information23_o
451 => per_abc_shd.g_old_rec.ac_information23
452 ,p_ac_information24_o
453 => per_abc_shd.g_old_rec.ac_information24
454 ,p_ac_information25_o
455 => per_abc_shd.g_old_rec.ac_information25
456 ,p_ac_information26_o
457 => per_abc_shd.g_old_rec.ac_information26
458 ,p_ac_information27_o
459 => per_abc_shd.g_old_rec.ac_information27
460 ,p_ac_information28_o
461 => per_abc_shd.g_old_rec.ac_information28
462 ,p_ac_information29_o
463 => per_abc_shd.g_old_rec.ac_information29
464 ,p_ac_information30_o
465 => per_abc_shd.g_old_rec.ac_information30
466 ,p_ac_attribute_category_o
467 => per_abc_shd.g_old_rec.ac_attribute_category
468 ,p_attribute1_o
469 => per_abc_shd.g_old_rec.attribute1
470 ,p_attribute2_o
471 => per_abc_shd.g_old_rec.attribute2
472 ,p_attribute3_o
473 => per_abc_shd.g_old_rec.attribute3
474 ,p_attribute4_o
475 => per_abc_shd.g_old_rec.attribute4
476 ,p_attribute5_o
477 => per_abc_shd.g_old_rec.attribute5
478 ,p_attribute6_o
479 => per_abc_shd.g_old_rec.attribute6
480 ,p_attribute7_o
481 => per_abc_shd.g_old_rec.attribute7
482 ,p_attribute8_o
483 => per_abc_shd.g_old_rec.attribute8
484 ,p_attribute9_o
485 => per_abc_shd.g_old_rec.attribute9
486 ,p_attribute10_o
487 => per_abc_shd.g_old_rec.attribute10
488 ,p_attribute11_o
489 => per_abc_shd.g_old_rec.attribute11
490 ,p_attribute12_o
491 => per_abc_shd.g_old_rec.attribute12
492 ,p_attribute13_o
493 => per_abc_shd.g_old_rec.attribute13
494 ,p_attribute14_o
495 => per_abc_shd.g_old_rec.attribute14
496 ,p_attribute15_o
497 => per_abc_shd.g_old_rec.attribute15
498 ,p_attribute16_o
499 => per_abc_shd.g_old_rec.attribute16
500 ,p_attribute17_o
501 => per_abc_shd.g_old_rec.attribute17
502 ,p_attribute18_o
503 => per_abc_shd.g_old_rec.attribute18
504 ,p_attribute19_o
505 => per_abc_shd.g_old_rec.attribute19
506 ,p_attribute20_o
507 => per_abc_shd.g_old_rec.attribute20
508 ,p_attribute21_o
509 => per_abc_shd.g_old_rec.attribute21
510 ,p_attribute22_o
511 => per_abc_shd.g_old_rec.attribute22
512 ,p_attribute23_o
513 => per_abc_shd.g_old_rec.attribute23
514 ,p_attribute24_o
515 => per_abc_shd.g_old_rec.attribute24
516 ,p_attribute25_o
517 => per_abc_shd.g_old_rec.attribute25
518 ,p_attribute26_o
519 => per_abc_shd.g_old_rec.attribute26
520 ,p_attribute27_o
521 => per_abc_shd.g_old_rec.attribute27
522 ,p_attribute28_o
523 => per_abc_shd.g_old_rec.attribute28
524 ,p_attribute29_o
525 => per_abc_shd.g_old_rec.attribute29
526 ,p_attribute30_o
527 => per_abc_shd.g_old_rec.attribute30
528 ,p_object_version_number_o
529 => per_abc_shd.g_old_rec.object_version_number
530 ,p_business_group_id_o
531 => per_abc_shd.g_old_rec.business_group_id
532 ,p_comments_o
533 => per_abc_shd.g_old_rec.comments
534 );
535 --
536 exception
537 --
538 when hr_api.cannot_find_prog_unit then
539 --
540 hr_api.cannot_find_prog_unit_error
541 (p_module_name => 'PER_ABSENCE_CASES'
542 ,p_hook_type => 'AU');
543 --
544 end;
545 --
546 hr_utility.set_location(' Leaving:'||l_proc, 10);
547 End post_update;
548 --
549 -- ----------------------------------------------------------------------------
550 -- |-----------------------------< convert_defs >-----------------------------|
551 -- ----------------------------------------------------------------------------
552 -- {Start Of Comments}
553 --
554 -- Description:
555 -- The Convert_Defs procedure has one very important function:
556 -- It must return the record structure for the row with all system defaulted
557 -- values converted into its corresponding parameter value for update. When
558 -- we attempt to update a row through the Upd process , certain
559 -- parameters can be defaulted which enables flexibility in the calling of
560 -- the upd process (e.g. only attributes which need to be updated need to be
561 -- specified). For the upd process to determine which attributes
562 -- have NOT been specified we need to check if the parameter has a reserved
563 -- system default value. Therefore, for all parameters which have a
564 -- corresponding reserved system default mechanism specified we need to
565 -- check if a system default is being used. If a system default is being
566 -- used then we convert the defaulted value into its corresponding attribute
567 -- value held in the g_old_rec data structure.
568 --
569 -- Prerequisites:
570 -- This private function can only be called from the upd process.
571 --
572 -- In Parameters:
573 -- A Pl/Sql record structure.
574 --
575 -- Post Success:
576 -- The record structure will be returned with all system defaulted parameter
577 -- values converted into its current row attribute value.
578 --
579 -- Post Failure:
580 -- No direct error handling is required within this function. Any possible
581 -- errors within this procedure will be a PL/SQL value error due to
582 -- conversion of datatypes or data lengths.
583 --
584 -- Developer Implementation Notes:
585 -- None.
586 --
587 -- Access Status:
588 -- Internal Row Handler Use Only.
589 --
590 -- {End Of Comments}
591 -- ----------------------------------------------------------------------------
592 Procedure convert_defs
593 (p_rec in out nocopy per_abc_shd.g_rec_type
594 ) is
595 --
596 Begin
597 --
598 -- We must now examine each argument value in the
599 -- p_rec plsql record structure
600 -- to see if a system default is being used. If a system default
601 -- is being used then we must set to the 'current' argument value.
602 --
603 If (p_rec.name = hr_api.g_varchar2) then
604 p_rec.name :=
605 per_abc_shd.g_old_rec.name;
606 End If;
607 If (p_rec.person_id = hr_api.g_number) then
608 p_rec.person_id :=
609 per_abc_shd.g_old_rec.person_id;
610 End If;
611 If (p_rec.incident_id = hr_api.g_varchar2) then
612 p_rec.incident_id :=
613 per_abc_shd.g_old_rec.incident_id;
614 End If;
615 If (p_rec.absence_category = hr_api.g_varchar2) then
616 p_rec.absence_category :=
617 per_abc_shd.g_old_rec.absence_category;
618 End If;
619 If (p_rec.ac_information_category = hr_api.g_varchar2) then
620 p_rec.ac_information_category :=
621 per_abc_shd.g_old_rec.ac_information_category;
622 End If;
623 If (p_rec.ac_information1 = hr_api.g_varchar2) then
624 p_rec.ac_information1 :=
625 per_abc_shd.g_old_rec.ac_information1;
626 End If;
627 If (p_rec.ac_information2 = hr_api.g_varchar2) then
628 p_rec.ac_information2 :=
629 per_abc_shd.g_old_rec.ac_information2;
630 End If;
631 If (p_rec.ac_information3 = hr_api.g_varchar2) then
632 p_rec.ac_information3 :=
633 per_abc_shd.g_old_rec.ac_information3;
634 End If;
635 If (p_rec.ac_information4 = hr_api.g_varchar2) then
636 p_rec.ac_information4 :=
637 per_abc_shd.g_old_rec.ac_information4;
638 End If;
639 If (p_rec.ac_information5 = hr_api.g_varchar2) then
640 p_rec.ac_information5 :=
641 per_abc_shd.g_old_rec.ac_information5;
642 End If;
643 If (p_rec.ac_information6 = hr_api.g_varchar2) then
644 p_rec.ac_information6 :=
645 per_abc_shd.g_old_rec.ac_information6;
646 End If;
647 If (p_rec.ac_information7 = hr_api.g_varchar2) then
648 p_rec.ac_information7 :=
649 per_abc_shd.g_old_rec.ac_information7;
650 End If;
651 If (p_rec.ac_information8 = hr_api.g_varchar2) then
652 p_rec.ac_information8 :=
653 per_abc_shd.g_old_rec.ac_information8;
654 End If;
655 If (p_rec.ac_information9 = hr_api.g_varchar2) then
656 p_rec.ac_information9 :=
657 per_abc_shd.g_old_rec.ac_information9;
658 End If;
659 If (p_rec.ac_information10 = hr_api.g_varchar2) then
660 p_rec.ac_information10 :=
661 per_abc_shd.g_old_rec.ac_information10;
662 End If;
663 If (p_rec.ac_information11 = hr_api.g_varchar2) then
664 p_rec.ac_information11 :=
665 per_abc_shd.g_old_rec.ac_information11;
666 End If;
667 If (p_rec.ac_information12 = hr_api.g_varchar2) then
668 p_rec.ac_information12 :=
669 per_abc_shd.g_old_rec.ac_information12;
670 End If;
671 If (p_rec.ac_information13 = hr_api.g_varchar2) then
672 p_rec.ac_information13 :=
673 per_abc_shd.g_old_rec.ac_information13;
674 End If;
675 If (p_rec.ac_information14 = hr_api.g_varchar2) then
676 p_rec.ac_information14 :=
677 per_abc_shd.g_old_rec.ac_information14;
678 End If;
679 If (p_rec.ac_information15 = hr_api.g_varchar2) then
680 p_rec.ac_information15 :=
681 per_abc_shd.g_old_rec.ac_information15;
682 End If;
683 If (p_rec.ac_information16 = hr_api.g_varchar2) then
684 p_rec.ac_information16 :=
685 per_abc_shd.g_old_rec.ac_information16;
686 End If;
687 If (p_rec.ac_information17 = hr_api.g_varchar2) then
688 p_rec.ac_information17 :=
689 per_abc_shd.g_old_rec.ac_information17;
690 End If;
691 If (p_rec.ac_information18 = hr_api.g_varchar2) then
692 p_rec.ac_information18 :=
693 per_abc_shd.g_old_rec.ac_information18;
694 End If;
695 If (p_rec.ac_information19 = hr_api.g_varchar2) then
696 p_rec.ac_information19 :=
697 per_abc_shd.g_old_rec.ac_information19;
698 End If;
699 If (p_rec.ac_information20 = hr_api.g_varchar2) then
700 p_rec.ac_information20 :=
701 per_abc_shd.g_old_rec.ac_information20;
702 End If;
703 If (p_rec.ac_information21 = hr_api.g_varchar2) then
704 p_rec.ac_information21 :=
705 per_abc_shd.g_old_rec.ac_information21;
706 End If;
707 If (p_rec.ac_information22 = hr_api.g_varchar2) then
708 p_rec.ac_information22 :=
709 per_abc_shd.g_old_rec.ac_information22;
710 End If;
711 If (p_rec.ac_information23 = hr_api.g_varchar2) then
712 p_rec.ac_information23 :=
713 per_abc_shd.g_old_rec.ac_information23;
714 End If;
715 If (p_rec.ac_information24 = hr_api.g_varchar2) then
716 p_rec.ac_information24 :=
717 per_abc_shd.g_old_rec.ac_information24;
718 End If;
719 If (p_rec.ac_information25 = hr_api.g_varchar2) then
720 p_rec.ac_information25 :=
721 per_abc_shd.g_old_rec.ac_information25;
722 End If;
723 If (p_rec.ac_information26 = hr_api.g_varchar2) then
724 p_rec.ac_information26 :=
725 per_abc_shd.g_old_rec.ac_information26;
726 End If;
727 If (p_rec.ac_information27 = hr_api.g_varchar2) then
728 p_rec.ac_information27 :=
729 per_abc_shd.g_old_rec.ac_information27;
730 End If;
731 If (p_rec.ac_information28 = hr_api.g_varchar2) then
732 p_rec.ac_information28 :=
733 per_abc_shd.g_old_rec.ac_information28;
734 End If;
735 If (p_rec.ac_information29 = hr_api.g_varchar2) then
736 p_rec.ac_information29 :=
737 per_abc_shd.g_old_rec.ac_information29;
738 End If;
739 If (p_rec.ac_information30 = hr_api.g_varchar2) then
740 p_rec.ac_information30 :=
741 per_abc_shd.g_old_rec.ac_information30;
742 End If;
743 If (p_rec.ac_attribute_category = hr_api.g_varchar2) then
744 p_rec.ac_attribute_category :=
745 per_abc_shd.g_old_rec.ac_attribute_category;
746 End If;
747 If (p_rec.attribute1 = hr_api.g_varchar2) then
748 p_rec.attribute1 :=
749 per_abc_shd.g_old_rec.attribute1;
750 End If;
751 If (p_rec.attribute2 = hr_api.g_varchar2) then
752 p_rec.attribute2 :=
753 per_abc_shd.g_old_rec.attribute2;
754 End If;
755 If (p_rec.attribute3 = hr_api.g_varchar2) then
756 p_rec.attribute3 :=
757 per_abc_shd.g_old_rec.attribute3;
758 End If;
759 If (p_rec.attribute4 = hr_api.g_varchar2) then
760 p_rec.attribute4 :=
761 per_abc_shd.g_old_rec.attribute4;
762 End If;
763 If (p_rec.attribute5 = hr_api.g_varchar2) then
764 p_rec.attribute5 :=
765 per_abc_shd.g_old_rec.attribute5;
766 End If;
767 If (p_rec.attribute6 = hr_api.g_varchar2) then
768 p_rec.attribute6 :=
769 per_abc_shd.g_old_rec.attribute6;
770 End If;
771 If (p_rec.attribute7 = hr_api.g_varchar2) then
772 p_rec.attribute7 :=
773 per_abc_shd.g_old_rec.attribute7;
774 End If;
775 If (p_rec.attribute8 = hr_api.g_varchar2) then
776 p_rec.attribute8 :=
777 per_abc_shd.g_old_rec.attribute8;
778 End If;
779 If (p_rec.attribute9 = hr_api.g_varchar2) then
780 p_rec.attribute9 :=
781 per_abc_shd.g_old_rec.attribute9;
782 End If;
783 If (p_rec.attribute10 = hr_api.g_varchar2) then
784 p_rec.attribute10 :=
785 per_abc_shd.g_old_rec.attribute10;
786 End If;
787 If (p_rec.attribute11 = hr_api.g_varchar2) then
788 p_rec.attribute11 :=
789 per_abc_shd.g_old_rec.attribute11;
790 End If;
791 If (p_rec.attribute12 = hr_api.g_varchar2) then
792 p_rec.attribute12 :=
793 per_abc_shd.g_old_rec.attribute12;
794 End If;
795 If (p_rec.attribute13 = hr_api.g_varchar2) then
796 p_rec.attribute13 :=
797 per_abc_shd.g_old_rec.attribute13;
798 End If;
799 If (p_rec.attribute14 = hr_api.g_varchar2) then
800 p_rec.attribute14 :=
801 per_abc_shd.g_old_rec.attribute14;
802 End If;
803 If (p_rec.attribute15 = hr_api.g_varchar2) then
804 p_rec.attribute15 :=
805 per_abc_shd.g_old_rec.attribute15;
806 End If;
807 If (p_rec.attribute16 = hr_api.g_varchar2) then
808 p_rec.attribute16 :=
809 per_abc_shd.g_old_rec.attribute16;
810 End If;
811 If (p_rec.attribute17 = hr_api.g_varchar2) then
812 p_rec.attribute17 :=
813 per_abc_shd.g_old_rec.attribute17;
814 End If;
815 If (p_rec.attribute18 = hr_api.g_varchar2) then
816 p_rec.attribute18 :=
817 per_abc_shd.g_old_rec.attribute18;
818 End If;
819 If (p_rec.attribute19 = hr_api.g_varchar2) then
820 p_rec.attribute19 :=
821 per_abc_shd.g_old_rec.attribute19;
822 End If;
823 If (p_rec.attribute20 = hr_api.g_varchar2) then
824 p_rec.attribute20 :=
825 per_abc_shd.g_old_rec.attribute20;
826 End If;
827 If (p_rec.attribute21 = hr_api.g_varchar2) then
828 p_rec.attribute21 :=
829 per_abc_shd.g_old_rec.attribute21;
830 End If;
831 If (p_rec.attribute22 = hr_api.g_varchar2) then
832 p_rec.attribute22 :=
833 per_abc_shd.g_old_rec.attribute22;
834 End If;
835 If (p_rec.attribute23 = hr_api.g_varchar2) then
836 p_rec.attribute23 :=
837 per_abc_shd.g_old_rec.attribute23;
838 End If;
839 If (p_rec.attribute24 = hr_api.g_varchar2) then
840 p_rec.attribute24 :=
841 per_abc_shd.g_old_rec.attribute24;
842 End If;
843 If (p_rec.attribute25 = hr_api.g_varchar2) then
844 p_rec.attribute25 :=
845 per_abc_shd.g_old_rec.attribute25;
846 End If;
847 If (p_rec.attribute26 = hr_api.g_varchar2) then
848 p_rec.attribute26 :=
849 per_abc_shd.g_old_rec.attribute26;
850 End If;
851 If (p_rec.attribute27 = hr_api.g_varchar2) then
852 p_rec.attribute27 :=
853 per_abc_shd.g_old_rec.attribute27;
854 End If;
855 If (p_rec.attribute28 = hr_api.g_varchar2) then
856 p_rec.attribute28 :=
857 per_abc_shd.g_old_rec.attribute28;
858 End If;
859 If (p_rec.attribute29 = hr_api.g_varchar2) then
860 p_rec.attribute29 :=
861 per_abc_shd.g_old_rec.attribute29;
862 End If;
863 If (p_rec.attribute30 = hr_api.g_varchar2) then
864 p_rec.attribute30 :=
865 per_abc_shd.g_old_rec.attribute30;
866 End If;
867 If (p_rec.business_group_id = hr_api.g_number) then
868 p_rec.business_group_id :=
869 per_abc_shd.g_old_rec.business_group_id;
870 End If;
871 If (p_rec.comments = hr_api.g_varchar2) then
872 p_rec.comments :=
873 per_abc_shd.g_old_rec.comments;
874 End If;
875 --
876 End convert_defs;
877 --
878 -- ----------------------------------------------------------------------------
879 -- |---------------------------------< upd >----------------------------------|
880 -- ----------------------------------------------------------------------------
881 Procedure upd
882 (p_rec in out nocopy per_abc_shd.g_rec_type
883 ) is
884 --
885 l_proc varchar2(72) := g_package||'upd';
886 --
887 Begin
888 hr_utility.set_location('Entering:'||l_proc, 5);
889 --
890 -- We must lock the row which we need to update.
891 --
892 per_abc_shd.lck
893 (p_rec.absence_case_id
894 ,p_rec.object_version_number
895 );
896 --
897 -- 1. During an update system defaults are used to determine if
898 -- arguments have been defaulted or not. We must therefore
899 -- derive the full record structure values to be updated.
900 --
901 -- 2. Call the supporting update validate operations.
902 --
903 convert_defs(p_rec);
904 per_abc_bus.update_validate
905 (p_rec
906 );
907 --
908 -- Call to raise any errors on multi-message list
909 hr_multi_message.end_validation_set;
910 --
911 -- Call the supporting pre-update operation
912 --
913 per_abc_upd.pre_update(p_rec);
914 --
915 -- Update the row.
916 --
917 per_abc_upd.update_dml(p_rec);
918 --
919 -- Call the supporting post-update operation
920 --
921 per_abc_upd.post_update
922 (p_rec
923 );
924 --
925 -- Call to raise any errors on multi-message list
926 hr_multi_message.end_validation_set;
927 End upd;
928 --
929 -- ----------------------------------------------------------------------------
930 -- |---------------------------------< upd >----------------------------------|
931 -- ----------------------------------------------------------------------------
932 Procedure upd
933 (p_absence_case_id in number
934 ,p_object_version_number in out nocopy number
935 ,p_name in varchar2 default hr_api.g_varchar2
936 ,p_person_id in number default hr_api.g_number
937 ,p_business_group_id in number default hr_api.g_number
938 ,p_incident_id in varchar2 default hr_api.g_varchar2
939 ,p_absence_category in varchar2 default hr_api.g_varchar2
940 ,p_ac_information_category in varchar2 default hr_api.g_varchar2
941 ,p_ac_information1 in varchar2 default hr_api.g_varchar2
942 ,p_ac_information2 in varchar2 default hr_api.g_varchar2
943 ,p_ac_information3 in varchar2 default hr_api.g_varchar2
944 ,p_ac_information4 in varchar2 default hr_api.g_varchar2
945 ,p_ac_information5 in varchar2 default hr_api.g_varchar2
946 ,p_ac_information6 in varchar2 default hr_api.g_varchar2
947 ,p_ac_information7 in varchar2 default hr_api.g_varchar2
948 ,p_ac_information8 in varchar2 default hr_api.g_varchar2
949 ,p_ac_information9 in varchar2 default hr_api.g_varchar2
950 ,p_ac_information10 in varchar2 default hr_api.g_varchar2
951 ,p_ac_information11 in varchar2 default hr_api.g_varchar2
952 ,p_ac_information12 in varchar2 default hr_api.g_varchar2
953 ,p_ac_information13 in varchar2 default hr_api.g_varchar2
954 ,p_ac_information14 in varchar2 default hr_api.g_varchar2
955 ,p_ac_information15 in varchar2 default hr_api.g_varchar2
956 ,p_ac_information16 in varchar2 default hr_api.g_varchar2
957 ,p_ac_information17 in varchar2 default hr_api.g_varchar2
958 ,p_ac_information18 in varchar2 default hr_api.g_varchar2
959 ,p_ac_information19 in varchar2 default hr_api.g_varchar2
960 ,p_ac_information20 in varchar2 default hr_api.g_varchar2
961 ,p_ac_information21 in varchar2 default hr_api.g_varchar2
962 ,p_ac_information22 in varchar2 default hr_api.g_varchar2
963 ,p_ac_information23 in varchar2 default hr_api.g_varchar2
964 ,p_ac_information24 in varchar2 default hr_api.g_varchar2
965 ,p_ac_information25 in varchar2 default hr_api.g_varchar2
966 ,p_ac_information26 in varchar2 default hr_api.g_varchar2
967 ,p_ac_information27 in varchar2 default hr_api.g_varchar2
968 ,p_ac_information28 in varchar2 default hr_api.g_varchar2
969 ,p_ac_information29 in varchar2 default hr_api.g_varchar2
970 ,p_ac_information30 in varchar2 default hr_api.g_varchar2
971 ,p_ac_attribute_category in varchar2 default hr_api.g_varchar2
972 ,p_attribute1 in varchar2 default hr_api.g_varchar2
973 ,p_attribute2 in varchar2 default hr_api.g_varchar2
974 ,p_attribute3 in varchar2 default hr_api.g_varchar2
975 ,p_attribute4 in varchar2 default hr_api.g_varchar2
976 ,p_attribute5 in varchar2 default hr_api.g_varchar2
977 ,p_attribute6 in varchar2 default hr_api.g_varchar2
978 ,p_attribute7 in varchar2 default hr_api.g_varchar2
979 ,p_attribute8 in varchar2 default hr_api.g_varchar2
980 ,p_attribute9 in varchar2 default hr_api.g_varchar2
981 ,p_attribute10 in varchar2 default hr_api.g_varchar2
982 ,p_attribute11 in varchar2 default hr_api.g_varchar2
983 ,p_attribute12 in varchar2 default hr_api.g_varchar2
984 ,p_attribute13 in varchar2 default hr_api.g_varchar2
985 ,p_attribute14 in varchar2 default hr_api.g_varchar2
986 ,p_attribute15 in varchar2 default hr_api.g_varchar2
987 ,p_attribute16 in varchar2 default hr_api.g_varchar2
988 ,p_attribute17 in varchar2 default hr_api.g_varchar2
989 ,p_attribute18 in varchar2 default hr_api.g_varchar2
990 ,p_attribute19 in varchar2 default hr_api.g_varchar2
991 ,p_attribute20 in varchar2 default hr_api.g_varchar2
992 ,p_attribute21 in varchar2 default hr_api.g_varchar2
993 ,p_attribute22 in varchar2 default hr_api.g_varchar2
994 ,p_attribute23 in varchar2 default hr_api.g_varchar2
995 ,p_attribute24 in varchar2 default hr_api.g_varchar2
996 ,p_attribute25 in varchar2 default hr_api.g_varchar2
997 ,p_attribute26 in varchar2 default hr_api.g_varchar2
998 ,p_attribute27 in varchar2 default hr_api.g_varchar2
999 ,p_attribute28 in varchar2 default hr_api.g_varchar2
1000 ,p_attribute29 in varchar2 default hr_api.g_varchar2
1001 ,p_attribute30 in varchar2 default hr_api.g_varchar2
1002 ,p_comments in varchar2 default hr_api.g_varchar2
1003 ) is
1004 --
1005 l_rec per_abc_shd.g_rec_type;
1006 l_proc varchar2(72) := g_package||'upd';
1007 --
1008 Begin
1009 hr_utility.set_location('Entering:'||l_proc, 5);
1010 --
1011 -- Call conversion function to turn arguments into the
1012 -- l_rec structure.
1013 --
1014 l_rec :=
1015 per_abc_shd.convert_args
1016 (p_absence_case_id
1017 ,p_name
1018 ,p_person_id
1019 ,p_incident_id
1020 ,p_absence_category
1021 ,p_ac_information_category
1022 ,p_ac_information1
1023 ,p_ac_information2
1024 ,p_ac_information3
1025 ,p_ac_information4
1026 ,p_ac_information5
1027 ,p_ac_information6
1028 ,p_ac_information7
1029 ,p_ac_information8
1030 ,p_ac_information9
1031 ,p_ac_information10
1032 ,p_ac_information11
1033 ,p_ac_information12
1034 ,p_ac_information13
1035 ,p_ac_information14
1036 ,p_ac_information15
1037 ,p_ac_information16
1038 ,p_ac_information17
1039 ,p_ac_information18
1040 ,p_ac_information19
1041 ,p_ac_information20
1042 ,p_ac_information21
1043 ,p_ac_information22
1044 ,p_ac_information23
1045 ,p_ac_information24
1046 ,p_ac_information25
1047 ,p_ac_information26
1048 ,p_ac_information27
1049 ,p_ac_information28
1050 ,p_ac_information29
1051 ,p_ac_information30
1052 ,p_ac_attribute_category
1053 ,p_attribute1
1054 ,p_attribute2
1055 ,p_attribute3
1056 ,p_attribute4
1057 ,p_attribute5
1058 ,p_attribute6
1059 ,p_attribute7
1060 ,p_attribute8
1061 ,p_attribute9
1062 ,p_attribute10
1063 ,p_attribute11
1064 ,p_attribute12
1065 ,p_attribute13
1066 ,p_attribute14
1067 ,p_attribute15
1068 ,p_attribute16
1069 ,p_attribute17
1070 ,p_attribute18
1071 ,p_attribute19
1072 ,p_attribute20
1073 ,p_attribute21
1074 ,p_attribute22
1075 ,p_attribute23
1076 ,p_attribute24
1077 ,p_attribute25
1078 ,p_attribute26
1079 ,p_attribute27
1080 ,p_attribute28
1081 ,p_attribute29
1082 ,p_attribute30
1083 ,p_object_version_number
1084 ,p_business_group_id
1085 ,p_comments
1086 );
1087 --
1088 -- Having converted the arguments into the
1089 -- plsql record structure we call the corresponding record
1090 -- business process.
1091 --
1092 per_abc_upd.upd
1093 (l_rec
1094 );
1095 p_object_version_number := l_rec.object_version_number;
1096 --
1097 hr_utility.set_location(' Leaving:'||l_proc, 10);
1098 End upd;
1099 --
1100 end per_abc_upd;