DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_CPO_UPD

Source


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