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