DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_APR_UPD

Source


1 Package Body ben_apr_upd as
2 /* $Header: beaprrhi.pkb 120.0 2005/05/28 00:26:53 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_apr_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 this
21 --   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 structre.
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 ben_apr_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) is
63 --
64   l_proc	varchar2(72) := g_package||'dt_update_dml';
65 --
66 Begin
67   hr_utility.set_location('Entering:'||l_proc, 5);
68   --
69   If (p_datetrack_mode = 'CORRECTION') then
70     hr_utility.set_location(l_proc, 10);
71     --
72     -- Because we are updating a row we must get the next object
73     -- version number.
74     --
75     p_rec.object_version_number :=
76       dt_api.get_object_version_number
77 	  (p_base_table_name	=> 'ben_actl_prem_f',
78 	   p_base_key_column	=> 'actl_prem_id',
79 	   p_base_key_value	=> p_rec.actl_prem_id);
80     --
81     ben_apr_shd.g_api_dml := true;  -- Set the api dml status
82     --
83     -- Update the ben_actl_prem_f Row
84     --
85     update  ben_actl_prem_f
86     set
87     actl_prem_id                    = p_rec.actl_prem_id,
88     name                            = p_rec.name,
89     acty_ref_perd_cd                = p_rec.acty_ref_perd_cd,
90     uom                             = p_rec.uom,
91     rt_typ_cd                       = p_rec.rt_typ_cd,
92     bnft_rt_typ_cd                  = p_rec.bnft_rt_typ_cd,
93     val                             = p_rec.val,
94     mlt_cd                          = p_rec.mlt_cd,
95     prdct_cd                        = p_rec.prdct_cd,
96     rndg_cd                         = p_rec.rndg_cd,
97     rndg_rl                         = p_rec.rndg_rl,
98     val_calc_rl                   =p_rec.val_calc_rl
99     ,prem_asnmt_cd                 =p_rec.prem_asnmt_cd
100     ,prem_asnmt_lvl_cd             =p_rec.prem_asnmt_lvl_cd
101     ,actl_prem_typ_cd              =p_rec.actl_prem_typ_cd
102     ,prem_pyr_cd                   =p_rec.prem_pyr_cd
103     ,cr_lkbk_val                   =p_rec.cr_lkbk_val
104     ,cr_lkbk_uom                   =p_rec.cr_lkbk_uom
105     ,cr_lkbk_crnt_py_only_flag     =p_rec.cr_lkbk_crnt_py_only_flag
106     ,prsptv_r_rtsptv_cd            =p_rec.prsptv_r_rtsptv_cd
107     ,upr_lmt_val                   =p_rec.upr_lmt_val
108     ,upr_lmt_calc_rl               =p_rec.upr_lmt_calc_rl
109     ,lwr_lmt_val                   =p_rec.lwr_lmt_val
110     ,lwr_lmt_calc_rl               =p_rec.lwr_lmt_calc_rl
111     ,cost_allocation_keyflex_id    =p_rec.cost_allocation_keyflex_id
112     ,organization_id               =p_rec.organization_id
113     ,oipl_id                       =p_rec.oipl_id
114     ,pl_id                         =p_rec.pl_id
115     ,comp_lvl_fctr_id                = p_rec.comp_lvl_fctr_id,
116     business_group_id               = p_rec.business_group_id,
117     prtl_mo_det_mthd_cd             = p_rec.prtl_mo_det_mthd_cd,
118     prtl_mo_det_mthd_rl             = p_rec.prtl_mo_det_mthd_rl,
119     wsh_rl_dy_mo_num                = p_rec.wsh_rl_dy_mo_num,
120     vrbl_rt_add_on_calc_rl          = p_rec.vrbl_rt_add_on_calc_rl,
121     apr_attribute_category          = p_rec.apr_attribute_category,
122     apr_attribute1                  = p_rec.apr_attribute1,
123     apr_attribute2                  = p_rec.apr_attribute2,
124     apr_attribute3                  = p_rec.apr_attribute3,
125     apr_attribute4                  = p_rec.apr_attribute4,
126     apr_attribute5                  = p_rec.apr_attribute5,
127     apr_attribute6                  = p_rec.apr_attribute6,
128     apr_attribute7                  = p_rec.apr_attribute7,
129     apr_attribute8                  = p_rec.apr_attribute8,
130     apr_attribute9                  = p_rec.apr_attribute9,
131     apr_attribute10                 = p_rec.apr_attribute10,
132     apr_attribute11                 = p_rec.apr_attribute11,
133     apr_attribute12                 = p_rec.apr_attribute12,
134     apr_attribute13                 = p_rec.apr_attribute13,
135     apr_attribute14                 = p_rec.apr_attribute14,
136     apr_attribute15                 = p_rec.apr_attribute15,
137     apr_attribute16                 = p_rec.apr_attribute16,
138     apr_attribute17                 = p_rec.apr_attribute17,
139     apr_attribute18                 = p_rec.apr_attribute18,
140     apr_attribute19                 = p_rec.apr_attribute19,
141     apr_attribute20                 = p_rec.apr_attribute20,
142     apr_attribute21                 = p_rec.apr_attribute21,
143     apr_attribute22                 = p_rec.apr_attribute22,
144     apr_attribute23                 = p_rec.apr_attribute23,
145     apr_attribute24                 = p_rec.apr_attribute24,
146     apr_attribute25                 = p_rec.apr_attribute25,
147     apr_attribute26                 = p_rec.apr_attribute26,
148     apr_attribute27                 = p_rec.apr_attribute27,
149     apr_attribute28                 = p_rec.apr_attribute28,
150     apr_attribute29                 = p_rec.apr_attribute29,
151     apr_attribute30                 = p_rec.apr_attribute30,
152     object_version_number           = p_rec.object_version_number
153     where   actl_prem_id = p_rec.actl_prem_id
154     and     effective_start_date = p_validation_start_date
155     and     effective_end_date   = p_validation_end_date;
156     --
157     ben_apr_shd.g_api_dml := false;   -- Unset the api dml status
158     --
159     -- Set the effective start and end dates
160     --
161     p_rec.effective_start_date := p_validation_start_date;
162     p_rec.effective_end_date   := p_validation_end_date;
163   End If;
164 --
165 hr_utility.set_location(' Leaving:'||l_proc, 15);
166 Exception
167   When hr_api.check_integrity_violated Then
168     -- A check constraint has been violated
169     ben_apr_shd.g_api_dml := false;   -- Unset the api dml status
170     ben_apr_shd.constraint_error
171       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
172   When hr_api.unique_integrity_violated Then
173     -- Unique integrity has been violated
174     ben_apr_shd.g_api_dml := false;   -- Unset the api dml status
175     ben_apr_shd.constraint_error
176       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
177   When Others Then
178     ben_apr_shd.g_api_dml := false;   -- Unset the api dml status
179     Raise;
180 End dt_update_dml;
181 --
182 -- ----------------------------------------------------------------------------
183 -- |------------------------------< update_dml >------------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 --   This procedure calls the dt_update_dml control logic which handles
189 --   the actual datetrack dml.
190 --
191 -- Prerequisites:
192 --   This is an internal private procedure which must be called from the upd
193 --   procedure.
194 --
195 -- In Parameters:
196 --   A Pl/Sql record structre.
197 --
198 -- Post Success:
199 --   Processing contines.
200 --
201 -- Post Failure:
202 --   No specific error handling is required within this procedure.
203 --
204 -- Developer Implementation Notes:
205 --   The update 'set' arguments list should be modified if any of your
206 --   attributes are not updateable.
207 --
208 -- Access Status:
209 --   Internal Row Handler Use Only.
210 --
211 -- {End Of Comments}
212 -- ----------------------------------------------------------------------------
213 Procedure update_dml
214 	(p_rec 			 in out nocopy ben_apr_shd.g_rec_type,
215 	 p_effective_date	 in	date,
216 	 p_datetrack_mode	 in	varchar2,
217 	 p_validation_start_date in	date,
218 	 p_validation_end_date	 in	date) is
219 --
220   l_proc	varchar2(72) := g_package||'update_dml';
221 --
222 Begin
223   hr_utility.set_location('Entering:'||l_proc, 5);
224   --
225   dt_update_dml(p_rec			=> p_rec,
226 		p_effective_date	=> p_effective_date,
227 		p_datetrack_mode	=> p_datetrack_mode,
228        		p_validation_start_date	=> p_validation_start_date,
229 		p_validation_end_date	=> p_validation_end_date);
230   --
231   hr_utility.set_location(' Leaving:'||l_proc, 10);
232 End update_dml;
233 --
234 -- ----------------------------------------------------------------------------
235 -- |----------------------------< dt_pre_update >-----------------------------|
236 -- ----------------------------------------------------------------------------
237 -- {Start Of Comments}
238 --
239 -- Description:
240 --   The dt_pre_update procedure controls the execution
241 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
242 --   and UPDATE_CHANGE_INSERT only. The execution required is as
243 --   follows:
244 --
245 --   1) Providing the datetrack update mode is not 'CORRECTION'
246 --      then set the effective end date of the current row (this
247 --      will be the validation_start_date - 1).
248 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
249 --      corresponding delete_dml process to delete any future rows
250 --      where the effective_start_date is greater than or equal to
251 --	the validation_start_date.
252 --   3) Call the insert_dml process to insert the new updated row
253 --      details..
254 --
255 -- Prerequisites:
256 --   This is an internal procedure which is called from the
257 --   pre_update procedure.
258 --
259 -- In Parameters:
260 --
261 -- Post Success:
262 --   Processing continues.
263 --
264 -- Post Failure:
265 --   If an error has occurred, an error message and exception will be raised
266 --   but not handled.
267 --
268 -- Developer Implementation Notes:
269 --   This is an internal procedure which is required by Datetrack. Don't
270 --   remove or modify.
271 --
272 -- Access Status:
273 --   Internal Row Handler Use Only.
274 --
275 -- {End Of Comments}
276 -- ----------------------------------------------------------------------------
277 Procedure dt_pre_update
278 	(p_rec 			 in out nocopy ben_apr_shd.g_rec_type,
279 	 p_effective_date	 in	date,
280 	 p_datetrack_mode	 in	varchar2,
281 	 p_validation_start_date in	date,
282 	 p_validation_end_date	 in	date) is
283 --
284   l_proc	         varchar2(72) := g_package||'dt_pre_update';
285   l_dummy_version_number number;
286 --
287 Begin
288   hr_utility.set_location('Entering:'||l_proc, 5);
289   If (p_datetrack_mode <> 'CORRECTION') then
290     hr_utility.set_location(l_proc, 10);
291     --
292     -- Update the current effective end date
293     --
294     ben_apr_shd.upd_effective_end_date
295      (p_effective_date	       => p_effective_date,
296       p_base_key_value	       => p_rec.actl_prem_id,
297       p_new_effective_end_date => (p_validation_start_date - 1),
298       p_validation_start_date  => p_validation_start_date,
299       p_validation_end_date    => p_validation_end_date,
300       p_object_version_number  => l_dummy_version_number);
301     --
302     If (p_datetrack_mode = 'UPDATE_OVERRIDE') then
303       hr_utility.set_location(l_proc, 15);
304       --
305       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
306       -- delete any future rows
307       --
308       ben_apr_del.delete_dml
309         (p_rec			 => p_rec,
310 	 p_effective_date	 => p_effective_date,
311 	 p_datetrack_mode	 => p_datetrack_mode,
312 	 p_validation_start_date => p_validation_start_date,
313 	 p_validation_end_date   => p_validation_end_date);
314     End If;
315     hr_utility.set_location(l_proc, 20);
316     --
317     -- We must now insert the updated row
318     --
319     ben_apr_ins.insert_dml
320       (p_rec			=> p_rec,
321        p_effective_date		=> p_effective_date,
322        p_datetrack_mode		=> p_datetrack_mode,
323        p_validation_start_date	=> p_validation_start_date,
324        p_validation_end_date	=> p_validation_end_date);
325   End If;
326   hr_utility.set_location(' Leaving:'||l_proc, 20);
327 End dt_pre_update;
328 --
329 -- ----------------------------------------------------------------------------
330 -- |------------------------------< pre_update >------------------------------|
331 -- ----------------------------------------------------------------------------
332 -- {Start Of Comments}
333 --
334 -- Description:
335 --   This private procedure contains any processing which is required before
336 --   the update dml.
337 --
338 -- Prerequisites:
339 --   This is an internal procedure which is called from the upd procedure.
340 --
341 -- In Parameters:
342 --   A Pl/Sql record structre.
343 --
344 -- Post Success:
345 --   Processing continues.
346 --
347 -- Post Failure:
348 --   If an error has occurred, an error message and exception will be raised
349 --   but not handled.
350 --
351 -- Developer Implementation Notes:
352 --   Any pre-processing required before the update dml is issued should be
353 --   coded within this procedure. It is important to note that any 3rd party
354 --   maintenance should be reviewed before placing in this procedure. The call
355 --   to the dt_update_dml procedure should NOT be removed.
356 --
357 -- Access Status:
358 --   Internal Row Handler Use Only.
359 --
360 -- {End Of Comments}
361 -- ----------------------------------------------------------------------------
362 Procedure pre_update
363 	(p_rec 			 in out nocopy ben_apr_shd.g_rec_type,
364 	 p_effective_date	 in	date,
365 	 p_datetrack_mode	 in	varchar2,
366 	 p_validation_start_date in	date,
367 	 p_validation_end_date	 in	date) is
368 --
369   l_proc	varchar2(72) := g_package||'pre_update';
370 --
371 Begin
372   hr_utility.set_location('Entering:'||l_proc, 5);
373   --
374   --
375   --
376   dt_pre_update
377     (p_rec 		     => p_rec,
378      p_effective_date	     => p_effective_date,
379      p_datetrack_mode	     => p_datetrack_mode,
380      p_validation_start_date => p_validation_start_date,
381      p_validation_end_date   => p_validation_end_date);
382   --
383   hr_utility.set_location(' Leaving:'||l_proc, 10);
384 End pre_update;
385 --
386 -- ----------------------------------------------------------------------------
387 -- |-----------------------------< post_update >------------------------------|
388 -- ----------------------------------------------------------------------------
389 -- {Start Of Comments}
390 --
391 -- Description:
392 --   This private procedure contains any processing which is required after the
393 --   update dml.
394 --
395 -- Prerequisites:
396 --   This is an internal procedure which is called from the upd procedure.
397 --
398 -- In Parameters:
399 --   A Pl/Sql record structre.
400 --
401 -- Post Success:
402 --   Processing continues.
403 --
404 -- Post Failure:
405 --   If an error has occurred, an error message and exception will be raised
406 --   but not handled.
407 --
408 -- Developer Implementation Notes:
409 --   Any post-processing required after the update dml is issued should be
410 --   coded within this procedure. It is important to note that any 3rd party
411 --   maintenance should be reviewed before placing in this procedure.
412 --
413 -- Access Status:
414 --   Internal Row Handler Use Only.
415 --
416 -- {End Of Comments}
417 -- ----------------------------------------------------------------------------
418 Procedure post_update
419 	(p_rec 			 in ben_apr_shd.g_rec_type,
420 	 p_effective_date	 in date,
421 	 p_datetrack_mode	 in varchar2,
422 	 p_validation_start_date in date,
423 	 p_validation_end_date	 in date) is
424 --
425   l_proc	varchar2(72) := g_package||'post_update';
426 --
427 Begin
428   hr_utility.set_location('Entering:'||l_proc, 5);
429 --
430   --
431   -- Start of API User Hook for post_update.
432   --
433   begin
434     --
435     ben_apr_rku.after_update
436       (
437   p_actl_prem_id                  =>p_rec.actl_prem_id
438  ,p_effective_start_date          =>p_rec.effective_start_date
439  ,p_effective_end_date            =>p_rec.effective_end_date
440  ,p_name                          =>p_rec.name
441  ,p_acty_ref_perd_cd              =>p_rec.acty_ref_perd_cd
442  ,p_uom                           =>p_rec.uom
443  ,p_rt_typ_cd                     =>p_rec.rt_typ_cd
444  ,p_bnft_rt_typ_cd                =>p_rec.bnft_rt_typ_cd
445  ,p_val                           =>p_rec.val
446  ,p_mlt_cd                        =>p_rec.mlt_cd
447  ,p_prdct_cd                      =>p_rec.prdct_cd
448  ,p_rndg_cd                       =>p_rec.rndg_cd
449  ,p_rndg_rl                       =>p_rec.rndg_rl
450  ,p_val_calc_rl                   =>p_rec.val_calc_rl
451  ,p_prem_asnmt_cd                 =>p_rec.prem_asnmt_cd
452  ,p_prem_asnmt_lvl_cd             =>p_rec.prem_asnmt_lvl_cd
453  ,p_actl_prem_typ_cd              =>p_rec.actl_prem_typ_cd
454  ,p_prem_pyr_cd                   =>p_rec.prem_pyr_cd
455  ,p_cr_lkbk_val                   =>p_rec.cr_lkbk_val
456  ,p_cr_lkbk_uom                   =>p_rec.cr_lkbk_uom
457  ,p_cr_lkbk_crnt_py_only_flag     =>p_rec.cr_lkbk_crnt_py_only_flag
458  ,p_prsptv_r_rtsptv_cd            =>p_rec.prsptv_r_rtsptv_cd
459  ,p_upr_lmt_val                   =>p_rec.upr_lmt_val
460  ,p_upr_lmt_calc_rl               =>p_rec.upr_lmt_calc_rl
461  ,p_lwr_lmt_val                   =>p_rec.lwr_lmt_val
462  ,p_lwr_lmt_calc_rl               =>p_rec.lwr_lmt_calc_rl
463  ,p_cost_allocation_keyflex_id    =>p_rec.cost_allocation_keyflex_id
464  ,p_organization_id               =>p_rec.organization_id
465  ,p_oipl_id                       =>p_rec.oipl_id
466  ,p_pl_id                         =>p_rec.pl_id
467  ,p_comp_lvl_fctr_id              =>p_rec.comp_lvl_fctr_id
468  ,p_business_group_id             =>p_rec.business_group_id
469  ,p_prtl_mo_det_mthd_cd             => p_rec.prtl_mo_det_mthd_cd
470  ,p_prtl_mo_det_mthd_rl             => p_rec.prtl_mo_det_mthd_rl
471  ,p_wsh_rl_dy_mo_num                => p_rec.wsh_rl_dy_mo_num
472  ,p_vrbl_rt_add_on_calc_rl        =>p_rec.vrbl_rt_add_on_calc_rl
473  ,p_apr_attribute_category        =>p_rec.apr_attribute_category
474  ,p_apr_attribute1                =>p_rec.apr_attribute1
475  ,p_apr_attribute2                =>p_rec.apr_attribute2
476  ,p_apr_attribute3                =>p_rec.apr_attribute3
477  ,p_apr_attribute4                =>p_rec.apr_attribute4
478  ,p_apr_attribute5                =>p_rec.apr_attribute5
479  ,p_apr_attribute6                =>p_rec.apr_attribute6
480  ,p_apr_attribute7                =>p_rec.apr_attribute7
481  ,p_apr_attribute8                =>p_rec.apr_attribute8
482  ,p_apr_attribute9                =>p_rec.apr_attribute9
483  ,p_apr_attribute10               =>p_rec.apr_attribute10
484  ,p_apr_attribute11               =>p_rec.apr_attribute11
485  ,p_apr_attribute12               =>p_rec.apr_attribute12
486  ,p_apr_attribute13               =>p_rec.apr_attribute13
487  ,p_apr_attribute14               =>p_rec.apr_attribute14
488  ,p_apr_attribute15               =>p_rec.apr_attribute15
489  ,p_apr_attribute16               =>p_rec.apr_attribute16
490  ,p_apr_attribute17               =>p_rec.apr_attribute17
491  ,p_apr_attribute18               =>p_rec.apr_attribute18
492  ,p_apr_attribute19               =>p_rec.apr_attribute19
493  ,p_apr_attribute20               =>p_rec.apr_attribute20
494  ,p_apr_attribute21               =>p_rec.apr_attribute21
495  ,p_apr_attribute22               =>p_rec.apr_attribute22
496  ,p_apr_attribute23               =>p_rec.apr_attribute23
497  ,p_apr_attribute24               =>p_rec.apr_attribute24
498  ,p_apr_attribute25               =>p_rec.apr_attribute25
499  ,p_apr_attribute26               =>p_rec.apr_attribute26
500  ,p_apr_attribute27               =>p_rec.apr_attribute27
501  ,p_apr_attribute28               =>p_rec.apr_attribute28
502  ,p_apr_attribute29               =>p_rec.apr_attribute29
503  ,p_apr_attribute30               =>p_rec.apr_attribute30
504  ,p_object_version_number         =>p_rec.object_version_number
505  ,p_effective_date                =>p_effective_date
506  ,p_datetrack_mode                =>p_datetrack_mode
507  ,p_validation_start_date         =>p_validation_start_date
508  ,p_validation_end_date           =>p_validation_end_date
509  ,p_effective_start_date_o        =>ben_apr_shd.g_old_rec.effective_start_date
510  ,p_effective_end_date_o          =>ben_apr_shd.g_old_rec.effective_end_date
511  ,p_name_o                        =>ben_apr_shd.g_old_rec.name
512  ,p_acty_ref_perd_cd_o            =>ben_apr_shd.g_old_rec.acty_ref_perd_cd
513  ,p_uom_o                         =>ben_apr_shd.g_old_rec.uom
514  ,p_rt_typ_cd_o                   =>ben_apr_shd.g_old_rec.rt_typ_cd
515  ,p_bnft_rt_typ_cd_o              =>ben_apr_shd.g_old_rec.bnft_rt_typ_cd
516  ,p_val_o                         =>ben_apr_shd.g_old_rec.val
517  ,p_mlt_cd_o                      =>ben_apr_shd.g_old_rec.mlt_cd
518  ,p_prdct_cd_o                    =>ben_apr_shd.g_old_rec.prdct_cd
519  ,p_rndg_cd_o                     =>ben_apr_shd.g_old_rec.rndg_cd
520  ,p_rndg_rl_o                     =>ben_apr_shd.g_old_rec.rndg_rl
521  ,p_val_calc_rl_o                   =>ben_apr_shd.g_old_rec.val_calc_rl
522  ,p_prem_asnmt_cd_o                 =>ben_apr_shd.g_old_rec.prem_asnmt_cd
523  ,p_prem_asnmt_lvl_cd_o             =>ben_apr_shd.g_old_rec.prem_asnmt_lvl_cd
524  ,p_actl_prem_typ_cd_o              =>ben_apr_shd.g_old_rec.actl_prem_typ_cd
525  ,p_prem_pyr_cd_o                   =>ben_apr_shd.g_old_rec.prem_pyr_cd
526  ,p_cr_lkbk_val_o                   =>ben_apr_shd.g_old_rec.cr_lkbk_val
527  ,p_cr_lkbk_uom_o                   =>ben_apr_shd.g_old_rec.cr_lkbk_uom
528  ,p_cr_lkbk_crnt_py_only_flag_o     =>ben_apr_shd.g_old_rec.cr_lkbk_crnt_py_only_flag
529  ,p_prsptv_r_rtsptv_cd_o            =>ben_apr_shd.g_old_rec.prsptv_r_rtsptv_cd
530  ,p_upr_lmt_val_o                   =>ben_apr_shd.g_old_rec.upr_lmt_val
531  ,p_upr_lmt_calc_rl_o               =>ben_apr_shd.g_old_rec.upr_lmt_calc_rl
532  ,p_lwr_lmt_val_o                   =>ben_apr_shd.g_old_rec.lwr_lmt_val
533  ,p_lwr_lmt_calc_rl_o               =>ben_apr_shd.g_old_rec.lwr_lmt_calc_rl
534  ,p_cost_allocation_keyflex_id_o    =>ben_apr_shd.g_old_rec.cost_allocation_keyflex_id
535  ,p_organization_id_o               =>ben_apr_shd.g_old_rec.organization_id
536  ,p_oipl_id_o                       =>ben_apr_shd.g_old_rec.oipl_id
537  ,p_pl_id_o                         =>ben_apr_shd.g_old_rec.pl_id
538  ,p_comp_lvl_fctr_id_o            =>ben_apr_shd.g_old_rec.comp_lvl_fctr_id
539  ,p_business_group_id_o           =>ben_apr_shd.g_old_rec.business_group_id
540  ,p_prtl_mo_det_mthd_cd_o             => ben_apr_shd.g_old_rec.prtl_mo_det_mthd_cd
541  ,p_prtl_mo_det_mthd_rl_o             => ben_apr_shd.g_old_rec.prtl_mo_det_mthd_rl
542  ,p_wsh_rl_dy_mo_num_o                => ben_apr_shd.g_old_rec.wsh_rl_dy_mo_num
543  ,p_vrbl_rt_add_on_calc_rl_o      =>ben_apr_shd.g_old_rec.vrbl_rt_add_on_calc_rl
544  ,p_apr_attribute_category_o      =>ben_apr_shd.g_old_rec.apr_attribute_category
545  ,p_apr_attribute1_o              =>ben_apr_shd.g_old_rec.apr_attribute1
546  ,p_apr_attribute2_o              =>ben_apr_shd.g_old_rec.apr_attribute2
547  ,p_apr_attribute3_o              =>ben_apr_shd.g_old_rec.apr_attribute3
548  ,p_apr_attribute4_o              =>ben_apr_shd.g_old_rec.apr_attribute4
549  ,p_apr_attribute5_o              =>ben_apr_shd.g_old_rec.apr_attribute5
550  ,p_apr_attribute6_o              =>ben_apr_shd.g_old_rec.apr_attribute6
551  ,p_apr_attribute7_o              =>ben_apr_shd.g_old_rec.apr_attribute7
552  ,p_apr_attribute8_o              =>ben_apr_shd.g_old_rec.apr_attribute8
553  ,p_apr_attribute9_o              =>ben_apr_shd.g_old_rec.apr_attribute9
554  ,p_apr_attribute10_o             =>ben_apr_shd.g_old_rec.apr_attribute10
555  ,p_apr_attribute11_o             =>ben_apr_shd.g_old_rec.apr_attribute11
556  ,p_apr_attribute12_o             =>ben_apr_shd.g_old_rec.apr_attribute12
557  ,p_apr_attribute13_o             =>ben_apr_shd.g_old_rec.apr_attribute13
558  ,p_apr_attribute14_o             =>ben_apr_shd.g_old_rec.apr_attribute14
559  ,p_apr_attribute15_o             =>ben_apr_shd.g_old_rec.apr_attribute15
560  ,p_apr_attribute16_o             =>ben_apr_shd.g_old_rec.apr_attribute16
561  ,p_apr_attribute17_o             =>ben_apr_shd.g_old_rec.apr_attribute17
562  ,p_apr_attribute18_o             =>ben_apr_shd.g_old_rec.apr_attribute18
563  ,p_apr_attribute19_o             =>ben_apr_shd.g_old_rec.apr_attribute19
564  ,p_apr_attribute20_o             =>ben_apr_shd.g_old_rec.apr_attribute20
565  ,p_apr_attribute21_o             =>ben_apr_shd.g_old_rec.apr_attribute21
566  ,p_apr_attribute22_o             =>ben_apr_shd.g_old_rec.apr_attribute22
567  ,p_apr_attribute23_o             =>ben_apr_shd.g_old_rec.apr_attribute23
568  ,p_apr_attribute24_o             =>ben_apr_shd.g_old_rec.apr_attribute24
569  ,p_apr_attribute25_o             =>ben_apr_shd.g_old_rec.apr_attribute25
570  ,p_apr_attribute26_o             =>ben_apr_shd.g_old_rec.apr_attribute26
571  ,p_apr_attribute27_o             =>ben_apr_shd.g_old_rec.apr_attribute27
572  ,p_apr_attribute28_o             =>ben_apr_shd.g_old_rec.apr_attribute28
573  ,p_apr_attribute29_o             =>ben_apr_shd.g_old_rec.apr_attribute29
574  ,p_apr_attribute30_o             =>ben_apr_shd.g_old_rec.apr_attribute30
575  ,p_object_version_number_o       =>ben_apr_shd.g_old_rec.object_version_number
576       );
577     --
578   exception
579     --
580     when hr_api.cannot_find_prog_unit then
581       --
582       hr_api.cannot_find_prog_unit_error
583         (p_module_name => 'ben_actl_prem_f'
584         ,p_hook_type   => 'AU');
585       --
586   end;
587   --
588   -- End of API User Hook for post_update.
589   --
590   --
591   hr_utility.set_location(' Leaving:'||l_proc, 10);
592 End post_update;
593 --
594 -- ----------------------------------------------------------------------------
595 -- |-----------------------------< convert_defs >-----------------------------|
596 -- ----------------------------------------------------------------------------
597 -- {Start Of Comments}
598 --
599 -- Description:
600 --   The Convert_Defs procedure has one very important function:
601 --   It must return the record structure for the row with all system defaulted
602 --   values converted into its corresponding parameter value for update. When
603 --   we attempt to update a row through the Upd process , certain
604 --   parameters can be defaulted which enables flexibility in the calling of
605 --   the upd process (e.g. only attributes which need to be updated need to be
606 --   specified). For the upd process to determine which attributes
607 --   have NOT been specified we need to check if the parameter has a reserved
608 --   system default value. Therefore, for all parameters which have a
609 --   corresponding reserved system default mechanism specified we need to
610 --   check if a system default is being used. If a system default is being
611 --   used then we convert the defaulted value into its corresponding attribute
612 --   value held in the g_old_rec data structure.
613 --
614 -- Prerequisites:
615 --   This private function can only be called from the upd process.
616 --
617 -- In Parameters:
618 --   A Pl/Sql record structre.
619 --
620 -- Post Success:
621 --   The record structure will be returned with all system defaulted parameter
622 --   values converted into its current row attribute value.
623 --
624 -- Post Failure:
625 --   No direct error handling is required within this function. Any possible
626 --   errors within this procedure will be a PL/SQL value error due to conversion
627 --   of datatypes or data lengths.
628 --
629 -- Developer Implementation Notes:
630 --   None.
631 --
632 -- Access Status:
633 --   Internal Row Handler Use Only.
634 --
635 -- {End Of Comments}
636 -- ----------------------------------------------------------------------------
637 Procedure convert_defs(p_rec in out nocopy ben_apr_shd.g_rec_type) is
638 --
639   l_proc  varchar2(72) := g_package||'convert_defs';
640 --
641 Begin
642   --
643   hr_utility.set_location('Entering:'||l_proc, 5);
644   --
645   -- We must now examine each argument value in the
646   -- p_rec plsql record structure
647   -- to see if a system default is being used. If a system default
648   -- is being used then we must set to the 'current' argument value.
649   --
650   If (p_rec.name = hr_api.g_varchar2) then
651     p_rec.name :=
652     ben_apr_shd.g_old_rec.name;
653   End If;
654   If (p_rec.acty_ref_perd_cd = hr_api.g_varchar2) then
655     p_rec.acty_ref_perd_cd :=
656     ben_apr_shd.g_old_rec.acty_ref_perd_cd;
657   End If;
658   If (p_rec.uom = hr_api.g_varchar2) then
659     p_rec.uom :=
660     ben_apr_shd.g_old_rec.uom;
661   End If;
662   If (p_rec.rt_typ_cd = hr_api.g_varchar2) then
663     p_rec.rt_typ_cd :=
664     ben_apr_shd.g_old_rec.rt_typ_cd;
665   End If;
666   If (p_rec.bnft_rt_typ_cd = hr_api.g_varchar2) then
667     p_rec.bnft_rt_typ_cd :=
668     ben_apr_shd.g_old_rec.bnft_rt_typ_cd;
669   End If;
670   If (p_rec.val = hr_api.g_number) then
671     p_rec.val :=
672     ben_apr_shd.g_old_rec.val;
673   End If;
674   If (p_rec.mlt_cd = hr_api.g_varchar2) then
675     p_rec.mlt_cd :=
676     ben_apr_shd.g_old_rec.mlt_cd;
677   End If;
678   If (p_rec.prdct_cd = hr_api.g_varchar2) then
679     p_rec.prdct_cd :=
680     ben_apr_shd.g_old_rec.prdct_cd;
681   End If;
682   If (p_rec.rndg_cd = hr_api.g_varchar2) then
683     p_rec.rndg_cd :=
684     ben_apr_shd.g_old_rec.rndg_cd;
685   End If;
686   If (p_rec.rndg_rl = hr_api.g_number) then
687     p_rec.rndg_rl :=
688     ben_apr_shd.g_old_rec.rndg_rl;
689   End If;
690   If (p_rec.comp_lvl_fctr_id = hr_api.g_number) then
691     p_rec.comp_lvl_fctr_id :=
692     ben_apr_shd.g_old_rec.comp_lvl_fctr_id;
693   End If;
694   If (p_rec.organization_id = hr_api.g_number) then
695     p_rec.organization_id :=
696     ben_apr_shd.g_old_rec.organization_id;
697   End If;
698   If (p_rec.business_group_id = hr_api.g_number) then
699     p_rec.business_group_id :=
700     ben_apr_shd.g_old_rec.business_group_id;
701   End If;
702   If (p_rec.val_calc_rl = hr_api.g_number) then
703     p_rec.val_calc_rl :=
704     ben_apr_shd.g_old_rec.val_calc_rl;
705   End If;
706   If (p_rec.prtl_mo_det_mthd_cd = hr_api.g_varchar2) then
707     p_rec.prtl_mo_det_mthd_cd :=
708     ben_apr_shd.g_old_rec.prtl_mo_det_mthd_cd;
709   End If;
710   If (p_rec.prtl_mo_det_mthd_rl = hr_api.g_number) then
711     p_rec.prtl_mo_det_mthd_rl :=
712     ben_apr_shd.g_old_rec.prtl_mo_det_mthd_rl;
713   End If;
714   If (p_rec.wsh_rl_dy_mo_num = hr_api.g_number) then
715     p_rec.wsh_rl_dy_mo_num :=
716     ben_apr_shd.g_old_rec.wsh_rl_dy_mo_num;
717   End If;
718   If (p_rec.vrbl_rt_add_on_calc_rl = hr_api.g_number) then
719     p_rec.vrbl_rt_add_on_calc_rl :=
720     ben_apr_shd.g_old_rec.vrbl_rt_add_on_calc_rl;
721   End If;
722   If (p_rec.apr_attribute_category = hr_api.g_varchar2) then
723     p_rec.apr_attribute_category :=
724     ben_apr_shd.g_old_rec.apr_attribute_category;
725   End If;
726   If (p_rec.apr_attribute1 = hr_api.g_varchar2) then
727     p_rec.apr_attribute1 :=
728     ben_apr_shd.g_old_rec.apr_attribute1;
729   End If;
730   If (p_rec.apr_attribute2 = hr_api.g_varchar2) then
731     p_rec.apr_attribute2 :=
732     ben_apr_shd.g_old_rec.apr_attribute2;
733   End If;
734   If (p_rec.apr_attribute3 = hr_api.g_varchar2) then
735     p_rec.apr_attribute3 :=
736     ben_apr_shd.g_old_rec.apr_attribute3;
737   End If;
738   If (p_rec.apr_attribute4 = hr_api.g_varchar2) then
739     p_rec.apr_attribute4 :=
740     ben_apr_shd.g_old_rec.apr_attribute4;
741   End If;
742   If (p_rec.apr_attribute5 = hr_api.g_varchar2) then
743     p_rec.apr_attribute5 :=
744     ben_apr_shd.g_old_rec.apr_attribute5;
745   End If;
746   If (p_rec.apr_attribute6 = hr_api.g_varchar2) then
747     p_rec.apr_attribute6 :=
748     ben_apr_shd.g_old_rec.apr_attribute6;
749   End If;
750   If (p_rec.apr_attribute7 = hr_api.g_varchar2) then
751     p_rec.apr_attribute7 :=
752     ben_apr_shd.g_old_rec.apr_attribute7;
753   End If;
754   If (p_rec.apr_attribute8 = hr_api.g_varchar2) then
755     p_rec.apr_attribute8 :=
756     ben_apr_shd.g_old_rec.apr_attribute8;
757   End If;
758   If (p_rec.apr_attribute9 = hr_api.g_varchar2) then
759     p_rec.apr_attribute9 :=
760     ben_apr_shd.g_old_rec.apr_attribute9;
761   End If;
762   If (p_rec.apr_attribute10 = hr_api.g_varchar2) then
763     p_rec.apr_attribute10 :=
764     ben_apr_shd.g_old_rec.apr_attribute10;
765   End If;
766   If (p_rec.apr_attribute11 = hr_api.g_varchar2) then
767     p_rec.apr_attribute11 :=
768     ben_apr_shd.g_old_rec.apr_attribute11;
769   End If;
770   If (p_rec.apr_attribute12 = hr_api.g_varchar2) then
771     p_rec.apr_attribute12 :=
772     ben_apr_shd.g_old_rec.apr_attribute12;
773   End If;
774   If (p_rec.apr_attribute13 = hr_api.g_varchar2) then
775     p_rec.apr_attribute13 :=
776     ben_apr_shd.g_old_rec.apr_attribute13;
777   End If;
778   If (p_rec.apr_attribute14 = hr_api.g_varchar2) then
779     p_rec.apr_attribute14 :=
780     ben_apr_shd.g_old_rec.apr_attribute14;
781   End If;
782   If (p_rec.apr_attribute15 = hr_api.g_varchar2) then
783     p_rec.apr_attribute15 :=
784     ben_apr_shd.g_old_rec.apr_attribute15;
785   End If;
786   If (p_rec.apr_attribute16 = hr_api.g_varchar2) then
787     p_rec.apr_attribute16 :=
788     ben_apr_shd.g_old_rec.apr_attribute16;
789   End If;
790   If (p_rec.apr_attribute17 = hr_api.g_varchar2) then
791     p_rec.apr_attribute17 :=
792     ben_apr_shd.g_old_rec.apr_attribute17;
793   End If;
794   If (p_rec.apr_attribute18 = hr_api.g_varchar2) then
795     p_rec.apr_attribute18 :=
796     ben_apr_shd.g_old_rec.apr_attribute18;
797   End If;
798   If (p_rec.apr_attribute19 = hr_api.g_varchar2) then
799     p_rec.apr_attribute19 :=
800     ben_apr_shd.g_old_rec.apr_attribute19;
801   End If;
802   If (p_rec.apr_attribute20 = hr_api.g_varchar2) then
803     p_rec.apr_attribute20 :=
804     ben_apr_shd.g_old_rec.apr_attribute20;
805   End If;
806   If (p_rec.apr_attribute21 = hr_api.g_varchar2) then
807     p_rec.apr_attribute21 :=
808     ben_apr_shd.g_old_rec.apr_attribute21;
809   End If;
810   If (p_rec.apr_attribute22 = hr_api.g_varchar2) then
811     p_rec.apr_attribute22 :=
812     ben_apr_shd.g_old_rec.apr_attribute22;
813   End If;
814   If (p_rec.apr_attribute23 = hr_api.g_varchar2) then
815     p_rec.apr_attribute23 :=
816     ben_apr_shd.g_old_rec.apr_attribute23;
817   End If;
818   If (p_rec.apr_attribute24 = hr_api.g_varchar2) then
819     p_rec.apr_attribute24 :=
820     ben_apr_shd.g_old_rec.apr_attribute24;
821   End If;
822   If (p_rec.apr_attribute25 = hr_api.g_varchar2) then
823     p_rec.apr_attribute25 :=
824     ben_apr_shd.g_old_rec.apr_attribute25;
825   End If;
826   If (p_rec.apr_attribute26 = hr_api.g_varchar2) then
827     p_rec.apr_attribute26 :=
828     ben_apr_shd.g_old_rec.apr_attribute26;
829   End If;
830   If (p_rec.apr_attribute27 = hr_api.g_varchar2) then
831     p_rec.apr_attribute27 :=
832     ben_apr_shd.g_old_rec.apr_attribute27;
833   End If;
834   If (p_rec.apr_attribute28 = hr_api.g_varchar2) then
835     p_rec.apr_attribute28 :=
836     ben_apr_shd.g_old_rec.apr_attribute28;
837   End If;
838   If (p_rec.apr_attribute29 = hr_api.g_varchar2) then
839     p_rec.apr_attribute29 :=
840     ben_apr_shd.g_old_rec.apr_attribute29;
841   End If;
842   If (p_rec.apr_attribute30 = hr_api.g_varchar2) then
843     p_rec.apr_attribute30 :=
844     ben_apr_shd.g_old_rec.apr_attribute30;
845   End If;
846 
847   --
848   hr_utility.set_location(' Leaving:'||l_proc, 10);
849 --
850 End convert_defs;
851 --
852 -- ----------------------------------------------------------------------------
853 -- |---------------------------------< upd >----------------------------------|
854 -- ----------------------------------------------------------------------------
855 Procedure upd
856   (
857   p_rec			in out nocopy 	ben_apr_shd.g_rec_type,
858   p_effective_date	in 	date,
859   p_datetrack_mode	in 	varchar2
860   ) is
861 --
862   l_proc			varchar2(72) := g_package||'upd';
863   l_validation_start_date	date;
864   l_validation_end_date		date;
865 --
866 Begin
867   hr_utility.set_location('Entering:'||l_proc, 5);
868   --
869   -- Ensure that the DateTrack update mode is valid
870   --
871   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
872   --
873   -- We must lock the row which we need to update.
874   --
875   ben_apr_shd.lck
876 	(p_effective_date	 => p_effective_date,
877       	 p_datetrack_mode	 => p_datetrack_mode,
878       	 p_actl_prem_id	 => p_rec.actl_prem_id,
879       	 p_object_version_number => p_rec.object_version_number,
880       	 p_validation_start_date => l_validation_start_date,
881       	 p_validation_end_date	 => l_validation_end_date);
882   --
883   -- 1. During an update system defaults are used to determine if
884   --    arguments have been defaulted or not. We must therefore
885   --    derive the full record structure values to be updated.
886   --
887   -- 2. Call the supporting update validate operations.
888   --
889   convert_defs(p_rec);
890   ben_apr_bus.update_validate
891 	(p_rec			 => p_rec,
892 	 p_effective_date	 => p_effective_date,
893 	 p_datetrack_mode  	 => p_datetrack_mode,
894 	 p_validation_start_date => l_validation_start_date,
895 	 p_validation_end_date	 => l_validation_end_date);
896   --
897   -- Call the supporting pre-update operation
898   --
899   pre_update
900 	(p_rec			 => p_rec,
901 	 p_effective_date	 => p_effective_date,
902 	 p_datetrack_mode	 => p_datetrack_mode,
903 	 p_validation_start_date => l_validation_start_date,
904 	 p_validation_end_date	 => l_validation_end_date);
905   --
906   -- Update the row.
907   --
908   update_dml
909 	(p_rec			 => p_rec,
910 	 p_effective_date	 => p_effective_date,
911 	 p_datetrack_mode	 => p_datetrack_mode,
912 	 p_validation_start_date => l_validation_start_date,
913 	 p_validation_end_date	 => l_validation_end_date);
914   --
915   -- Call the supporting post-update operation
916   --
917   post_update
918 	(p_rec			 => p_rec,
919 	 p_effective_date	 => p_effective_date,
920 	 p_datetrack_mode	 => p_datetrack_mode,
921 	 p_validation_start_date => l_validation_start_date,
922 	 p_validation_end_date	 => l_validation_end_date);
923 End upd;
924 --
925 -- ----------------------------------------------------------------------------
926 -- |---------------------------------< upd >----------------------------------|
927 -- ----------------------------------------------------------------------------
928 Procedure upd
929   (
930   p_actl_prem_id                 in number,
931   p_effective_start_date         out nocopy date,
932   p_effective_end_date           out nocopy date,
933   p_name                         in varchar2         default hr_api.g_varchar2,
934   p_acty_ref_perd_cd             in varchar2         default hr_api.g_varchar2,
935   p_uom                          in varchar2         default hr_api.g_varchar2,
936   p_rt_typ_cd                    in varchar2         default hr_api.g_varchar2,
937   p_bnft_rt_typ_cd               in varchar2         default hr_api.g_varchar2,
938   p_val                          in number           default hr_api.g_number,
939   p_mlt_cd                       in varchar2         default hr_api.g_varchar2,
940   p_prdct_cd                     in varchar2         default hr_api.g_varchar2,
941   p_rndg_cd                      in varchar2         default hr_api.g_varchar2,
942   p_rndg_rl                      in number           default hr_api.g_number,
943   p_val_calc_rl                  in number           default hr_api.g_number,
944   p_prem_asnmt_cd                 in varchar2       default hr_api.g_varchar2,
945   p_prem_asnmt_lvl_cd             in varchar2       default hr_api.g_varchar2,
946   p_actl_prem_typ_cd              in varchar2       default hr_api.g_varchar2,
947   p_prem_pyr_cd                   in varchar2       default hr_api.g_varchar2,
948   p_cr_lkbk_val                   in number         default hr_api.g_number,
949   p_cr_lkbk_uom                   in varchar2       default hr_api.g_varchar2,
950   p_cr_lkbk_crnt_py_only_flag     in varchar2,
951   p_prsptv_r_rtsptv_cd            in varchar2      default hr_api.g_varchar2,
952   p_upr_lmt_val                   in number         default hr_api.g_number,
953   p_upr_lmt_calc_rl               in number         default hr_api.g_number,
954   p_lwr_lmt_val                   in number         default hr_api.g_number,
955   p_lwr_lmt_calc_rl               in number         default hr_api.g_number,
956   p_cost_allocation_keyflex_id    in number         default hr_api.g_number,
957   p_organization_id               in number         default hr_api.g_number,
958   p_oipl_id                       in number         default hr_api.g_number,
959   p_pl_id                         in number         default hr_api.g_number,
960   p_comp_lvl_fctr_id             in number           default hr_api.g_number,
961   p_business_group_id            in number           default hr_api.g_number,
962   p_prtl_mo_det_mthd_cd                      in varchar2         default hr_api.g_varchar2,
963   p_prtl_mo_det_mthd_rl                      in number           default hr_api.g_number,
964   p_wsh_rl_dy_mo_num                      in number           default hr_api.g_number,
965   p_vrbl_rt_add_on_calc_rl       in number           default hr_api.g_number,
966   p_apr_attribute_category       in varchar2         default hr_api.g_varchar2,
967   p_apr_attribute1               in varchar2         default hr_api.g_varchar2,
968   p_apr_attribute2               in varchar2         default hr_api.g_varchar2,
969   p_apr_attribute3               in varchar2         default hr_api.g_varchar2,
970   p_apr_attribute4               in varchar2         default hr_api.g_varchar2,
971   p_apr_attribute5               in varchar2         default hr_api.g_varchar2,
972   p_apr_attribute6               in varchar2         default hr_api.g_varchar2,
973   p_apr_attribute7               in varchar2         default hr_api.g_varchar2,
974   p_apr_attribute8               in varchar2         default hr_api.g_varchar2,
975   p_apr_attribute9               in varchar2         default hr_api.g_varchar2,
976   p_apr_attribute10              in varchar2         default hr_api.g_varchar2,
977   p_apr_attribute11              in varchar2         default hr_api.g_varchar2,
978   p_apr_attribute12              in varchar2         default hr_api.g_varchar2,
979   p_apr_attribute13              in varchar2         default hr_api.g_varchar2,
980   p_apr_attribute14              in varchar2         default hr_api.g_varchar2,
981   p_apr_attribute15              in varchar2         default hr_api.g_varchar2,
982   p_apr_attribute16              in varchar2         default hr_api.g_varchar2,
983   p_apr_attribute17              in varchar2         default hr_api.g_varchar2,
984   p_apr_attribute18              in varchar2         default hr_api.g_varchar2,
985   p_apr_attribute19              in varchar2         default hr_api.g_varchar2,
986   p_apr_attribute20              in varchar2         default hr_api.g_varchar2,
987   p_apr_attribute21              in varchar2         default hr_api.g_varchar2,
988   p_apr_attribute22              in varchar2         default hr_api.g_varchar2,
989   p_apr_attribute23              in varchar2         default hr_api.g_varchar2,
990   p_apr_attribute24              in varchar2         default hr_api.g_varchar2,
991   p_apr_attribute25              in varchar2         default hr_api.g_varchar2,
992   p_apr_attribute26              in varchar2         default hr_api.g_varchar2,
993   p_apr_attribute27              in varchar2         default hr_api.g_varchar2,
994   p_apr_attribute28              in varchar2         default hr_api.g_varchar2,
995   p_apr_attribute29              in varchar2         default hr_api.g_varchar2,
996   p_apr_attribute30              in varchar2         default hr_api.g_varchar2,
997   p_object_version_number        in out nocopy number,
998   p_effective_date		 in date,
999   p_datetrack_mode		 in varchar2
1000   ) is
1001 --
1002   l_rec		ben_apr_shd.g_rec_type;
1003   l_proc	varchar2(72) := g_package||'upd';
1004 --
1005 Begin
1006   hr_utility.set_location('Entering:'||l_proc, 5);
1007   --
1008   -- Call conversion function to turn arguments into the
1009   -- l_rec structure.
1010   --
1011   l_rec :=
1012   ben_apr_shd.convert_args
1013   (
1014   p_actl_prem_id,
1015   null,
1016   null,
1017   p_name,
1018   p_acty_ref_perd_cd,
1019   p_uom,
1020   p_rt_typ_cd,
1021   p_bnft_rt_typ_cd,
1022   p_val,
1023   p_mlt_cd,
1024   p_prdct_cd,
1025   p_rndg_cd,
1026   p_rndg_rl,
1027   p_val_calc_rl,
1028   p_prem_asnmt_cd,
1029   p_prem_asnmt_lvl_cd,
1030   p_actl_prem_typ_cd,
1031   p_prem_pyr_cd,
1032   p_cr_lkbk_val,
1033   p_cr_lkbk_uom,
1034   p_cr_lkbk_crnt_py_only_flag,
1035   p_prsptv_r_rtsptv_cd,
1036   p_upr_lmt_val,
1037   p_upr_lmt_calc_rl,
1038   p_lwr_lmt_val,
1039   p_lwr_lmt_calc_rl,
1040   p_cost_allocation_keyflex_id,
1041   p_organization_id,
1042   p_oipl_id,
1043   p_pl_id,
1044   p_comp_lvl_fctr_id,
1045   p_business_group_id,
1046   p_prtl_mo_det_mthd_cd,
1047   p_prtl_mo_det_mthd_rl,
1048   p_wsh_rl_dy_mo_num,
1049   p_vrbl_rt_add_on_calc_rl,
1050   p_apr_attribute_category,
1051   p_apr_attribute1,
1052   p_apr_attribute2,
1053   p_apr_attribute3,
1054   p_apr_attribute4,
1055   p_apr_attribute5,
1056   p_apr_attribute6,
1057   p_apr_attribute7,
1058   p_apr_attribute8,
1059   p_apr_attribute9,
1060   p_apr_attribute10,
1061   p_apr_attribute11,
1062   p_apr_attribute12,
1063   p_apr_attribute13,
1064   p_apr_attribute14,
1065   p_apr_attribute15,
1066   p_apr_attribute16,
1067   p_apr_attribute17,
1068   p_apr_attribute18,
1069   p_apr_attribute19,
1070   p_apr_attribute20,
1071   p_apr_attribute21,
1072   p_apr_attribute22,
1073   p_apr_attribute23,
1074   p_apr_attribute24,
1075   p_apr_attribute25,
1076   p_apr_attribute26,
1077   p_apr_attribute27,
1078   p_apr_attribute28,
1079   p_apr_attribute29,
1080   p_apr_attribute30,
1081   p_object_version_number
1082   );
1083   --
1084   -- Having converted the arguments into the
1085   -- plsql record structure we call the corresponding record
1086   -- business process.
1087   --
1088   upd(l_rec, p_effective_date, p_datetrack_mode);
1089   p_object_version_number       := l_rec.object_version_number;
1090   p_effective_start_date        := l_rec.effective_start_date;
1091   p_effective_end_date          := l_rec.effective_end_date;
1092   --
1093   --
1094   hr_utility.set_location(' Leaving:'||l_proc, 10);
1095 End upd;
1096 --
1097 end ben_apr_upd;