DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_CCM_UPD

Source


1 Package Body ben_ccm_upd as
2 /* $Header: beccmrhi.pkb 120.6 2011/03/06 05:46:23 pvelvano ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_ccm_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_ccm_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_cvg_amt_calc_mthd_f',
78 	   p_base_key_column	=> 'cvg_amt_calc_mthd_id',
79 	   p_base_key_value	=> p_rec.cvg_amt_calc_mthd_id);
80     --
81     ben_ccm_shd.g_api_dml := true;  -- Set the api dml status
82     --
83     -- Update the ben_cvg_amt_calc_mthd_f Row
84     --
85     update  ben_cvg_amt_calc_mthd_f
86     set
87         cvg_amt_calc_mthd_id            = p_rec.cvg_amt_calc_mthd_id,
88     name                            = p_rec.name,
89     incrmt_val                      = p_rec.incrmt_val,
90     mx_val                          = p_rec.mx_val,
91     mn_val                          = p_rec.mn_val,
92     no_mx_val_dfnd_flag             = p_rec.no_mx_val_dfnd_flag,
93     no_mn_val_dfnd_flag             = p_rec.no_mn_val_dfnd_flag,
94     rndg_cd                         = p_rec.rndg_cd,
95     rndg_rl                         = p_rec.rndg_rl,
96     lwr_lmt_val                     = p_rec.lwr_lmt_val,
97     lwr_lmt_calc_rl                 = p_rec.lwr_lmt_calc_rl,
98     upr_lmt_val                     = p_rec.upr_lmt_val,
99     upr_lmt_calc_rl                 = p_rec.upr_lmt_calc_rl,
100     val                             = p_rec.val,
101     val_ovrid_alwd_flag             = p_rec.val_ovrid_alwd_flag,
102     val_calc_rl                     = p_rec.val_calc_rl,
103     uom                             = p_rec.uom,
104     nnmntry_uom                     = p_rec.nnmntry_uom,
105     bndry_perd_cd                   = p_rec.bndry_perd_cd,
106     bnft_typ_cd                     = p_rec.bnft_typ_cd,
107     cvg_mlt_cd                      = p_rec.cvg_mlt_cd,
108     rt_typ_cd                       = p_rec.rt_typ_cd,
109     dflt_val                        = p_rec.dflt_val,
110     entr_val_at_enrt_flag           = p_rec.entr_val_at_enrt_flag,
111     dflt_flag                       = p_rec.dflt_flag,
112     comp_lvl_fctr_id                = p_rec.comp_lvl_fctr_id,
113     oipl_id                         = p_rec.oipl_id,
114     pl_id                           = p_rec.pl_id,
115     plip_id                         = p_rec.plip_id,
116     business_group_id               = p_rec.business_group_id,
117     ccm_attribute_category          = p_rec.ccm_attribute_category,
118     ccm_attribute1                  = p_rec.ccm_attribute1,
119     ccm_attribute2                  = p_rec.ccm_attribute2,
120     ccm_attribute3                  = p_rec.ccm_attribute3,
121     ccm_attribute4                  = p_rec.ccm_attribute4,
122     ccm_attribute5                  = p_rec.ccm_attribute5,
123     ccm_attribute6                  = p_rec.ccm_attribute6,
124     ccm_attribute7                  = p_rec.ccm_attribute7,
125     ccm_attribute8                  = p_rec.ccm_attribute8,
126     ccm_attribute9                  = p_rec.ccm_attribute9,
127     ccm_attribute10                 = p_rec.ccm_attribute10,
128     ccm_attribute11                 = p_rec.ccm_attribute11,
129     ccm_attribute12                 = p_rec.ccm_attribute12,
130     ccm_attribute13                 = p_rec.ccm_attribute13,
131     ccm_attribute14                 = p_rec.ccm_attribute14,
132     ccm_attribute15                 = p_rec.ccm_attribute15,
133     ccm_attribute16                 = p_rec.ccm_attribute16,
134     ccm_attribute17                 = p_rec.ccm_attribute17,
135     ccm_attribute18                 = p_rec.ccm_attribute18,
136     ccm_attribute19                 = p_rec.ccm_attribute19,
137     ccm_attribute20                 = p_rec.ccm_attribute20,
138     ccm_attribute21                 = p_rec.ccm_attribute21,
139     ccm_attribute22                 = p_rec.ccm_attribute22,
140     ccm_attribute23                 = p_rec.ccm_attribute23,
141     ccm_attribute24                 = p_rec.ccm_attribute24,
142     ccm_attribute25                 = p_rec.ccm_attribute25,
143     ccm_attribute26                 = p_rec.ccm_attribute26,
144     ccm_attribute27                 = p_rec.ccm_attribute27,
145     ccm_attribute28                 = p_rec.ccm_attribute28,
146     ccm_attribute29                 = p_rec.ccm_attribute29,
147     ccm_attribute30                 = p_rec.ccm_attribute30,
148     object_version_number           = p_rec.object_version_number
149     where   cvg_amt_calc_mthd_id = p_rec.cvg_amt_calc_mthd_id
150     and     effective_start_date = p_validation_start_date
151     and     effective_end_date   = p_validation_end_date;
152     --
153     ben_ccm_shd.g_api_dml := false;   -- Unset the api dml status
154     --
155     -- Set the effective start and end dates
156     --
157     p_rec.effective_start_date := p_validation_start_date;
158     p_rec.effective_end_date   := p_validation_end_date;
159   End If;
160 --
161 hr_utility.set_location(' Leaving:'||l_proc, 15);
162 Exception
163   When hr_api.check_integrity_violated Then
164     -- A check constraint has been violated
165     ben_ccm_shd.g_api_dml := false;   -- Unset the api dml status
166     ben_ccm_shd.constraint_error
167       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
168   When hr_api.unique_integrity_violated Then
169     -- Unique integrity has been violated
170     ben_ccm_shd.g_api_dml := false;   -- Unset the api dml status
171     ben_ccm_shd.constraint_error
172       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
173   When Others Then
174     ben_ccm_shd.g_api_dml := false;   -- Unset the api dml status
175     Raise;
176 End dt_update_dml;
177 --
178 -- ----------------------------------------------------------------------------
179 -- |------------------------------< update_dml >------------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start Of Comments}
182 --
183 -- Description:
184 --   This procedure calls the dt_update_dml control logic which handles
185 --   the actual datetrack dml.
186 --
187 -- Prerequisites:
188 --   This is an internal private procedure which must be called from the upd
189 --   procedure.
190 --
191 -- In Parameters:
192 --   A Pl/Sql record structre.
193 --
194 -- Post Success:
195 --   Processing contines.
196 --
197 -- Post Failure:
198 --   No specific error handling is required within this procedure.
199 --
200 -- Developer Implementation Notes:
201 --   The update 'set' arguments list should be modified if any of your
202 --   attributes are not updateable.
203 --
204 -- Access Status:
205 --   Internal Row Handler Use Only.
206 --
207 -- {End Of Comments}
208 -- ----------------------------------------------------------------------------
209 Procedure update_dml
210 	(p_rec 			 in out nocopy ben_ccm_shd.g_rec_type,
211 	 p_effective_date	 in	date,
212 	 p_datetrack_mode	 in	varchar2,
213 	 p_validation_start_date in	date,
214 	 p_validation_end_date	 in	date) is
215 --
216   l_proc	varchar2(72) := g_package||'update_dml';
217 --
218 Begin
219   hr_utility.set_location('Entering:'||l_proc, 5);
220   --
221   dt_update_dml(p_rec			=> p_rec,
222 		p_effective_date	=> p_effective_date,
223 		p_datetrack_mode	=> p_datetrack_mode,
224        		p_validation_start_date	=> p_validation_start_date,
225 		p_validation_end_date	=> p_validation_end_date);
226   --
227   hr_utility.set_location(' Leaving:'||l_proc, 10);
228 End update_dml;
229 --
230 -- ----------------------------------------------------------------------------
231 -- |----------------------------< dt_pre_update >-----------------------------|
232 -- ----------------------------------------------------------------------------
233 -- {Start Of Comments}
234 --
235 -- Description:
236 --   The dt_pre_update procedure controls the execution
237 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
238 --   and UPDATE_CHANGE_INSERT only. The execution required is as
239 --   follows:
240 --
241 --   1) Providing the datetrack update mode is not 'CORRECTION'
242 --      then set the effective end date of the current row (this
243 --      will be the validation_start_date - 1).
244 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
245 --      corresponding delete_dml process to delete any future rows
246 --      where the effective_start_date is greater than or equal to
247 --	the validation_start_date.
248 --   3) Call the insert_dml process to insert the new updated row
249 --      details..
250 --
251 -- Prerequisites:
252 --   This is an internal procedure which is called from the
253 --   pre_update procedure.
254 --
255 -- In Parameters:
256 --
257 -- Post Success:
258 --   Processing continues.
259 --
260 -- Post Failure:
261 --   If an error has occurred, an error message and exception will be raised
262 --   but not handled.
263 --
264 -- Developer Implementation Notes:
265 --   This is an internal procedure which is required by Datetrack. Don't
266 --   remove or modify.
267 --
268 -- Access Status:
269 --   Internal Row Handler Use Only.
270 --
271 -- {End Of Comments}
272 -- ----------------------------------------------------------------------------
273 Procedure dt_pre_update
274 	(p_rec 			 in out nocopy ben_ccm_shd.g_rec_type,
275 	 p_effective_date	 in	date,
276 	 p_datetrack_mode	 in	varchar2,
277 	 p_validation_start_date in	date,
278 	 p_validation_end_date	 in	date) is
279 --
280   l_proc	         varchar2(72) := g_package||'dt_pre_update';
281   l_dummy_version_number number;
282 --
283 Begin
284   hr_utility.set_location('Entering:'||l_proc, 5);
285   If (p_datetrack_mode <> 'CORRECTION') then
286     hr_utility.set_location(l_proc, 10);
287     --
288     -- Update the current effective end date
289     --
290     ben_ccm_shd.upd_effective_end_date
291      (p_effective_date	       => p_effective_date,
292       p_base_key_value	       => p_rec.cvg_amt_calc_mthd_id,
293       p_new_effective_end_date => (p_validation_start_date - 1),
294       p_validation_start_date  => p_validation_start_date,
295       p_validation_end_date    => p_validation_end_date,
296       p_object_version_number  => l_dummy_version_number);
297     --
298     If (p_datetrack_mode = 'UPDATE_OVERRIDE') then
299       hr_utility.set_location(l_proc, 15);
300       --
301       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
302       -- delete any future rows
303       --
304       ben_ccm_del.delete_dml
305         (p_rec			 => p_rec,
306 	 p_effective_date	 => p_effective_date,
307 	 p_datetrack_mode	 => p_datetrack_mode,
308 	 p_validation_start_date => p_validation_start_date,
309 	 p_validation_end_date   => p_validation_end_date);
310     End If;
311     hr_utility.set_location(l_proc, 20);
312     --
313     -- We must now insert the updated row
314     --
315     ben_ccm_ins.insert_dml
316       (p_rec			=> p_rec,
317        p_effective_date		=> p_effective_date,
318        p_datetrack_mode		=> p_datetrack_mode,
319        p_validation_start_date	=> p_validation_start_date,
320        p_validation_end_date	=> p_validation_end_date);
321   End If;
322   hr_utility.set_location(' Leaving:'||l_proc, 20);
323 End dt_pre_update;
324 --
325 -- ----------------------------------------------------------------------------
326 -- |------------------------------< pre_update >------------------------------|
327 -- ----------------------------------------------------------------------------
328 -- {Start Of Comments}
329 --
330 -- Description:
331 --   This private procedure contains any processing which is required before
332 --   the update dml.
333 --
334 -- Prerequisites:
335 --   This is an internal procedure which is called from the upd procedure.
336 --
337 -- In Parameters:
338 --   A Pl/Sql record structre.
339 --
340 -- Post Success:
341 --   Processing continues.
342 --
343 -- Post Failure:
344 --   If an error has occurred, an error message and exception will be raised
345 --   but not handled.
346 --
347 -- Developer Implementation Notes:
348 --   Any pre-processing required before the update dml is issued should be
349 --   coded within this procedure. It is important to note that any 3rd party
350 --   maintenance should be reviewed before placing in this procedure. The call
351 --   to the dt_update_dml procedure should NOT be removed.
352 --
353 -- Access Status:
354 --   Internal Row Handler Use Only.
355 --
356 -- {End Of Comments}
357 -- ----------------------------------------------------------------------------
358 Procedure pre_update
359 	(p_rec 			 in out nocopy ben_ccm_shd.g_rec_type,
360 	 p_effective_date	 in	date,
361 	 p_datetrack_mode	 in	varchar2,
362 	 p_validation_start_date in	date,
363 	 p_validation_end_date	 in	date) is
364 --
365   l_proc	varchar2(72) := g_package||'pre_update';
366 --
367 Begin
368   hr_utility.set_location('Entering:'||l_proc, 5);
369   --
370   --
371   --
372   dt_pre_update
373     (p_rec 		     => p_rec,
374      p_effective_date	     => p_effective_date,
375      p_datetrack_mode	     => p_datetrack_mode,
376      p_validation_start_date => p_validation_start_date,
377      p_validation_end_date   => p_validation_end_date);
378   --
379   hr_utility.set_location(' Leaving:'||l_proc, 10);
380 End pre_update;
381 --
382 -- ----------------------------------------------------------------------------
383 -- |-----------------------------< post_update >------------------------------|
384 -- ----------------------------------------------------------------------------
385 -- {Start Of Comments}
386 --
387 -- Description:
388 --   This private procedure contains any processing which is required after the
389 --   update dml.
390 --
391 -- Prerequisites:
392 --   This is an internal procedure which is called from the upd procedure.
393 --
394 -- In Parameters:
395 --   A Pl/Sql record structre.
396 --
397 -- Post Success:
398 --   Processing continues.
399 --
400 -- Post Failure:
401 --   If an error has occurred, an error message and exception will be raised
402 --   but not handled.
403 --
404 -- Developer Implementation Notes:
405 --   Any post-processing required after the update dml is issued should be
406 --   coded within this procedure. It is important to note that any 3rd party
407 --   maintenance should be reviewed before placing in this procedure.
408 --
409 -- Access Status:
410 --   Internal Row Handler Use Only.
411 --
412 -- {End Of Comments}
413 -- ----------------------------------------------------------------------------
414 Procedure post_update
415 	(p_rec 			 in ben_ccm_shd.g_rec_type,
416 	 p_effective_date	 in date,
417 	 p_datetrack_mode	 in varchar2,
418 	 p_validation_start_date in date,
419 	 p_validation_end_date	 in date) is
420 --
421   l_proc	varchar2(72) := g_package||'post_update';
422 --
423 Begin
424   hr_utility.set_location('Entering:'||l_proc, 5);
425 --
426   --
427   -- Start of API User Hook for post_update.
428   --
429   begin
430     --
431     ben_ccm_rku.after_update
432       (
433   p_cvg_amt_calc_mthd_id          =>p_rec.cvg_amt_calc_mthd_id
434  ,p_effective_start_date          =>p_rec.effective_start_date
435  ,p_effective_end_date            =>p_rec.effective_end_date
436  ,p_name                          =>p_rec.name
437  ,p_incrmt_val                    =>p_rec.incrmt_val
438  ,p_mx_val                        =>p_rec.mx_val
439  ,p_mn_val                        =>p_rec.mn_val
440  ,p_no_mx_val_dfnd_flag           =>p_rec.no_mx_val_dfnd_flag
441  ,p_no_mn_val_dfnd_flag           =>p_rec.no_mn_val_dfnd_flag
442  ,p_rndg_cd                       =>p_rec.rndg_cd
443  ,p_rndg_rl                       =>p_rec.rndg_rl
444  ,p_lwr_lmt_val                   =>p_rec.lwr_lmt_val
445  ,p_lwr_lmt_calc_rl               =>p_rec.lwr_lmt_calc_rl
446  ,p_upr_lmt_val                   =>p_rec.upr_lmt_val
447  ,p_upr_lmt_calc_rl               =>p_rec.upr_lmt_calc_rl
448  ,p_val                           =>p_rec.val
449  ,p_val_ovrid_alwd_flag           =>p_rec.val_ovrid_alwd_flag
450  ,p_val_calc_rl                   =>p_rec.val_calc_rl
451  ,p_uom                           =>p_rec.uom
452  ,p_nnmntry_uom                   =>p_rec.nnmntry_uom
453  ,p_bndry_perd_cd                 =>p_rec.bndry_perd_cd
454  ,p_bnft_typ_cd                   =>p_rec.bnft_typ_cd
455  ,p_cvg_mlt_cd                    =>p_rec.cvg_mlt_cd
456  ,p_rt_typ_cd                     =>p_rec.rt_typ_cd
457  ,p_dflt_val                      =>p_rec.dflt_val
458  ,p_entr_val_at_enrt_flag         =>p_rec.entr_val_at_enrt_flag
459  ,p_dflt_flag                     =>p_rec.dflt_flag
460  ,p_comp_lvl_fctr_id              =>p_rec.comp_lvl_fctr_id
461  ,p_oipl_id                       =>p_rec.oipl_id
462  ,p_pl_id                         =>p_rec.pl_id
463  ,p_plip_id                       =>p_rec.plip_id
464  ,p_business_group_id             =>p_rec.business_group_id
465  ,p_ccm_attribute_category        =>p_rec.ccm_attribute_category
466  ,p_ccm_attribute1                =>p_rec.ccm_attribute1
467  ,p_ccm_attribute2                =>p_rec.ccm_attribute2
468  ,p_ccm_attribute3                =>p_rec.ccm_attribute3
469  ,p_ccm_attribute4                =>p_rec.ccm_attribute4
470  ,p_ccm_attribute5                =>p_rec.ccm_attribute5
471  ,p_ccm_attribute6                =>p_rec.ccm_attribute6
472  ,p_ccm_attribute7                =>p_rec.ccm_attribute7
473  ,p_ccm_attribute8                =>p_rec.ccm_attribute8
474  ,p_ccm_attribute9                =>p_rec.ccm_attribute9
475  ,p_ccm_attribute10               =>p_rec.ccm_attribute10
476  ,p_ccm_attribute11               =>p_rec.ccm_attribute11
477  ,p_ccm_attribute12               =>p_rec.ccm_attribute12
478  ,p_ccm_attribute13               =>p_rec.ccm_attribute13
479  ,p_ccm_attribute14               =>p_rec.ccm_attribute14
480  ,p_ccm_attribute15               =>p_rec.ccm_attribute15
481  ,p_ccm_attribute16               =>p_rec.ccm_attribute16
482  ,p_ccm_attribute17               =>p_rec.ccm_attribute17
483  ,p_ccm_attribute18               =>p_rec.ccm_attribute18
484  ,p_ccm_attribute19               =>p_rec.ccm_attribute19
485  ,p_ccm_attribute20               =>p_rec.ccm_attribute20
486  ,p_ccm_attribute21               =>p_rec.ccm_attribute21
487  ,p_ccm_attribute22               =>p_rec.ccm_attribute22
488  ,p_ccm_attribute23               =>p_rec.ccm_attribute23
489  ,p_ccm_attribute24               =>p_rec.ccm_attribute24
490  ,p_ccm_attribute25               =>p_rec.ccm_attribute25
491  ,p_ccm_attribute26               =>p_rec.ccm_attribute26
492  ,p_ccm_attribute27               =>p_rec.ccm_attribute27
493  ,p_ccm_attribute28               =>p_rec.ccm_attribute28
494  ,p_ccm_attribute29               =>p_rec.ccm_attribute29
495  ,p_ccm_attribute30               =>p_rec.ccm_attribute30
496  ,p_object_version_number         =>p_rec.object_version_number
497  ,p_effective_date                =>p_effective_date
498  ,p_datetrack_mode                =>p_datetrack_mode
499  ,p_validation_start_date         =>p_validation_start_date
500  ,p_validation_end_date           =>p_validation_end_date
501  ,p_effective_start_date_o        =>ben_ccm_shd.g_old_rec.effective_start_date
502  ,p_effective_end_date_o          =>ben_ccm_shd.g_old_rec.effective_end_date
503  ,p_name_o                        =>ben_ccm_shd.g_old_rec.name
504  ,p_incrmt_val_o                  =>ben_ccm_shd.g_old_rec.incrmt_val
505  ,p_mx_val_o                      =>ben_ccm_shd.g_old_rec.mx_val
506  ,p_mn_val_o                      =>ben_ccm_shd.g_old_rec.mn_val
507  ,p_no_mx_val_dfnd_flag_o         =>ben_ccm_shd.g_old_rec.no_mx_val_dfnd_flag
508  ,p_no_mn_val_dfnd_flag_o         =>ben_ccm_shd.g_old_rec.no_mn_val_dfnd_flag
509  ,p_rndg_cd_o                     =>ben_ccm_shd.g_old_rec.rndg_cd
510  ,p_rndg_rl_o                     =>ben_ccm_shd.g_old_rec.rndg_rl
511  ,p_lwr_lmt_val_o                 =>ben_ccm_shd.g_old_rec.lwr_lmt_val
512  ,p_lwr_lmt_calc_rl_o             =>ben_ccm_shd.g_old_rec.lwr_lmt_calc_rl
513  ,p_upr_lmt_val_o                 =>ben_ccm_shd.g_old_rec.upr_lmt_val
514  ,p_upr_lmt_calc_rl_o             =>ben_ccm_shd.g_old_rec.upr_lmt_calc_rl
515  ,p_val_o                         =>ben_ccm_shd.g_old_rec.val
516  ,p_val_ovrid_alwd_flag_o         =>ben_ccm_shd.g_old_rec.val_ovrid_alwd_flag
517  ,p_val_calc_rl_o                 =>ben_ccm_shd.g_old_rec.val_calc_rl
518  ,p_uom_o                         =>ben_ccm_shd.g_old_rec.uom
519  ,p_nnmntry_uom_o                 =>ben_ccm_shd.g_old_rec.nnmntry_uom
520  ,p_bndry_perd_cd_o               =>ben_ccm_shd.g_old_rec.bndry_perd_cd
521  ,p_bnft_typ_cd_o                 =>ben_ccm_shd.g_old_rec.bnft_typ_cd
522  ,p_cvg_mlt_cd_o                  =>ben_ccm_shd.g_old_rec.cvg_mlt_cd
523  ,p_rt_typ_cd_o                   =>ben_ccm_shd.g_old_rec.rt_typ_cd
524  ,p_dflt_val_o                    =>ben_ccm_shd.g_old_rec.dflt_val
525  ,p_entr_val_at_enrt_flag_o       =>ben_ccm_shd.g_old_rec.entr_val_at_enrt_flag
526  ,p_dflt_flag_o                   =>ben_ccm_shd.g_old_rec.dflt_flag
527  ,p_comp_lvl_fctr_id_o            =>ben_ccm_shd.g_old_rec.comp_lvl_fctr_id
528  ,p_oipl_id_o                     =>ben_ccm_shd.g_old_rec.oipl_id
529  ,p_pl_id_o                       =>ben_ccm_shd.g_old_rec.pl_id
530  ,p_plip_id_o                     =>ben_ccm_shd.g_old_rec.plip_id
531  ,p_business_group_id_o           =>ben_ccm_shd.g_old_rec.business_group_id
532  ,p_ccm_attribute_category_o      =>ben_ccm_shd.g_old_rec.ccm_attribute_category
533  ,p_ccm_attribute1_o              =>ben_ccm_shd.g_old_rec.ccm_attribute1
534  ,p_ccm_attribute2_o              =>ben_ccm_shd.g_old_rec.ccm_attribute2
535  ,p_ccm_attribute3_o              =>ben_ccm_shd.g_old_rec.ccm_attribute3
536  ,p_ccm_attribute4_o              =>ben_ccm_shd.g_old_rec.ccm_attribute4
537  ,p_ccm_attribute5_o              =>ben_ccm_shd.g_old_rec.ccm_attribute5
538  ,p_ccm_attribute6_o              =>ben_ccm_shd.g_old_rec.ccm_attribute6
539  ,p_ccm_attribute7_o              =>ben_ccm_shd.g_old_rec.ccm_attribute7
540  ,p_ccm_attribute8_o              =>ben_ccm_shd.g_old_rec.ccm_attribute8
541  ,p_ccm_attribute9_o              =>ben_ccm_shd.g_old_rec.ccm_attribute9
542  ,p_ccm_attribute10_o             =>ben_ccm_shd.g_old_rec.ccm_attribute10
543  ,p_ccm_attribute11_o             =>ben_ccm_shd.g_old_rec.ccm_attribute11
544  ,p_ccm_attribute12_o             =>ben_ccm_shd.g_old_rec.ccm_attribute12
545  ,p_ccm_attribute13_o             =>ben_ccm_shd.g_old_rec.ccm_attribute13
546  ,p_ccm_attribute14_o             =>ben_ccm_shd.g_old_rec.ccm_attribute14
547  ,p_ccm_attribute15_o             =>ben_ccm_shd.g_old_rec.ccm_attribute15
548  ,p_ccm_attribute16_o             =>ben_ccm_shd.g_old_rec.ccm_attribute16
549  ,p_ccm_attribute17_o             =>ben_ccm_shd.g_old_rec.ccm_attribute17
550  ,p_ccm_attribute18_o             =>ben_ccm_shd.g_old_rec.ccm_attribute18
551  ,p_ccm_attribute19_o             =>ben_ccm_shd.g_old_rec.ccm_attribute19
552  ,p_ccm_attribute20_o             =>ben_ccm_shd.g_old_rec.ccm_attribute20
553  ,p_ccm_attribute21_o             =>ben_ccm_shd.g_old_rec.ccm_attribute21
554  ,p_ccm_attribute22_o             =>ben_ccm_shd.g_old_rec.ccm_attribute22
555  ,p_ccm_attribute23_o             =>ben_ccm_shd.g_old_rec.ccm_attribute23
556  ,p_ccm_attribute24_o             =>ben_ccm_shd.g_old_rec.ccm_attribute24
557  ,p_ccm_attribute25_o             =>ben_ccm_shd.g_old_rec.ccm_attribute25
558  ,p_ccm_attribute26_o             =>ben_ccm_shd.g_old_rec.ccm_attribute26
559  ,p_ccm_attribute27_o             =>ben_ccm_shd.g_old_rec.ccm_attribute27
560  ,p_ccm_attribute28_o             =>ben_ccm_shd.g_old_rec.ccm_attribute28
561  ,p_ccm_attribute29_o             =>ben_ccm_shd.g_old_rec.ccm_attribute29
562  ,p_ccm_attribute30_o             =>ben_ccm_shd.g_old_rec.ccm_attribute30
563  ,p_object_version_number_o       =>ben_ccm_shd.g_old_rec.object_version_number
564       );
565     --
566   exception
567     --
568     when hr_api.cannot_find_prog_unit then
569       --
570       hr_api.cannot_find_prog_unit_error
571         (p_module_name => 'ben_cvg_amt_calc_mthd_f'
572         ,p_hook_type   => 'AU');
573       --
574   end;
575   --
576   -- End of API User Hook for post_update.
577   --
578   --
579   hr_utility.set_location(' Leaving:'||l_proc, 10);
580 End post_update;
581 --
582 -- ----------------------------------------------------------------------------
583 -- |-----------------------------< convert_defs >-----------------------------|
584 -- ----------------------------------------------------------------------------
585 -- {Start Of Comments}
586 --
587 -- Description:
588 --   The Convert_Defs procedure has one very important function:
589 --   It must return the record structure for the row with all system defaulted
590 --   values converted into its corresponding parameter value for update. When
591 --   we attempt to update a row through the Upd process , certain
592 --   parameters can be defaulted which enables flexibility in the calling of
593 --   the upd process (e.g. only attributes which need to be updated need to be
594 --   specified). For the upd process to determine which attributes
595 --   have NOT been specified we need to check if the parameter has a reserved
596 --   system default value. Therefore, for all parameters which have a
597 --   corresponding reserved system default mechanism specified we need to
598 --   check if a system default is being used. If a system default is being
599 --   used then we convert the defaulted value into its corresponding attribute
600 --   value held in the g_old_rec data structure.
601 --
602 -- Prerequisites:
603 --   This private function can only be called from the upd process.
604 --
605 -- In Parameters:
606 --   A Pl/Sql record structre.
607 --
608 -- Post Success:
609 --   The record structure will be returned with all system defaulted parameter
610 --   values converted into its current row attribute value.
611 --
612 -- Post Failure:
613 --   No direct error handling is required within this function. Any possible
614 --   errors within this procedure will be a PL/SQL value error due to conversion
615 --   of datatypes or data lengths.
616 --
617 -- Developer Implementation Notes:
618 --   None.
619 --
620 -- Access Status:
621 --   Internal Row Handler Use Only.
622 --
623 -- {End Of Comments}
624 -- ----------------------------------------------------------------------------
625 Procedure convert_defs(p_rec in out nocopy ben_ccm_shd.g_rec_type) is
626 --
627   l_proc  varchar2(72) := g_package||'convert_defs';
628 --
629 Begin
630   --
631   hr_utility.set_location('Entering:'||l_proc, 5);
632   --
633   -- We must now examine each argument value in the
634   -- p_rec plsql record structure
635   -- to see if a system default is being used. If a system default
636   -- is being used then we must set to the 'current' argument value.
637   --
638   If (p_rec.name = hr_api.g_varchar2) then
639     p_rec.name :=
640     ben_ccm_shd.g_old_rec.name;
641   End If;
642   If (p_rec.incrmt_val = hr_api.g_number) then
643     p_rec.incrmt_val :=
644     ben_ccm_shd.g_old_rec.incrmt_val;
645   End If;
646   If (p_rec.mx_val = hr_api.g_number) then
647     p_rec.mx_val :=
648     ben_ccm_shd.g_old_rec.mx_val;
649   End If;
650   If (p_rec.mn_val = hr_api.g_number) then
651     p_rec.mn_val :=
652     ben_ccm_shd.g_old_rec.mn_val;
653   End If;
654   If (p_rec.no_mx_val_dfnd_flag = hr_api.g_varchar2) then
655     p_rec.no_mx_val_dfnd_flag :=
656     ben_ccm_shd.g_old_rec.no_mx_val_dfnd_flag;
657   End If;
658   If (p_rec.no_mn_val_dfnd_flag = hr_api.g_varchar2) then
659     p_rec.no_mn_val_dfnd_flag :=
660     ben_ccm_shd.g_old_rec.no_mn_val_dfnd_flag;
661   End If;
662   If (p_rec.rndg_cd = hr_api.g_varchar2) then
663     p_rec.rndg_cd :=
664     ben_ccm_shd.g_old_rec.rndg_cd;
665   End If;
666   If (p_rec.rndg_rl = hr_api.g_number) then
667     p_rec.rndg_rl :=
668     ben_ccm_shd.g_old_rec.rndg_rl;
669   End If;
670   If (p_rec.lwr_lmt_val = hr_api.g_number) then
671     p_rec.lwr_lmt_val :=
672     ben_ccm_shd.g_old_rec.lwr_lmt_val;
673   End If;
674   If (p_rec.lwr_lmt_calc_rl = hr_api.g_number) then
675     p_rec.lwr_lmt_calc_rl :=
676     ben_ccm_shd.g_old_rec.lwr_lmt_calc_rl;
677   End If;
678   If (p_rec.upr_lmt_val = hr_api.g_number) then
679     p_rec.upr_lmt_val :=
680     ben_ccm_shd.g_old_rec.upr_lmt_val;
681   End If;
682   If (p_rec.upr_lmt_calc_rl = hr_api.g_number) then
683     p_rec.upr_lmt_calc_rl :=
684     ben_ccm_shd.g_old_rec.upr_lmt_calc_rl;
685   End If;
686   If (p_rec.val = hr_api.g_number) then
687     p_rec.val :=
688     ben_ccm_shd.g_old_rec.val;
689   End If;
690   If (p_rec.val_ovrid_alwd_flag = hr_api.g_varchar2) then
691     p_rec.val_ovrid_alwd_flag :=
692     ben_ccm_shd.g_old_rec.val_ovrid_alwd_flag;
693   End If;
694   If (p_rec.val_calc_rl = hr_api.g_number) then
695     p_rec.val_calc_rl :=
696     ben_ccm_shd.g_old_rec.val_calc_rl;
697   End If;
698   If (p_rec.uom = hr_api.g_varchar2) then
699     p_rec.uom :=
700     ben_ccm_shd.g_old_rec.uom;
701   End If;
702   If (p_rec.nnmntry_uom = hr_api.g_varchar2) then
703     p_rec.nnmntry_uom :=
704     ben_ccm_shd.g_old_rec.nnmntry_uom;
705   End If;
706   If (p_rec.bndry_perd_cd = hr_api.g_varchar2) then
707     p_rec.bndry_perd_cd :=
708     ben_ccm_shd.g_old_rec.bndry_perd_cd;
709   End If;
710   If (p_rec.bnft_typ_cd = hr_api.g_varchar2) then
711     p_rec.bnft_typ_cd :=
712     ben_ccm_shd.g_old_rec.bnft_typ_cd;
713   End If;
714   If (p_rec.cvg_mlt_cd = hr_api.g_varchar2) then
715     p_rec.cvg_mlt_cd :=
716     ben_ccm_shd.g_old_rec.cvg_mlt_cd;
717   End If;
718   If (p_rec.rt_typ_cd = hr_api.g_varchar2) then
719     p_rec.rt_typ_cd :=
720     ben_ccm_shd.g_old_rec.rt_typ_cd;
721   End If;
722 
723   If (p_rec.dflt_val = hr_api.g_number) then
724     p_rec.dflt_val :=
725     ben_ccm_shd.g_old_rec.dflt_val ;
726   End If;
727   If (p_rec.entr_val_at_enrt_flag = hr_api.g_varchar2) then
728     p_rec.entr_val_at_enrt_flag :=
729     ben_ccm_shd.g_old_rec.entr_val_at_enrt_flag ;
730   End If;
731   If (p_rec.dflt_flag  = hr_api.g_varchar2) then
732     p_rec.dflt_flag  :=
733     ben_ccm_shd.g_old_rec.dflt_flag ;
734   End If;
735   If (p_rec.comp_lvl_fctr_id = hr_api.g_number) then
736     p_rec.comp_lvl_fctr_id :=
737     ben_ccm_shd.g_old_rec.comp_lvl_fctr_id;
738   End If;
739   If (p_rec.oipl_id = hr_api.g_number) then
740     p_rec.oipl_id :=
741     ben_ccm_shd.g_old_rec.oipl_id;
742   End If;
743   If (p_rec.pl_id = hr_api.g_number) then
744     p_rec.pl_id :=
745     ben_ccm_shd.g_old_rec.pl_id;
746   End If;
747   If (p_rec.plip_id = hr_api.g_number) then
748     p_rec.plip_id :=
749     ben_ccm_shd.g_old_rec.plip_id;
750   End If;
751   If (p_rec.business_group_id = hr_api.g_number) then
752     p_rec.business_group_id :=
753     ben_ccm_shd.g_old_rec.business_group_id;
754   End If;
755   If (p_rec.ccm_attribute_category = hr_api.g_varchar2) then
756     p_rec.ccm_attribute_category :=
757     ben_ccm_shd.g_old_rec.ccm_attribute_category;
758   End If;
759   If (p_rec.ccm_attribute1 = hr_api.g_varchar2) then
760     p_rec.ccm_attribute1 :=
761     ben_ccm_shd.g_old_rec.ccm_attribute1;
762   End If;
763   If (p_rec.ccm_attribute2 = hr_api.g_varchar2) then
764     p_rec.ccm_attribute2 :=
765     ben_ccm_shd.g_old_rec.ccm_attribute2;
766   End If;
767   If (p_rec.ccm_attribute3 = hr_api.g_varchar2) then
768     p_rec.ccm_attribute3 :=
769     ben_ccm_shd.g_old_rec.ccm_attribute3;
770   End If;
771   If (p_rec.ccm_attribute4 = hr_api.g_varchar2) then
772     p_rec.ccm_attribute4 :=
773     ben_ccm_shd.g_old_rec.ccm_attribute4;
774   End If;
775   If (p_rec.ccm_attribute5 = hr_api.g_varchar2) then
776     p_rec.ccm_attribute5 :=
777     ben_ccm_shd.g_old_rec.ccm_attribute5;
778   End If;
779   If (p_rec.ccm_attribute6 = hr_api.g_varchar2) then
780     p_rec.ccm_attribute6 :=
781     ben_ccm_shd.g_old_rec.ccm_attribute6;
782   End If;
783   If (p_rec.ccm_attribute7 = hr_api.g_varchar2) then
784     p_rec.ccm_attribute7 :=
785     ben_ccm_shd.g_old_rec.ccm_attribute7;
786   End If;
787   If (p_rec.ccm_attribute8 = hr_api.g_varchar2) then
788     p_rec.ccm_attribute8 :=
789     ben_ccm_shd.g_old_rec.ccm_attribute8;
790   End If;
791   If (p_rec.ccm_attribute9 = hr_api.g_varchar2) then
792     p_rec.ccm_attribute9 :=
793     ben_ccm_shd.g_old_rec.ccm_attribute9;
794   End If;
795   If (p_rec.ccm_attribute10 = hr_api.g_varchar2) then
796     p_rec.ccm_attribute10 :=
797     ben_ccm_shd.g_old_rec.ccm_attribute10;
798   End If;
799   If (p_rec.ccm_attribute11 = hr_api.g_varchar2) then
800     p_rec.ccm_attribute11 :=
801     ben_ccm_shd.g_old_rec.ccm_attribute11;
802   End If;
803   If (p_rec.ccm_attribute12 = hr_api.g_varchar2) then
804     p_rec.ccm_attribute12 :=
805     ben_ccm_shd.g_old_rec.ccm_attribute12;
806   End If;
807   If (p_rec.ccm_attribute13 = hr_api.g_varchar2) then
808     p_rec.ccm_attribute13 :=
809     ben_ccm_shd.g_old_rec.ccm_attribute13;
810   End If;
811   If (p_rec.ccm_attribute14 = hr_api.g_varchar2) then
812     p_rec.ccm_attribute14 :=
813     ben_ccm_shd.g_old_rec.ccm_attribute14;
814   End If;
815   If (p_rec.ccm_attribute15 = hr_api.g_varchar2) then
816     p_rec.ccm_attribute15 :=
817     ben_ccm_shd.g_old_rec.ccm_attribute15;
818   End If;
819   If (p_rec.ccm_attribute16 = hr_api.g_varchar2) then
820     p_rec.ccm_attribute16 :=
821     ben_ccm_shd.g_old_rec.ccm_attribute16;
822   End If;
823   If (p_rec.ccm_attribute17 = hr_api.g_varchar2) then
824     p_rec.ccm_attribute17 :=
825     ben_ccm_shd.g_old_rec.ccm_attribute17;
826   End If;
827   If (p_rec.ccm_attribute18 = hr_api.g_varchar2) then
828     p_rec.ccm_attribute18 :=
829     ben_ccm_shd.g_old_rec.ccm_attribute18;
830   End If;
831   If (p_rec.ccm_attribute19 = hr_api.g_varchar2) then
832     p_rec.ccm_attribute19 :=
833     ben_ccm_shd.g_old_rec.ccm_attribute19;
834   End If;
835   If (p_rec.ccm_attribute20 = hr_api.g_varchar2) then
836     p_rec.ccm_attribute20 :=
837     ben_ccm_shd.g_old_rec.ccm_attribute20;
838   End If;
839   If (p_rec.ccm_attribute21 = hr_api.g_varchar2) then
840     p_rec.ccm_attribute21 :=
841     ben_ccm_shd.g_old_rec.ccm_attribute21;
842   End If;
843   If (p_rec.ccm_attribute22 = hr_api.g_varchar2) then
844     p_rec.ccm_attribute22 :=
845     ben_ccm_shd.g_old_rec.ccm_attribute22;
846   End If;
847   If (p_rec.ccm_attribute23 = hr_api.g_varchar2) then
848     p_rec.ccm_attribute23 :=
849     ben_ccm_shd.g_old_rec.ccm_attribute23;
850   End If;
851   If (p_rec.ccm_attribute24 = hr_api.g_varchar2) then
852     p_rec.ccm_attribute24 :=
853     ben_ccm_shd.g_old_rec.ccm_attribute24;
854   End If;
855   If (p_rec.ccm_attribute25 = hr_api.g_varchar2) then
856     p_rec.ccm_attribute25 :=
857     ben_ccm_shd.g_old_rec.ccm_attribute25;
858   End If;
859   If (p_rec.ccm_attribute26 = hr_api.g_varchar2) then
860     p_rec.ccm_attribute26 :=
861     ben_ccm_shd.g_old_rec.ccm_attribute26;
862   End If;
863   If (p_rec.ccm_attribute27 = hr_api.g_varchar2) then
864     p_rec.ccm_attribute27 :=
865     ben_ccm_shd.g_old_rec.ccm_attribute27;
866   End If;
867   If (p_rec.ccm_attribute28 = hr_api.g_varchar2) then
868     p_rec.ccm_attribute28 :=
869     ben_ccm_shd.g_old_rec.ccm_attribute28;
870   End If;
871   If (p_rec.ccm_attribute29 = hr_api.g_varchar2) then
872     p_rec.ccm_attribute29 :=
873     ben_ccm_shd.g_old_rec.ccm_attribute29;
874   End If;
875   If (p_rec.ccm_attribute30 = hr_api.g_varchar2) then
876     p_rec.ccm_attribute30 :=
877     ben_ccm_shd.g_old_rec.ccm_attribute30;
878   End If;
879 
880   --
881   hr_utility.set_location(' Leaving:'||l_proc, 10);
882 --
883 End convert_defs;
884 --
885 -- ----------------------------------------------------------------------------
886 -- |---------------------------------< upd >----------------------------------|
887 -- ----------------------------------------------------------------------------
888 Procedure upd
889   (
890   p_rec			in out nocopy 	ben_ccm_shd.g_rec_type,
891   p_effective_date	in 	date,
892   p_datetrack_mode	in 	varchar2
893   ) is
894 --
895   l_proc			varchar2(72) := g_package||'upd';
896   l_validation_start_date	date;
897   l_validation_end_date		date;
898 --
899 Begin
900   hr_utility.set_location('Entering:'||l_proc, 5);
901   --
902   -- Ensure that the DateTrack update mode is valid
903   --
904   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
905   --
906   -- We must lock the row which we need to update.
907   --
908   ben_ccm_shd.lck
909 	(p_effective_date	 => p_effective_date,
910       	 p_datetrack_mode	 => p_datetrack_mode,
911       	 p_cvg_amt_calc_mthd_id	 => p_rec.cvg_amt_calc_mthd_id,
912       	 p_object_version_number => p_rec.object_version_number,
913       	 p_validation_start_date => l_validation_start_date,
914       	 p_validation_end_date	 => l_validation_end_date);
915   --
916   -- 1. During an update system defaults are used to determine if
917   --    arguments have been defaulted or not. We must therefore
918   --    derive the full record structure values to be updated.
919   --
920   -- 2. Call the supporting update validate operations.
921   --
922   convert_defs(p_rec);
923   ben_ccm_bus.update_validate
924 	(p_rec			 => p_rec,
925 	 p_effective_date	 => p_effective_date,
926 	 p_datetrack_mode  	 => p_datetrack_mode,
927 	 p_validation_start_date => l_validation_start_date,
928 	 p_validation_end_date	 => l_validation_end_date);
929   --
930   -- Call the supporting pre-update operation
931   --
932   pre_update
933 	(p_rec			 => p_rec,
934 	 p_effective_date	 => p_effective_date,
935 	 p_datetrack_mode	 => p_datetrack_mode,
936 	 p_validation_start_date => l_validation_start_date,
937 	 p_validation_end_date	 => l_validation_end_date);
938   --
939   -- Update the row.
940   --
941   update_dml
942 	(p_rec			 => p_rec,
943 	 p_effective_date	 => p_effective_date,
944 	 p_datetrack_mode	 => p_datetrack_mode,
945 	 p_validation_start_date => l_validation_start_date,
946 	 p_validation_end_date	 => l_validation_end_date);
947   --
948   -- Call the supporting post-update operation
949   --
950   post_update
951 	(p_rec			 => p_rec,
952 	 p_effective_date	 => p_effective_date,
953 	 p_datetrack_mode	 => p_datetrack_mode,
954 	 p_validation_start_date => l_validation_start_date,
955 	 p_validation_end_date	 => l_validation_end_date);
956 End upd;
957 --
958 -- ----------------------------------------------------------------------------
959 -- |---------------------------------< upd >----------------------------------|
960 -- ----------------------------------------------------------------------------
961 Procedure upd
962   (
963   p_cvg_amt_calc_mthd_id         in number,
964   p_effective_start_date         out nocopy date,
965   p_effective_end_date           out nocopy date,
966   p_name                         in varchar2         default hr_api.g_varchar2,
967   p_incrmt_val                   in number           default hr_api.g_number,
968   p_mx_val                       in number           default hr_api.g_number,
969   p_mn_val                       in number           default hr_api.g_number,
970   p_no_mx_val_dfnd_flag          in varchar2         default hr_api.g_varchar2,
971   p_no_mn_val_dfnd_flag          in varchar2         default hr_api.g_varchar2,
972   p_rndg_cd                      in varchar2         default hr_api.g_varchar2,
973   p_rndg_rl                      in number           default hr_api.g_number,
974   p_lwr_lmt_val                  in number           default hr_api.g_number,
975   p_lwr_lmt_calc_rl              in number           default hr_api.g_number,
976   p_upr_lmt_val                  in number           default hr_api.g_number,
977   p_upr_lmt_calc_rl              in number           default hr_api.g_number,
978   p_val                          in number           default hr_api.g_number,
979   p_val_ovrid_alwd_flag          in varchar2         default hr_api.g_varchar2,
980   p_val_calc_rl                  in number           default hr_api.g_number,
981   p_uom                          in varchar2         default hr_api.g_varchar2,
982   p_nnmntry_uom                  in varchar2         default hr_api.g_varchar2,
983   p_bndry_perd_cd                in varchar2         default hr_api.g_varchar2,
984   p_bnft_typ_cd                  in varchar2         default hr_api.g_varchar2,
985   p_cvg_mlt_cd                   in varchar2         default hr_api.g_varchar2,
986   p_rt_typ_cd                    in varchar2         default hr_api.g_varchar2,
987   p_dflt_val                     in number           default hr_api.g_number,
988   p_entr_val_at_enrt_flag        in varchar2         default hr_api.g_varchar2,
989   p_dflt_flag                    in varchar2         default hr_api.g_varchar2,
990   p_comp_lvl_fctr_id             in number           default hr_api.g_number,
991   p_oipl_id                      in number           default hr_api.g_number,
992   p_pl_id                        in number           default hr_api.g_number,
993   p_plip_id                      in number           default hr_api.g_number,
994   p_business_group_id            in number           default hr_api.g_number,
995   p_ccm_attribute_category       in varchar2         default hr_api.g_varchar2,
996   p_ccm_attribute1               in varchar2         default hr_api.g_varchar2,
997   p_ccm_attribute2               in varchar2         default hr_api.g_varchar2,
998   p_ccm_attribute3               in varchar2         default hr_api.g_varchar2,
999   p_ccm_attribute4               in varchar2         default hr_api.g_varchar2,
1000   p_ccm_attribute5               in varchar2         default hr_api.g_varchar2,
1001   p_ccm_attribute6               in varchar2         default hr_api.g_varchar2,
1002   p_ccm_attribute7               in varchar2         default hr_api.g_varchar2,
1003   p_ccm_attribute8               in varchar2         default hr_api.g_varchar2,
1004   p_ccm_attribute9               in varchar2         default hr_api.g_varchar2,
1005   p_ccm_attribute10              in varchar2         default hr_api.g_varchar2,
1006   p_ccm_attribute11              in varchar2         default hr_api.g_varchar2,
1007   p_ccm_attribute12              in varchar2         default hr_api.g_varchar2,
1008   p_ccm_attribute13              in varchar2         default hr_api.g_varchar2,
1009   p_ccm_attribute14              in varchar2         default hr_api.g_varchar2,
1010   p_ccm_attribute15              in varchar2         default hr_api.g_varchar2,
1011   p_ccm_attribute16              in varchar2         default hr_api.g_varchar2,
1012   p_ccm_attribute17              in varchar2         default hr_api.g_varchar2,
1013   p_ccm_attribute18              in varchar2         default hr_api.g_varchar2,
1014   p_ccm_attribute19              in varchar2         default hr_api.g_varchar2,
1015   p_ccm_attribute20              in varchar2         default hr_api.g_varchar2,
1016   p_ccm_attribute21              in varchar2         default hr_api.g_varchar2,
1017   p_ccm_attribute22              in varchar2         default hr_api.g_varchar2,
1018   p_ccm_attribute23              in varchar2         default hr_api.g_varchar2,
1019   p_ccm_attribute24              in varchar2         default hr_api.g_varchar2,
1020   p_ccm_attribute25              in varchar2         default hr_api.g_varchar2,
1021   p_ccm_attribute26              in varchar2         default hr_api.g_varchar2,
1022   p_ccm_attribute27              in varchar2         default hr_api.g_varchar2,
1023   p_ccm_attribute28              in varchar2         default hr_api.g_varchar2,
1024   p_ccm_attribute29              in varchar2         default hr_api.g_varchar2,
1025   p_ccm_attribute30              in varchar2         default hr_api.g_varchar2,
1026   p_object_version_number        in out nocopy number,
1027   p_effective_date		 in date,
1028   p_datetrack_mode		 in varchar2
1029   ) is
1030 --
1031   l_rec		ben_ccm_shd.g_rec_type;
1032   l_proc	varchar2(72) := g_package||'upd';
1033 --
1034 Begin
1035   hr_utility.set_location('Entering:'||l_proc, 5);
1036   --
1037   -- Call conversion function to turn arguments into the
1038   -- l_rec structure.
1039   --
1040   l_rec :=
1041   ben_ccm_shd.convert_args
1042   (
1043   p_cvg_amt_calc_mthd_id,
1044   null,
1045   null,
1046   p_name,
1047   p_incrmt_val,
1048   p_mx_val,
1049   p_mn_val,
1050   p_no_mx_val_dfnd_flag,
1051   p_no_mn_val_dfnd_flag,
1052   p_rndg_cd,
1053   p_rndg_rl,
1054   p_lwr_lmt_val,
1055   p_lwr_lmt_calc_rl,
1056   p_upr_lmt_val,
1057   p_upr_lmt_calc_rl,
1058   p_val,
1059   p_val_ovrid_alwd_flag,
1060   p_val_calc_rl,
1061   p_uom,
1062   p_nnmntry_uom,
1063   p_bndry_perd_cd,
1064   p_bnft_typ_cd,
1065   p_cvg_mlt_cd,
1066   p_rt_typ_cd,
1067   p_dflt_val,
1068   p_entr_val_at_enrt_flag,
1069   p_dflt_flag,
1070   p_comp_lvl_fctr_id,
1071   p_oipl_id,
1072   p_pl_id,
1073   p_plip_id,
1074   p_business_group_id,
1075   p_ccm_attribute_category,
1076   p_ccm_attribute1,
1077   p_ccm_attribute2,
1078   p_ccm_attribute3,
1079   p_ccm_attribute4,
1080   p_ccm_attribute5,
1081   p_ccm_attribute6,
1082   p_ccm_attribute7,
1083   p_ccm_attribute8,
1084   p_ccm_attribute9,
1085   p_ccm_attribute10,
1086   p_ccm_attribute11,
1087   p_ccm_attribute12,
1088   p_ccm_attribute13,
1089   p_ccm_attribute14,
1090   p_ccm_attribute15,
1091   p_ccm_attribute16,
1092   p_ccm_attribute17,
1093   p_ccm_attribute18,
1094   p_ccm_attribute19,
1095   p_ccm_attribute20,
1096   p_ccm_attribute21,
1097   p_ccm_attribute22,
1098   p_ccm_attribute23,
1099   p_ccm_attribute24,
1100   p_ccm_attribute25,
1101   p_ccm_attribute26,
1102   p_ccm_attribute27,
1103   p_ccm_attribute28,
1104   p_ccm_attribute29,
1105   p_ccm_attribute30,
1106   p_object_version_number
1107   );
1108   --
1109   -- Having converted the arguments into the
1110   -- plsql record structure we call the corresponding record
1111   -- business process.
1112   --
1113   upd(l_rec, p_effective_date, p_datetrack_mode);
1114   p_object_version_number       := l_rec.object_version_number;
1115   p_effective_start_date        := l_rec.effective_start_date;
1116   p_effective_end_date          := l_rec.effective_end_date;
1117   --
1118   --
1119   hr_utility.set_location(' Leaving:'||l_proc, 10);
1120 End upd;
1121 --
1122 end ben_ccm_upd;