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