DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PGR_UPD

Source


1 Package Body pay_pgr_upd as
2 /* $Header: pypgrrhi.pkb 120.6.12020000.2 2013/01/17 09:39:34 sclakkar ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_pgr_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the execution of dml from the datetrack mode
17 --   of CORRECTION only. It is important to note that the object version
18 --   number is only increment by 1 because the datetrack correction is
19 --   soley for one datetracked row.
20 --   This procedure controls the actual dml update logic. The functions of
21 --   this procedure are as follows:
22 --   1) Get the next object_version_number.
23 --   2) To set and unset the g_api_dml status as required (as we are about to
24 --      perform dml).
25 --   3) To update the specified row in the schema using the primary key in
26 --      the predicates.
27 --   4) To trap any constraint violations that may have occurred.
28 --   5) To raise any other errors.
29 --
30 -- Prerequisites:
31 --   This is an internal private procedure which must be called from the
32 --   update_dml procedure.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structure.
36 --
37 -- Post Success:
38 --   The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 --   On the update dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   The update 'set' arguments list should be modified if any of your
50 --   attributes are not updateable.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58   (p_rec                   in out nocopy pay_pgr_shd.g_rec_type
59   ,p_effective_date        in date
60   ,p_datetrack_mode        in varchar2
61   ,p_validation_start_date in date
62   ,p_validation_end_date   in date
63   ) is
64 --
65   l_proc        varchar2(72) := g_package||'dt_update_dml';
66 --
67 Begin
68   hr_utility.set_location('Entering:'||l_proc, 5);
69   --
70   If (p_datetrack_mode = hr_api.g_correction) then
71     hr_utility.set_location(l_proc, 10);
72     --
73     -- Because we are updating a row we must get the next object
74     -- version number.
75     --
76     p_rec.object_version_number :=
77       dt_api.get_object_version_number
78         (p_base_table_name => 'pay_grade_rules_f'
79         ,p_base_key_column => 'grade_rule_id'
80         ,p_base_key_value  => p_rec.grade_rule_id
81         );
82     --
83     pay_pgr_shd.g_api_dml := true;  -- Set the api dml status
84     --
85     -- Update the pay_grade_rules_f Row
86     --
87     update  pay_grade_rules_f
88     set
89      grade_rule_id                        = p_rec.grade_rule_id
90     ,business_group_id                    = p_rec.business_group_id
91     ,rate_id                              = p_rec.rate_id
92     ,grade_or_spinal_point_id             = p_rec.grade_or_spinal_point_id
93     ,rate_type                            = p_rec.rate_type
94     ,maximum                              = p_rec.maximum
95     ,mid_value                            = p_rec.mid_value
96     ,minimum                              = p_rec.minimum
97     ,sequence                             = p_rec.sequence
98     ,value                                = p_rec.value
99     ,request_id                           = p_rec.request_id
100     ,program_application_id               = p_rec.program_application_id
101     ,program_id                           = p_rec.program_id
102     ,program_update_date                  = p_rec.program_update_date
103     ,object_version_number                = p_rec.object_version_number
104     ,currency_code                        = p_rec.currency_code
105     where   grade_rule_id = p_rec.grade_rule_id
106     and     effective_start_date = p_validation_start_date
107     and     effective_end_date   = p_validation_end_date;
108     --
109     pay_pgr_shd.g_api_dml := false;   -- Unset the api dml status
110     --
111     -- Set the effective start and end dates
112     --
113     p_rec.effective_start_date := p_validation_start_date;
114     p_rec.effective_end_date   := p_validation_end_date;
115   End If;
116 --
117 hr_utility.set_location(' Leaving:'||l_proc, 15);
118 Exception
119   When hr_api.check_integrity_violated Then
120     -- A check constraint has been violated
121     pay_pgr_shd.g_api_dml := false;   -- Unset the api dml status
122     pay_pgr_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     pay_pgr_shd.g_api_dml := false;   -- Unset the api dml status
127     pay_pgr_shd.constraint_error
128       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
129   When Others Then
130     pay_pgr_shd.g_api_dml := false;   -- Unset the api dml status
131     Raise;
132 End dt_update_dml;
133 --
134 -- ----------------------------------------------------------------------------
135 -- |------------------------------< update_dml >------------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 --   This procedure calls the dt_update_dml control logic which handles
141 --   the actual datetrack dml.
142 --
143 -- Prerequisites:
144 --   This is an internal private procedure which must be called from the upd
145 --   procedure.
146 --
147 -- In Parameters:
148 --   A Pl/Sql record structre.
149 --
150 -- Post Success:
151 --   Processing contines.
152 --
153 -- Post Failure:
154 --   No specific error handling is required within this procedure.
155 --
156 -- Developer Implementation Notes:
157 --   The update 'set' arguments list should be modified if any of your
158 --   attributes are not updateable.
159 --
160 -- Access Status:
161 --   Internal Row Handler Use Only.
162 --
163 -- {End Of Comments}
164 -- ----------------------------------------------------------------------------
165 Procedure update_dml
166   (p_rec                      in out nocopy pay_pgr_shd.g_rec_type
167   ,p_effective_date           in date
168   ,p_datetrack_mode           in varchar2
169   ,p_validation_start_date    in date
170   ,p_validation_end_date      in date
171   ) is
172 --
173   l_proc        varchar2(72) := g_package||'update_dml';
174 --
175 Begin
176   hr_utility.set_location('Entering:'||l_proc, 5);
177   --
178   pay_pgr_upd.dt_update_dml
179     (p_rec                   => p_rec
180     ,p_effective_date        => p_effective_date
181     ,p_datetrack_mode        => p_datetrack_mode
182     ,p_validation_start_date => p_validation_start_date
183     ,p_validation_end_date   => p_validation_end_date
184     );
185   --
186   hr_utility.set_location(' Leaving:'||l_proc, 10);
187 End update_dml;
188 --
189 -- ----------------------------------------------------------------------------
190 -- |----------------------------< dt_pre_update >-----------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start Of Comments}
193 --
194 -- Description:
195 --   The dt_pre_update procedure controls the execution
196 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
197 --   and UPDATE_CHANGE_INSERT only. The execution required is as
198 --   follows:
199 --
200 --   1) Providing the datetrack update mode is not 'CORRECTION'
201 --      then set the effective end date of the current row (this
202 --      will be the validation_start_date - 1).
203 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
204 --      corresponding delete_dml process to delete any future rows
205 --      where the effective_start_date is greater than or equal to
206 --      the validation_start_date.
207 --   3) Call the insert_dml process to insert the new updated row
208 --      details.
209 --
210 -- Prerequisites:
211 --   This is an internal procedure which is called from the
212 --   pre_update procedure.
213 --
214 -- In Parameters:
215 --
216 -- Post Success:
217 --   Processing continues.
218 --
219 -- Post Failure:
220 --   If an error has occurred, an error message and exception will be raised
221 --   but not handled.
222 --
223 -- Developer Implementation Notes:
224 --   This is an internal procedure which is required by Datetrack. Don't
225 --   remove or modify.
226 --
227 -- Access Status:
228 --   Internal Row Handler Use Only.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 Procedure dt_pre_update
233   (p_rec                     in out nocopy     pay_pgr_shd.g_rec_type
234   ,p_effective_date          in date
235   ,p_datetrack_mode          in varchar2
236   ,p_validation_start_date   in date
237   ,p_validation_end_date     in date
238   ) is
239 --
240   l_proc                 varchar2(72) := g_package||'dt_pre_update';
241   l_dummy_version_number number;
242 --
243 Begin
244   hr_utility.set_location('Entering:'||l_proc, 5);
245   If (p_datetrack_mode <> hr_api.g_correction) then
246     --
247     -- Update the current effective end date
248     --
249     pay_pgr_shd.upd_effective_end_date
250       (p_effective_date         => p_effective_date
251       ,p_base_key_value         => p_rec.grade_rule_id
252       ,p_new_effective_end_date => (p_validation_start_date - 1)
253       ,p_validation_start_date  => p_validation_start_date
254       ,p_validation_end_date    => p_validation_end_date
255       ,p_object_version_number  => l_dummy_version_number
256       );
257     --
258     If (p_datetrack_mode = hr_api.g_update_override) then
259       --
260       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
261       -- delete any future rows
262       --
263       pay_pgr_del.delete_dml
264         (p_rec                   => p_rec
265         ,p_effective_date        => p_effective_date
266         ,p_datetrack_mode        => p_datetrack_mode
267         ,p_validation_start_date => p_validation_start_date
268         ,p_validation_end_date   => p_validation_end_date
269         );
270     End If;
271     --
272     -- We must now insert the updated row
273     --
274     pay_pgr_ins.insert_dml
275       (p_rec                    => p_rec
276       ,p_effective_date         => p_effective_date
277       ,p_datetrack_mode         => p_datetrack_mode
278       ,p_validation_start_date  => p_validation_start_date
279       ,p_validation_end_date    => p_validation_end_date
280       );
281   End If;
282   hr_utility.set_location(' Leaving:'||l_proc, 20);
283 End dt_pre_update;
284 --
285 -- ----------------------------------------------------------------------------
286 -- |------------------------------< pre_update >------------------------------|
287 -- ----------------------------------------------------------------------------
288 -- {Start Of Comments}
289 --
290 -- Description:
291 --   This private procedure contains any processing which is required before
292 --   the update dml.
293 --
294 -- Prerequisites:
295 --   This is an internal procedure which is called from the upd procedure.
296 --
297 -- In Parameters:
298 --   A Pl/Sql record structure.
299 --
300 -- Post Success:
301 --   Processing continues.
302 --
303 -- Post Failure:
304 --   If an error has occurred, an error message and exception will be raised
305 --   but not handled.
306 -- Developer Implementation Notes:
307 --   Any pre-processing required before the update dml is issued should be
308 --   coded within this procedure. It is important to note that any 3rd party
309 --   maintenance should be reviewed before placing in this procedure. The call
310 --   to the dt_update_dml procedure should NOT be removed.
311 --
312 -- Access Status:
313 --   Internal Row Handler Use Only.
314 --
315 -- {End Of Comments}
316 -- ----------------------------------------------------------------------------
317 Procedure pre_update
318   (p_rec                   in out nocopy pay_pgr_shd.g_rec_type
319   ,p_effective_date        in date
320   ,p_datetrack_mode        in varchar2
321   ,p_validation_start_date in date
322   ,p_validation_end_date   in date
323   ) is
324 --
325   l_proc        varchar2(72) := g_package||'pre_update';
326 --
327 Begin
328   hr_utility.set_location('Entering:'||l_proc, 5);
329   --
330   --
331   --
332   dt_pre_update
333     (p_rec                   => p_rec
334     ,p_effective_date        => p_effective_date
335     ,p_datetrack_mode        => p_datetrack_mode
336     ,p_validation_start_date => p_validation_start_date
337     ,p_validation_end_date   => p_validation_end_date
338     );
339   --
340   hr_utility.set_location(' Leaving:'||l_proc, 10);
341 End pre_update;
342 --
343 -- ----------------------------------------------------------------------------
344 -- |----------------------------< post_update >-------------------------------|
345 -- ----------------------------------------------------------------------------
346 -- {Start Of Comments}
347 --
348 -- Description:
349 --   This private procedure contains any processing which is required after
350 --   the update dml.
351 --
352 -- Prerequisites:
353 --   This is an internal procedure which is called from the upd procedure.
354 --
355 -- In Parameters:
356 --   A Pl/Sql record structure.
357 --
358 -- Post Success:
359 --   Processing continues.
360 --
361 -- Post Failure:
362 --   If an error has occurred, an error message and exception will be raised
363 --   but not handled.
364 --
365 -- Developer Implementation Notes:
366 --   Any post-processing required after the update dml is issued should be
367 --   coded within this procedure. It is important to note that any 3rd party
368 --   maintenance should be reviewed before placing in this procedure.
369 --
370 -- Access Status:
371 --   Internal Row Handler Use Only.
372 --
373 -- {End Of Comments}
374 -- ----------------------------------------------------------------------------
375 Procedure post_update
376   (p_rec                   in pay_pgr_shd.g_rec_type
377   ,p_effective_date        in date
378   ,p_datetrack_mode        in varchar2
379   ,p_validation_start_date in date
380   ,p_validation_end_date   in date
381   ) is
382 --
383   l_proc        varchar2(72) := g_package||'post_update';
384 --
385 Begin
386   hr_utility.set_location('Entering:'||l_proc, 5);
387   begin
388     --
389     pay_pgr_rku.after_update
390       (p_effective_date
391       => p_effective_date
392       ,p_datetrack_mode
393       => p_datetrack_mode
394       ,p_validation_start_date
395       => p_validation_start_date
396       ,p_validation_end_date
397       => p_validation_end_date
398       ,p_grade_rule_id
399       => p_rec.grade_rule_id
400       ,p_effective_start_date
401       => p_rec.effective_start_date
402       ,p_effective_end_date
403       => p_rec.effective_end_date
404       ,p_business_group_id
405       => p_rec.business_group_id
406       ,p_rate_id
407       => p_rec.rate_id
408       ,p_grade_or_spinal_point_id
409       => p_rec.grade_or_spinal_point_id
410       ,p_rate_type
411       => p_rec.rate_type
412       ,p_maximum
413       => p_rec.maximum
414       ,p_mid_value
415       => p_rec.mid_value
416       ,p_minimum
417       => p_rec.minimum
418       ,p_sequence
419       => p_rec.sequence
420       ,p_value
421       => p_rec.value
422       ,p_request_id
423       => p_rec.request_id
424       ,p_program_application_id
425       => p_rec.program_application_id
426       ,p_program_id
427       => p_rec.program_id
428       ,p_program_update_date
429       => p_rec.program_update_date
430       ,p_object_version_number
431       => p_rec.object_version_number
432       ,p_currency_code
433       => p_rec.currency_code
434       ,p_effective_start_date_o
435       => pay_pgr_shd.g_old_rec.effective_start_date
436       ,p_effective_end_date_o
437       => pay_pgr_shd.g_old_rec.effective_end_date
438       ,p_business_group_id_o
439       => pay_pgr_shd.g_old_rec.business_group_id
440       ,p_rate_id_o
441       => pay_pgr_shd.g_old_rec.rate_id
442       ,p_grade_or_spinal_point_id_o
443       => pay_pgr_shd.g_old_rec.grade_or_spinal_point_id
444       ,p_rate_type_o
445       => pay_pgr_shd.g_old_rec.rate_type
446       ,p_maximum_o
447       => pay_pgr_shd.g_old_rec.maximum
448       ,p_mid_value_o
449       => pay_pgr_shd.g_old_rec.mid_value
450       ,p_minimum_o
451       => pay_pgr_shd.g_old_rec.minimum
452       ,p_sequence_o
453       => pay_pgr_shd.g_old_rec.sequence
454       ,p_value_o
455       => pay_pgr_shd.g_old_rec.value
456       ,p_request_id_o
457       => pay_pgr_shd.g_old_rec.request_id
458       ,p_program_application_id_o
459       => pay_pgr_shd.g_old_rec.program_application_id
460       ,p_program_id_o
461       => pay_pgr_shd.g_old_rec.program_id
462       ,p_program_update_date_o
463       => pay_pgr_shd.g_old_rec.program_update_date
464       ,p_object_version_number_o
465       => pay_pgr_shd.g_old_rec.object_version_number
466       ,p_currency_code_o
467       => pay_pgr_shd.g_old_rec.currency_code
468       );
469     --
470   exception
471     --
472     when hr_api.cannot_find_prog_unit then
473       --
474       hr_api.cannot_find_prog_unit_error
475         (p_module_name => 'PAY_GRADE_RULES_F'
476         ,p_hook_type   => 'AU');
477       --
478   end;
479   --
480   hr_utility.set_location(' Leaving:'||l_proc, 10);
481 End post_update;
482 --
483 -- ----------------------------------------------------------------------------
484 -- |-----------------------------< convert_defs >-----------------------------|
485 -- ----------------------------------------------------------------------------
486 -- {Start Of Comments}
487 --
488 -- Description:
489 --   The Convert_Defs procedure has one very important function:
490 --   It must return the record structure for the row with all system defaulted
491 --   values converted into its corresponding parameter value for update. When
492 --   we attempt to update a row through the Upd process , certain
493 --   parameters can be defaulted which enables flexibility in the calling of
494 --   the upd process (e.g. only attributes which need to be updated need to be
495 --   specified). For the upd process to determine which attributes
496 --   have NOT been specified we need to check if the parameter has a reserved
497 --   system default value. Therefore, for all parameters which have a
498 --   corresponding reserved system default mechanism specified we need to
499 --   check if a system default is being used. If a system default is being
500 --   used then we convert the defaulted value into its corresponding attribute
501 --   value held in the g_old_rec data structure.
502 --
503 -- Prerequisites:
504 --   This private function can only be called from the upd process.
505 --
506 -- In Parameters:
507 --   A Pl/Sql record structure.
508 --
509 -- Post Success:
510 --   The record structure will be returned with all system defaulted parameter
511 --   values converted into its current row attribute value.
512 --
513 -- Post Failure:
514 --   No direct error handling is required within this function. Any possible
515 --   errors within this procedure will be a PL/SQL value error due to
516 --   conversion of datatypes or data lengths.
517 --
518 -- Developer Implementation Notes:
519 --   None.
520 --
521 -- Access Status:
522 --   Internal Row Handler Use Only.
523 --
524 -- {End Of Comments}
525 -- ----------------------------------------------------------------------------
526 Procedure convert_defs
527   (p_rec in out nocopy pay_pgr_shd.g_rec_type
528   ) is
529 --
530 Begin
531   --
532   -- We must now examine each argument value in the
533   -- p_rec plsql record structure
534   -- to see if a system default is being used. If a system default
535   -- is being used then we must set to the 'current' argument value.
536   --
537   If (p_rec.business_group_id = hr_api.g_number) then
538     p_rec.business_group_id :=
539     pay_pgr_shd.g_old_rec.business_group_id;
540   End If;
541   If (p_rec.rate_id = hr_api.g_number) then
542     p_rec.rate_id :=
543     pay_pgr_shd.g_old_rec.rate_id;
544   End If;
545   If (p_rec.grade_or_spinal_point_id = hr_api.g_number) then
546     p_rec.grade_or_spinal_point_id :=
547     pay_pgr_shd.g_old_rec.grade_or_spinal_point_id;
548   End If;
549   If (p_rec.rate_type = hr_api.g_varchar2) then
550     p_rec.rate_type :=
551     pay_pgr_shd.g_old_rec.rate_type;
552   End If;
553   If (p_rec.maximum = hr_api.g_varchar2) then
554     p_rec.maximum :=
555     pay_pgr_shd.g_old_rec.maximum;
556   End If;
557   If (p_rec.mid_value = hr_api.g_varchar2) then
558     p_rec.mid_value :=
559     pay_pgr_shd.g_old_rec.mid_value;
560   End If;
561   If (p_rec.minimum = hr_api.g_varchar2) then
562     p_rec.minimum :=
563     pay_pgr_shd.g_old_rec.minimum;
564   End If;
565   If (p_rec.value = hr_api.g_varchar2) then
566     p_rec.value :=
567     pay_pgr_shd.g_old_rec.value;
568   End If;
569   If (p_rec.sequence = hr_api.g_number) then
570     p_rec.sequence :=
571     pay_pgr_shd.g_old_rec.sequence;
572   End If;
573   If (p_rec.request_id = hr_api.g_number) then
574     p_rec.request_id :=
575     pay_pgr_shd.g_old_rec.request_id;
576   End If;
577   If (p_rec.program_application_id = hr_api.g_number) then
578     p_rec.program_application_id :=
579     pay_pgr_shd.g_old_rec.program_application_id;
580   End If;
581   If (p_rec.program_id = hr_api.g_number) then
582     p_rec.program_id :=
583     pay_pgr_shd.g_old_rec.program_id;
584   End If;
585   If (p_rec.program_update_date = hr_api.g_date) then
586     p_rec.program_update_date :=
587     pay_pgr_shd.g_old_rec.program_update_date;
588   End If;
589   If (p_rec.currency_code = hr_api.g_varchar2) then
590     p_rec.currency_code :=
591     pay_pgr_shd.g_old_rec.currency_code;
592   End If;
593   --
594 End convert_defs;
595 --
596 -- ----------------------------------------------------------------------------
597 -- |---------------------------------< upd >----------------------------------|
598 -- ----------------------------------------------------------------------------
599 Procedure upd
600   (p_effective_date in     date
601   ,p_datetrack_mode in     varchar2
602   ,p_rec            in out nocopy pay_pgr_shd.g_rec_type
603   ) is
604 --
605   l_proc                        varchar2(72) := g_package||'upd';
606   l_validation_start_date       date;
607   l_validation_end_date         date;
608 --
609 Begin
610   hr_utility.set_location('Entering:'||l_proc, 5);
611   --
612   -- Ensure that the DateTrack update mode is valid
613   --
614   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
615   --
616   -- We must lock the row which we need to update.
617   --
618   pay_pgr_shd.lck
619     (p_effective_date                   => p_effective_date
620     ,p_datetrack_mode                   => p_datetrack_mode
621     ,p_grade_rule_id                    => p_rec.grade_rule_id
622     ,p_object_version_number            => p_rec.object_version_number
623     ,p_validation_start_date            => l_validation_start_date
624     ,p_validation_end_date              => l_validation_end_date
625     );
626   --
627   -- 1. During an update system defaults are used to determine if
628   --    arguments have been defaulted or not. We must therefore
629   --    derive the full record structure values to be updated.
630   --
631   -- 2. Call the supporting update validate operations.
632   --
633   pay_pgr_upd.convert_defs(p_rec);
634   --
635   pay_pgr_bus.update_validate
636     (p_rec                              => p_rec
637     ,p_effective_date                   => p_effective_date
638     ,p_datetrack_mode                   => p_datetrack_mode
639     ,p_validation_start_date            => l_validation_start_date
640     ,p_validation_end_date              => l_validation_end_date
641     );
642   --
643   -- Call to raise any errors on multi-message list
644   hr_multi_message.end_validation_set;
645   --
646   -- Call the supporting pre-update operation
647   --
648   pre_update
649     (p_rec                              => p_rec
650     ,p_effective_date                   => p_effective_date
651     ,p_datetrack_mode                   => p_datetrack_mode
652     ,p_validation_start_date            => l_validation_start_date
653     ,p_validation_end_date              => l_validation_end_date
654     );
655   --
656   -- Update the row.
657   --
658   update_dml
659     (p_rec                              => p_rec
660     ,p_effective_date                   => p_effective_date
661     ,p_datetrack_mode                   => p_datetrack_mode
662     ,p_validation_start_date            => l_validation_start_date
663     ,p_validation_end_date              => l_validation_end_date
664     );
665   --
666   -- Call the supporting post-update operation
667   --
668   post_update
669     (p_rec                              => p_rec
670     ,p_effective_date                   => p_effective_date
671     ,p_datetrack_mode                   => p_datetrack_mode
672     ,p_validation_start_date            => l_validation_start_date
673     ,p_validation_end_date              => l_validation_end_date
674     );
675   --
676   -- Call to raise any errors on multi-message list
677   hr_multi_message.end_validation_set;
678 End upd;
679 --
680 -- ----------------------------------------------------------------------------
681 -- |------------------------------< upd >-------------------------------------|
682 -- ----------------------------------------------------------------------------
683 Procedure upd
684   (p_effective_date               in     date
685   ,p_datetrack_mode               in     varchar2
686   ,p_grade_rule_id                in     number
687   ,p_object_version_number        in out nocopy number
688   ,p_maximum                      in     varchar2  default hr_api.g_varchar2
689   ,p_mid_value                    in     varchar2  default hr_api.g_varchar2
690   ,p_minimum                      in     varchar2  default hr_api.g_varchar2
691   ,p_sequence                     in     number    default hr_api.g_number
692   ,p_value                        in     varchar2  default hr_api.g_varchar2
693   ,p_currency_code                in     varchar2  default hr_api.g_varchar2
694   ,p_effective_start_date            out nocopy date
695   ,p_effective_end_date              out nocopy date
696   ) is
697 --
698   l_rec         pay_pgr_shd.g_rec_type;
699   l_proc        varchar2(72) := g_package||'upd';
700 --
701 Begin
702   hr_utility.set_location('Entering:'||l_proc, 5);
703   --
704   -- Call conversion function to turn arguments into the
705   -- l_rec structure.
706   --
707   l_rec :=
708   pay_pgr_shd.convert_args
709     (p_grade_rule_id
710     ,NULL
711     ,NULL
712     ,hr_api.g_number  --p_business_group_id
713     ,hr_api.g_number  --p_rate_id
714     ,hr_api.g_number  --p_grade_or_spinal_point_id
715     ,hr_api.g_varchar2  --p_rate_type
716     ,p_maximum
717     ,p_mid_value
718     ,p_minimum
719     ,p_sequence
720     ,p_value
721     ,NULL --p_request_id
722     ,NULL --p_program_application_id
723     ,NULL --p_program_id
724     ,NULL --p_program_update_date
725     ,p_object_version_number
726     ,p_currency_code
727     );
728   --
729   -- Having converted the arguments into the
730   -- plsql record structure we call the corresponding record
731   -- business process.
732   --
733   pay_pgr_upd.upd
734     (p_effective_date
735     ,p_datetrack_mode
736     ,l_rec
737     );
738   --
739   -- Set the out parameters
740   --
741   p_object_version_number            := l_rec.object_version_number;
742   p_effective_start_date             := l_rec.effective_start_date;
743   p_effective_end_date               := l_rec.effective_end_date;
744   --
745   --
746   hr_utility.set_location(' Leaving:'||l_proc, 10);
747 End upd;
748 --
749 end pay_pgr_upd;