DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQP_DET_UPD

Source


1 Package Body pqp_det_upd as
2 /* $Header: pqdetrhi.pkb 115.8 2003/02/17 22:14:03 tmehra ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pqp_det_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml update logic. The processing of
17 --   this procedure is:
18 --   1) Increment the object_version_number by 1 if the object_version_number
19 --      is defined as an attribute for this entity.
20 --   2) To set and unset the g_api_dml status as required (as we are about to
21 --      perform dml).
22 --   3) To update the specified row in the schema using the primary key in
23 --      the predicates.
24 --   4) To trap any constraint violations that may have occurred.
25 --   5) To raise any other errors.
26 --
27 -- Prerequisites:
28 --   This is an internal private procedure which must be called from the upd
29 --   procedure.
30 --
31 -- In Parameters:
32 --   A Pl/Sql record structre.
33 --
34 -- Post Success:
35 --   The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 --   On the update dml failure it is important to note that we always reset the
39 --   g_api_dml status to false.
40 --   If a check, unique or parent integrity constraint violation is raised the
41 --   constraint_error procedure will be called.
42 --   If any other error is reported, the error will be raised after the
43 --   g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 --   The update 'set' attribute list should be modified if any of your
47 --   attributes are not updateable.
48 --
49 -- Access Status:
50 --   Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy pqp_det_shd.g_rec_type) is
55 --
56   l_proc  varchar2(72) := g_package||'update_dml';
57 --
58 Begin
59   hr_utility.set_location('Entering:'||l_proc, 5);
60   --
61   -- Increment the object version
62   --
63   p_rec.object_version_number := p_rec.object_version_number + 1;
64   --
65   pqp_det_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the pqp_analyzed_alien_details Row
68   --
69   update pqp_analyzed_alien_details
70   set
71   analyzed_data_details_id          = p_rec.analyzed_data_details_id,
72   analyzed_data_id                  = p_rec.analyzed_data_id,
73   income_code                       = p_rec.income_code,
74   withholding_rate                  = p_rec.withholding_rate,
75   income_code_sub_type              = p_rec.income_code_sub_type,
76   exemption_code                    = p_rec.exemption_code,
77   maximum_benefit_amount            = p_rec.maximum_benefit_amount,
78   retro_lose_ben_amt_flag           = p_rec.retro_lose_ben_amt_flag,
79   date_benefit_ends                 = p_rec.date_benefit_ends,
80   retro_lose_ben_date_flag          = p_rec.retro_lose_ben_date_flag,
81   nra_exempt_from_ss                = p_rec.nra_exempt_from_ss,
82   nra_exempt_from_medicare          = p_rec.nra_exempt_from_medicare,
83   student_exempt_from_ss            = p_rec.student_exempt_from_ss,
84   student_exempt_from_medicare      = p_rec.student_exempt_from_medicare,
85   addl_withholding_flag             = p_rec.addl_withholding_flag,
86   constant_addl_tax                 = p_rec.constant_addl_tax,
87   addl_withholding_amt              = p_rec.addl_withholding_amt,
88   addl_wthldng_amt_period_type      = p_rec.addl_wthldng_amt_period_type,
89   personal_exemption                = p_rec.personal_exemption,
90   addl_exemption_allowed            = p_rec.addl_exemption_allowed,
91   treaty_ben_allowed_flag           = p_rec.treaty_ben_allowed_flag,
92   treaty_benefits_start_date        = p_rec.treaty_benefits_start_date,
93   object_version_number             = p_rec.object_version_number,
94   retro_loss_notification_sent      = p_rec.retro_loss_notification_sent,
95   current_analysis                  = p_rec.current_analysis,
96   forecast_income_code              = p_rec.forecast_income_code
97   where analyzed_data_details_id    = p_rec.analyzed_data_details_id;
98   --
99   pqp_det_shd.g_api_dml := false;   -- Unset the api dml status
100   --
101   hr_utility.set_location(' Leaving:'||l_proc, 10);
102 --
103 Exception
104   When hr_api.check_integrity_violated Then
105     -- A check constraint has been violated
106     pqp_det_shd.g_api_dml := false;   -- Unset the api dml status
107     pqp_det_shd.constraint_error
108       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
109   When hr_api.parent_integrity_violated Then
110     -- Parent integrity has been violated
111     pqp_det_shd.g_api_dml := false;   -- Unset the api dml status
112     pqp_det_shd.constraint_error
113       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
114   When hr_api.unique_integrity_violated Then
115     -- Unique integrity has been violated
116     pqp_det_shd.g_api_dml := false;   -- Unset the api dml status
117     pqp_det_shd.constraint_error
118       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
119   When Others Then
120     pqp_det_shd.g_api_dml := false;   -- Unset the api dml status
121     Raise;
122 End update_dml;
123 --
124 -- ----------------------------------------------------------------------------
125 -- |------------------------------< pre_update >------------------------------|
126 -- ----------------------------------------------------------------------------
127 -- {Start Of Comments}
128 --
129 -- Description:
130 --   This private procedure contains any processing which is required before
131 --   the update dml.
132 --
133 -- Prerequisites:
134 --   This is an internal procedure which is called from the upd procedure.
135 --
136 -- In Parameters:
137 --   A Pl/Sql record structre.
138 --
139 -- Post Success:
140 --   Processing continues.
141 --
142 -- Post Failure:
143 --   If an error has occurred, an error message and exception will be raised
144 --   but not handled.
145 --
146 -- Developer Implementation Notes:
147 --   Any pre-processing required before the update dml is issued should be
148 --   coded within this procedure. It is important to note that any 3rd party
149 --   maintenance should be reviewed before placing in this procedure.
150 --
151 -- Access Status:
152 --   Internal Row Handler Use Only.
153 --
154 -- {End Of Comments}
155 -- ----------------------------------------------------------------------------
156 Procedure pre_update(p_rec in pqp_det_shd.g_rec_type) is
157 --
158   l_proc  varchar2(72) := g_package||'pre_update';
159 --
160 Begin
161   hr_utility.set_location('Entering:'||l_proc, 5);
162   --
163   hr_utility.set_location(' Leaving:'||l_proc, 10);
164 End pre_update;
165 --
166 -- ----------------------------------------------------------------------------
167 -- |-----------------------------< post_update >------------------------------|
168 -- ----------------------------------------------------------------------------
169 -- {Start Of Comments}
170 --
171 -- Description:
172 --   This private procedure contains any processing which is required after the
173 --   update dml.
174 --
175 -- Prerequisites:
176 --   This is an internal procedure which is called from the upd procedure.
177 --
178 -- In Parameters:
179 --   A Pl/Sql record structre.
180 --
181 -- Post Success:
182 --   Processing continues.
183 --
184 -- Post Failure:
185 --   If an error has occurred, an error message and exception will be raised
186 --   but not handled.
187 --
188 -- Developer Implementation Notes:
189 --   Any post-processing required after the update dml is issued should be
190 --   coded within this procedure. It is important to note that any 3rd party
191 --   maintenance should be reviewed before placing in this procedure.
192 --
193 -- Access Status:
194 --   Internal Row Handler Use Only.
195 --
196 -- {End Of Comments}
197 -- ----------------------------------------------------------------------------
198 Procedure post_update(
199 p_effective_date in date,p_rec in pqp_det_shd.g_rec_type) is
200 --
201   l_proc  varchar2(72) := g_package||'post_update';
202 --
203 Begin
204   hr_utility.set_location('Entering:'||l_proc, 5);
205 --
206   --
207   -- Start of API User Hook for post_update.
208   --
209   begin
210     --
211     pqp_det_rku.after_update
212       (
213   p_analyzed_data_details_id      =>p_rec.analyzed_data_details_id
214  ,p_analyzed_data_id              =>p_rec.analyzed_data_id
215  ,p_income_code                   =>p_rec.income_code
216  ,p_withholding_rate              =>p_rec.withholding_rate
217  ,p_income_code_sub_type          =>p_rec.income_code_sub_type
218  ,p_exemption_code                =>p_rec.exemption_code
219  ,p_maximum_benefit_amount        =>p_rec.maximum_benefit_amount
220  ,p_retro_lose_ben_amt_flag       =>p_rec.retro_lose_ben_amt_flag
221  ,p_date_benefit_ends             =>p_rec.date_benefit_ends
222  ,p_retro_lose_ben_date_flag      =>p_rec.retro_lose_ben_date_flag
223  ,p_nra_exempt_from_ss            =>p_rec.nra_exempt_from_ss
224  ,p_nra_exempt_from_medicare      =>p_rec.nra_exempt_from_medicare
225  ,p_student_exempt_from_ss        =>p_rec.student_exempt_from_ss
226  ,p_student_exempt_from_medi      =>p_rec.student_exempt_from_medicare
227  ,p_addl_withholding_flag         =>p_rec.addl_withholding_flag
228  ,p_constant_addl_tax             =>p_rec.constant_addl_tax
229  ,p_addl_withholding_amt          =>p_rec.addl_withholding_amt
230  ,p_addl_wthldng_amt_period_type  =>p_rec.addl_wthldng_amt_period_type
231  ,p_personal_exemption            =>p_rec.personal_exemption
232  ,p_addl_exemption_allowed        =>p_rec.addl_exemption_allowed
233  ,p_treaty_ben_allowed_flag       =>p_rec.treaty_ben_allowed_flag
234  ,p_treaty_benefits_start_date    =>p_rec.treaty_benefits_start_date
235  ,p_object_version_number         =>p_rec.object_version_number
236  ,p_effective_date                =>p_effective_date
237  ,p_retro_loss_notification_sent  =>p_rec.retro_loss_notification_sent
238  ,p_current_analysis              =>p_rec.current_analysis
239  ,p_forecast_income_code          =>p_rec.forecast_income_code
240  ,p_analyzed_data_id_o            =>pqp_det_shd.g_old_rec.analyzed_data_id
241  ,p_income_code_o                 =>pqp_det_shd.g_old_rec.income_code
242  ,p_withholding_rate_o            =>pqp_det_shd.g_old_rec.withholding_rate
243  ,p_income_code_sub_type_o        =>pqp_det_shd.g_old_rec.income_code_sub_type
244  ,p_exemption_code_o              =>pqp_det_shd.g_old_rec.exemption_code
245  ,p_maximum_benefit_amount_o      =>pqp_det_shd.g_old_rec.maximum_benefit_amount
246  ,p_retro_lose_ben_amt_flag_o     =>pqp_det_shd.g_old_rec.retro_lose_ben_amt_flag
247  ,p_date_benefit_ends_o           =>pqp_det_shd.g_old_rec.date_benefit_ends
248  ,p_retro_lose_ben_date_flag_o    =>pqp_det_shd.g_old_rec.retro_lose_ben_date_flag
249  ,p_nra_exempt_from_ss_o          =>pqp_det_shd.g_old_rec.nra_exempt_from_ss
250  ,p_nra_exempt_from_medicare_o    =>pqp_det_shd.g_old_rec.nra_exempt_from_medicare
251  ,p_student_exempt_from_ss_o      =>pqp_det_shd.g_old_rec.student_exempt_from_ss
252  ,p_student_exempt_from_medi_o    =>pqp_det_shd.g_old_rec.student_exempt_from_medicare
253  ,p_addl_withholding_flag_o       =>pqp_det_shd.g_old_rec.addl_withholding_flag
254  ,p_constant_addl_tax_o           =>pqp_det_shd.g_old_rec.constant_addl_tax
255  ,p_addl_withholding_amt_o        =>pqp_det_shd.g_old_rec.addl_withholding_amt
256  ,p_addl_wthldng_amt_period_ty_o  =>pqp_det_shd.g_old_rec.addl_wthldng_amt_period_type
257  ,p_personal_exemption_o          =>pqp_det_shd.g_old_rec.personal_exemption
258  ,p_addl_exemption_allowed_o      =>pqp_det_shd.g_old_rec.addl_exemption_allowed
259  ,p_treaty_ben_allowed_flag_o     =>pqp_det_shd.g_old_rec.treaty_ben_allowed_flag
260  ,p_treaty_benefits_start_date_o  =>pqp_det_shd.g_old_rec.treaty_benefits_start_date
261  ,p_object_version_number_o       =>pqp_det_shd.g_old_rec.object_version_number
262  ,p_retro_loss_notif_sent_o       =>pqp_det_shd.g_old_rec.retro_loss_notification_sent
263  ,p_current_analysis_o            =>pqp_det_shd.g_old_rec.current_analysis
264  ,p_forecast_income_code_o        =>pqp_det_shd.g_old_rec.forecast_income_code
265       );
266     --
267   exception
268     --
269     when hr_api.cannot_find_prog_unit then
270       --
271       hr_api.cannot_find_prog_unit_error
272         (p_module_name => 'PQP_ANALYZED_ALIEN_DET'
273         ,p_hook_type   => 'AU');
274       --
275   end;
276   --
277   -- End of API User Hook for post_update.
278   --
279   --
280   hr_utility.set_location(' Leaving:'||l_proc, 10);
281 End post_update;
282 --
283 -- ----------------------------------------------------------------------------
284 -- |-----------------------------< convert_defs >-----------------------------|
285 -- ----------------------------------------------------------------------------
286 -- {Start Of Comments}
287 --
288 -- Description:
289 --   The Convert_Defs procedure has one very important function:
290 --   It must return the record structure for the row with all system defaulted
291 --   values converted into its corresponding parameter value for update. When
292 --   we attempt to update a row through the Upd process , certain
293 --   parameters can be defaulted which enables flexibility in the calling of
294 --   the upd process (e.g. only attributes which need to be updated need to be
295 --   specified). For the upd process to determine which attributes
296 --   have NOT been specified we need to check if the parameter has a reserved
297 --   system default value. Therefore, for all parameters which have a
298 --   corresponding reserved system default mechanism specified we need to
299 --   check if a system default is being used. If a system default is being
300 --   used then we convert the defaulted value into its corresponding attribute
301 --   value held in the g_old_rec data structure.
302 --
303 -- Prerequisites:
304 --   This private function can only be called from the upd process.
305 --
306 -- In Parameters:
307 --   A Pl/Sql record structre.
308 --
309 -- Post Success:
310 --   The record structure will be returned with all system defaulted parameter
311 --   values converted into its current row attribute value.
312 --
313 -- Post Failure:
314 --   No direct error handling is required within this function. Any possible
315 --   errors within this procedure will be a PL/SQL value error due to conversion
316 --   of datatypes or data lengths.
317 --
318 -- Developer Implementation Notes:
319 --   None.
320 --
321 -- Access Status:
322 --   Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure convert_defs(p_rec in out nocopy pqp_det_shd.g_rec_type) is
327 --
328   l_proc  varchar2(72) := g_package||'convert_defs';
329 --
330 Begin
331   --
332   hr_utility.set_location('Entering:'||l_proc, 5);
333   --
334   -- We must now examine each argument value in the
335   -- p_rec plsql record structure
336   -- to see if a system default is being used. If a system default
337   -- is being used then we must set to the 'current' argument value.
338   --
339   If (p_rec.analyzed_data_id = hr_api.g_number) then
340     p_rec.analyzed_data_id :=
341     pqp_det_shd.g_old_rec.analyzed_data_id;
342   End If;
343   If (p_rec.income_code = hr_api.g_varchar2) then
344     p_rec.income_code :=
345     pqp_det_shd.g_old_rec.income_code;
346   End If;
347   If (p_rec.withholding_rate = hr_api.g_number) then
348     p_rec.withholding_rate :=
349     pqp_det_shd.g_old_rec.withholding_rate;
350   End If;
351   If (p_rec.income_code_sub_type = hr_api.g_varchar2) then
352     p_rec.income_code_sub_type :=
353     pqp_det_shd.g_old_rec.income_code_sub_type;
354   End If;
355   If (p_rec.exemption_code = hr_api.g_varchar2) then
356     p_rec.exemption_code :=
357     pqp_det_shd.g_old_rec.exemption_code;
358   End If;
359   If (p_rec.maximum_benefit_amount = hr_api.g_number) then
360     p_rec.maximum_benefit_amount :=
361     pqp_det_shd.g_old_rec.maximum_benefit_amount;
362   End If;
363   If (p_rec.retro_lose_ben_amt_flag = hr_api.g_varchar2) then
364     p_rec.retro_lose_ben_amt_flag :=
365     pqp_det_shd.g_old_rec.retro_lose_ben_amt_flag;
366   End If;
367   If (p_rec.date_benefit_ends = hr_api.g_date) then
368     p_rec.date_benefit_ends :=
369     pqp_det_shd.g_old_rec.date_benefit_ends;
370   End If;
371   If (p_rec.retro_lose_ben_date_flag = hr_api.g_varchar2) then
372     p_rec.retro_lose_ben_date_flag :=
373     pqp_det_shd.g_old_rec.retro_lose_ben_date_flag;
374   End If;
375   If (p_rec.nra_exempt_from_ss = hr_api.g_varchar2) then
376     p_rec.nra_exempt_from_ss :=
377     pqp_det_shd.g_old_rec.nra_exempt_from_ss;
378   End If;
379   If (p_rec.nra_exempt_from_medicare = hr_api.g_varchar2) then
380     p_rec.nra_exempt_from_medicare :=
381     pqp_det_shd.g_old_rec.nra_exempt_from_medicare;
382   End If;
383   If (p_rec.student_exempt_from_ss = hr_api.g_varchar2) then
384     p_rec.student_exempt_from_ss :=
385     pqp_det_shd.g_old_rec.student_exempt_from_ss;
386   End If;
387   If (p_rec.student_exempt_from_medicare = hr_api.g_varchar2) then
388     p_rec.student_exempt_from_medicare :=
389     pqp_det_shd.g_old_rec.student_exempt_from_medicare;
390   End If;
391   If (p_rec.addl_withholding_flag = hr_api.g_varchar2) then
392     p_rec.addl_withholding_flag :=
393     pqp_det_shd.g_old_rec.addl_withholding_flag;
394   End If;
395   If (p_rec.constant_addl_tax = hr_api.g_number) then
396     p_rec.constant_addl_tax :=
397     pqp_det_shd.g_old_rec.constant_addl_tax;
398   End If;
399   If (p_rec.addl_withholding_amt = hr_api.g_number) then
400     p_rec.addl_withholding_amt :=
401     pqp_det_shd.g_old_rec.addl_withholding_amt;
402   End If;
403   If (p_rec.addl_wthldng_amt_period_type = hr_api.g_varchar2) then
404     p_rec.addl_wthldng_amt_period_type :=
405     pqp_det_shd.g_old_rec.addl_wthldng_amt_period_type;
406   End If;
407   If (p_rec.personal_exemption = hr_api.g_number) then
408     p_rec.personal_exemption :=
409     pqp_det_shd.g_old_rec.personal_exemption;
410   End If;
411   If (p_rec.addl_exemption_allowed = hr_api.g_number) then
412     p_rec.addl_exemption_allowed :=
413     pqp_det_shd.g_old_rec.addl_exemption_allowed;
414   End If;
415   If (p_rec.treaty_ben_allowed_flag = hr_api.g_varchar2) then
416     p_rec.treaty_ben_allowed_flag :=
417     pqp_det_shd.g_old_rec.treaty_ben_allowed_flag;
418   End If;
419   If (p_rec.treaty_benefits_start_date = hr_api.g_date) then
420     p_rec.treaty_benefits_start_date :=
421     pqp_det_shd.g_old_rec.treaty_benefits_start_date;
422   End If;
423   If (p_rec.retro_loss_notification_sent = hr_api.g_varchar2) then
424     p_rec.retro_loss_notification_sent :=
425     pqp_det_shd.g_old_rec.retro_loss_notification_sent;
426   End If;
427   If (p_rec.current_analysis = hr_api.g_varchar2) then
428     p_rec.current_analysis :=
429     pqp_det_shd.g_old_rec.current_analysis;
430   End If;
431   If (p_rec.forecast_income_code = hr_api.g_varchar2) then
432     p_rec.forecast_income_code :=
433     pqp_det_shd.g_old_rec.forecast_income_code;
434   End If;
435 
436   --
437   hr_utility.set_location(' Leaving:'||l_proc, 10);
438 --
439 End convert_defs;
440 --
441 -- ----------------------------------------------------------------------------
442 -- |---------------------------------< upd >----------------------------------|
443 -- ----------------------------------------------------------------------------
444 Procedure upd
445   (
446   p_effective_date in date,
447   p_rec        in out nocopy pqp_det_shd.g_rec_type
448   ) is
449 --
450   l_proc  varchar2(72) := g_package||'upd';
451 --
452 Begin
453   hr_utility.set_location('Entering:'||l_proc, 5);
454   --
455   -- We must lock the row which we need to update.
456   --
457   pqp_det_shd.lck
458 	(
459 	p_rec.analyzed_data_details_id,
460 	p_rec.object_version_number
461 	);
462   --
463   -- 1. During an update system defaults are used to determine if
464   --    arguments have been defaulted or not. We must therefore
465   --    derive the full record structure values to be updated.
466   --
467   -- 2. Call the supporting update validate operations.
468   --
469   convert_defs(p_rec);
470   pqp_det_bus.update_validate(p_rec
471   ,p_effective_date);
472   --
473   -- Call the supporting pre-update operation
474   --
475   pre_update(p_rec);
476   --
477   -- Update the row.
478   --
479   update_dml(p_rec);
480   --
481   -- Call the supporting post-update operation
482   --
483   post_update(
484 p_effective_date,p_rec);
485 End upd;
486 --
487 -- ----------------------------------------------------------------------------
488 -- |---------------------------------< upd >----------------------------------|
489 -- ----------------------------------------------------------------------------
490 Procedure upd
491   (
492   p_effective_date in date,
493   p_analyzed_data_details_id     in number,
494   p_analyzed_data_id             in number           default hr_api.g_number,
495   p_income_code                  in varchar2         default hr_api.g_varchar2,
496   p_withholding_rate             in number           default hr_api.g_number,
497   p_income_code_sub_type         in varchar2         default hr_api.g_varchar2,
498   p_exemption_code               in varchar2         default hr_api.g_varchar2,
499   p_maximum_benefit_amount       in number           default hr_api.g_number,
500   p_retro_lose_ben_amt_flag      in varchar2         default hr_api.g_varchar2,
501   p_date_benefit_ends            in date             default hr_api.g_date,
502   p_retro_lose_ben_date_flag     in varchar2         default hr_api.g_varchar2,
503   p_nra_exempt_from_ss           in varchar2         default hr_api.g_varchar2,
504   p_nra_exempt_from_medicare     in varchar2         default hr_api.g_varchar2,
505   p_student_exempt_from_ss       in varchar2         default hr_api.g_varchar2,
506   p_student_exempt_from_medi     in varchar2         default hr_api.g_varchar2,
507   p_addl_withholding_flag        in varchar2         default hr_api.g_varchar2,
508   p_constant_addl_tax            in number           default hr_api.g_number,
509   p_addl_withholding_amt         in number           default hr_api.g_number,
510   p_addl_wthldng_amt_period_type in varchar2         default hr_api.g_varchar2,
511   p_personal_exemption           in number           default hr_api.g_number,
512   p_addl_exemption_allowed       in number           default hr_api.g_number,
513   p_treaty_ben_allowed_flag      in varchar2         default hr_api.g_varchar2,
514   p_treaty_benefits_start_date   in date             default hr_api.g_date,
515   p_object_version_number        in out nocopy number ,
516   p_retro_loss_notification_sent in varchar2         default hr_api.g_varchar2,
517   p_current_analysis             in varchar2         default hr_api.g_varchar2,
518   p_forecast_income_code         in varchar2         default hr_api.g_varchar2
519   ) is
520 --
521   l_rec	  pqp_det_shd.g_rec_type;
522   l_proc  varchar2(72) := g_package||'upd';
523 --
524 Begin
525   hr_utility.set_location('Entering:'||l_proc, 5);
526   --
527   -- Call conversion function to turn arguments into the
528   -- l_rec structure.
529   --
530   l_rec :=
531   pqp_det_shd.convert_args
532   (
533   p_analyzed_data_details_id,
534   p_analyzed_data_id,
535   p_income_code,
536   p_withholding_rate,
537   p_income_code_sub_type,
538   p_exemption_code,
539   p_maximum_benefit_amount,
540   p_retro_lose_ben_amt_flag,
541   p_date_benefit_ends,
542   p_retro_lose_ben_date_flag,
543   p_nra_exempt_from_ss,
544   p_nra_exempt_from_medicare,
545   p_student_exempt_from_ss,
546   p_student_exempt_from_medi,
547   p_addl_withholding_flag,
548   p_constant_addl_tax,
549   p_addl_withholding_amt,
550   p_addl_wthldng_amt_period_type,
551   p_personal_exemption,
552   p_addl_exemption_allowed,
553   p_treaty_ben_allowed_flag,
554   p_treaty_benefits_start_date,
555   p_object_version_number ,
556   p_retro_loss_notification_sent,
557   p_current_analysis,
558   p_forecast_income_code
559   );
560   --
561   -- Having converted the arguments into the
562   -- plsql record structure we call the corresponding record
563   -- business process.
564   --
565   upd(
566     p_effective_date,l_rec);
567   p_object_version_number := l_rec.object_version_number;
568   --
569   hr_utility.set_location(' Leaving:'||l_proc, 10);
570 End upd;
571 --
572 end pqp_det_upd;