DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_BFT_UPD

Source


1 Package Body ben_bft_upd as
2 /* $Header: bebftrhi.pkb 115.23 2003/08/18 05:05:29 rpgupta ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_bft_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml update logic. The processing of
17 --   this procedure is:
18 --   1) Increment the object_version_number by 1 if the object_version_number
19 --      is defined as an attribute for this entity.
20 --   2) To set and unset the g_api_dml status as required (as we are about to
21 --      perform dml).
22 --   3) To update the specified row in the schema using the primary key in
23 --      the predicates.
24 --   4) To trap any constraint violations that may have occurred.
25 --   5) To raise any other errors.
26 --
27 -- Prerequisites:
28 --   This is an internal private procedure which must be called from the upd
29 --   procedure.
30 --
31 -- In Parameters:
32 --   A Pl/Sql record structre.
33 --
34 -- Post Success:
35 --   The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 --   On the update dml failure it is important to note that we always reset the
39 --   g_api_dml status to false.
40 --   If a check, unique or parent integrity constraint violation is raised the
41 --   constraint_error procedure will be called.
42 --   If any other error is reported, the error will be raised after the
43 --   g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 --   The update 'set' attribute list should be modified if any of your
47 --   attributes are not updateable.
48 --
49 -- Access Status:
50 --   Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy ben_bft_shd.g_rec_type) is
55 --
56   l_proc  varchar2(72) := g_package||'update_dml';
57 --
58 Begin
59   hr_utility.set_location('Entering:'||l_proc, 5);
60   --
61   -- Increment the object version
62   --
63   p_rec.object_version_number := p_rec.object_version_number + 1;
64   --
65   ben_bft_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_benefit_actions Row
68   --
69   update ben_benefit_actions
70   set
71   benefit_action_id                 = p_rec.benefit_action_id,
72   process_date                      = p_rec.process_date,
73   uneai_effective_date              = p_rec.uneai_effective_date,
74   mode_cd                           = p_rec.mode_cd,
75   derivable_factors_flag            = p_rec.derivable_factors_flag,
76   close_uneai_flag                  = p_rec.close_uneai_flag      ,
77   validate_flag                     = p_rec.validate_flag,
78   person_id                         = p_rec.person_id,
79   person_type_id                    = p_rec.person_type_id,
80   pgm_id                            = p_rec.pgm_id,
81   business_group_id                 = p_rec.business_group_id,
82   pl_id                             = p_rec.pl_id,
83   popl_enrt_typ_cycl_id             = p_rec.popl_enrt_typ_cycl_id,
84   no_programs_flag                  = p_rec.no_programs_flag,
85   no_plans_flag                     = p_rec.no_plans_flag,
86   comp_selection_rl                 = p_rec.comp_selection_rl,
87   person_selection_rl               = p_rec.person_selection_rl,
88   ler_id                            = p_rec.ler_id,
89   organization_id                   = p_rec.organization_id,
90   benfts_grp_id                     = p_rec.benfts_grp_id,
91   location_id                       = p_rec.location_id,
92   pstl_zip_rng_id                   = p_rec.pstl_zip_rng_id,
93   rptg_grp_id                       = p_rec.rptg_grp_id,
94   pl_typ_id                         = p_rec.pl_typ_id,
95   opt_id                            = p_rec.opt_id,
96   eligy_prfl_id                     = p_rec.eligy_prfl_id,
97   vrbl_rt_prfl_id                   = p_rec.vrbl_rt_prfl_id,
98   legal_entity_id                   = p_rec.legal_entity_id,
99   payroll_id                        = p_rec.payroll_id,
100   debug_messages_flag               = p_rec.debug_messages_flag,
101   cm_trgr_typ_cd                    = p_rec.cm_trgr_typ_cd,
102   cm_typ_id                         = p_rec.cm_typ_id,
103   age_fctr_id                       = p_rec.age_fctr_id,
104   min_age                           = p_rec.min_age,
105   max_age                           = p_rec.max_age,
106   los_fctr_id                       = p_rec.los_fctr_id,
107   min_los                           = p_rec.min_los,
108   max_los                           = p_rec.max_los,
109   cmbn_age_los_fctr_id              = p_rec.cmbn_age_los_fctr_id,
110   min_cmbn                          = p_rec.min_cmbn,
111   max_cmbn                          = p_rec.max_cmbn,
112   date_from                         = p_rec.date_from,
113   elig_enrol_cd                     = p_rec.elig_enrol_cd,
114   actn_typ_id                       = p_rec.actn_typ_id,
115   use_fctr_to_sel_flag              = p_rec.use_fctr_to_sel_flag,
116   los_det_to_use_cd                 = p_rec.los_det_to_use_cd,
117   audit_log_flag                    = p_rec.audit_log_flag,
118   lmt_prpnip_by_org_flag            = p_rec.lmt_prpnip_by_org_flag,
119   lf_evt_ocrd_dt                    = p_rec.lf_evt_ocrd_dt,
120   ptnl_ler_for_per_stat_cd          = p_rec.ptnl_ler_for_per_stat_cd,
121   bft_attribute_category            = p_rec.bft_attribute_category,
122   bft_attribute1                    = p_rec.bft_attribute1,
123   bft_attribute3                    = p_rec.bft_attribute3,
124   bft_attribute4                    = p_rec.bft_attribute4,
125   bft_attribute5                    = p_rec.bft_attribute5,
126   bft_attribute6                    = p_rec.bft_attribute6,
127   bft_attribute7                    = p_rec.bft_attribute7,
128   bft_attribute8                    = p_rec.bft_attribute8,
129   bft_attribute9                    = p_rec.bft_attribute9,
130   bft_attribute10                   = p_rec.bft_attribute10,
131   bft_attribute11                   = p_rec.bft_attribute11,
132   bft_attribute12                   = p_rec.bft_attribute12,
133   bft_attribute13                   = p_rec.bft_attribute13,
134   bft_attribute14                   = p_rec.bft_attribute14,
135   bft_attribute15                   = p_rec.bft_attribute15,
136   bft_attribute16                   = p_rec.bft_attribute16,
137   bft_attribute17                   = p_rec.bft_attribute17,
138   bft_attribute18                   = p_rec.bft_attribute18,
139   bft_attribute19                   = p_rec.bft_attribute19,
140   bft_attribute20                   = p_rec.bft_attribute20,
141   bft_attribute21                   = p_rec.bft_attribute21,
142   bft_attribute22                   = p_rec.bft_attribute22,
143   bft_attribute23                   = p_rec.bft_attribute23,
144   bft_attribute24                   = p_rec.bft_attribute24,
145   bft_attribute25                   = p_rec.bft_attribute25,
146   bft_attribute26                   = p_rec.bft_attribute26,
147   bft_attribute27                   = p_rec.bft_attribute27,
148   bft_attribute28                   = p_rec.bft_attribute28,
149   bft_attribute29                   = p_rec.bft_attribute29,
150   bft_attribute30                   = p_rec.bft_attribute30,
151   request_id                        = p_rec.request_id,
152   program_application_id            = p_rec.program_application_id,
153   program_id                        = p_rec.program_id,
154   program_update_date               = p_rec.program_update_date,
155   object_version_number             = p_rec.object_version_number,
156   enrt_perd_id                      = p_rec.enrt_perd_id,
157   inelg_action_cd                   = p_rec.inelg_action_cd,
158   org_hierarchy_id                   = p_rec.org_hierarchy_id,
159   org_starting_node_id                   = p_rec.org_starting_node_id,
160   grade_ladder_id                   = p_rec.grade_ladder_id,
161   asg_events_to_all_sel_dt                   = p_rec.asg_events_to_all_sel_dt,
162   rate_id                   = p_rec.rate_id,
163   per_sel_dt_cd                   = p_rec.per_sel_dt_cd,
164   per_sel_freq_cd                   = p_rec.per_sel_freq_cd,
165   per_sel_dt_from                   = p_rec.per_sel_dt_from,
166   per_sel_dt_to                   = p_rec.per_sel_dt_to,
167   year_from                   = p_rec.year_from,
168   year_to                   = p_rec.year_to,
169   cagr_id                   = p_rec.cagr_id,
170   qual_type                   = p_rec.qual_type,
171   qual_status                   = p_rec.qual_status,
172   concat_segs                   = p_rec.concat_segs,
173   grant_price_val                   = p_rec.grant_price_val
174   where benefit_action_id = p_rec.benefit_action_id;
175   --
176   ben_bft_shd.g_api_dml := false;   -- Unset the api dml status
177   --
178   hr_utility.set_location(' Leaving:'||l_proc, 10);
179 --
180 Exception
181   When hr_api.check_integrity_violated Then
182     -- A check constraint has been violated
183     ben_bft_shd.g_api_dml := false;   -- Unset the api dml status
184     ben_bft_shd.constraint_error
185       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
186   When hr_api.parent_integrity_violated Then
187     -- Parent integrity has been violated
188     ben_bft_shd.g_api_dml := false;   -- Unset the api dml status
189     ben_bft_shd.constraint_error
190       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
191   When hr_api.unique_integrity_violated Then
192     -- Unique integrity has been violated
193     ben_bft_shd.g_api_dml := false;   -- Unset the api dml status
194     ben_bft_shd.constraint_error
195       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
196   When Others Then
197     ben_bft_shd.g_api_dml := false;   -- Unset the api dml status
198     Raise;
199 End update_dml;
200 --
201 -- ----------------------------------------------------------------------------
202 -- |------------------------------< pre_update >------------------------------|
203 -- ----------------------------------------------------------------------------
204 -- {Start Of Comments}
205 --
206 -- Description:
207 --   This private procedure contains any processing which is required before
208 --   the update dml.
209 --
210 -- Prerequisites:
211 --   This is an internal procedure which is called from the upd procedure.
212 --
213 -- In Parameters:
214 --   A Pl/Sql record structre.
215 --
216 -- Post Success:
217 --   Processing continues.
218 --
219 -- Post Failure:
220 --   If an error has occurred, an error message and exception will be raised
221 --   but not handled.
222 --
223 -- Developer Implementation Notes:
224 --   Any pre-processing required before the update dml is issued should be
225 --   coded within this procedure. It is important to note that any 3rd party
226 --   maintenance should be reviewed before placing in this procedure.
227 --
228 -- Access Status:
229 --   Internal Row Handler Use Only.
230 --
231 -- {End Of Comments}
232 -- ----------------------------------------------------------------------------
233 Procedure pre_update(p_rec in ben_bft_shd.g_rec_type) is
234 --
235   l_proc  varchar2(72) := g_package||'pre_update';
236 --
237 Begin
238   hr_utility.set_location('Entering:'||l_proc, 5);
239   --
240   hr_utility.set_location(' Leaving:'||l_proc, 10);
241 End pre_update;
242 --
243 -- ----------------------------------------------------------------------------
244 -- |-----------------------------< post_update >------------------------------|
245 -- ----------------------------------------------------------------------------
246 -- {Start Of Comments}
247 --
248 -- Description:
249 --   This private procedure contains any processing which is required after the
250 --   update dml.
251 --
252 -- Prerequisites:
253 --   This is an internal procedure which is called from the upd procedure.
254 --
255 -- In Parameters:
256 --   A Pl/Sql record structre.
257 --
258 -- Post Success:
259 --   Processing continues.
260 --
261 -- Post Failure:
262 --   If an error has occurred, an error message and exception will be raised
263 --   but not handled.
264 --
265 -- Developer Implementation Notes:
266 --   Any post-processing required after the update dml is issued should be
267 --   coded within this procedure. It is important to note that any 3rd party
268 --   maintenance should be reviewed before placing in this procedure.
269 --
270 -- Access Status:
271 --   Internal Row Handler Use Only.
272 --
273 -- {End Of Comments}
274 -- ----------------------------------------------------------------------------
275 Procedure post_update(
276 p_effective_date in date,p_rec in ben_bft_shd.g_rec_type) is
277 --
278   l_proc  varchar2(72) := g_package||'post_update';
279 --
280 Begin
281   hr_utility.set_location('Entering:'||l_proc, 5);
282 --
283   --
284   -- Start of API User Hook for post_update.
285   --
286   begin
287     --
288     ben_bft_rku.after_update
289       (
290   p_benefit_action_id             =>p_rec.benefit_action_id
291  ,p_process_date                  =>p_rec.process_date
292  ,p_uneai_effective_date          =>p_rec.uneai_effective_date
293  ,p_mode_cd                       =>p_rec.mode_cd
294  ,p_derivable_factors_flag        =>p_rec.derivable_factors_flag
295  ,p_close_uneai_flag              =>p_rec.close_uneai_flag
296  ,p_validate_flag                 =>p_rec.validate_flag
297  ,p_person_id                     =>p_rec.person_id
298  ,p_person_type_id                =>p_rec.person_type_id
299  ,p_pgm_id                        =>p_rec.pgm_id
300  ,p_business_group_id             =>p_rec.business_group_id
301  ,p_pl_id                         =>p_rec.pl_id
302  ,p_popl_enrt_typ_cycl_id         =>p_rec.popl_enrt_typ_cycl_id
303  ,p_no_programs_flag              =>p_rec.no_programs_flag
304  ,p_no_plans_flag                 =>p_rec.no_plans_flag
305  ,p_comp_selection_rl             =>p_rec.comp_selection_rl
306  ,p_person_selection_rl           =>p_rec.person_selection_rl
307  ,p_ler_id                        =>p_rec.ler_id
308  ,p_organization_id               =>p_rec.organization_id
309  ,p_benfts_grp_id                 =>p_rec.benfts_grp_id
310  ,p_location_id                   =>p_rec.location_id
311  ,p_pstl_zip_rng_id               =>p_rec.pstl_zip_rng_id
312  ,p_rptg_grp_id                   =>p_rec.rptg_grp_id
313  ,p_pl_typ_id                     =>p_rec.pl_typ_id
314  ,p_opt_id                        =>p_rec.opt_id
315  ,p_eligy_prfl_id                 =>p_rec.eligy_prfl_id
316  ,p_vrbl_rt_prfl_id               =>p_rec.vrbl_rt_prfl_id
317  ,p_legal_entity_id               =>p_rec.legal_entity_id
318  ,p_payroll_id                    =>p_rec.payroll_id
319  ,p_debug_messages_flag           =>p_rec.debug_messages_flag
320  ,p_cm_trgr_typ_cd                =>p_rec.cm_trgr_typ_cd
321  ,p_cm_typ_id                     =>p_rec.cm_typ_id
322  ,p_age_fctr_id                   =>p_rec.age_fctr_id
323  ,p_min_age                       =>p_rec.min_age
324  ,p_max_age                       =>p_rec.max_age
325  ,p_los_fctr_id                   =>p_rec.los_fctr_id
326  ,p_min_los                       =>p_rec.min_los
327  ,p_max_los                       =>p_rec.max_los
328  ,p_cmbn_age_los_fctr_id          =>p_rec.cmbn_age_los_fctr_id
329  ,p_min_cmbn                      =>p_rec.min_cmbn
330  ,p_max_cmbn                      =>p_rec.max_cmbn
331  ,p_date_from                     =>p_rec.date_from
332  ,p_elig_enrol_cd                 =>p_rec.elig_enrol_cd
333  ,p_actn_typ_id                   =>p_rec.actn_typ_id
334  ,p_use_fctr_to_sel_flag          =>p_rec.use_fctr_to_sel_flag
335  ,p_los_det_to_use_cd             =>p_rec.los_det_to_use_cd
336  ,p_audit_log_flag                =>p_rec.audit_log_flag
337  ,p_lmt_prpnip_by_org_flag        =>p_rec.lmt_prpnip_by_org_flag
341  ,p_bft_attribute1                =>p_rec.bft_attribute1
338  ,p_lf_evt_ocrd_dt                =>p_rec.lf_evt_ocrd_dt
339  ,p_ptnl_ler_for_per_stat_cd      =>p_rec.ptnl_ler_for_per_stat_cd
340  ,p_bft_attribute_category        =>p_rec.bft_attribute_category
342  ,p_bft_attribute3                =>p_rec.bft_attribute3
343  ,p_bft_attribute4                =>p_rec.bft_attribute4
344  ,p_bft_attribute5                =>p_rec.bft_attribute5
345  ,p_bft_attribute6                =>p_rec.bft_attribute6
346  ,p_bft_attribute7                =>p_rec.bft_attribute7
347  ,p_bft_attribute8                =>p_rec.bft_attribute8
348  ,p_bft_attribute9                =>p_rec.bft_attribute9
349  ,p_bft_attribute10               =>p_rec.bft_attribute10
350  ,p_bft_attribute11               =>p_rec.bft_attribute11
351  ,p_bft_attribute12               =>p_rec.bft_attribute12
352  ,p_bft_attribute13               =>p_rec.bft_attribute13
353  ,p_bft_attribute14               =>p_rec.bft_attribute14
354  ,p_bft_attribute15               =>p_rec.bft_attribute15
355  ,p_bft_attribute16               =>p_rec.bft_attribute16
356  ,p_bft_attribute17               =>p_rec.bft_attribute17
357  ,p_bft_attribute18               =>p_rec.bft_attribute18
358  ,p_bft_attribute19               =>p_rec.bft_attribute19
359  ,p_bft_attribute20               =>p_rec.bft_attribute20
360  ,p_bft_attribute21               =>p_rec.bft_attribute21
361  ,p_bft_attribute22               =>p_rec.bft_attribute22
362  ,p_bft_attribute23               =>p_rec.bft_attribute23
363  ,p_bft_attribute24               =>p_rec.bft_attribute24
364  ,p_bft_attribute25               =>p_rec.bft_attribute25
365  ,p_bft_attribute26               =>p_rec.bft_attribute26
366  ,p_bft_attribute27               =>p_rec.bft_attribute27
367  ,p_bft_attribute28               =>p_rec.bft_attribute28
368  ,p_bft_attribute29               =>p_rec.bft_attribute29
369  ,p_bft_attribute30               =>p_rec.bft_attribute30
370  ,p_object_version_number         =>p_rec.object_version_number
371  ,p_effective_date                =>p_effective_date
372  ,p_enrt_perd_id                  =>p_rec.enrt_perd_id
373  ,p_inelg_action_cd               =>p_rec.inelg_action_cd
374  ,p_org_hierarchy_id               =>p_rec.org_hierarchy_id
375  ,p_org_starting_node_id               =>p_rec.org_starting_node_id
376  ,p_grade_ladder_id               =>p_rec.grade_ladder_id
377  ,p_asg_events_to_all_sel_dt               =>p_rec.asg_events_to_all_sel_dt
378  ,p_rate_id               =>p_rec.rate_id
379  ,p_per_sel_dt_cd               =>p_rec.per_sel_dt_cd
380  ,p_per_sel_freq_cd               =>p_rec.per_sel_freq_cd
381  ,p_per_sel_dt_from               =>p_rec.per_sel_dt_from
382  ,p_per_sel_dt_to               =>p_rec.per_sel_dt_to
383  ,p_year_from               =>p_rec.year_from
384  ,p_year_to               =>p_rec.year_to
385  ,p_cagr_id               =>p_rec.cagr_id
386  ,p_qual_type               =>p_rec.qual_type
387  ,p_qual_status               =>p_rec.qual_status
388  ,p_concat_segs               =>p_rec.concat_segs
389  ,p_grant_price_val               =>p_rec.grant_price_val
390  ,p_process_date_o                =>ben_bft_shd.g_old_rec.process_date
391  ,p_uneai_effective_date_o        =>ben_bft_shd.g_old_rec.uneai_effective_date
392  ,p_mode_cd_o                     =>ben_bft_shd.g_old_rec.mode_cd
393  ,p_derivable_factors_flag_o      =>ben_bft_shd.g_old_rec.derivable_factors_flag
394  ,p_close_uneai_flag_o            =>ben_bft_shd.g_old_rec.close_uneai_flag
395  ,p_validate_flag_o               =>ben_bft_shd.g_old_rec.validate_flag
396  ,p_person_id_o                   =>ben_bft_shd.g_old_rec.person_id
397  ,p_person_type_id_o              =>ben_bft_shd.g_old_rec.person_type_id
398  ,p_pgm_id_o                      =>ben_bft_shd.g_old_rec.pgm_id
399  ,p_business_group_id_o           =>ben_bft_shd.g_old_rec.business_group_id
400  ,p_pl_id_o                       =>ben_bft_shd.g_old_rec.pl_id
401  ,p_popl_enrt_typ_cycl_id_o       =>ben_bft_shd.g_old_rec.popl_enrt_typ_cycl_id
402  ,p_no_programs_flag_o            =>ben_bft_shd.g_old_rec.no_programs_flag
403  ,p_no_plans_flag_o               =>ben_bft_shd.g_old_rec.no_plans_flag
404  ,p_comp_selection_rl_o           =>ben_bft_shd.g_old_rec.comp_selection_rl
405  ,p_person_selection_rl_o         =>ben_bft_shd.g_old_rec.person_selection_rl
406  ,p_ler_id_o                      =>ben_bft_shd.g_old_rec.ler_id
407  ,p_organization_id_o             =>ben_bft_shd.g_old_rec.organization_id
408  ,p_benfts_grp_id_o               =>ben_bft_shd.g_old_rec.benfts_grp_id
409  ,p_location_id_o                 =>ben_bft_shd.g_old_rec.location_id
410  ,p_pstl_zip_rng_id_o             =>ben_bft_shd.g_old_rec.pstl_zip_rng_id
411  ,p_rptg_grp_id_o                 =>ben_bft_shd.g_old_rec.rptg_grp_id
412  ,p_pl_typ_id_o                   =>ben_bft_shd.g_old_rec.pl_typ_id
413  ,p_opt_id_o                      =>ben_bft_shd.g_old_rec.opt_id
414  ,p_eligy_prfl_id_o               =>ben_bft_shd.g_old_rec.eligy_prfl_id
415  ,p_vrbl_rt_prfl_id_o             =>ben_bft_shd.g_old_rec.vrbl_rt_prfl_id
416  ,p_legal_entity_id_o             =>ben_bft_shd.g_old_rec.legal_entity_id
417  ,p_payroll_id_o                  =>ben_bft_shd.g_old_rec.payroll_id
418  ,p_debug_messages_flag_o         =>ben_bft_shd.g_old_rec.debug_messages_flag
419  ,p_cm_trgr_typ_cd_o              =>ben_bft_shd.g_old_rec.cm_trgr_typ_cd
420  ,p_cm_typ_id_o                   =>ben_bft_shd.g_old_rec.cm_typ_id
421  ,p_age_fctr_id_o                 =>ben_bft_shd.g_old_rec.age_fctr_id
422  ,p_min_age_o                     =>ben_bft_shd.g_old_rec.min_age
426  ,p_max_los_o                     =>ben_bft_shd.g_old_rec.max_los
423  ,p_max_age_o                     =>ben_bft_shd.g_old_rec.max_age
424  ,p_los_fctr_id_o                 =>ben_bft_shd.g_old_rec.los_fctr_id
425  ,p_min_los_o                     =>ben_bft_shd.g_old_rec.min_los
427  ,p_cmbn_age_los_fctr_id_o        =>ben_bft_shd.g_old_rec.cmbn_age_los_fctr_id
428  ,p_min_cmbn_o                    =>ben_bft_shd.g_old_rec.min_cmbn
429  ,p_max_cmbn_o                    =>ben_bft_shd.g_old_rec.max_cmbn
430  ,p_date_from_o                   =>ben_bft_shd.g_old_rec.date_from
431  ,p_elig_enrol_cd_o               =>ben_bft_shd.g_old_rec.elig_enrol_cd
432  ,p_actn_typ_id_o                 =>ben_bft_shd.g_old_rec.actn_typ_id
433  ,p_use_fctr_to_sel_flag_o        =>ben_bft_shd.g_old_rec.use_fctr_to_sel_flag
434  ,p_los_det_to_use_cd_o           =>ben_bft_shd.g_old_rec.los_det_to_use_cd
435  ,p_audit_log_flag_o              =>ben_bft_shd.g_old_rec.audit_log_flag
436  ,p_lmt_prpnip_by_org_flag_o      =>ben_bft_shd.g_old_rec.lmt_prpnip_by_org_flag
437  ,p_lf_evt_ocrd_dt_o              =>ben_bft_shd.g_old_rec.lf_evt_ocrd_dt
438  ,p_ptnl_ler_for_per_stat_cd_o    =>ben_bft_shd.g_old_rec.ptnl_ler_for_per_stat_cd
439  ,p_bft_attribute_category_o      =>ben_bft_shd.g_old_rec.bft_attribute_category
440  ,p_bft_attribute1_o              =>ben_bft_shd.g_old_rec.bft_attribute1
441  ,p_bft_attribute3_o              =>ben_bft_shd.g_old_rec.bft_attribute3
442  ,p_bft_attribute4_o              =>ben_bft_shd.g_old_rec.bft_attribute4
443  ,p_bft_attribute5_o              =>ben_bft_shd.g_old_rec.bft_attribute5
444  ,p_bft_attribute6_o              =>ben_bft_shd.g_old_rec.bft_attribute6
445  ,p_bft_attribute7_o              =>ben_bft_shd.g_old_rec.bft_attribute7
446  ,p_bft_attribute8_o              =>ben_bft_shd.g_old_rec.bft_attribute8
447  ,p_bft_attribute9_o              =>ben_bft_shd.g_old_rec.bft_attribute9
448  ,p_bft_attribute10_o             =>ben_bft_shd.g_old_rec.bft_attribute10
449  ,p_bft_attribute11_o             =>ben_bft_shd.g_old_rec.bft_attribute11
450  ,p_bft_attribute12_o             =>ben_bft_shd.g_old_rec.bft_attribute12
451  ,p_bft_attribute13_o             =>ben_bft_shd.g_old_rec.bft_attribute13
452  ,p_bft_attribute14_o             =>ben_bft_shd.g_old_rec.bft_attribute14
453  ,p_bft_attribute15_o             =>ben_bft_shd.g_old_rec.bft_attribute15
454  ,p_bft_attribute16_o             =>ben_bft_shd.g_old_rec.bft_attribute16
455  ,p_bft_attribute17_o             =>ben_bft_shd.g_old_rec.bft_attribute17
456  ,p_bft_attribute18_o             =>ben_bft_shd.g_old_rec.bft_attribute18
457  ,p_bft_attribute19_o             =>ben_bft_shd.g_old_rec.bft_attribute19
458  ,p_bft_attribute20_o             =>ben_bft_shd.g_old_rec.bft_attribute20
459  ,p_bft_attribute21_o             =>ben_bft_shd.g_old_rec.bft_attribute21
460  ,p_bft_attribute22_o             =>ben_bft_shd.g_old_rec.bft_attribute22
461  ,p_bft_attribute23_o             =>ben_bft_shd.g_old_rec.bft_attribute23
462  ,p_bft_attribute24_o             =>ben_bft_shd.g_old_rec.bft_attribute24
463  ,p_bft_attribute25_o             =>ben_bft_shd.g_old_rec.bft_attribute25
464  ,p_bft_attribute26_o             =>ben_bft_shd.g_old_rec.bft_attribute26
465  ,p_bft_attribute27_o             =>ben_bft_shd.g_old_rec.bft_attribute27
466  ,p_bft_attribute28_o             =>ben_bft_shd.g_old_rec.bft_attribute28
467  ,p_bft_attribute29_o             =>ben_bft_shd.g_old_rec.bft_attribute29
468  ,p_bft_attribute30_o             =>ben_bft_shd.g_old_rec.bft_attribute30
469  ,p_enrt_perd_id_o                =>ben_bft_shd.g_old_rec.enrt_perd_id
470  ,p_inelg_action_cd_o             =>ben_bft_shd.g_old_rec.inelg_action_cd
471  ,p_org_hierarchy_id_o             =>ben_bft_shd.g_old_rec.org_hierarchy_id
472  ,p_org_starting_node_id_o             =>ben_bft_shd.g_old_rec.org_starting_node_id
473  ,p_grade_ladder_id_o             =>ben_bft_shd.g_old_rec.grade_ladder_id
474  ,p_asg_events_to_all_sel_dt_o             =>ben_bft_shd.g_old_rec.asg_events_to_all_sel_dt
475  ,p_rate_id_o             =>ben_bft_shd.g_old_rec.rate_id
476  ,p_per_sel_dt_cd_o             =>ben_bft_shd.g_old_rec.per_sel_dt_cd
477  ,p_per_sel_freq_cd_o             =>ben_bft_shd.g_old_rec.per_sel_freq_cd
478  ,p_per_sel_dt_from_o             =>ben_bft_shd.g_old_rec.per_sel_dt_from
479  ,p_per_sel_dt_to_o             =>ben_bft_shd.g_old_rec.per_sel_dt_to
480  ,p_year_from_o             =>ben_bft_shd.g_old_rec.year_from
481  ,p_year_to_o             =>ben_bft_shd.g_old_rec.year_to
482  ,p_cagr_id_o             =>ben_bft_shd.g_old_rec.cagr_id
483  ,p_qual_type_o             =>ben_bft_shd.g_old_rec.qual_type
484  ,p_qual_status_o             =>ben_bft_shd.g_old_rec.qual_status
485  ,p_concat_segs_o             =>ben_bft_shd.g_old_rec.concat_segs
486  ,p_grant_price_val_o             =>ben_bft_shd.g_old_rec.grant_price_val
487  ,p_object_version_number_o       =>ben_bft_shd.g_old_rec.object_version_number
488       );
489     --
490   exception
491     --
492     when hr_api.cannot_find_prog_unit then
493       --
494       hr_api.cannot_find_prog_unit_error
495         (p_module_name => 'ben_benefit_actions'
496         ,p_hook_type   => 'AU');
497       --
498   end;
499   --
500   -- End of API User Hook for post_update.
501   --
502   --
503   hr_utility.set_location(' Leaving:'||l_proc, 10);
504 End post_update;
505 --
506 -- ----------------------------------------------------------------------------
507 -- |-----------------------------< convert_defs >-----------------------------|
508 -- ----------------------------------------------------------------------------
509 -- {Start Of Comments}
510 --
511 -- Description:
512 --   The Convert_Defs procedure has one very important function:
516 --   parameters can be defaulted which enables flexibility in the calling of
513 --   It must return the record structure for the row with all system defaulted
514 --   values converted into its corresponding parameter value for update. When
515 --   we attempt to update a row through the Upd process , certain
517 --   the upd process (e.g. only attributes which need to be updated need to be
518 --   specified). For the upd process to determine which attributes
519 --   have NOT been specified we need to check if the parameter has a reserved
520 --   system default value. Therefore, for all parameters which have a
521 --   corresponding reserved system default mechanism specified we need to
522 --   check if a system default is being used. If a system default is being
523 --   used then we convert the defaulted value into its corresponding attribute
524 --   value held in the g_old_rec data structure.
525 --
526 -- Prerequisites:
527 --   This private function can only be called from the upd process.
528 --
529 -- In Parameters:
530 --   A Pl/Sql record structre.
531 --
532 -- Post Success:
533 --   The record structure will be returned with all system defaulted parameter
534 --   values converted into its current row attribute value.
535 --
536 -- Post Failure:
537 --   No direct error handling is required within this function. Any possible
538 --   errors within this procedure will be a PL/SQL value error due to conversion
539 --   of datatypes or data lengths.
540 --
541 -- Developer Implementation Notes:
542 --   None.
543 --
544 -- Access Status:
545 --   Internal Row Handler Use Only.
546 --
547 -- {End Of Comments}
548 -- ----------------------------------------------------------------------------
549 Procedure convert_defs(p_rec in out nocopy ben_bft_shd.g_rec_type) is
550 --
551   l_proc  varchar2(72) := g_package||'convert_defs';
552 --
553 Begin
554   --
555   hr_utility.set_location('Entering:'||l_proc, 5);
556   --
557   -- We must now examine each argument value in the
558   -- p_rec plsql record structure
559   -- to see if a system default is being used. If a system default
560   -- is being used then we must set to the 'current' argument value.
561   --
562   If (p_rec.process_date = hr_api.g_date) then
563     p_rec.process_date :=
564     ben_bft_shd.g_old_rec.process_date;
565   End If;
566   If (p_rec.uneai_effective_date = hr_api.g_date) then
567     p_rec.uneai_effective_date :=
568     ben_bft_shd.g_old_rec.uneai_effective_date;
569   End If;
570   If (p_rec.mode_cd = hr_api.g_varchar2) then
571     p_rec.mode_cd :=
572     ben_bft_shd.g_old_rec.mode_cd;
573   End If;
574   If (p_rec.derivable_factors_flag = hr_api.g_varchar2) then
575     p_rec.derivable_factors_flag :=
576     ben_bft_shd.g_old_rec.derivable_factors_flag;
577   End If;
578   If (p_rec.close_uneai_flag = hr_api.g_varchar2) then
579     p_rec.close_uneai_flag :=
580     ben_bft_shd.g_old_rec.close_uneai_flag      ;
581   End If;
582   If (p_rec.validate_flag = hr_api.g_varchar2) then
583     p_rec.validate_flag :=
584     ben_bft_shd.g_old_rec.validate_flag;
585   End If;
586   If (p_rec.person_id = hr_api.g_number) then
587     p_rec.person_id :=
588     ben_bft_shd.g_old_rec.person_id;
589   End If;
590   If (p_rec.person_type_id = hr_api.g_number) then
591     p_rec.person_type_id :=
592     ben_bft_shd.g_old_rec.person_type_id;
593   End If;
594   If (p_rec.pgm_id = hr_api.g_number) then
595     p_rec.pgm_id :=
596     ben_bft_shd.g_old_rec.pgm_id;
597   End If;
598   If (p_rec.business_group_id = hr_api.g_number) then
599     p_rec.business_group_id :=
600     ben_bft_shd.g_old_rec.business_group_id;
601   End If;
602   If (p_rec.pl_id = hr_api.g_number) then
603     p_rec.pl_id :=
604     ben_bft_shd.g_old_rec.pl_id;
605   End If;
606   If (p_rec.popl_enrt_typ_cycl_id = hr_api.g_number) then
607     p_rec.popl_enrt_typ_cycl_id :=
608     ben_bft_shd.g_old_rec.popl_enrt_typ_cycl_id;
609   End If;
610   If (p_rec.no_programs_flag = hr_api.g_varchar2) then
611     p_rec.no_programs_flag :=
612     ben_bft_shd.g_old_rec.no_programs_flag;
613   End If;
614   If (p_rec.no_plans_flag = hr_api.g_varchar2) then
615     p_rec.no_plans_flag :=
616     ben_bft_shd.g_old_rec.no_plans_flag;
617   End If;
618   If (p_rec.comp_selection_rl = hr_api.g_number) then
619     p_rec.comp_selection_rl :=
620     ben_bft_shd.g_old_rec.comp_selection_rl;
621   End If;
622   If (p_rec.person_selection_rl = hr_api.g_number) then
623     p_rec.person_selection_rl :=
624     ben_bft_shd.g_old_rec.person_selection_rl;
625   End If;
626   If (p_rec.ler_id = hr_api.g_number) then
627     p_rec.ler_id :=
628     ben_bft_shd.g_old_rec.ler_id;
629   End If;
630   If (p_rec.organization_id = hr_api.g_number) then
631     p_rec.organization_id :=
632     ben_bft_shd.g_old_rec.organization_id;
633   End If;
634   If (p_rec.benfts_grp_id = hr_api.g_number) then
635     p_rec.benfts_grp_id :=
636     ben_bft_shd.g_old_rec.benfts_grp_id;
637   End If;
638   If (p_rec.location_id = hr_api.g_number) then
639     p_rec.location_id :=
640     ben_bft_shd.g_old_rec.location_id;
641   End If;
642   If (p_rec.pstl_zip_rng_id = hr_api.g_number) then
643     p_rec.pstl_zip_rng_id :=
644     ben_bft_shd.g_old_rec.pstl_zip_rng_id;
645   End If;
646   If (p_rec.rptg_grp_id = hr_api.g_number) then
647     p_rec.rptg_grp_id :=
648     ben_bft_shd.g_old_rec.rptg_grp_id;
649   End If;
653   End If;
650   If (p_rec.pl_typ_id = hr_api.g_number) then
651     p_rec.pl_typ_id :=
652     ben_bft_shd.g_old_rec.pl_typ_id;
654   If (p_rec.opt_id = hr_api.g_number) then
655     p_rec.opt_id :=
656     ben_bft_shd.g_old_rec.opt_id;
657   End If;
658   If (p_rec.eligy_prfl_id = hr_api.g_number) then
659     p_rec.eligy_prfl_id :=
660     ben_bft_shd.g_old_rec.eligy_prfl_id;
661   End If;
662   If (p_rec.vrbl_rt_prfl_id = hr_api.g_number) then
663     p_rec.vrbl_rt_prfl_id :=
664     ben_bft_shd.g_old_rec.vrbl_rt_prfl_id;
665   End If;
666   If (p_rec.legal_entity_id = hr_api.g_number) then
667     p_rec.legal_entity_id :=
668     ben_bft_shd.g_old_rec.legal_entity_id;
669   End If;
670   If (p_rec.payroll_id = hr_api.g_number) then
671     p_rec.payroll_id :=
672     ben_bft_shd.g_old_rec.payroll_id;
673   End If;
674   If (p_rec.debug_messages_flag = hr_api.g_varchar2) then
675     p_rec.debug_messages_flag :=
676     ben_bft_shd.g_old_rec.debug_messages_flag;
677   End If;
678   If (p_rec.cm_trgr_typ_cd = hr_api.g_number) then
679     p_rec.cm_trgr_typ_cd :=
680     ben_bft_shd.g_old_rec.cm_trgr_typ_cd;
681   End If;
682   If (p_rec.cm_typ_id = hr_api.g_number) then
683     p_rec.cm_typ_id :=
684     ben_bft_shd.g_old_rec.cm_typ_id;
685   End If;
686   If (p_rec.age_fctr_id = hr_api.g_number) then
687     p_rec.age_fctr_id :=
688     ben_bft_shd.g_old_rec.age_fctr_id;
689   End If;
690   If (p_rec.min_age = hr_api.g_number) then
691     p_rec.min_age :=
692     ben_bft_shd.g_old_rec.min_age;
693   End If;
694   If (p_rec.max_age = hr_api.g_number) then
695     p_rec.max_age :=
696     ben_bft_shd.g_old_rec.max_age;
697   End If;
698   If (p_rec.los_fctr_id = hr_api.g_number) then
699     p_rec.los_fctr_id :=
700     ben_bft_shd.g_old_rec.los_fctr_id;
701   End If;
702   If (p_rec.min_los = hr_api.g_number) then
703     p_rec.min_los :=
704     ben_bft_shd.g_old_rec.min_los;
705   End If;
706   If (p_rec.max_los = hr_api.g_number) then
707     p_rec.max_los :=
708     ben_bft_shd.g_old_rec.max_los;
709   End If;
710   If (p_rec.cmbn_age_los_fctr_id = hr_api.g_number) then
711     p_rec.cmbn_age_los_fctr_id :=
712     ben_bft_shd.g_old_rec.cmbn_age_los_fctr_id;
713   End If;
714   If (p_rec.min_cmbn = hr_api.g_number) then
715     p_rec.min_cmbn :=
716     ben_bft_shd.g_old_rec.min_cmbn;
717   End If;
718   If (p_rec.max_cmbn = hr_api.g_number) then
719     p_rec.max_cmbn :=
720     ben_bft_shd.g_old_rec.max_cmbn;
721   End If;
722   If (p_rec.date_from = hr_api.g_date) then
723     p_rec.date_from :=
724     ben_bft_shd.g_old_rec.date_from;
725   End If;
726   If (p_rec.elig_enrol_cd = hr_api.g_varchar2) then
727     p_rec.elig_enrol_cd :=
728     ben_bft_shd.g_old_rec.elig_enrol_cd;
729   End If;
730   If (p_rec.actn_typ_id = hr_api.g_number) then
731     p_rec.actn_typ_id :=
732     ben_bft_shd.g_old_rec.actn_typ_id;
733   End If;
734   If (p_rec.use_fctr_to_sel_flag = hr_api.g_varchar2) then
735     p_rec.use_fctr_to_sel_flag :=
736     ben_bft_shd.g_old_rec.use_fctr_to_sel_flag;
737   End If;
738   If (p_rec.los_det_to_use_cd = hr_api.g_varchar2) then
739     p_rec.los_det_to_use_cd :=
740     ben_bft_shd.g_old_rec.los_det_to_use_cd;
741   End If;
742   If (p_rec.audit_log_flag = hr_api.g_varchar2) then
743     p_rec.audit_log_flag :=
744     ben_bft_shd.g_old_rec.audit_log_flag;
745   End If;
746   If (p_rec.lmt_prpnip_by_org_flag = hr_api.g_varchar2) then
747     p_rec.lmt_prpnip_by_org_flag :=
748     ben_bft_shd.g_old_rec.lmt_prpnip_by_org_flag;
749   End If;
750   If (p_rec.lf_evt_ocrd_dt = hr_api.g_date) then
751     p_rec.lf_evt_ocrd_dt :=
752     ben_bft_shd.g_old_rec.lf_evt_ocrd_dt;
753   End If;
754   If (p_rec.ptnl_ler_for_per_stat_cd = hr_api.g_varchar2) then
755     p_rec.ptnl_ler_for_per_stat_cd :=
756     ben_bft_shd.g_old_rec.ptnl_ler_for_per_stat_cd;
757   End If;
758   If (p_rec.bft_attribute_category = hr_api.g_varchar2) then
759     p_rec.bft_attribute_category :=
760     ben_bft_shd.g_old_rec.bft_attribute_category;
761   End If;
762   If (p_rec.bft_attribute1 = hr_api.g_varchar2) then
763     p_rec.bft_attribute1 :=
764     ben_bft_shd.g_old_rec.bft_attribute1;
765   End If;
766   If (p_rec.bft_attribute3 = hr_api.g_varchar2) then
767     p_rec.bft_attribute3 :=
768     ben_bft_shd.g_old_rec.bft_attribute3;
769   End If;
770   If (p_rec.bft_attribute4 = hr_api.g_varchar2) then
771     p_rec.bft_attribute4 :=
772     ben_bft_shd.g_old_rec.bft_attribute4;
773   End If;
774   If (p_rec.bft_attribute5 = hr_api.g_varchar2) then
775     p_rec.bft_attribute5 :=
776     ben_bft_shd.g_old_rec.bft_attribute5;
777   End If;
778   If (p_rec.bft_attribute6 = hr_api.g_varchar2) then
779     p_rec.bft_attribute6 :=
780     ben_bft_shd.g_old_rec.bft_attribute6;
781   End If;
782   If (p_rec.bft_attribute7 = hr_api.g_varchar2) then
783     p_rec.bft_attribute7 :=
784     ben_bft_shd.g_old_rec.bft_attribute7;
785   End If;
786   If (p_rec.bft_attribute8 = hr_api.g_varchar2) then
787     p_rec.bft_attribute8 :=
788     ben_bft_shd.g_old_rec.bft_attribute8;
789   End If;
790   If (p_rec.bft_attribute9 = hr_api.g_varchar2) then
791     p_rec.bft_attribute9 :=
792     ben_bft_shd.g_old_rec.bft_attribute9;
793   End If;
797   End If;
794   If (p_rec.bft_attribute10 = hr_api.g_varchar2) then
795     p_rec.bft_attribute10 :=
796     ben_bft_shd.g_old_rec.bft_attribute10;
798   If (p_rec.bft_attribute11 = hr_api.g_varchar2) then
799     p_rec.bft_attribute11 :=
800     ben_bft_shd.g_old_rec.bft_attribute11;
801   End If;
802   If (p_rec.bft_attribute12 = hr_api.g_varchar2) then
803     p_rec.bft_attribute12 :=
804     ben_bft_shd.g_old_rec.bft_attribute12;
805   End If;
806   If (p_rec.bft_attribute13 = hr_api.g_varchar2) then
807     p_rec.bft_attribute13 :=
808     ben_bft_shd.g_old_rec.bft_attribute13;
809   End If;
810   If (p_rec.bft_attribute14 = hr_api.g_varchar2) then
811     p_rec.bft_attribute14 :=
812     ben_bft_shd.g_old_rec.bft_attribute14;
813   End If;
814   If (p_rec.bft_attribute15 = hr_api.g_varchar2) then
815     p_rec.bft_attribute15 :=
816     ben_bft_shd.g_old_rec.bft_attribute15;
817   End If;
818   If (p_rec.bft_attribute16 = hr_api.g_varchar2) then
819     p_rec.bft_attribute16 :=
820     ben_bft_shd.g_old_rec.bft_attribute16;
821   End If;
822   If (p_rec.bft_attribute17 = hr_api.g_varchar2) then
823     p_rec.bft_attribute17 :=
824     ben_bft_shd.g_old_rec.bft_attribute17;
825   End If;
826   If (p_rec.bft_attribute18 = hr_api.g_varchar2) then
827     p_rec.bft_attribute18 :=
828     ben_bft_shd.g_old_rec.bft_attribute18;
829   End If;
830   If (p_rec.bft_attribute19 = hr_api.g_varchar2) then
831     p_rec.bft_attribute19 :=
832     ben_bft_shd.g_old_rec.bft_attribute19;
833   End If;
834   If (p_rec.bft_attribute20 = hr_api.g_varchar2) then
835     p_rec.bft_attribute20 :=
836     ben_bft_shd.g_old_rec.bft_attribute20;
837   End If;
838   If (p_rec.bft_attribute21 = hr_api.g_varchar2) then
839     p_rec.bft_attribute21 :=
840     ben_bft_shd.g_old_rec.bft_attribute21;
841   End If;
842   If (p_rec.bft_attribute22 = hr_api.g_varchar2) then
843     p_rec.bft_attribute22 :=
844     ben_bft_shd.g_old_rec.bft_attribute22;
845   End If;
846   If (p_rec.bft_attribute23 = hr_api.g_varchar2) then
847     p_rec.bft_attribute23 :=
848     ben_bft_shd.g_old_rec.bft_attribute23;
849   End If;
850   If (p_rec.bft_attribute24 = hr_api.g_varchar2) then
851     p_rec.bft_attribute24 :=
852     ben_bft_shd.g_old_rec.bft_attribute24;
853   End If;
854   If (p_rec.bft_attribute25 = hr_api.g_varchar2) then
855     p_rec.bft_attribute25 :=
856     ben_bft_shd.g_old_rec.bft_attribute25;
857   End If;
858   If (p_rec.bft_attribute26 = hr_api.g_varchar2) then
859     p_rec.bft_attribute26 :=
860     ben_bft_shd.g_old_rec.bft_attribute26;
861   End If;
862   If (p_rec.bft_attribute27 = hr_api.g_varchar2) then
863     p_rec.bft_attribute27 :=
864     ben_bft_shd.g_old_rec.bft_attribute27;
865   End If;
866   If (p_rec.bft_attribute28 = hr_api.g_varchar2) then
867     p_rec.bft_attribute28 :=
868     ben_bft_shd.g_old_rec.bft_attribute28;
869   End If;
870   If (p_rec.bft_attribute29 = hr_api.g_varchar2) then
871     p_rec.bft_attribute29 :=
872     ben_bft_shd.g_old_rec.bft_attribute29;
873   End If;
874   If (p_rec.bft_attribute30 = hr_api.g_varchar2) then
875     p_rec.bft_attribute30 :=
876     ben_bft_shd.g_old_rec.bft_attribute30;
877   End If;
878   If (p_rec.request_id = hr_api.g_number) then
879     p_rec.request_id :=
880     ben_bft_shd.g_old_rec.request_id;
881   End If;
882   If (p_rec.program_application_id = hr_api.g_number) then
883     p_rec.program_application_id :=
884     ben_bft_shd.g_old_rec.program_application_id;
885   End If;
886   If (p_rec.program_id = hr_api.g_number) then
887     p_rec.program_id :=
888     ben_bft_shd.g_old_rec.program_id;
889   End If;
890   If (p_rec.program_update_date = hr_api.g_date) then
891     p_rec.program_update_date :=
892     ben_bft_shd.g_old_rec.program_update_date;
893   End If;
894   If (p_rec.enrt_perd_id = hr_api.g_number) then
895 	    p_rec.enrt_perd_id :=
896 	    ben_bft_shd.g_old_rec.enrt_perd_id;
897   End If;
898   If (p_rec.inelg_action_cd = hr_api.g_varchar2) then
899 		    p_rec.inelg_action_cd:=
900 		    ben_bft_shd.g_old_rec.inelg_action_cd;
901   End If;
902 
903   If (p_rec.org_hierarchy_id = hr_api.g_number) then
904 		    p_rec.org_hierarchy_id:=
905 		    ben_bft_shd.g_old_rec.org_hierarchy_id;
906   End If;
907 
908   If (p_rec.org_starting_node_id = hr_api.g_number) then
909 		    p_rec.org_starting_node_id:=
910 		    ben_bft_shd.g_old_rec.org_starting_node_id;
911   End If;
912 
913   If (p_rec.grade_ladder_id = hr_api.g_number) then
914 		    p_rec.grade_ladder_id:=
915 		    ben_bft_shd.g_old_rec.grade_ladder_id;
916   End If;
917   If (p_rec.asg_events_to_all_sel_dt = hr_api.g_varchar2) then
918 		    p_rec.asg_events_to_all_sel_dt:=
919 		    ben_bft_shd.g_old_rec.asg_events_to_all_sel_dt;
920   End If;
921   If (p_rec.rate_id = hr_api.g_number) then
922 		    p_rec.rate_id:=
923 		    ben_bft_shd.g_old_rec.rate_id;
924   End If;
925   If (p_rec.per_sel_dt_cd = hr_api.g_varchar2) then
926 		    p_rec.per_sel_dt_cd:=
927 		    ben_bft_shd.g_old_rec.per_sel_dt_cd;
928   End If;
929   If (p_rec.per_sel_freq_cd = hr_api.g_varchar2) then
930 		    p_rec.per_sel_freq_cd:=
931 		    ben_bft_shd.g_old_rec.per_sel_freq_cd;
932   End If;
933   If (p_rec.per_sel_dt_from = hr_api.g_date) then
934 		    p_rec.per_sel_dt_from:=
938 		    p_rec.per_sel_dt_to:=
935 		    ben_bft_shd.g_old_rec.per_sel_dt_from;
936   End If;
937   If (p_rec.per_sel_dt_to = hr_api.g_date) then
939 		    ben_bft_shd.g_old_rec.per_sel_dt_to;
940   End If;
941   If (p_rec.year_from = hr_api.g_number) then
942 		    p_rec.year_from:=
943 		    ben_bft_shd.g_old_rec.year_from;
944   End If;
945   If (p_rec.year_to = hr_api.g_number) then
946 		    p_rec.year_to:=
947 		    ben_bft_shd.g_old_rec.year_to;
948   End If;
949   If (p_rec.cagr_id = hr_api.g_number) then
950 		    p_rec.cagr_id:=
951 		    ben_bft_shd.g_old_rec.cagr_id;
952   End If;
953   If (p_rec.qual_type = hr_api.g_number) then
954 		    p_rec.qual_type:=
955 		    ben_bft_shd.g_old_rec.qual_type;
956   End If;
957   If (p_rec.qual_status = hr_api.g_varchar2) then
958 		    p_rec.qual_status:=
959 		    ben_bft_shd.g_old_rec.qual_status;
960   End If;
961   If (p_rec.concat_segs = hr_api.g_varchar2) then
962 		    p_rec.concat_segs:=
963 		    ben_bft_shd.g_old_rec.concat_segs;
964   End If;
965   If (p_rec.grant_price_val = hr_api.g_number) then
966 			    p_rec.grant_price_val:=
967 			    ben_bft_shd.g_old_rec.grant_price_val;
968   End If;
969   --
970   hr_utility.set_location(' Leaving:'||l_proc, 10);
971 --
972 End convert_defs;
973 --
974 -- ----------------------------------------------------------------------------
975 -- |---------------------------------< upd >----------------------------------|
976 -- ----------------------------------------------------------------------------
977 Procedure upd
978   (
979   p_effective_date in date,
980   p_rec        in out nocopy ben_bft_shd.g_rec_type
981   ) is
982 --
983   l_proc  varchar2(72) := g_package||'upd';
984 --
985 Begin
986   hr_utility.set_location('Entering:'||l_proc, 5);
987   --
988   -- We must lock the row which we need to update.
989   --
990   ben_bft_shd.lck
991 	(
992 	p_rec.benefit_action_id,
993 	p_rec.object_version_number
994 	);
995   --
996   -- 1. During an update system defaults are used to determine if
997   --    arguments have been defaulted or not. We must therefore
998   --    derive the full record structure values to be updated.
999   --
1000   -- 2. Call the supporting update validate operations.
1001   --
1002   convert_defs(p_rec);
1003   ben_bft_bus.update_validate(p_rec,p_effective_date);
1004   --
1005   -- Call the supporting pre-update operation
1006   --
1007   pre_update(p_rec);
1008   --
1009   -- Update the row.
1010   --
1011   update_dml(p_rec);
1012   --
1013   -- Call the supporting post-update operation
1014   --
1015   post_update(p_effective_date,p_rec);
1016 End upd;
1017 --
1018 -- ----------------------------------------------------------------------------
1019 -- |---------------------------------< upd >----------------------------------|
1020 -- ----------------------------------------------------------------------------
1021 Procedure upd
1022   (
1023   p_effective_date in date,
1024   p_benefit_action_id            in number,
1025   p_process_date                 in date             default hr_api.g_date,
1026   p_uneai_effective_date         in date             default hr_api.g_date,
1027   p_mode_cd                      in varchar2         default hr_api.g_varchar2,
1028   p_derivable_factors_flag       in varchar2         default hr_api.g_varchar2,
1029   p_close_uneai_flag             in varchar2         default hr_api.g_varchar2,
1030   p_validate_flag                in varchar2         default hr_api.g_varchar2,
1031   p_person_id                    in number           default hr_api.g_number,
1032   p_person_type_id               in number           default hr_api.g_number,
1033   p_pgm_id                       in number           default hr_api.g_number,
1034   p_business_group_id            in number           default hr_api.g_number,
1035   p_pl_id                        in number           default hr_api.g_number,
1036   p_popl_enrt_typ_cycl_id        in number           default hr_api.g_number,
1037   p_no_programs_flag             in varchar2         default hr_api.g_varchar2,
1038   p_no_plans_flag                in varchar2         default hr_api.g_varchar2,
1039   p_comp_selection_rl            in number           default hr_api.g_number,
1040   p_person_selection_rl          in number           default hr_api.g_number,
1041   p_ler_id                       in number           default hr_api.g_number,
1042   p_organization_id              in number           default hr_api.g_number,
1043   p_benfts_grp_id                in number           default hr_api.g_number,
1044   p_location_id                  in number           default hr_api.g_number,
1045   p_pstl_zip_rng_id              in number           default hr_api.g_number,
1046   p_rptg_grp_id                  in number           default hr_api.g_number,
1047   p_pl_typ_id                    in number           default hr_api.g_number,
1048   p_opt_id                       in number           default hr_api.g_number,
1049   p_eligy_prfl_id                in number           default hr_api.g_number,
1050   p_vrbl_rt_prfl_id              in number           default hr_api.g_number,
1051   p_legal_entity_id              in number           default hr_api.g_number,
1052   p_payroll_id                   in number           default hr_api.g_number,
1053   p_debug_messages_flag          in varchar2         default hr_api.g_varchar2,
1054   p_cm_trgr_typ_cd               in varchar2         default hr_api.g_varchar2,
1055   p_cm_typ_id                    in number           default hr_api.g_number,
1056   p_age_fctr_id                  in number           default hr_api.g_number,
1057   p_min_age                      in number           default hr_api.g_number,
1058   p_max_age                      in number           default hr_api.g_number,
1059   p_los_fctr_id                  in number           default hr_api.g_number,
1060   p_min_los                      in number           default hr_api.g_number,
1061   p_max_los                      in number           default hr_api.g_number,
1062   p_cmbn_age_los_fctr_id         in number           default hr_api.g_number,
1063   p_min_cmbn                     in number           default hr_api.g_number,
1064   p_max_cmbn                     in number           default hr_api.g_number,
1068   p_use_fctr_to_sel_flag         in varchar2         default hr_api.g_varchar2,
1065   p_date_from                    in date             default hr_api.g_date,
1066   p_elig_enrol_cd                in varchar2         default hr_api.g_varchar2,
1067   p_actn_typ_id                  in number           default hr_api.g_number,
1069   p_los_det_to_use_cd            in varchar2         default hr_api.g_varchar2,
1070   p_audit_log_flag               in varchar2         default hr_api.g_varchar2,
1071   p_lmt_prpnip_by_org_flag       in varchar2         default hr_api.g_varchar2,
1072   p_lf_evt_ocrd_dt               in date             default hr_api.g_date,
1073   p_ptnl_ler_for_per_stat_cd     in varchar2         default hr_api.g_varchar2,
1074   p_bft_attribute_category       in varchar2         default hr_api.g_varchar2,
1075   p_bft_attribute1               in varchar2         default hr_api.g_varchar2,
1076   p_bft_attribute3               in varchar2         default hr_api.g_varchar2,
1077   p_bft_attribute4               in varchar2         default hr_api.g_varchar2,
1078   p_bft_attribute5               in varchar2         default hr_api.g_varchar2,
1079   p_bft_attribute6               in varchar2         default hr_api.g_varchar2,
1080   p_bft_attribute7               in varchar2         default hr_api.g_varchar2,
1081   p_bft_attribute8               in varchar2         default hr_api.g_varchar2,
1082   p_bft_attribute9               in varchar2         default hr_api.g_varchar2,
1083   p_bft_attribute10              in varchar2         default hr_api.g_varchar2,
1084   p_bft_attribute11              in varchar2         default hr_api.g_varchar2,
1085   p_bft_attribute12              in varchar2         default hr_api.g_varchar2,
1086   p_bft_attribute13              in varchar2         default hr_api.g_varchar2,
1087   p_bft_attribute14              in varchar2         default hr_api.g_varchar2,
1088   p_bft_attribute15              in varchar2         default hr_api.g_varchar2,
1089   p_bft_attribute16              in varchar2         default hr_api.g_varchar2,
1090   p_bft_attribute17              in varchar2         default hr_api.g_varchar2,
1091   p_bft_attribute18              in varchar2         default hr_api.g_varchar2,
1092   p_bft_attribute19              in varchar2         default hr_api.g_varchar2,
1093   p_bft_attribute20              in varchar2         default hr_api.g_varchar2,
1094   p_bft_attribute21              in varchar2         default hr_api.g_varchar2,
1095   p_bft_attribute22              in varchar2         default hr_api.g_varchar2,
1096   p_bft_attribute23              in varchar2         default hr_api.g_varchar2,
1097   p_bft_attribute24              in varchar2         default hr_api.g_varchar2,
1098   p_bft_attribute25              in varchar2         default hr_api.g_varchar2,
1099   p_bft_attribute26              in varchar2         default hr_api.g_varchar2,
1100   p_bft_attribute27              in varchar2         default hr_api.g_varchar2,
1101   p_bft_attribute28              in varchar2         default hr_api.g_varchar2,
1102   p_bft_attribute29              in varchar2         default hr_api.g_varchar2,
1103   p_bft_attribute30              in varchar2         default hr_api.g_varchar2,
1104   p_request_id                   in number           default hr_api.g_number,
1105   p_program_application_id       in number           default hr_api.g_number,
1106   p_program_id                   in number           default hr_api.g_number,
1107   p_program_update_date          in date             default hr_api.g_date,
1108   p_enrt_perd_id                 in number           default hr_api.g_number,
1109   p_inelg_action_cd              in varchar2         default hr_api.g_varchar2,
1110   p_org_hierarchy_id              in number         default hr_api.g_number,
1111   p_org_starting_node_id              in number         default hr_api.g_number,
1112   p_grade_ladder_id              in number         default hr_api.g_number,
1113   p_asg_events_to_all_sel_dt              in varchar2         default hr_api.g_varchar2,
1114   p_rate_id              in number         default hr_api.g_number,
1115   p_per_sel_dt_cd              in varchar2         default hr_api.g_varchar2,
1116   p_per_sel_freq_cd              in varchar2         default hr_api.g_varchar2,
1117   p_per_sel_dt_from              in date         default hr_api.g_date,
1118   p_per_sel_dt_to              in date         default hr_api.g_date,
1119   p_year_from              in number         default hr_api.g_number,
1120   p_year_to              in number         default hr_api.g_number,
1121   p_cagr_id              in number         default hr_api.g_number,
1122   p_qual_type              in number         default hr_api.g_number,
1123   p_qual_status              in varchar2         default hr_api.g_varchar2,
1124   p_concat_segs              in varchar2         default hr_api.g_varchar2,
1125   p_grant_price_val              in number           default hr_api.g_number,
1126   p_object_version_number        in out nocopy number
1127   ) is
1128 --
1129   l_rec	  ben_bft_shd.g_rec_type;
1130   l_proc  varchar2(72) := g_package||'upd';
1131 --
1132 Begin
1133   hr_utility.set_location('Entering:'||l_proc, 5);
1134   --
1135   -- Call conversion function to turn arguments into the
1136   -- l_rec structure.
1137   --
1138   l_rec :=
1139   ben_bft_shd.convert_args
1140   (
1141   p_benefit_action_id,
1142   p_process_date,
1143   p_uneai_effective_date,
1144   p_mode_cd,
1145   p_derivable_factors_flag,
1146   p_close_uneai_flag      ,
1147   p_validate_flag,
1148   p_person_id,
1149   p_person_type_id,
1150   p_pgm_id,
1151   p_business_group_id,
1152   p_pl_id,
1153   p_popl_enrt_typ_cycl_id,
1154   p_no_programs_flag,
1155   p_no_plans_flag,
1156   p_comp_selection_rl,
1157   p_person_selection_rl,
1158   p_ler_id,
1159   p_organization_id,
1160   p_benfts_grp_id,
1161   p_location_id,
1162   p_pstl_zip_rng_id,
1163   p_rptg_grp_id,
1164   p_pl_typ_id,
1165   p_opt_id,
1166   p_eligy_prfl_id,
1167   p_vrbl_rt_prfl_id,
1168   p_legal_entity_id,
1169   p_payroll_id,
1170   p_debug_messages_flag,
1171   p_cm_trgr_typ_cd,
1172   p_cm_typ_id,
1173   p_age_fctr_id,
1174   p_min_age,
1175   p_max_age,
1176   p_los_fctr_id,
1177   p_min_los,
1178   p_max_los,
1179   p_cmbn_age_los_fctr_id,
1180   p_min_cmbn,
1181   p_max_cmbn,
1182   p_date_from,
1183   p_elig_enrol_cd,
1184   p_actn_typ_id,
1185   p_use_fctr_to_sel_flag,
1186   p_los_det_to_use_cd,
1187   p_audit_log_flag,
1188   p_lmt_prpnip_by_org_flag,
1189   p_lf_evt_ocrd_dt,
1190   p_ptnl_ler_for_per_stat_cd,
1191   p_bft_attribute_category,
1192   p_bft_attribute1,
1193   p_bft_attribute3,
1194   p_bft_attribute4,
1195   p_bft_attribute5,
1196   p_bft_attribute6,
1197   p_bft_attribute7,
1198   p_bft_attribute8,
1199   p_bft_attribute9,
1200   p_bft_attribute10,
1201   p_bft_attribute11,
1202   p_bft_attribute12,
1203   p_bft_attribute13,
1204   p_bft_attribute14,
1205   p_bft_attribute15,
1206   p_bft_attribute16,
1207   p_bft_attribute17,
1208   p_bft_attribute18,
1209   p_bft_attribute19,
1210   p_bft_attribute20,
1211   p_bft_attribute21,
1212   p_bft_attribute22,
1213   p_bft_attribute23,
1214   p_bft_attribute24,
1215   p_bft_attribute25,
1216   p_bft_attribute26,
1217   p_bft_attribute27,
1218   p_bft_attribute28,
1219   p_bft_attribute29,
1220   p_bft_attribute30,
1221   p_request_id,
1222   p_program_application_id,
1223   p_program_id,
1224   p_program_update_date,
1225   p_object_version_number,
1226   p_enrt_perd_id,
1227   p_inelg_action_cd,
1228   p_org_hierarchy_id,
1229   p_org_starting_node_id,
1230   p_grade_ladder_id,
1231   p_asg_events_to_all_sel_dt,
1232   p_rate_id,
1233   p_per_sel_dt_cd,
1234   p_per_sel_freq_cd,
1235   p_per_sel_dt_from,
1236   p_per_sel_dt_to,
1237   p_year_from,
1238   p_year_to,
1239   p_cagr_id,
1240   p_qual_type,
1241   p_qual_status,
1242   p_concat_segs,
1243   p_grant_price_val
1244 
1245   );
1246   --
1247   -- Having converted the arguments into the
1248   -- plsql record structure we call the corresponding record
1249   -- business process.
1250   --
1251   upd(p_effective_date,l_rec);
1252   p_object_version_number := l_rec.object_version_number;
1253   --
1254   hr_utility.set_location(' Leaving:'||l_proc, 10);
1255 End upd;
1256 --
1257 end ben_bft_upd;