DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_ISB_UPD

Source


1 Package Body pay_isb_upd as
2 /* $Header: pyisbrhi.pkb 115.3 2002/12/16 17:48:15 dsaxby ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_isb_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_isb_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_ie_social_benefits_f'
79         ,p_base_key_column => 'social_benefit_id'
80         ,p_base_key_value  => p_rec.social_benefit_id
81         );
82     --
83     --
84     --
85     -- Update the pay_ie_social_benefits_f Row
86     --
87     update  pay_ie_social_benefits_f
88     set
89      social_benefit_id                    = p_rec.social_benefit_id
90     ,object_version_number                = p_rec.object_version_number
91     ,assignment_id                        = p_rec.assignment_id
92     ,absence_start_date                   = p_rec.absence_start_date
93     ,absence_end_date                     = p_rec.absence_end_date
94     ,benefit_amount                       = p_rec.benefit_amount
95     ,benefit_type                         = p_rec.benefit_type
96     ,calculation_option                   = p_rec.calculation_option
97     ,reduced_tax_credit                   = p_rec.reduced_tax_credit
98     ,reduced_standard_cutoff              = p_rec.reduced_standard_cutoff
99     ,incident_id                          = p_rec.incident_id
100     ,request_id                           = p_rec.request_id
101     ,program_application_id               = p_rec.program_application_id
102     ,program_id                           = p_rec.program_id
103     ,program_update_date                  = p_rec.program_update_date
104     where   social_benefit_id = p_rec.social_benefit_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     pay_isb_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     pay_isb_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 pay_isb_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   pay_isb_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 pay_isb_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     pay_isb_shd.upd_effective_end_date
249       (p_effective_date         => p_effective_date
250       ,p_base_key_value         => p_rec.social_benefit_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       pay_isb_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     pay_isb_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 pay_isb_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 pay_isb_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     pay_isb_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_social_benefit_id
398       => p_rec.social_benefit_id
399       ,p_effective_start_date
400       => p_rec.effective_start_date
401       ,p_effective_end_date
402       => p_rec.effective_end_date
403       ,p_object_version_number
404       => p_rec.object_version_number
405       ,p_assignment_id
406       => p_rec.assignment_id
407       ,p_absence_start_date
408       => p_rec.absence_start_date
409       ,p_absence_end_date
410       => p_rec.absence_end_date
411       ,p_benefit_amount
412       => p_rec.benefit_amount
413       ,p_benefit_type
414       => p_rec.benefit_type
415       ,p_calculation_option
416       => p_rec.calculation_option
417       ,p_reduced_tax_credit
418       => p_rec.reduced_tax_credit
419       ,p_reduced_standard_cutoff
420       => p_rec.reduced_standard_cutoff
421       ,p_incident_id
422       => p_rec.incident_id
423       ,p_request_id
424       => p_rec.request_id
425       ,p_program_application_id
426       => p_rec.program_application_id
427       ,p_program_id
428       => p_rec.program_id
429       ,p_program_update_date
430       => p_rec.program_update_date
431       ,p_effective_start_date_o
432       => pay_isb_shd.g_old_rec.effective_start_date
433       ,p_effective_end_date_o
434       => pay_isb_shd.g_old_rec.effective_end_date
435       ,p_object_version_number_o
436       => pay_isb_shd.g_old_rec.object_version_number
437       ,p_assignment_id_o
438       => pay_isb_shd.g_old_rec.assignment_id
439       ,p_absence_start_date_o
440       => pay_isb_shd.g_old_rec.absence_start_date
441       ,p_absence_end_date_o
442       => pay_isb_shd.g_old_rec.absence_end_date
443       ,p_benefit_amount_o
444       => pay_isb_shd.g_old_rec.benefit_amount
445       ,p_benefit_type_o
446       => pay_isb_shd.g_old_rec.benefit_type
447       ,p_calculation_option_o
448       => pay_isb_shd.g_old_rec.calculation_option
449       ,p_reduced_tax_credit_o
450       => pay_isb_shd.g_old_rec.reduced_tax_credit
451       ,p_reduced_standard_cutoff_o
452       => pay_isb_shd.g_old_rec.reduced_standard_cutoff
453       ,p_incident_id_o
454       => pay_isb_shd.g_old_rec.incident_id
455       ,p_request_id_o
456       => pay_isb_shd.g_old_rec.request_id
457       ,p_program_application_id_o
458       => pay_isb_shd.g_old_rec.program_application_id
459       ,p_program_id_o
460       => pay_isb_shd.g_old_rec.program_id
461       ,p_program_update_date_o
462       => pay_isb_shd.g_old_rec.program_update_date
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 => 'PAY_IE_SOCIAL_BENEFITS_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 pay_isb_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.assignment_id = hr_api.g_number) then
533     p_rec.assignment_id :=
534     pay_isb_shd.g_old_rec.assignment_id;
535   End If;
536   If (p_rec.absence_start_date = hr_api.g_date) then
537     p_rec.absence_start_date :=
538     pay_isb_shd.g_old_rec.absence_start_date;
539   End If;
540   If (p_rec.absence_end_date = hr_api.g_date) then
541     p_rec.absence_end_date :=
542     pay_isb_shd.g_old_rec.absence_end_date;
543   End If;
544   If (p_rec.benefit_amount = hr_api.g_number) then
545     p_rec.benefit_amount :=
546     pay_isb_shd.g_old_rec.benefit_amount;
547   End If;
548   If (p_rec.benefit_type = hr_api.g_varchar2) then
549     p_rec.benefit_type :=
550     pay_isb_shd.g_old_rec.benefit_type;
551   End If;
552   If (p_rec.calculation_option = hr_api.g_varchar2) then
553     p_rec.calculation_option :=
554     pay_isb_shd.g_old_rec.calculation_option;
555   End If;
556   If (p_rec.reduced_tax_credit = hr_api.g_number) then
557     p_rec.reduced_tax_credit :=
558     pay_isb_shd.g_old_rec.reduced_tax_credit;
559   End If;
560   If (p_rec.reduced_standard_cutoff = hr_api.g_number) then
561     p_rec.reduced_standard_cutoff :=
562     pay_isb_shd.g_old_rec.reduced_standard_cutoff;
563   End If;
564   If (p_rec.incident_id = hr_api.g_number) then
565     p_rec.incident_id :=
566     pay_isb_shd.g_old_rec.incident_id;
567   End If;
568   If (p_rec.request_id = hr_api.g_number) then
569     p_rec.request_id :=
570     pay_isb_shd.g_old_rec.request_id;
571   End If;
572   If (p_rec.program_application_id = hr_api.g_number) then
573     p_rec.program_application_id :=
574     pay_isb_shd.g_old_rec.program_application_id;
575   End If;
576   If (p_rec.program_id = hr_api.g_varchar2) then
577     p_rec.program_id :=
578     pay_isb_shd.g_old_rec.program_id;
579   End If;
580   If (p_rec.program_update_date = hr_api.g_date) then
581     p_rec.program_update_date :=
582     pay_isb_shd.g_old_rec.program_update_date;
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 pay_isb_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   pay_isb_shd.lck
610     (p_effective_date                   => p_effective_date
611     ,p_datetrack_mode                   => p_datetrack_mode
612     ,p_social_benefit_id                => p_rec.social_benefit_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   pay_isb_upd.convert_defs(p_rec);
625   --
626   pay_isb_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_social_benefit_id            in     number
672   ,p_object_version_number        in out nocopy number
673   ,p_assignment_id                in     number    default hr_api.g_number
674   ,p_benefit_amount               in     number    default hr_api.g_number
675   ,p_calculation_option           in     varchar2  default hr_api.g_varchar2
676   ,p_absence_start_date           in     date      default hr_api.g_date
677   ,p_absence_end_date             in     date      default hr_api.g_date
678   ,p_benefit_type                 in     varchar2  default hr_api.g_varchar2
679   ,p_reduced_tax_credit           in     number    default hr_api.g_number
680   ,p_reduced_standard_cutoff      in     number    default hr_api.g_number
681   ,p_incident_id                  in     number    default hr_api.g_number
682   ,p_request_id                   in     number    default hr_api.g_number
683   ,p_program_application_id       in     number    default hr_api.g_number
684   ,p_program_id                   in     varchar2  default hr_api.g_varchar2
685   ,p_program_update_date          in     date      default hr_api.g_date
686   ,p_effective_start_date            out nocopy date
687   ,p_effective_end_date              out nocopy date
688   ) is
689 --
690   l_rec         pay_isb_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   pay_isb_shd.convert_args
701     (p_social_benefit_id
702     ,null
703     ,null
704     ,p_object_version_number
705     ,p_assignment_id
706     ,p_absence_start_date
707     ,p_absence_end_date
708     ,p_benefit_amount
709     ,p_benefit_type
710     ,p_calculation_option
711     ,p_reduced_tax_credit
712     ,p_reduced_standard_cutoff
713     ,p_incident_id
714     ,p_request_id
715     ,p_program_application_id
716     ,p_program_id
717     ,p_program_update_date
718     );
719   --
720   -- Having converted the arguments into the
721   -- plsql record structure we call the corresponding record
722   -- business process.
723   --
724   pay_isb_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   hr_utility.set_location(' Leaving:'||l_proc, 10);
737 End upd;
738 --
739 end pay_isb_upd;