DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PPS_UPD

Source


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