DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_GIN_UPD

Source


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