DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PYR_UPD

Source


1 Package Body pay_pyr_upd as
2 /* $Header: pypyrrhi.pkb 115.3 2003/09/15 04:18:59 adhunter noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  VARCHAR2(33) := '  pay_pyr_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 pay_pyr_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   pay_pyr_shd.g_api_dml := TRUE;  -- Set the api dml status
67   --
68   -- Update the pay_rates Row
69   --
70   update pay_rates
71     set
72      rate_id                         = p_rec.rate_id
73     ,parent_spine_id                 = p_rec.parent_spine_id
74     ,name                            = p_rec.name
75     ,rate_uom                        = p_rec.rate_uom
76     ,comments                        = p_rec.comments
77     ,request_id                      = p_rec.request_id
78     ,program_application_id          = p_rec.program_application_id
79     ,program_id                      = p_rec.program_id
80     ,program_update_date             = p_rec.program_update_date
81     ,attribute_category              = p_rec.attribute_category
82     ,attribute1                      = p_rec.attribute1
83     ,attribute2                      = p_rec.attribute2
84     ,attribute3                      = p_rec.attribute3
85     ,attribute4                      = p_rec.attribute4
86     ,attribute5                      = p_rec.attribute5
87     ,attribute6                      = p_rec.attribute6
88     ,attribute7                      = p_rec.attribute7
89     ,attribute8                      = p_rec.attribute8
90     ,attribute9                      = p_rec.attribute9
91     ,attribute10                     = p_rec.attribute10
92     ,attribute11                     = p_rec.attribute11
93     ,attribute12                     = p_rec.attribute12
94     ,attribute13                     = p_rec.attribute13
95     ,attribute14                     = p_rec.attribute14
96     ,attribute15                     = p_rec.attribute15
97     ,attribute16                     = p_rec.attribute16
98     ,attribute17                     = p_rec.attribute17
99     ,attribute18                     = p_rec.attribute18
100     ,attribute19                     = p_rec.attribute19
101     ,attribute20                     = p_rec.attribute20
102     ,rate_basis                      = p_rec.rate_basis
103     ,asg_rate_type                   = p_rec.asg_rate_type
104     ,object_version_number           = p_rec.object_version_number
105     WHERE rate_id = p_rec.rate_id;
106   --
107   pay_pyr_shd.g_api_dml := FALSE;   -- Unset the api dml status
108   --
109   hr_utility.set_location(' Leaving:'||l_proc, 10);
110 --
111 EXCEPTION
112   WHEN hr_api.check_integrity_violated THEN
113     -- A check constraint has been violated
114     pay_pyr_shd.g_api_dml := FALSE;   -- Unset the api dml status
115     pay_pyr_shd.constraint_error
116       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117   WHEN hr_api.parent_integrity_violated THEN
118     -- Parent integrity has been violated
119     pay_pyr_shd.g_api_dml := FALSE;   -- Unset the api dml status
120     pay_pyr_shd.constraint_error
121       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122   WHEN hr_api.unique_integrity_violated THEN
123     -- Unique integrity has been violated
124     pay_pyr_shd.g_api_dml := FALSE;   -- Unset the api dml status
125     pay_pyr_shd.constraint_error
126       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127   WHEN Others THEN
128     pay_pyr_shd.g_api_dml := FALSE;   -- Unset the api dml status
129     Raise;
130 END update_dml;
131 --
132 -- ----------------------------------------------------------------------------
133 -- |------------------------------< pre_update >------------------------------|
134 -- ----------------------------------------------------------------------------
135 -- {Start Of Comments}
136 --
137 -- Description:
138 --   This private procedure contains any processing which IS required before
139 --   the update dml.
140 --
141 -- Prerequisites:
142 --   This IS an internal procedure which IS called FROM the upd procedure.
143 --
144 -- In Parameters:
145 --   A Pl/Sql record structure.
146 --
147 -- Post Success:
148 --   Processing continues.
149 --
150 -- Post Failure:
151 --   IF an error has occurred, an error message AND exception wil be raised
152 --   but not handled.
153 --
154 -- Developer Implementation Notes:
155 --   Any pre-processing required before the update dml IS issued should be
156 --   coded within this procedure. It IS important to note that any 3rd party
157 --   maintenance should be reviewed before placing IN this procedure.
158 --
159 -- Access Status:
160 --   Internal Row Handler Use Only.
161 --
162 -- {END Of Comments}
163 -- ----------------------------------------------------------------------------
164 PROCEDURE pre_update
165   (p_rec IN pay_pyr_shd.g_rec_type
166   ) IS
167 --
168   l_proc  VARCHAR2(72) := g_package||'pre_update';
169 --
170 BEGIN
171   hr_utility.set_location('Entering:'||l_proc, 5);
172   --
173   hr_utility.set_location(' Leaving:'||l_proc, 10);
174 END pre_update;
175 --
176 -- ----------------------------------------------------------------------------
177 -- |-----------------------------< post_update >------------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start Of Comments}
180 --
181 -- Description:
182 --   This private procedure contains any processing which IS required after
183 --   the update dml.
184 --
185 -- Prerequisites:
186 --   This IS an internal procedure which IS called FROM the upd procedure.
187 --
188 -- In Parameters:
189 --   A Pl/Sql record structure.
190 --
191 -- Post Success:
192 --   Processing continues.
193 --
194 -- Post Failure:
195 --   IF an error has occurred, an error message AND exception will be raised
196 --   but not handled.
197 --
198 -- Developer Implementation Notes:
199 --   Any post-processing required after the update dml IS issued should be
200 --   coded within this procedure. It IS important to note that any 3rd party
201 --   maintenance should be reviewed before placing IN this procedure.
202 --
203 -- Access Status:
204 --   Internal Row Handler Use Only.
205 --
206 -- {END Of Comments}
207 -- ----------------------------------------------------------------------------
208 PROCEDURE post_update
209   (p_effective_date               IN DATE
210   ,p_rec                          IN pay_pyr_shd.g_rec_type
211   ) IS
212 --
213   l_proc  VARCHAR2(72) := g_package||'post_update';
214 --
215 BEGIN
216   hr_utility.set_location('Entering:'||l_proc, 5);
217   BEGIN
218     --
219     pay_pyr_rku.after_update
220       (p_effective_date              => p_effective_date
221       ,p_rate_id
222       => p_rec.rate_id
223       ,p_business_group_id
224       => p_rec.business_group_id
225       ,p_parent_spine_id
226       => p_rec.parent_spine_id
227       ,p_name
228       => p_rec.name
229       ,p_rate_type
230       => p_rec.rate_type
231       ,p_rate_uom
232       => p_rec.rate_uom
233       ,p_comments
234       => p_rec.comments
235       ,p_request_id
236       => p_rec.request_id
237       ,p_program_application_id
238       => p_rec.program_application_id
239       ,p_program_id
240       => p_rec.program_id
241       ,p_program_update_date
242       => p_rec.program_update_date
243       ,p_attribute_category
244       => p_rec.attribute_category
245       ,p_attribute1
246       => p_rec.attribute1
247       ,p_attribute2
248       => p_rec.attribute2
249       ,p_attribute3
250       => p_rec.attribute3
251       ,p_attribute4
252       => p_rec.attribute4
253       ,p_attribute5
254       => p_rec.attribute5
255       ,p_attribute6
256       => p_rec.attribute6
257       ,p_attribute7
258       => p_rec.attribute7
259       ,p_attribute8
260       => p_rec.attribute8
261       ,p_attribute9
262       => p_rec.attribute9
263       ,p_attribute10
264       => p_rec.attribute10
265       ,p_attribute11
266       => p_rec.attribute11
267       ,p_attribute12
268       => p_rec.attribute12
269       ,p_attribute13
270       => p_rec.attribute13
271       ,p_attribute14
272       => p_rec.attribute14
273       ,p_attribute15
274       => p_rec.attribute15
275       ,p_attribute16
276       => p_rec.attribute16
277       ,p_attribute17
278       => p_rec.attribute17
279       ,p_attribute18
280       => p_rec.attribute18
281       ,p_attribute19
282       => p_rec.attribute19
283       ,p_attribute20
284       => p_rec.attribute20
285       ,p_rate_basis
286       => p_rec.rate_basis
287       ,p_asg_rate_type
288       => p_rec.asg_rate_type
289       ,p_object_version_number
290       => p_rec.object_version_number
291       ,p_business_group_id_o
292       => pay_pyr_shd.g_old_rec.business_group_id
293       ,p_parent_spine_id_o
294       => pay_pyr_shd.g_old_rec.parent_spine_id
295       ,p_name_o
296       => pay_pyr_shd.g_old_rec.name
297       ,p_rate_type_o
298       => pay_pyr_shd.g_old_rec.rate_type
299       ,p_rate_uom_o
300       => pay_pyr_shd.g_old_rec.rate_uom
301       ,p_comments_o
302       => pay_pyr_shd.g_old_rec.comments
303       ,p_request_id_o
304       => pay_pyr_shd.g_old_rec.request_id
305       ,p_program_application_id_o
306       => pay_pyr_shd.g_old_rec.program_application_id
307       ,p_program_id_o
308       => pay_pyr_shd.g_old_rec.program_id
309       ,p_program_update_date_o
310       => pay_pyr_shd.g_old_rec.program_update_date
311       ,p_attribute_category_o
312       => pay_pyr_shd.g_old_rec.attribute_category
313       ,p_attribute1_o
314       => pay_pyr_shd.g_old_rec.attribute1
315       ,p_attribute2_o
316       => pay_pyr_shd.g_old_rec.attribute2
317       ,p_attribute3_o
318       => pay_pyr_shd.g_old_rec.attribute3
319       ,p_attribute4_o
320       => pay_pyr_shd.g_old_rec.attribute4
321       ,p_attribute5_o
322       => pay_pyr_shd.g_old_rec.attribute5
323       ,p_attribute6_o
324       => pay_pyr_shd.g_old_rec.attribute6
325       ,p_attribute7_o
326       => pay_pyr_shd.g_old_rec.attribute7
327       ,p_attribute8_o
328       => pay_pyr_shd.g_old_rec.attribute8
329       ,p_attribute9_o
330       => pay_pyr_shd.g_old_rec.attribute9
331       ,p_attribute10_o
332       => pay_pyr_shd.g_old_rec.attribute10
333       ,p_attribute11_o
334       => pay_pyr_shd.g_old_rec.attribute11
335       ,p_attribute12_o
336       => pay_pyr_shd.g_old_rec.attribute12
337       ,p_attribute13_o
338       => pay_pyr_shd.g_old_rec.attribute13
339       ,p_attribute14_o
340       => pay_pyr_shd.g_old_rec.attribute14
341       ,p_attribute15_o
342       => pay_pyr_shd.g_old_rec.attribute15
343       ,p_attribute16_o
344       => pay_pyr_shd.g_old_rec.attribute16
345       ,p_attribute17_o
346       => pay_pyr_shd.g_old_rec.attribute17
347       ,p_attribute18_o
348       => pay_pyr_shd.g_old_rec.attribute18
349       ,p_attribute19_o
350       => pay_pyr_shd.g_old_rec.attribute19
351       ,p_attribute20_o
352       => pay_pyr_shd.g_old_rec.attribute20
353       ,p_rate_basis_o
354       => pay_pyr_shd.g_old_rec.rate_basis
355       ,p_asg_rate_type_o
356       => pay_pyr_shd.g_old_rec.asg_rate_type
357       ,p_object_version_number_o
358       => pay_pyr_shd.g_old_rec.object_version_number
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 => 'PAY_RATES'
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 pay_pyr_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.business_group_id = hr_api.g_number) THEN
429     p_rec.business_group_id :=
430     pay_pyr_shd.g_old_rec.business_group_id;
431   END IF;
432   IF (p_rec.parent_spine_id = hr_api.g_number) THEN
433     p_rec.parent_spine_id :=
434     pay_pyr_shd.g_old_rec.parent_spine_id;
435   END IF;
436   IF (p_rec.name = hr_api.g_VARCHAR2) THEN
437     p_rec.name :=
438     pay_pyr_shd.g_old_rec.name;
439   END IF;
440   IF (p_rec.rate_type = hr_api.g_VARCHAR2) THEN
441     p_rec.rate_type :=
442     pay_pyr_shd.g_old_rec.rate_type;
443   END IF;
444   IF (p_rec.rate_uom = hr_api.g_VARCHAR2) THEN
445     p_rec.rate_uom :=
446     pay_pyr_shd.g_old_rec.rate_uom;
447   END IF;
448   IF (p_rec.comments = hr_api.g_VARCHAR2) THEN
449     p_rec.comments :=
450     pay_pyr_shd.g_old_rec.comments;
451   END IF;
452   IF (p_rec.request_id = hr_api.g_number) THEN
453     p_rec.request_id :=
454     pay_pyr_shd.g_old_rec.request_id;
455   END IF;
456   IF (p_rec.program_application_id = hr_api.g_number) THEN
457     p_rec.program_application_id :=
458     pay_pyr_shd.g_old_rec.program_application_id;
459   END IF;
460   IF (p_rec.program_id = hr_api.g_number) THEN
461     p_rec.program_id :=
462     pay_pyr_shd.g_old_rec.program_id;
463   END IF;
464   IF (p_rec.program_update_date = hr_api.g_date) THEN
465     p_rec.program_update_date :=
466     pay_pyr_shd.g_old_rec.program_update_date;
467   END IF;
468   IF (p_rec.attribute_category = hr_api.g_VARCHAR2) THEN
469     p_rec.attribute_category :=
470     pay_pyr_shd.g_old_rec.attribute_category;
471   END IF;
472   IF (p_rec.attribute1 = hr_api.g_VARCHAR2) THEN
473     p_rec.attribute1 :=
474     pay_pyr_shd.g_old_rec.attribute1;
475   END IF;
476   IF (p_rec.attribute2 = hr_api.g_VARCHAR2) THEN
477     p_rec.attribute2 :=
478     pay_pyr_shd.g_old_rec.attribute2;
479   END IF;
480   IF (p_rec.attribute3 = hr_api.g_VARCHAR2) THEN
481     p_rec.attribute3 :=
482     pay_pyr_shd.g_old_rec.attribute3;
483   END IF;
484   IF (p_rec.attribute4 = hr_api.g_VARCHAR2) THEN
485     p_rec.attribute4 :=
486     pay_pyr_shd.g_old_rec.attribute4;
487   END IF;
488   IF (p_rec.attribute5 = hr_api.g_VARCHAR2) THEN
489     p_rec.attribute5 :=
490     pay_pyr_shd.g_old_rec.attribute5;
491   END IF;
492   IF (p_rec.attribute6 = hr_api.g_VARCHAR2) THEN
493     p_rec.attribute6 :=
494     pay_pyr_shd.g_old_rec.attribute6;
495   END IF;
496   IF (p_rec.attribute7 = hr_api.g_VARCHAR2) THEN
497     p_rec.attribute7 :=
498     pay_pyr_shd.g_old_rec.attribute7;
499   END IF;
500   IF (p_rec.attribute8 = hr_api.g_VARCHAR2) THEN
501     p_rec.attribute8 :=
502     pay_pyr_shd.g_old_rec.attribute8;
503   END IF;
504   IF (p_rec.attribute9 = hr_api.g_VARCHAR2) THEN
505     p_rec.attribute9 :=
506     pay_pyr_shd.g_old_rec.attribute9;
507   END IF;
508   IF (p_rec.attribute10 = hr_api.g_VARCHAR2) THEN
509     p_rec.attribute10 :=
510     pay_pyr_shd.g_old_rec.attribute10;
511   END IF;
512   IF (p_rec.attribute11 = hr_api.g_VARCHAR2) THEN
513     p_rec.attribute11 :=
514     pay_pyr_shd.g_old_rec.attribute11;
515   END IF;
516   IF (p_rec.attribute12 = hr_api.g_VARCHAR2) THEN
517     p_rec.attribute12 :=
518     pay_pyr_shd.g_old_rec.attribute12;
519   END IF;
520   IF (p_rec.attribute13 = hr_api.g_VARCHAR2) THEN
521     p_rec.attribute13 :=
522     pay_pyr_shd.g_old_rec.attribute13;
523   END IF;
524   IF (p_rec.attribute14 = hr_api.g_VARCHAR2) THEN
525     p_rec.attribute14 :=
526     pay_pyr_shd.g_old_rec.attribute14;
527   END IF;
528   IF (p_rec.attribute15 = hr_api.g_VARCHAR2) THEN
529     p_rec.attribute15 :=
530     pay_pyr_shd.g_old_rec.attribute15;
531   END IF;
532   IF (p_rec.attribute16 = hr_api.g_VARCHAR2) THEN
533     p_rec.attribute16 :=
534     pay_pyr_shd.g_old_rec.attribute16;
535   END IF;
536   IF (p_rec.attribute17 = hr_api.g_VARCHAR2) THEN
537     p_rec.attribute17 :=
538     pay_pyr_shd.g_old_rec.attribute17;
539   END IF;
540   IF (p_rec.attribute18 = hr_api.g_VARCHAR2) THEN
541     p_rec.attribute18 :=
542     pay_pyr_shd.g_old_rec.attribute18;
543   END IF;
544   IF (p_rec.attribute19 = hr_api.g_VARCHAR2) THEN
545     p_rec.attribute19 :=
546     pay_pyr_shd.g_old_rec.attribute19;
547   END IF;
548   IF (p_rec.attribute20 = hr_api.g_VARCHAR2) THEN
549     p_rec.attribute20 :=
550     pay_pyr_shd.g_old_rec.attribute20;
551   END IF;
552   IF (p_rec.rate_basis = hr_api.g_VARCHAR2) THEN
553     p_rec.rate_basis :=
554     pay_pyr_shd.g_old_rec.rate_basis;
555   END IF;
556   IF (p_rec.asg_rate_type = hr_api.g_VARCHAR2) THEN
557     p_rec.asg_rate_type :=
558     pay_pyr_shd.g_old_rec.asg_rate_type;
559   END IF;
560   --
561 END convert_defs;
562 --
563 -- ----------------------------------------------------------------------------
564 -- |---------------------------------< upd >----------------------------------|
565 -- ----------------------------------------------------------------------------
566 PROCEDURE upd
567   (p_effective_date               IN DATE
568   ,p_rec                          IN OUT NOCOPY pay_pyr_shd.g_rec_type
569   ) IS
570 --
571   l_proc  VARCHAR2(72) := g_package||'upd';
572 --
573 BEGIN
574   hr_utility.set_location('Entering:'||l_proc, 5);
575   --
576   -- We must lock the row which we need to update.
577   --
578   pay_pyr_shd.lck
579     (p_rec.rate_id
580     ,p_rec.object_version_number
581     );
582   --
583   -- 1. During an update system defaults are used to determine IF
584   --    arguments have been defaulted or not. We must therefore
585   --    derive the full record structure values to be updated.
586   --
587   -- 2. Call the supporting update validate operations.
588   --
589   convert_defs(p_rec);
590   pay_pyr_bus.update_validate
591      (p_effective_date
592      ,p_rec
593      );
594   --
595   -- Call to raise any errors on multi-message list
596   hr_multi_message.end_validation_set;
597   --
598   -- Call the supporting pre-update operation
599   --
600   pay_pyr_upd.pre_update(p_rec);
601   --
602   -- Update the row.
603   --
604   pay_pyr_upd.update_dml(p_rec);
605   --
606   -- Call the supporting post-update operation
607   --
608   pay_pyr_upd.post_update
609      (p_effective_date
610      ,p_rec
611      );
612   --
613   -- Call to raise any errors on multi-message list
614   hr_multi_message.end_validation_set;
615 END upd;
616 --
617 -- ----------------------------------------------------------------------------
618 -- |---------------------------------< upd >----------------------------------|
619 -- ----------------------------------------------------------------------------
620 PROCEDURE upd
621   (p_effective_date               IN     DATE
622   ,p_rate_id                      IN     NUMBER
623   ,p_object_version_number        IN OUT NOCOPY NUMBER
624   ,p_name                         IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
625   ,p_rate_uom                     IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
626   ,p_parent_spine_id              IN     NUMBER    DEFAULT hr_api.g_number
627   ,p_comments                     IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
628   ,p_attribute_category           IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
629   ,p_attribute1                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
630   ,p_attribute2                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
631   ,p_attribute3                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
632   ,p_attribute4                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
633   ,p_attribute5                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
634   ,p_attribute6                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
635   ,p_attribute7                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
636   ,p_attribute8                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
637   ,p_attribute9                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
638   ,p_attribute10                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
639   ,p_attribute11                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
640   ,p_attribute12                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
641   ,p_attribute13                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
642   ,p_attribute14                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
643   ,p_attribute15                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
644   ,p_attribute16                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
645   ,p_attribute17                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
646   ,p_attribute18                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
647   ,p_attribute19                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
648   ,p_attribute20                  IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
649   ,p_rate_basis                   IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
650   ,p_asg_rate_type                IN     VARCHAR2  DEFAULT hr_api.g_VARCHAR2
651   ) IS
652 --
653   l_rec   pay_pyr_shd.g_rec_type;
654   l_proc  VARCHAR2(72) := g_package||'upd';
655 --
656 BEGIN
657   hr_utility.set_location('Entering:'||l_proc, 5);
658   --
659   -- Call conversion function to turn arguments INTO the
660   -- l_rec structure.
661   --
662   l_rec :=
663   pay_pyr_shd.convert_args
664   (p_rate_id
665   ,hr_api.g_number  --p_business_group_id
666   ,p_parent_spine_id
667   ,p_name
668   ,hr_api.g_varchar2 --p_rate_type
669   ,p_rate_uom
670   ,p_comments
671   ,p_attribute_category
672   ,p_attribute1
673   ,p_attribute2
674   ,p_attribute3
675   ,p_attribute4
676   ,p_attribute5
677   ,p_attribute6
678   ,p_attribute7
679   ,p_attribute8
680   ,p_attribute9
681   ,p_attribute10
682   ,p_attribute11
683   ,p_attribute12
684   ,p_attribute13
685   ,p_attribute14
686   ,p_attribute15
687   ,p_attribute16
688   ,p_attribute17
689   ,p_attribute18
690   ,p_attribute19
691   ,p_attribute20
692   ,p_rate_basis
693   ,p_asg_rate_type
694   ,p_object_version_number
695   );
696   --
697   -- Having converted the arguments INTO the
698   -- plsql record structure we call the corresponding record
699   -- business process.
700   --
701   pay_pyr_upd.upd
702      (p_effective_date
703      ,l_rec
704      );
705   p_object_version_number := l_rec.object_version_number;
706   --
707   hr_utility.set_location(' Leaving:'||l_proc, 10);
708 END upd;
709 --
710 END pay_pyr_upd;