DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_SPH_UPD

Source


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