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