DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_CEO_UPD

Source


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