DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_SID_UPD

Source


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