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