DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PMS_UPD

Source


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