DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PCL_UPD

Source


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