DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_RFM_UPD

Source


1 Package Body pay_rfm_upd as
2 /* $Header: pyrfmrhi.pkb 120.0 2005/05/29 08:20 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_rfm_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 --
58   (p_rec                   in out nocopy pay_rfm_shd.g_rec_type
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
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_report_format_mappings_f'
79         ,p_base_key_column => 'report_format_mapping_id'
80         ,p_base_key_value  => p_rec.report_format_mapping_id
81         );
82     --
83     pay_rfm_shd.g_api_dml := true;  -- Set the api dml status
84     --
85     -- Update the pay_report_format_mappings_f Row
86     --
87     update  pay_report_format_mappings_f
88     set
89      report_type                          = p_rec.report_type
90     ,report_qualifier                     = p_rec.report_qualifier
91     ,report_format                        = p_rec.report_format
92     ,range_code                           = p_rec.range_code
93     ,assignment_action_code               = p_rec.assignment_action_code
94     ,initialization_code                  = p_rec.initialization_code
95     ,archive_code                         = p_rec.archive_code
96     ,magnetic_code                        = p_rec.magnetic_code
97     ,report_category                      = p_rec.report_category
98     ,report_name                          = p_rec.report_name
99     ,sort_code                            = p_rec.sort_code
100     ,updatable_flag                       = p_rec.updatable_flag
101     ,deinitialization_code                = p_rec.deinitialization_code
102     ,report_format_mapping_id             = p_rec.report_format_mapping_id
103     ,business_group_id                    = p_rec.business_group_id
104     ,legislation_code                     = p_rec.legislation_code
105     ,temporary_action_flag                = p_rec.temporary_action_flag
106     ,object_version_number                = p_rec.object_version_number
107     where   report_format_mapping_id = p_rec.report_format_mapping_id
108     and     effective_start_date = p_validation_start_date
109     and     effective_end_date   = p_validation_end_date;
110     --
111     pay_rfm_shd.g_api_dml := false;   -- Unset the api dml status
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     pay_rfm_shd.g_api_dml := false;   -- Unset the api dml status
124     pay_rfm_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     pay_rfm_shd.g_api_dml := false;   -- Unset the api dml status
129     pay_rfm_shd.constraint_error
130       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131   When Others Then
132     pay_rfm_shd.g_api_dml := false;   -- Unset the api dml status
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_rfm_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_rfm_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);
192 -- |----------------------------< dt_pre_update >-----------------------------|
189 End update_dml;
190 --
191 -- ----------------------------------------------------------------------------
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_rfm_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_rfm_shd.upd_effective_end_date
252       (p_effective_date         => p_effective_date
253       ,p_base_key_value         => p_rec.report_format_mapping_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_rfm_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_rfm_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_rfm_shd.g_rec_type
321   ,p_effective_date        in date
322   ,p_datetrack_mode        in varchar2
323   ,p_validation_start_date in date
327   l_proc        varchar2(72) := g_package||'pre_update';
324   ,p_validation_end_date   in date
325   ) is
326 --
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_rfm_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   --
390   hr_utility.set_location(' Leaving:'||l_proc, 10);
391 End post_update;
392 --
393 -- ----------------------------------------------------------------------------
394 -- |-----------------------------< convert_defs >-----------------------------|
395 -- ----------------------------------------------------------------------------
396 -- {Start Of Comments}
397 --
398 -- Description:
399 --   The Convert_Defs procedure has one very important function:
400 --   It must return the record structure for the row with all system defaulted
401 --   values converted into its corresponding parameter value for update. When
402 --   we attempt to update a row through the Upd process , certain
403 --   parameters can be defaulted which enables flexibility in the calling of
404 --   the upd process (e.g. only attributes which need to be updated need to be
405 --   specified). For the upd process to determine which attributes
406 --   have NOT been specified we need to check if the parameter has a reserved
407 --   system default value. Therefore, for all parameters which have a
408 --   corresponding reserved system default mechanism specified we need to
409 --   check if a system default is being used. If a system default is being
410 --   used then we convert the defaulted value into its corresponding attribute
411 --   value held in the g_old_rec data structure.
412 --
413 -- Prerequisites:
414 --   This private function can only be called from the upd process.
415 --
416 -- In Parameters:
417 --   A Pl/Sql record structure.
418 --
419 -- Post Success:
420 --   The record structure will be returned with all system defaulted parameter
421 --   values converted into its current row attribute value.
422 --
423 -- Post Failure:
424 --   No direct error handling is required within this function. Any possible
425 --   errors within this procedure will be a PL/SQL value error due to
426 --   conversion of datatypes or data lengths.
427 --
428 -- Developer Implementation Notes:
429 --   None.
430 --
431 -- Access Status:
432 --   Internal Row Handler Use Only.
433 --
434 -- {End Of Comments}
435 -- ----------------------------------------------------------------------------
436 Procedure convert_defs
437   (p_rec in out nocopy pay_rfm_shd.g_rec_type
438   ) is
439 --
440 Begin
441   --
442   -- We must now examine each argument value in the
443   -- p_rec plsql record structure
444   -- to see if a system default is being used. If a system default
445   -- is being used then we must set to the 'current' argument value.
446   --
447   If (p_rec.report_type = hr_api.g_varchar2) then
448     p_rec.report_type :=
449     pay_rfm_shd.g_old_rec.report_type;
450   End If;
451   If (p_rec.report_qualifier = hr_api.g_varchar2) then
452     p_rec.report_qualifier :=
453     pay_rfm_shd.g_old_rec.report_qualifier;
454   End If;
455   If (p_rec.report_format = hr_api.g_varchar2) then
456     p_rec.report_format :=
457     pay_rfm_shd.g_old_rec.report_format;
458   End If;
459   If (p_rec.range_code = hr_api.g_varchar2) then
460     p_rec.range_code :=
461     pay_rfm_shd.g_old_rec.range_code;
462   End If;
463   If (p_rec.assignment_action_code = hr_api.g_varchar2) then
464     p_rec.assignment_action_code :=
465     pay_rfm_shd.g_old_rec.assignment_action_code;
466   End If;
470   End If;
467   If (p_rec.initialization_code = hr_api.g_varchar2) then
468     p_rec.initialization_code :=
469     pay_rfm_shd.g_old_rec.initialization_code;
471   If (p_rec.archive_code = hr_api.g_varchar2) then
472     p_rec.archive_code :=
473     pay_rfm_shd.g_old_rec.archive_code;
474   End If;
475   If (p_rec.magnetic_code = hr_api.g_varchar2) then
476     p_rec.magnetic_code :=
477     pay_rfm_shd.g_old_rec.magnetic_code;
478   End If;
479   If (p_rec.report_category = hr_api.g_varchar2) then
480     p_rec.report_category :=
481     pay_rfm_shd.g_old_rec.report_category;
482   End If;
483   If (p_rec.report_name = hr_api.g_varchar2) then
484     p_rec.report_name :=
485     pay_rfm_shd.g_old_rec.report_name;
486   End If;
487   If (p_rec.sort_code = hr_api.g_varchar2) then
488     p_rec.sort_code :=
489     pay_rfm_shd.g_old_rec.sort_code;
490   End If;
491   If (p_rec.updatable_flag = hr_api.g_varchar2) then
492     p_rec.updatable_flag :=
493     pay_rfm_shd.g_old_rec.updatable_flag;
494   End If;
495   If (p_rec.deinitialization_code = hr_api.g_varchar2) then
496     p_rec.deinitialization_code :=
497     pay_rfm_shd.g_old_rec.deinitialization_code;
498   End If;
499   If (p_rec.business_group_id = hr_api.g_number) then
500     p_rec.business_group_id :=
501     pay_rfm_shd.g_old_rec.business_group_id;
502   End If;
503   If (p_rec.legislation_code = hr_api.g_varchar2) then
504     p_rec.legislation_code :=
505     pay_rfm_shd.g_old_rec.legislation_code;
506   End If;
507   If (p_rec.temporary_action_flag = hr_api.g_varchar2) then
508     p_rec.temporary_action_flag :=
509     pay_rfm_shd.g_old_rec.temporary_action_flag;
510   End If;
511   --
512 End convert_defs;
513 --
514 -- ----------------------------------------------------------------------------
515 -- |---------------------------------< upd >----------------------------------|
516 -- ----------------------------------------------------------------------------
517 Procedure upd
518   (p_effective_date in     date
519   ,p_datetrack_mode in     varchar2
520   ,p_rec            in out nocopy pay_rfm_shd.g_rec_type
521   ) is
522 --
523   l_proc                        varchar2(72) := g_package||'upd';
524   l_validation_start_date       date;
525   l_validation_end_date         date;
526 --
527 Begin
528   hr_utility.set_location('Entering:'||l_proc, 5);
529   --
530   -- Ensure that the DateTrack update mode is valid
531   --
532   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
533   --
534   -- We must lock the row which we need to update.
535   --
536   pay_rfm_shd.lck
537     (p_effective_date                   => p_effective_date
538     ,p_datetrack_mode                   => p_datetrack_mode
539     ,p_report_format_mapping_id         => p_rec.report_format_mapping_id
540     ,p_object_version_number            => p_rec.object_version_number
541     ,p_validation_start_date            => l_validation_start_date
542     ,p_validation_end_date              => l_validation_end_date
543     );
544   --
545   -- 1. During an update system defaults are used to determine if
546   --    arguments have been defaulted or not. We must therefore
547   --    derive the full record structure values to be updated.
548   --
549   -- 2. Call the supporting update validate operations.
550   --
551   pay_rfm_upd.convert_defs(p_rec);
552   --
553   pay_rfm_bus.update_validate
554     (p_rec                              => p_rec
555     ,p_effective_date                   => p_effective_date
556     ,p_datetrack_mode                   => p_datetrack_mode
557     ,p_validation_start_date            => l_validation_start_date
558     ,p_validation_end_date              => l_validation_end_date
559     );
560   --
561   -- Call to raise any errors on multi-message list
562   hr_multi_message.end_validation_set;
563   --
564   -- Call the supporting pre-update operation
565   --
566   pre_update
567     (p_rec                              => p_rec
568     ,p_effective_date                   => p_effective_date
569     ,p_datetrack_mode                   => p_datetrack_mode
570     ,p_validation_start_date            => l_validation_start_date
571     ,p_validation_end_date              => l_validation_end_date
572     );
573   --
574   -- Update the row.
575   --
576   update_dml
577     (p_rec                              => p_rec
578     ,p_effective_date                   => p_effective_date
579     ,p_datetrack_mode                   => p_datetrack_mode
580     ,p_validation_start_date            => l_validation_start_date
581     ,p_validation_end_date                  => l_validation_end_date
582     );
583   --
584   -- Call the supporting post-update operation
585   --
586   post_update
587     (p_rec                              => p_rec
588     ,p_effective_date                   => p_effective_date
589     ,p_datetrack_mode                   => p_datetrack_mode
590     ,p_validation_start_date            => l_validation_start_date
591     ,p_validation_end_date              => l_validation_end_date
592     );
593   --
594   -- Call to raise any errors on multi-message list
595   hr_multi_message.end_validation_set;
596 End upd;
597 --
598 -- ----------------------------------------------------------------------------
599 -- |------------------------------< upd >-------------------------------------|
600 -- ----------------------------------------------------------------------------
601 Procedure upd
602   (p_effective_date               in     date
603   ,p_datetrack_mode               in     varchar2
607   ,p_report_qualifier             in     varchar2  default hr_api.g_varchar2
604   ,p_report_format_mapping_id     in     number
605   ,p_object_version_number        in out nocopy number
606   ,p_report_type                  in     varchar2  default hr_api.g_varchar2
608   ,p_report_format                in     varchar2  default hr_api.g_varchar2
609   ,p_report_category              in     varchar2  default hr_api.g_varchar2
610   ,p_range_code                   in     varchar2  default hr_api.g_varchar2
611   ,p_assignment_action_code       in     varchar2  default hr_api.g_varchar2
612   ,p_initialization_code          in     varchar2  default hr_api.g_varchar2
613   ,p_archive_code                 in     varchar2  default hr_api.g_varchar2
614   ,p_magnetic_code                in     varchar2  default hr_api.g_varchar2
615   ,p_report_name                  in     varchar2  default hr_api.g_varchar2
616   ,p_sort_code                    in     varchar2  default hr_api.g_varchar2
617   ,p_updatable_flag               in     varchar2  default hr_api.g_varchar2
618   ,p_deinitialization_code        in     varchar2  default hr_api.g_varchar2
619   ,p_business_group_id            in     number    default hr_api.g_number
620   ,p_legislation_code             in     varchar2  default hr_api.g_varchar2
621   ,p_temporary_action_flag        in     varchar2  default hr_api.g_varchar2
622   ,p_effective_start_date            out nocopy date
623   ,p_effective_end_date              out nocopy date
624   ) is
625 --
626   l_rec         pay_rfm_shd.g_rec_type;
627   l_proc        varchar2(72) := g_package||'upd';
628 --
629 Begin
630   hr_utility.set_location('Entering:'||l_proc, 5);
631   --
632   -- Call conversion function to turn arguments into the
633   -- l_rec structure.
634   --
635   l_rec :=
636   pay_rfm_shd.convert_args
637     (p_report_type
638     ,p_report_qualifier
639     ,p_report_format
640     ,null
641     ,null
642     ,p_range_code
643     ,p_assignment_action_code
644     ,p_initialization_code
645     ,p_archive_code
646     ,p_magnetic_code
647     ,p_report_category
648     ,p_report_name
649     ,p_sort_code
650     ,p_updatable_flag
651     ,p_deinitialization_code
652     ,p_report_format_mapping_id
653     ,p_business_group_id
654     ,p_legislation_code
655     ,p_temporary_action_flag
656     ,p_object_version_number
657     );
658   --
659   -- Having converted the arguments into the
660   -- plsql record structure we call the corresponding record
661   -- business process.
662   --
663   pay_rfm_upd.upd
664     (trunc(p_effective_date)
665     ,p_datetrack_mode
666     ,l_rec
667     );
668   --
669   -- Set the out parameters
670   --
671   p_object_version_number            := l_rec.object_version_number;
672   p_effective_start_date             := l_rec.effective_start_date;
673   p_effective_end_date               := l_rec.effective_end_date;
674   --
675   --
676   hr_utility.set_location(' Leaving:'||l_proc, 10);
677 End upd;
678 --
679 end pay_rfm_upd;