[Home] [Help]
PACKAGE BODY: APPS.PSP_ERA_UPD
Source
1 Package Body psp_era_upd as
2 /* $Header: PSPEARHB.pls 120.2 2006/03/26 01:08 dpaudel noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' psp_era_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 psp_era_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 psp_eff_report_approvals Row
69 --
70 update psp_eff_report_approvals
71 set
72 effort_report_approval_id = p_rec.effort_report_approval_id
73 ,effort_report_detail_id = p_rec.effort_report_detail_id
74 ,wf_role_name = p_rec.wf_role_name
75 ,wf_orig_system_id = p_rec.wf_orig_system_id
76 ,wf_orig_system = p_rec.wf_orig_system
77 ,approver_order_num = p_rec.approver_order_num
78 ,approval_status = p_rec.approval_status
79 ,response_date = p_rec.response_date
80 ,actual_cost_share = p_rec.actual_cost_share
81 ,overwritten_effort_percent = p_rec.overwritten_effort_percent
82 ,wf_item_key = p_rec.wf_item_key
83 ,comments = p_rec.comments
84 ,pera_information_category = p_rec.pera_information_category
85 ,pera_information1 = p_rec.pera_information1
86 ,pera_information2 = p_rec.pera_information2
87 ,pera_information3 = p_rec.pera_information3
88 ,pera_information4 = p_rec.pera_information4
89 ,pera_information5 = p_rec.pera_information5
90 ,pera_information6 = p_rec.pera_information6
91 ,pera_information7 = p_rec.pera_information7
92 ,pera_information8 = p_rec.pera_information8
93 ,pera_information9 = p_rec.pera_information9
94 ,pera_information10 = p_rec.pera_information10
95 ,pera_information11 = p_rec.pera_information11
96 ,pera_information12 = p_rec.pera_information12
97 ,pera_information13 = p_rec.pera_information13
98 ,pera_information14 = p_rec.pera_information14
99 ,pera_information15 = p_rec.pera_information15
100 ,pera_information16 = p_rec.pera_information16
101 ,pera_information17 = p_rec.pera_information17
102 ,pera_information18 = p_rec.pera_information18
103 ,pera_information19 = p_rec.pera_information19
104 ,pera_information20 = p_rec.pera_information20
105 ,wf_role_display_name = p_rec.wf_role_display_name
106 ,object_version_number = p_rec.object_version_number
107 ,notification_id = p_rec.notification_id
108 ,eff_information_category = p_rec.eff_information_category
109 ,eff_information1 = p_rec.eff_information1
110 ,eff_information2 = p_rec.eff_information2
111 ,eff_information3 = p_rec.eff_information3
112 ,eff_information4 = p_rec.eff_information4
113 ,eff_information5 = p_rec.eff_information5
114 ,eff_information6 = p_rec.eff_information6
115 ,eff_information7 = p_rec.eff_information7
116 ,eff_information8 = p_rec.eff_information8
117 ,eff_information9 = p_rec.eff_information9
118 ,eff_information10 = p_rec.eff_information10
119 ,eff_information11 = p_rec.eff_information11
120 ,eff_information12 = p_rec.eff_information12
121 ,eff_information13 = p_rec.eff_information13
122 ,eff_information14 = p_rec.eff_information14
123 ,eff_information15 = p_rec.eff_information15
124 where effort_report_approval_id = p_rec.effort_report_approval_id;
125 --
126 --
127 --
128 hr_utility.set_location(' Leaving:'||l_proc, 10);
129 --
130 Exception
131 When hr_api.check_integrity_violated Then
132 -- A check constraint has been violated
133 --
134 psp_era_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When hr_api.parent_integrity_violated Then
137 -- Parent integrity has been violated
138 --
139 psp_era_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When hr_api.unique_integrity_violated Then
142 -- Unique integrity has been violated
143 --
144 psp_era_shd.constraint_error
145 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
146 When Others Then
147 --
148 Raise;
149 End update_dml;
150 --
151 -- ----------------------------------------------------------------------------
152 -- |------------------------------< pre_update >------------------------------|
153 -- ----------------------------------------------------------------------------
154 -- {Start Of Comments}
155 --
156 -- Description:
157 -- This private procedure contains any processing which is required before
158 -- the update dml.
159 --
160 -- Prerequisites:
161 -- This is an internal procedure which is called from the upd procedure.
162 --
163 -- In Parameters:
164 -- A Pl/Sql record structure.
165 --
166 -- Post Success:
167 -- Processing continues.
168 --
169 -- Post Failure:
170 -- If an error has occurred, an error message and exception wil be raised
171 -- but not handled.
172 --
173 -- Developer Implementation Notes:
174 -- Any pre-processing required before the update dml is issued should be
175 -- coded within this procedure. It is important to note that any 3rd party
176 -- maintenance should be reviewed before placing in this procedure.
177 --
178 -- Access Status:
179 -- Internal Row Handler Use Only.
180 --
181 -- {End Of Comments}
182 -- ----------------------------------------------------------------------------
183 Procedure pre_update
184 (p_rec in psp_era_shd.g_rec_type
185 ) is
186 --
187 l_proc varchar2(72) := g_package||'pre_update';
188 --
189 Begin
190 hr_utility.set_location('Entering:'||l_proc, 5);
191 --
192 hr_utility.set_location(' Leaving:'||l_proc, 10);
193 End pre_update;
194 --
195 -- ----------------------------------------------------------------------------
196 -- |-----------------------------< post_update >------------------------------|
197 -- ----------------------------------------------------------------------------
198 -- {Start Of Comments}
199 --
200 -- Description:
201 -- This private procedure contains any processing which is required after
202 -- the update dml.
203 --
204 -- Prerequisites:
205 -- This is an internal procedure which is called from the upd procedure.
206 --
207 -- In Parameters:
208 -- A Pl/Sql record structure.
209 --
210 -- Post Success:
211 -- Processing continues.
212 --
213 -- Post Failure:
214 -- If an error has occurred, an error message and exception will be raised
215 -- but not handled.
216 --
217 -- Developer Implementation Notes:
218 -- Any post-processing required after the update dml is issued should be
219 -- coded within this procedure. It is important to note that any 3rd party
220 -- maintenance should be reviewed before placing in this procedure.
221 --
222 -- Access Status:
223 -- Internal Row Handler Use Only.
224 --
225 -- {End Of Comments}
226 -- ----------------------------------------------------------------------------
227 Procedure post_update
228 (p_rec in psp_era_shd.g_rec_type
229 ) is
230 --
231 l_proc varchar2(72) := g_package||'post_update';
232 --
233 Begin
234 hr_utility.set_location('Entering:'||l_proc, 5);
235 begin
236 --
237 psp_era_rku.after_update
238 (p_effort_report_approval_id
239 => p_rec.effort_report_approval_id
240 ,p_effort_report_detail_id
241 => p_rec.effort_report_detail_id
242 ,p_wf_role_name
243 => p_rec.wf_role_name
244 ,p_wf_orig_system_id
245 => p_rec.wf_orig_system_id
246 ,p_wf_orig_system
247 => p_rec.wf_orig_system
248 ,p_approver_order_num
249 => p_rec.approver_order_num
250 ,p_approval_status
251 => p_rec.approval_status
252 ,p_response_date
253 => p_rec.response_date
254 ,p_actual_cost_share
255 => p_rec.actual_cost_share
256 ,p_overwritten_effort_percent
257 => p_rec.overwritten_effort_percent
258 ,p_wf_item_key
259 => p_rec.wf_item_key
260 ,p_comments
261 => p_rec.comments
262 ,p_pera_information_category
263 => p_rec.pera_information_category
264 ,p_pera_information1
265 => p_rec.pera_information1
266 ,p_pera_information2
267 => p_rec.pera_information2
268 ,p_pera_information3
269 => p_rec.pera_information3
270 ,p_pera_information4
271 => p_rec.pera_information4
272 ,p_pera_information5
273 => p_rec.pera_information5
274 ,p_pera_information6
275 => p_rec.pera_information6
276 ,p_pera_information7
277 => p_rec.pera_information7
278 ,p_pera_information8
279 => p_rec.pera_information8
280 ,p_pera_information9
281 => p_rec.pera_information9
282 ,p_pera_information10
283 => p_rec.pera_information10
284 ,p_pera_information11
285 => p_rec.pera_information11
286 ,p_pera_information12
287 => p_rec.pera_information12
288 ,p_pera_information13
289 => p_rec.pera_information13
290 ,p_pera_information14
291 => p_rec.pera_information14
292 ,p_pera_information15
293 => p_rec.pera_information15
294 ,p_pera_information16
295 => p_rec.pera_information16
296 ,p_pera_information17
297 => p_rec.pera_information17
298 ,p_pera_information18
299 => p_rec.pera_information18
300 ,p_pera_information19
301 => p_rec.pera_information19
302 ,p_pera_information20
303 => p_rec.pera_information20
304 ,p_wf_role_display_name
305 => p_rec.wf_role_display_name
306 ,p_object_version_number
307 => p_rec.object_version_number
308 ,p_notification_id
309 => p_rec.notification_id
310 ,p_eff_information_category
311 => p_rec.eff_information_category
312 ,p_eff_information1
313 => p_rec.eff_information1
314 ,p_eff_information2
315 => p_rec.eff_information2
316 ,p_eff_information3
317 => p_rec.eff_information3
318 ,p_eff_information4
319 => p_rec.eff_information4
320 ,p_eff_information5
321 => p_rec.eff_information5
322 ,p_eff_information6
323 => p_rec.eff_information6
324 ,p_eff_information7
325 => p_rec.eff_information7
326 ,p_eff_information8
327 => p_rec.eff_information8
328 ,p_eff_information9
329 => p_rec.eff_information9
330 ,p_eff_information10
331 => p_rec.eff_information10
332 ,p_eff_information11
333 => p_rec.eff_information11
334 ,p_eff_information12
335 => p_rec.eff_information12
336 ,p_eff_information13
337 => p_rec.eff_information13
338 ,p_eff_information14
339 => p_rec.eff_information14
340 ,p_eff_information15
341 => p_rec.eff_information15
342 ,p_effort_report_detail_id_o
343 => psp_era_shd.g_old_rec.effort_report_detail_id
344 ,p_wf_role_name_o
345 => psp_era_shd.g_old_rec.wf_role_name
346 ,p_wf_orig_system_id_o
347 => psp_era_shd.g_old_rec.wf_orig_system_id
348 ,p_wf_orig_system_o
349 => psp_era_shd.g_old_rec.wf_orig_system
350 ,p_approver_order_num_o
351 => psp_era_shd.g_old_rec.approver_order_num
352 ,p_approval_status_o
353 => psp_era_shd.g_old_rec.approval_status
354 ,p_response_date_o
355 => psp_era_shd.g_old_rec.response_date
356 ,p_actual_cost_share_o
357 => psp_era_shd.g_old_rec.actual_cost_share
358 ,p_overwritten_effort_percent_o
359 => psp_era_shd.g_old_rec.overwritten_effort_percent
360 ,p_wf_item_key_o
361 => psp_era_shd.g_old_rec.wf_item_key
362 ,p_comments_o
363 => psp_era_shd.g_old_rec.comments
364 ,p_pera_information_category_o
365 => psp_era_shd.g_old_rec.pera_information_category
366 ,p_pera_information1_o
367 => psp_era_shd.g_old_rec.pera_information1
368 ,p_pera_information2_o
369 => psp_era_shd.g_old_rec.pera_information2
370 ,p_pera_information3_o
371 => psp_era_shd.g_old_rec.pera_information3
372 ,p_pera_information4_o
373 => psp_era_shd.g_old_rec.pera_information4
374 ,p_pera_information5_o
375 => psp_era_shd.g_old_rec.pera_information5
376 ,p_pera_information6_o
377 => psp_era_shd.g_old_rec.pera_information6
378 ,p_pera_information7_o
379 => psp_era_shd.g_old_rec.pera_information7
380 ,p_pera_information8_o
381 => psp_era_shd.g_old_rec.pera_information8
382 ,p_pera_information9_o
383 => psp_era_shd.g_old_rec.pera_information9
384 ,p_pera_information10_o
385 => psp_era_shd.g_old_rec.pera_information10
386 ,p_pera_information11_o
387 => psp_era_shd.g_old_rec.pera_information11
388 ,p_pera_information12_o
389 => psp_era_shd.g_old_rec.pera_information12
390 ,p_pera_information13_o
391 => psp_era_shd.g_old_rec.pera_information13
392 ,p_pera_information14_o
393 => psp_era_shd.g_old_rec.pera_information14
394 ,p_pera_information15_o
395 => psp_era_shd.g_old_rec.pera_information15
396 ,p_pera_information16_o
397 => psp_era_shd.g_old_rec.pera_information16
398 ,p_pera_information17_o
399 => psp_era_shd.g_old_rec.pera_information17
400 ,p_pera_information18_o
401 => psp_era_shd.g_old_rec.pera_information18
402 ,p_pera_information19_o
403 => psp_era_shd.g_old_rec.pera_information19
404 ,p_pera_information20_o
405 => psp_era_shd.g_old_rec.pera_information20
406 ,p_wf_role_display_name_o
407 => psp_era_shd.g_old_rec.wf_role_display_name
408 ,p_object_version_number_o
409 => psp_era_shd.g_old_rec.object_version_number
410 ,p_notification_id_o
411 => psp_era_shd.g_old_rec.notification_id
412 ,p_eff_information_category_o
413 => psp_era_shd.g_old_rec.eff_information_category
414 ,p_eff_information1_o
415 => psp_era_shd.g_old_rec.eff_information1
416 ,p_eff_information2_o
417 => psp_era_shd.g_old_rec.eff_information2
418 ,p_eff_information3_o
419 => psp_era_shd.g_old_rec.eff_information3
420 ,p_eff_information4_o
421 => psp_era_shd.g_old_rec.eff_information4
422 ,p_eff_information5_o
423 => psp_era_shd.g_old_rec.eff_information5
424 ,p_eff_information6_o
425 => psp_era_shd.g_old_rec.eff_information6
426 ,p_eff_information7_o
427 => psp_era_shd.g_old_rec.eff_information7
428 ,p_eff_information8_o
429 => psp_era_shd.g_old_rec.eff_information8
430 ,p_eff_information9_o
431 => psp_era_shd.g_old_rec.eff_information9
432 ,p_eff_information10_o
433 => psp_era_shd.g_old_rec.eff_information10
434 ,p_eff_information11_o
435 => psp_era_shd.g_old_rec.eff_information11
436 ,p_eff_information12_o
437 => psp_era_shd.g_old_rec.eff_information12
438 ,p_eff_information13_o
439 => psp_era_shd.g_old_rec.eff_information13
440 ,p_eff_information14_o
441 => psp_era_shd.g_old_rec.eff_information14
442 ,p_eff_information15_o
443 => psp_era_shd.g_old_rec.eff_information15
444 );
445 --
446 exception
447 --
448 when hr_api.cannot_find_prog_unit then
449 --
450 hr_api.cannot_find_prog_unit_error
451 (p_module_name => 'PSP_EFF_REPORT_APPROVALS'
452 ,p_hook_type => 'AU');
453 --
454 end;
455 --
456 hr_utility.set_location(' Leaving:'||l_proc, 10);
457 End post_update;
458 --
459 -- ----------------------------------------------------------------------------
460 -- |-----------------------------< convert_defs >-----------------------------|
461 -- ----------------------------------------------------------------------------
462 -- {Start Of Comments}
463 --
464 -- Description:
465 -- The Convert_Defs procedure has one very important function:
466 -- It must return the record structure for the row with all system defaulted
467 -- values converted into its corresponding parameter value for update. When
468 -- we attempt to update a row through the Upd process , certain
469 -- parameters can be defaulted which enables flexibility in the calling of
470 -- the upd process (e.g. only attributes which need to be updated need to be
471 -- specified). For the upd process to determine which attributes
472 -- have NOT been specified we need to check if the parameter has a reserved
473 -- system default value. Therefore, for all parameters which have a
474 -- corresponding reserved system default mechanism specified we need to
475 -- check if a system default is being used. If a system default is being
476 -- used then we convert the defaulted value into its corresponding attribute
477 -- value held in the g_old_rec data structure.
478 --
479 -- Prerequisites:
480 -- This private function can only be called from the upd process.
481 --
482 -- In Parameters:
483 -- A Pl/Sql record structure.
484 --
485 -- Post Success:
486 -- The record structure will be returned with all system defaulted parameter
487 -- values converted into its current row attribute value.
488 --
489 -- Post Failure:
490 -- No direct error handling is required within this function. Any possible
491 -- errors within this procedure will be a PL/SQL value error due to
492 -- conversion of datatypes or data lengths.
493 --
494 -- Developer Implementation Notes:
495 -- None.
496 --
497 -- Access Status:
498 -- Internal Row Handler Use Only.
499 --
500 -- {End Of Comments}
501 -- ----------------------------------------------------------------------------
502 Procedure convert_defs
503 (p_rec in out nocopy psp_era_shd.g_rec_type
504 ) is
505 --
506 Begin
507 --
508 -- We must now examine each argument value in the
509 -- p_rec plsql record structure
510 -- to see if a system default is being used. If a system default
511 -- is being used then we must set to the 'current' argument value.
512 --
513 If (p_rec.effort_report_detail_id = hr_api.g_number) then
514 p_rec.effort_report_detail_id :=
515 psp_era_shd.g_old_rec.effort_report_detail_id;
516 End If;
517 If (p_rec.wf_role_name = hr_api.g_varchar2) then
518 p_rec.wf_role_name :=
519 psp_era_shd.g_old_rec.wf_role_name;
520 End If;
521 If (p_rec.wf_orig_system_id = hr_api.g_number) then
522 p_rec.wf_orig_system_id :=
523 psp_era_shd.g_old_rec.wf_orig_system_id;
524 End If;
525 If (p_rec.wf_orig_system = hr_api.g_varchar2) then
526 p_rec.wf_orig_system :=
527 psp_era_shd.g_old_rec.wf_orig_system;
528 End If;
529 If (p_rec.approver_order_num = hr_api.g_number) then
530 p_rec.approver_order_num :=
531 psp_era_shd.g_old_rec.approver_order_num;
532 End If;
533 If (p_rec.approval_status = hr_api.g_varchar2) then
534 p_rec.approval_status :=
535 psp_era_shd.g_old_rec.approval_status;
536 End If;
537 If (p_rec.response_date = hr_api.g_date) then
538 p_rec.response_date :=
539 psp_era_shd.g_old_rec.response_date;
540 End If;
541 If (p_rec.actual_cost_share = hr_api.g_number) then
542 p_rec.actual_cost_share :=
543 psp_era_shd.g_old_rec.actual_cost_share;
544 End If;
545 If (p_rec.overwritten_effort_percent = hr_api.g_number) then
546 p_rec.overwritten_effort_percent :=
547 psp_era_shd.g_old_rec.overwritten_effort_percent;
548 End If;
549 If (p_rec.wf_item_key = hr_api.g_varchar2) then
550 p_rec.wf_item_key :=
551 psp_era_shd.g_old_rec.wf_item_key;
552 End If;
553 If (p_rec.comments = hr_api.g_varchar2) then
554 p_rec.comments :=
555 psp_era_shd.g_old_rec.comments;
556 End If;
557 If (p_rec.pera_information_category = hr_api.g_varchar2) then
558 p_rec.pera_information_category :=
559 psp_era_shd.g_old_rec.pera_information_category;
560 End If;
561 If (p_rec.pera_information1 = hr_api.g_varchar2) then
562 p_rec.pera_information1 :=
563 psp_era_shd.g_old_rec.pera_information1;
564 End If;
565 If (p_rec.pera_information2 = hr_api.g_varchar2) then
566 p_rec.pera_information2 :=
567 psp_era_shd.g_old_rec.pera_information2;
568 End If;
569 If (p_rec.pera_information3 = hr_api.g_varchar2) then
570 p_rec.pera_information3 :=
571 psp_era_shd.g_old_rec.pera_information3;
572 End If;
573 If (p_rec.pera_information4 = hr_api.g_varchar2) then
574 p_rec.pera_information4 :=
575 psp_era_shd.g_old_rec.pera_information4;
576 End If;
577 If (p_rec.pera_information5 = hr_api.g_varchar2) then
578 p_rec.pera_information5 :=
579 psp_era_shd.g_old_rec.pera_information5;
580 End If;
581 If (p_rec.pera_information6 = hr_api.g_varchar2) then
582 p_rec.pera_information6 :=
583 psp_era_shd.g_old_rec.pera_information6;
584 End If;
585 If (p_rec.pera_information7 = hr_api.g_varchar2) then
586 p_rec.pera_information7 :=
587 psp_era_shd.g_old_rec.pera_information7;
588 End If;
589 If (p_rec.pera_information8 = hr_api.g_varchar2) then
590 p_rec.pera_information8 :=
591 psp_era_shd.g_old_rec.pera_information8;
592 End If;
593 If (p_rec.pera_information9 = hr_api.g_varchar2) then
594 p_rec.pera_information9 :=
595 psp_era_shd.g_old_rec.pera_information9;
596 End If;
597 If (p_rec.pera_information10 = hr_api.g_varchar2) then
598 p_rec.pera_information10 :=
599 psp_era_shd.g_old_rec.pera_information10;
600 End If;
601 If (p_rec.pera_information11 = hr_api.g_varchar2) then
602 p_rec.pera_information11 :=
603 psp_era_shd.g_old_rec.pera_information11;
604 End If;
605 If (p_rec.pera_information12 = hr_api.g_varchar2) then
606 p_rec.pera_information12 :=
607 psp_era_shd.g_old_rec.pera_information12;
608 End If;
609 If (p_rec.pera_information13 = hr_api.g_varchar2) then
610 p_rec.pera_information13 :=
611 psp_era_shd.g_old_rec.pera_information13;
612 End If;
613 If (p_rec.pera_information14 = hr_api.g_varchar2) then
614 p_rec.pera_information14 :=
615 psp_era_shd.g_old_rec.pera_information14;
616 End If;
617 If (p_rec.pera_information15 = hr_api.g_varchar2) then
618 p_rec.pera_information15 :=
619 psp_era_shd.g_old_rec.pera_information15;
620 End If;
621 If (p_rec.pera_information16 = hr_api.g_varchar2) then
622 p_rec.pera_information16 :=
623 psp_era_shd.g_old_rec.pera_information16;
624 End If;
625 If (p_rec.pera_information17 = hr_api.g_varchar2) then
626 p_rec.pera_information17 :=
627 psp_era_shd.g_old_rec.pera_information17;
628 End If;
629 If (p_rec.pera_information18 = hr_api.g_varchar2) then
630 p_rec.pera_information18 :=
631 psp_era_shd.g_old_rec.pera_information18;
632 End If;
633 If (p_rec.pera_information19 = hr_api.g_varchar2) then
634 p_rec.pera_information19 :=
635 psp_era_shd.g_old_rec.pera_information19;
636 End If;
637 If (p_rec.pera_information20 = hr_api.g_varchar2) then
638 p_rec.pera_information20 :=
639 psp_era_shd.g_old_rec.pera_information20;
640 End If;
641 If (p_rec.wf_role_display_name = hr_api.g_varchar2) then
642 p_rec.wf_role_display_name :=
643 psp_era_shd.g_old_rec.wf_role_display_name;
644 End If;
645 If (p_rec.notification_id = hr_api.g_number) then
646 p_rec.notification_id :=
647 psp_era_shd.g_old_rec.notification_id;
648 End If;
649 If (p_rec.eff_information_category = hr_api.g_varchar2) then
650 p_rec.eff_information_category :=
651 psp_era_shd.g_old_rec.eff_information_category;
652 End If;
653 If (p_rec.eff_information1 = hr_api.g_varchar2) then
654 p_rec.eff_information1 :=
655 psp_era_shd.g_old_rec.eff_information1;
656 End If;
657 If (p_rec.eff_information2 = hr_api.g_varchar2) then
658 p_rec.eff_information2 :=
659 psp_era_shd.g_old_rec.eff_information2;
660 End If;
661 If (p_rec.eff_information3 = hr_api.g_varchar2) then
662 p_rec.eff_information3 :=
663 psp_era_shd.g_old_rec.eff_information3;
664 End If;
665 If (p_rec.eff_information4 = hr_api.g_varchar2) then
666 p_rec.eff_information4 :=
667 psp_era_shd.g_old_rec.eff_information4;
668 End If;
669 If (p_rec.eff_information5 = hr_api.g_varchar2) then
670 p_rec.eff_information5 :=
671 psp_era_shd.g_old_rec.eff_information5;
672 End If;
673 If (p_rec.eff_information6 = hr_api.g_varchar2) then
674 p_rec.eff_information6 :=
675 psp_era_shd.g_old_rec.eff_information6;
676 End If;
677 If (p_rec.eff_information7 = hr_api.g_varchar2) then
678 p_rec.eff_information7 :=
679 psp_era_shd.g_old_rec.eff_information7;
680 End If;
681 If (p_rec.eff_information8 = hr_api.g_varchar2) then
682 p_rec.eff_information8 :=
683 psp_era_shd.g_old_rec.eff_information8;
684 End If;
685 If (p_rec.eff_information9 = hr_api.g_varchar2) then
686 p_rec.eff_information9 :=
687 psp_era_shd.g_old_rec.eff_information9;
688 End If;
689 If (p_rec.eff_information10 = hr_api.g_varchar2) then
690 p_rec.eff_information10 :=
691 psp_era_shd.g_old_rec.eff_information10;
692 End If;
693 If (p_rec.eff_information11 = hr_api.g_varchar2) then
694 p_rec.eff_information11 :=
695 psp_era_shd.g_old_rec.eff_information11;
696 End If;
697 If (p_rec.eff_information12 = hr_api.g_varchar2) then
698 p_rec.eff_information12 :=
699 psp_era_shd.g_old_rec.eff_information12;
700 End If;
701 If (p_rec.eff_information13 = hr_api.g_varchar2) then
702 p_rec.eff_information13 :=
703 psp_era_shd.g_old_rec.eff_information13;
704 End If;
705 If (p_rec.eff_information14 = hr_api.g_varchar2) then
706 p_rec.eff_information14 :=
707 psp_era_shd.g_old_rec.eff_information14;
708 End If;
709 If (p_rec.eff_information15 = hr_api.g_varchar2) then
710 p_rec.eff_information15 :=
711 psp_era_shd.g_old_rec.eff_information15;
712 End If;
713 --
714 End convert_defs;
715 --
716 -- ----------------------------------------------------------------------------
717 -- |---------------------------------< upd >----------------------------------|
718 -- ----------------------------------------------------------------------------
719 Procedure upd
720 (p_rec in out nocopy psp_era_shd.g_rec_type
721 ) is
722 --
723 l_proc varchar2(72) := g_package||'upd';
724 --
725 Begin
726 hr_utility.set_location('Entering:'||l_proc, 5);
727 --
728 -- We must lock the row which we need to update.
729 --
730 psp_era_shd.lck
731 (p_rec.effort_report_approval_id
732 ,p_rec.object_version_number
733 );
734 --
735 -- 1. During an update system defaults are used to determine if
736 -- arguments have been defaulted or not. We must therefore
737 -- derive the full record structure values to be updated.
738 --
739 -- 2. Call the supporting update validate operations.
740 --
741 convert_defs(p_rec);
742 psp_era_bus.update_validate
743 (p_rec
744 );
745 --
746 -- Call to raise any errors on multi-message list
747 hr_multi_message.end_validation_set;
748 --
749 -- Call the supporting pre-update operation
750 --
751 psp_era_upd.pre_update(p_rec);
752 --
753 -- Update the row.
754 --
755 psp_era_upd.update_dml(p_rec);
756 --
757 -- Call the supporting post-update operation
758 --
759 psp_era_upd.post_update
760 (p_rec
761 );
762 --
763 -- Call to raise any errors on multi-message list
764 hr_multi_message.end_validation_set;
765 End upd;
766 --
767 -- ----------------------------------------------------------------------------
768 -- |---------------------------------< upd >----------------------------------|
769 -- ----------------------------------------------------------------------------
770 Procedure upd
771 (p_effort_report_approval_id in number
772 ,p_object_version_number in out nocopy number
773 ,p_effort_report_detail_id in number default hr_api.g_number
774 ,p_wf_role_name in varchar2 default hr_api.g_varchar2
775 ,p_wf_orig_system_id in number default hr_api.g_number
776 ,p_wf_orig_system in varchar2 default hr_api.g_varchar2
777 ,p_approver_order_num in number default hr_api.g_number
778 ,p_approval_status in varchar2 default hr_api.g_varchar2
779 ,p_response_date in date default hr_api.g_date
780 ,p_actual_cost_share in number default hr_api.g_number
781 ,p_overwritten_effort_percent in number default hr_api.g_number
782 ,p_wf_item_key in varchar2 default hr_api.g_varchar2
783 ,p_comments in varchar2 default hr_api.g_varchar2
784 ,p_pera_information_category in varchar2 default hr_api.g_varchar2
785 ,p_pera_information1 in varchar2 default hr_api.g_varchar2
786 ,p_pera_information2 in varchar2 default hr_api.g_varchar2
787 ,p_pera_information3 in varchar2 default hr_api.g_varchar2
788 ,p_pera_information4 in varchar2 default hr_api.g_varchar2
789 ,p_pera_information5 in varchar2 default hr_api.g_varchar2
790 ,p_pera_information6 in varchar2 default hr_api.g_varchar2
791 ,p_pera_information7 in varchar2 default hr_api.g_varchar2
792 ,p_pera_information8 in varchar2 default hr_api.g_varchar2
793 ,p_pera_information9 in varchar2 default hr_api.g_varchar2
794 ,p_pera_information10 in varchar2 default hr_api.g_varchar2
795 ,p_pera_information11 in varchar2 default hr_api.g_varchar2
796 ,p_pera_information12 in varchar2 default hr_api.g_varchar2
797 ,p_pera_information13 in varchar2 default hr_api.g_varchar2
798 ,p_pera_information14 in varchar2 default hr_api.g_varchar2
799 ,p_pera_information15 in varchar2 default hr_api.g_varchar2
800 ,p_pera_information16 in varchar2 default hr_api.g_varchar2
801 ,p_pera_information17 in varchar2 default hr_api.g_varchar2
802 ,p_pera_information18 in varchar2 default hr_api.g_varchar2
803 ,p_pera_information19 in varchar2 default hr_api.g_varchar2
804 ,p_pera_information20 in varchar2 default hr_api.g_varchar2
805 ,p_wf_role_display_name in varchar2 default hr_api.g_varchar2
806 ,p_notification_id in number default hr_api.g_number
807 ,p_eff_information_category in varchar2 default hr_api.g_varchar2
808 ,p_eff_information1 in varchar2 default hr_api.g_varchar2
809 ,p_eff_information2 in varchar2 default hr_api.g_varchar2
810 ,p_eff_information3 in varchar2 default hr_api.g_varchar2
811 ,p_eff_information4 in varchar2 default hr_api.g_varchar2
812 ,p_eff_information5 in varchar2 default hr_api.g_varchar2
813 ,p_eff_information6 in varchar2 default hr_api.g_varchar2
814 ,p_eff_information7 in varchar2 default hr_api.g_varchar2
815 ,p_eff_information8 in varchar2 default hr_api.g_varchar2
816 ,p_eff_information9 in varchar2 default hr_api.g_varchar2
817 ,p_eff_information10 in varchar2 default hr_api.g_varchar2
818 ,p_eff_information11 in varchar2 default hr_api.g_varchar2
819 ,p_eff_information12 in varchar2 default hr_api.g_varchar2
820 ,p_eff_information13 in varchar2 default hr_api.g_varchar2
821 ,p_eff_information14 in varchar2 default hr_api.g_varchar2
822 ,p_eff_information15 in varchar2 default hr_api.g_varchar2
823 ) is
824 --
825 l_rec psp_era_shd.g_rec_type;
826 l_proc varchar2(72) := g_package||'upd';
827 --
828 Begin
829 hr_utility.set_location('Entering:'||l_proc, 5);
830 --
831 -- Call conversion function to turn arguments into the
832 -- l_rec structure.
833 --
834 l_rec :=
835 psp_era_shd.convert_args
836 (p_effort_report_approval_id
837 ,p_effort_report_detail_id
838 ,p_wf_role_name
839 ,p_wf_orig_system_id
840 ,p_wf_orig_system
841 ,p_approver_order_num
842 ,p_approval_status
843 ,p_response_date
844 ,p_actual_cost_share
845 ,p_overwritten_effort_percent
846 ,p_wf_item_key
847 ,p_comments
848 ,p_pera_information_category
849 ,p_pera_information1
850 ,p_pera_information2
851 ,p_pera_information3
852 ,p_pera_information4
853 ,p_pera_information5
854 ,p_pera_information6
855 ,p_pera_information7
856 ,p_pera_information8
857 ,p_pera_information9
858 ,p_pera_information10
859 ,p_pera_information11
860 ,p_pera_information12
861 ,p_pera_information13
862 ,p_pera_information14
863 ,p_pera_information15
864 ,p_pera_information16
865 ,p_pera_information17
866 ,p_pera_information18
867 ,p_pera_information19
868 ,p_pera_information20
869 ,p_wf_role_display_name
870 ,p_object_version_number
871 ,p_notification_id
872 ,p_eff_information_category
873 ,p_eff_information1
874 ,p_eff_information2
875 ,p_eff_information3
876 ,p_eff_information4
877 ,p_eff_information5
878 ,p_eff_information6
879 ,p_eff_information7
880 ,p_eff_information8
881 ,p_eff_information9
882 ,p_eff_information10
883 ,p_eff_information11
884 ,p_eff_information12
885 ,p_eff_information13
886 ,p_eff_information14
887 ,p_eff_information15
888 );
889 --
890 -- Having converted the arguments into the
891 -- plsql record structure we call the corresponding record
892 -- business process.
893 --
894 psp_era_upd.upd
895 (l_rec
896 );
897 p_object_version_number := l_rec.object_version_number;
898 --
899 hr_utility.set_location(' Leaving:'||l_proc, 10);
900 End upd;
901 --
902 end psp_era_upd;