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