DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PSH_UPD

Source


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