1 Package Body ben_epe_upd as
2 /* $Header: beeperhi.pkb 120.0 2005/05/28 02:36:58 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_epe_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_epe_shd.g_rec_type) is
55 --
59 hr_utility.set_location('Entering:'||l_proc, 5);
56 l_proc varchar2(72) := g_package||'update_dml';
57 --
58 Begin
60 --
61 -- Increment the object version
62 --
63 p_rec.object_version_number := p_rec.object_version_number + 1;
64 --
65 ben_epe_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_elig_per_elctbl_chc Row
68 --
69 update ben_elig_per_elctbl_chc
70 set
71 elig_per_elctbl_chc_id = p_rec.elig_per_elctbl_chc_id,
72 -- enrt_typ_cycl_cd = p_rec.enrt_typ_cycl_cd,
73 enrt_cvg_strt_dt_cd = p_rec.enrt_cvg_strt_dt_cd,
74 -- enrt_perd_end_dt = p_rec.enrt_perd_end_dt,
75 -- enrt_perd_strt_dt = p_rec.enrt_perd_strt_dt,
76 enrt_cvg_strt_dt_rl = p_rec.enrt_cvg_strt_dt_rl,
77 -- rt_strt_dt = p_rec.rt_strt_dt,
78 -- rt_strt_dt_rl = p_rec.rt_strt_dt_rl,
79 -- rt_strt_dt_cd = p_rec.rt_strt_dt_cd,
80 ctfn_rqd_flag = p_rec.ctfn_rqd_flag,
81 pil_elctbl_chc_popl_id = p_rec.pil_elctbl_chc_popl_id,
82 roll_crs_flag = p_rec.roll_crs_flag,
83 crntly_enrd_flag = p_rec.crntly_enrd_flag,
84 dflt_flag = p_rec.dflt_flag,
85 elctbl_flag = p_rec.elctbl_flag,
86 mndtry_flag = p_rec.mndtry_flag,
87 in_pndg_wkflow_flag = p_rec.in_pndg_wkflow_flag,
88 -- dflt_enrt_dt = p_rec.dflt_enrt_dt,
89 dpnt_cvg_strt_dt_cd = p_rec.dpnt_cvg_strt_dt_cd,
90 dpnt_cvg_strt_dt_rl = p_rec.dpnt_cvg_strt_dt_rl,
91 enrt_cvg_strt_dt = p_rec.enrt_cvg_strt_dt,
92 alws_dpnt_dsgn_flag = p_rec.alws_dpnt_dsgn_flag,
93 dpnt_dsgn_cd = p_rec.dpnt_dsgn_cd,
94 ler_chg_dpnt_cvg_cd = p_rec.ler_chg_dpnt_cvg_cd,
95 erlst_deenrt_dt = p_rec.erlst_deenrt_dt,
96 procg_end_dt = p_rec.procg_end_dt,
97 comp_lvl_cd = p_rec.comp_lvl_cd,
98 pl_id = p_rec.pl_id,
99 oipl_id = p_rec.oipl_id,
100 pgm_id = p_rec.pgm_id,
101 plip_id = p_rec.plip_id,
102 ptip_id = p_rec.ptip_id,
103 pl_typ_id = p_rec.pl_typ_id,
104 oiplip_id = p_rec.oiplip_id,
105 cmbn_plip_id = p_rec.cmbn_plip_id,
106 cmbn_ptip_id = p_rec.cmbn_ptip_id,
107 cmbn_ptip_opt_id = p_rec.cmbn_ptip_opt_id,
108 assignment_id = p_rec.assignment_id,
109 spcl_rt_pl_id = p_rec.spcl_rt_pl_id,
110 spcl_rt_oipl_id = p_rec.spcl_rt_oipl_id,
111 must_enrl_anthr_pl_id = p_rec.must_enrl_anthr_pl_id,
112 interim_elig_per_elctbl_chc_id = p_rec.int_elig_per_elctbl_chc_id,
113 prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id,
114 bnft_prvdr_pool_id = p_rec.bnft_prvdr_pool_id,
115 per_in_ler_id = p_rec.per_in_ler_id,
116 yr_perd_id = p_rec.yr_perd_id,
117 auto_enrt_flag = p_rec.auto_enrt_flag,
118 business_group_id = p_rec.business_group_id,
119 pl_ordr_num = p_rec.pl_ordr_num,
120 plip_ordr_num = p_rec.plip_ordr_num,
121 ptip_ordr_num = p_rec.ptip_ordr_num,
122 oipl_ordr_num = p_rec.oipl_ordr_num,
123 -- cwb
124 comments = p_rec.comments,
125 elig_flag = p_rec.elig_flag,
126 elig_ovrid_dt = p_rec.elig_ovrid_dt,
127 elig_ovrid_person_id = p_rec.elig_ovrid_person_id,
128 inelig_rsn_cd = p_rec.inelig_rsn_cd,
129 mgr_ovrid_dt = p_rec.mgr_ovrid_dt,
130 mgr_ovrid_person_id = p_rec.mgr_ovrid_person_id,
131 ws_mgr_id = p_rec.ws_mgr_id,
132 -- cwb
133 epe_attribute_category = p_rec.epe_attribute_category,
134 epe_attribute1 = p_rec.epe_attribute1,
135 epe_attribute2 = p_rec.epe_attribute2,
136 epe_attribute3 = p_rec.epe_attribute3,
137 epe_attribute4 = p_rec.epe_attribute4,
138 epe_attribute5 = p_rec.epe_attribute5,
139 epe_attribute6 = p_rec.epe_attribute6,
140 epe_attribute7 = p_rec.epe_attribute7,
141 epe_attribute8 = p_rec.epe_attribute8,
142 epe_attribute9 = p_rec.epe_attribute9,
143 epe_attribute10 = p_rec.epe_attribute10,
144 epe_attribute11 = p_rec.epe_attribute11,
145 epe_attribute12 = p_rec.epe_attribute12,
146 epe_attribute13 = p_rec.epe_attribute13,
147 epe_attribute14 = p_rec.epe_attribute14,
148 epe_attribute15 = p_rec.epe_attribute15,
149 epe_attribute16 = p_rec.epe_attribute16,
150 epe_attribute17 = p_rec.epe_attribute17,
151 epe_attribute18 = p_rec.epe_attribute18,
152 epe_attribute19 = p_rec.epe_attribute19,
153 epe_attribute20 = p_rec.epe_attribute20,
154 epe_attribute21 = p_rec.epe_attribute21,
155 epe_attribute22 = p_rec.epe_attribute22,
156 epe_attribute23 = p_rec.epe_attribute23,
157 epe_attribute24 = p_rec.epe_attribute24,
158 epe_attribute25 = p_rec.epe_attribute25,
162 epe_attribute29 = p_rec.epe_attribute29,
159 epe_attribute26 = p_rec.epe_attribute26,
160 epe_attribute27 = p_rec.epe_attribute27,
161 epe_attribute28 = p_rec.epe_attribute28,
163 epe_attribute30 = p_rec.epe_attribute30,
164 approval_status_cd = p_rec.approval_status_cd,
165 fonm_cvg_strt_dt = p_rec.fonm_cvg_strt_dt,
166 cryfwd_elig_dpnt_cd = p_rec.cryfwd_elig_dpnt_cd,
167 request_id = p_rec.request_id,
168 program_application_id = p_rec.program_application_id,
169 program_id = p_rec.program_id,
170 program_update_date = p_rec.program_update_date,
171 object_version_number = p_rec.object_version_number
172 where elig_per_elctbl_chc_id = p_rec.elig_per_elctbl_chc_id;
173 --
174 ben_epe_shd.g_api_dml := false; -- Unset the api dml status
175 --
176 hr_utility.set_location(' Leaving:'||l_proc, 10);
177 --
178 Exception
179 When hr_api.check_integrity_violated Then
180 -- A check constraint has been violated
181 ben_epe_shd.g_api_dml := false; -- Unset the api dml status
182 ben_epe_shd.constraint_error
183 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
184 When hr_api.parent_integrity_violated Then
185 -- Parent integrity has been violated
186 ben_epe_shd.g_api_dml := false; -- Unset the api dml status
187 ben_epe_shd.constraint_error
188 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
189 When hr_api.unique_integrity_violated Then
190 -- Unique integrity has been violated
191 ben_epe_shd.g_api_dml := false; -- Unset the api dml status
192 ben_epe_shd.constraint_error
193 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
194 When Others Then
195 ben_epe_shd.g_api_dml := false; -- Unset the api dml status
196 Raise;
197 End update_dml;
198 --
199 -- ----------------------------------------------------------------------------
200 -- |------------------------------< pre_update >------------------------------|
201 -- ----------------------------------------------------------------------------
202 -- {Start Of Comments}
203 --
204 -- Description:
205 -- This private procedure contains any processing which is required before
206 -- the update dml.
207 --
208 -- Prerequisites:
209 -- This is an internal procedure which is called from the upd procedure.
210 --
211 -- In Parameters:
212 -- A Pl/Sql record structre.
213 --
214 -- Post Success:
215 -- Processing continues.
216 --
217 -- Post Failure:
218 -- If an error has occurred, an error message and exception will be raised
219 -- but not handled.
220 --
221 -- Developer Implementation Notes:
222 -- Any pre-processing required before the update dml is issued should be
223 -- coded within this procedure. It is important to note that any 3rd party
224 -- maintenance should be reviewed before placing in this procedure.
225 --
226 -- Access Status:
227 -- Internal Row Handler Use Only.
228 --
229 -- {End Of Comments}
230 -- ----------------------------------------------------------------------------
231 Procedure pre_update(p_rec in ben_epe_shd.g_rec_type) is
232 --
233 l_proc varchar2(72) := g_package||'pre_update';
234 --
235 Begin
236 hr_utility.set_location('Entering:'||l_proc, 5);
237 --
238 hr_utility.set_location(' Leaving:'||l_proc, 10);
239 End pre_update;
240 --
241 -- ----------------------------------------------------------------------------
242 -- |-----------------------------< post_update >------------------------------|
243 -- ----------------------------------------------------------------------------
244 -- {Start Of Comments}
245 --
246 -- Description:
247 -- This private procedure contains any processing which is required after the
248 -- update dml.
249 --
250 -- Prerequisites:
251 -- This is an internal procedure which is called from the upd procedure.
252 --
253 -- In Parameters:
254 -- A Pl/Sql record structre.
255 --
256 -- Post Success:
257 -- Processing continues.
258 --
259 -- Post Failure:
260 -- If an error has occurred, an error message and exception will be raised
261 -- but not handled.
262 --
263 -- Developer Implementation Notes:
264 -- Any post-processing required after the update dml is issued should be
265 -- coded within this procedure. It is important to note that any 3rd party
266 -- maintenance should be reviewed before placing in this procedure.
267 --
268 -- Access Status:
269 -- Internal Row Handler Use Only.
270 --
271 -- {End Of Comments}
272 -- ----------------------------------------------------------------------------
273 Procedure post_update(p_rec in ben_epe_shd.g_rec_type) is
274 --
275 l_proc varchar2(72) := g_package||'post_update';
276 --
277 Begin
278 hr_utility.set_location('Entering:'||l_proc, 5);
279 --
280 hr_utility.set_location(' Leaving:'||l_proc, 10);
281 End post_update;
282 --
283 -- ----------------------------------------------------------------------------
284 -- |-----------------------------< convert_defs >-----------------------------|
285 -- ----------------------------------------------------------------------------
286 -- {Start Of Comments}
287 --
288 -- Description:
289 -- The Convert_Defs procedure has one very important function:
290 -- It must return the record structure for the row with all system defaulted
294 -- the upd process (e.g. only attributes which need to be updated need to be
291 -- values converted into its corresponding parameter value for update. When
292 -- we attempt to update a row through the Upd process , certain
293 -- parameters can be defaulted which enables flexibility in the calling of
295 -- specified). For the upd process to determine which attributes
296 -- have NOT been specified we need to check if the parameter has a reserved
297 -- system default value. Therefore, for all parameters which have a
298 -- corresponding reserved system default mechanism specified we need to
299 -- check if a system default is being used. If a system default is being
300 -- used then we convert the defaulted value into its corresponding attribute
301 -- value held in the g_old_rec data structure.
302 --
303 -- Prerequisites:
304 -- This private function can only be called from the upd process.
305 --
306 -- In Parameters:
307 -- A Pl/Sql record structre.
308 --
309 -- Post Success:
310 -- The record structure will be returned with all system defaulted parameter
311 -- values converted into its current row attribute value.
312 --
313 -- Post Failure:
314 -- No direct error handling is required within this function. Any possible
315 -- errors within this procedure will be a PL/SQL value error due to conversion
316
317 -- of datatypes or data lengths.
318 --
319 -- Developer Implementation Notes:
320 -- None.
321 --
322 -- Access Status:
323 -- Internal Row Handler Use Only.
324 --
325 -- {End Of Comments}
326 -- ----------------------------------------------------------------------------
327 Procedure convert_defs(p_rec in out nocopy ben_epe_shd.g_rec_type) is
328 --
329 l_proc varchar2(72) := g_package||'convert_defs';
330 --
331 Begin
332 --
333 hr_utility.set_location('Entering:'||l_proc, 5);
334 --
335 -- We must now examine each argument value in the
336 -- p_rec plsql record structure
337 -- to see if a system default is being used. If a system default
338 -- is being used then we must set to the 'current' argument value.
339 --
340 -- If (p_rec.enrt_typ_cycl_cd = hr_api.g_varchar2) then
341 -- p_rec.enrt_typ_cycl_cd :=
342 -- ben_epe_shd.g_old_rec.enrt_typ_cycl_cd;
343 -- End If;
344 If (p_rec.enrt_cvg_strt_dt_cd = hr_api.g_varchar2) then
345 p_rec.enrt_cvg_strt_dt_cd :=
346 ben_epe_shd.g_old_rec.enrt_cvg_strt_dt_cd;
347 End If;
348 -- If (p_rec.enrt_perd_end_dt = hr_api.g_date) then
349 -- p_rec.enrt_perd_end_dt :=
350 -- ben_epe_shd.g_old_rec.enrt_perd_end_dt;
351 -- End If;
352 -- If (p_rec.enrt_perd_strt_dt = hr_api.g_date) then
353 -- p_rec.enrt_perd_strt_dt :=
354 -- ben_epe_shd.g_old_rec.enrt_perd_strt_dt;
355 -- End If;
356 If (p_rec.enrt_cvg_strt_dt_rl = hr_api.g_varchar2) then
357 p_rec.enrt_cvg_strt_dt_rl :=
358 ben_epe_shd.g_old_rec.enrt_cvg_strt_dt_rl;
359 End If;
360 -- If (p_rec.rt_strt_dt = hr_api.g_date) then
361 -- p_rec.rt_strt_dt :=
362 -- ben_epe_shd.g_old_rec.rt_strt_dt;
363 -- End If;
364 -- If (p_rec.rt_strt_dt_rl = hr_api.g_varchar2) then
365 -- p_rec.rt_strt_dt_rl :=
366 -- ben_epe_shd.g_old_rec.rt_strt_dt_rl;
367 -- End If;
368 -- If (p_rec.rt_strt_dt_cd = hr_api.g_varchar2) then
369 -- p_rec.rt_strt_dt_cd :=
370 -- ben_epe_shd.g_old_rec.rt_strt_dt_cd;
371 -- End If;
372 If (p_rec.ctfn_rqd_flag = hr_api.g_varchar2) then
373 p_rec.ctfn_rqd_flag :=
374 ben_epe_shd.g_old_rec.ctfn_rqd_flag;
375 End If;
376 If (p_rec.pil_elctbl_chc_popl_id = hr_api.g_number) then
377 p_rec.pil_elctbl_chc_popl_id :=
378 ben_epe_shd.g_old_rec.pil_elctbl_chc_popl_id;
379 End If;
380 If (p_rec.roll_crs_flag = hr_api.g_varchar2) then
381 p_rec.roll_crs_flag :=
382 ben_epe_shd.g_old_rec.roll_crs_flag;
383 End If;
384 If (p_rec.crntly_enrd_flag = hr_api.g_varchar2) then
385 p_rec.crntly_enrd_flag :=
386 ben_epe_shd.g_old_rec.crntly_enrd_flag;
387 End If;
388 If (p_rec.dflt_flag = hr_api.g_varchar2) then
389 p_rec.dflt_flag :=
390 ben_epe_shd.g_old_rec.dflt_flag;
391 End If;
392 If (p_rec.elctbl_flag = hr_api.g_varchar2) then
393 p_rec.elctbl_flag :=
394 ben_epe_shd.g_old_rec.elctbl_flag;
395 End If;
396 If (p_rec.mndtry_flag = hr_api.g_varchar2) then
397 p_rec.mndtry_flag :=
398 ben_epe_shd.g_old_rec.mndtry_flag;
399 End If;
400 If (p_rec.in_pndg_wkflow_flag = hr_api.g_varchar2) then
401 p_rec.in_pndg_wkflow_flag :=
402 ben_epe_shd.g_old_rec.in_pndg_wkflow_flag;
403 End If;
404 -- If (p_rec.dflt_enrt_dt = hr_api.g_date) then
405 -- p_rec.dflt_enrt_dt :=
406 -- ben_epe_shd.g_old_rec.dflt_enrt_dt;
407 -- End If;
408 If (p_rec.dpnt_cvg_strt_dt_cd = hr_api.g_varchar2) then
409 p_rec.dpnt_cvg_strt_dt_cd :=
410 ben_epe_shd.g_old_rec.dpnt_cvg_strt_dt_cd;
411 End If;
412 If (p_rec.dpnt_cvg_strt_dt_rl = hr_api.g_varchar2) then
413 p_rec.dpnt_cvg_strt_dt_rl :=
414 ben_epe_shd.g_old_rec.dpnt_cvg_strt_dt_rl;
415 End If;
416 If (p_rec.enrt_cvg_strt_dt = hr_api.g_date) then
417 p_rec.enrt_cvg_strt_dt :=
418 ben_epe_shd.g_old_rec.enrt_cvg_strt_dt;
419 End If;
420 If (p_rec.alws_dpnt_dsgn_flag = hr_api.g_varchar2) then
421 p_rec.alws_dpnt_dsgn_flag :=
422 ben_epe_shd.g_old_rec.alws_dpnt_dsgn_flag;
423 End If;
424 If (p_rec.dpnt_dsgn_cd = hr_api.g_varchar2) then
425 p_rec.dpnt_dsgn_cd :=
426 ben_epe_shd.g_old_rec.dpnt_dsgn_cd;
427 End If;
431 End If;
428 If (p_rec.ler_chg_dpnt_cvg_cd = hr_api.g_varchar2) then
429 p_rec.ler_chg_dpnt_cvg_cd :=
430 ben_epe_shd.g_old_rec.ler_chg_dpnt_cvg_cd;
432 If (p_rec.erlst_deenrt_dt = hr_api.g_date) then
433 p_rec.erlst_deenrt_dt :=
434 ben_epe_shd.g_old_rec.erlst_deenrt_dt;
435 End If;
436 If (p_rec.procg_end_dt = hr_api.g_date) then
437 p_rec.procg_end_dt :=
438 ben_epe_shd.g_old_rec.procg_end_dt;
439 End If;
440 If (p_rec.comp_lvl_cd = hr_api.g_varchar2) then
441 p_rec.comp_lvl_cd :=
442 ben_epe_shd.g_old_rec.comp_lvl_cd;
443 End If;
444 If (p_rec.pl_id = hr_api.g_number) then
445 p_rec.pl_id :=
446 ben_epe_shd.g_old_rec.pl_id;
447 End If;
448 If (p_rec.oipl_id = hr_api.g_number) then
449 p_rec.oipl_id :=
450 ben_epe_shd.g_old_rec.oipl_id;
451 End If;
452 If (p_rec.pgm_id = hr_api.g_number) then
453 p_rec.pgm_id :=
454 ben_epe_shd.g_old_rec.pgm_id;
455 End If;
456 If (p_rec.plip_id = hr_api.g_number) then
457 p_rec.plip_id :=
458 ben_epe_shd.g_old_rec.plip_id;
459 End If;
460 If (p_rec.ptip_id = hr_api.g_number) then
461 p_rec.ptip_id :=
462 ben_epe_shd.g_old_rec.ptip_id;
463 End If;
464 If (p_rec.pl_typ_id = hr_api.g_number) then
465 p_rec.pl_typ_id :=
466 ben_epe_shd.g_old_rec.pl_typ_id;
467 End If;
468 If (p_rec.oiplip_id = hr_api.g_number) then
469 p_rec.oiplip_id :=
470 ben_epe_shd.g_old_rec.oiplip_id;
471 End If;
472 If (p_rec.cmbn_ptip_id = hr_api.g_number) then
473 p_rec.cmbn_ptip_id :=
474 ben_epe_shd.g_old_rec.cmbn_ptip_id;
475 End If;
476 If (p_rec.cmbn_plip_id = hr_api.g_number) then
477 p_rec.cmbn_plip_id :=
478 ben_epe_shd.g_old_rec.cmbn_plip_id;
479 End If;
480 If (p_rec.cmbn_ptip_opt_id = hr_api.g_number) then
481 p_rec.cmbn_ptip_opt_id :=
482 ben_epe_shd.g_old_rec.cmbn_ptip_opt_id;
483 End If;
484 If (p_rec.assignment_id = hr_api.g_number) then
485 p_rec.assignment_id :=
486 ben_epe_shd.g_old_rec.assignment_id;
487 End If;
488 If (p_rec.spcl_rt_pl_id = hr_api.g_number) then
489 p_rec.spcl_rt_pl_id :=
490 ben_epe_shd.g_old_rec.spcl_rt_pl_id;
491 End If;
492 If (p_rec.spcl_rt_oipl_id = hr_api.g_number) then
493 p_rec.spcl_rt_oipl_id :=
494 ben_epe_shd.g_old_rec.spcl_rt_oipl_id;
495 End If;
496 If (p_rec.must_enrl_anthr_pl_id = hr_api.g_number) then
497 p_rec.must_enrl_anthr_pl_id :=
498 ben_epe_shd.g_old_rec.must_enrl_anthr_pl_id;
499 End If;
500 If (p_rec.int_elig_per_elctbl_chc_id = hr_api.g_number) then
501 p_rec.int_elig_per_elctbl_chc_id :=
502 ben_epe_shd.g_old_rec.int_elig_per_elctbl_chc_id;
503 End If;
504 If (p_rec.prtt_enrt_rslt_id = hr_api.g_number) then
505 p_rec.prtt_enrt_rslt_id :=
506 ben_epe_shd.g_old_rec.prtt_enrt_rslt_id;
507 End If;
508 If (p_rec.bnft_prvdr_pool_id = hr_api.g_number) then
509 p_rec.bnft_prvdr_pool_id :=
510 ben_epe_shd.g_old_rec.bnft_prvdr_pool_id;
511 End If;
512 If (p_rec.per_in_ler_id = hr_api.g_number) then
513 p_rec.per_in_ler_id :=
514 ben_epe_shd.g_old_rec.per_in_ler_id;
515 End If;
516 If (p_rec.yr_perd_id = hr_api.g_number) then
517 p_rec.yr_perd_id :=
518 ben_epe_shd.g_old_rec.yr_perd_id;
519 End If;
520 If (p_rec.auto_enrt_flag = hr_api.g_varchar2) then
521 p_rec.auto_enrt_flag :=
522 ben_epe_shd.g_old_rec.auto_enrt_flag;
523 End If;
524 If (p_rec.business_group_id = hr_api.g_number) then
525 p_rec.business_group_id :=
526 ben_epe_shd.g_old_rec.business_group_id;
527 End If;
528 If (p_rec.pl_ordr_num= hr_api.g_number) then
529 p_rec.pl_ordr_num:=
530 ben_epe_shd.g_old_rec.pl_ordr_num;
531 End If;
532 If (p_rec.plip_ordr_num= hr_api.g_number) then
533 p_rec.plip_ordr_num:=
534 ben_epe_shd.g_old_rec.plip_ordr_num;
535 End If;
536 If (p_rec.ptip_ordr_num= hr_api.g_number) then
537 p_rec.ptip_ordr_num:=
538 ben_epe_shd.g_old_rec.ptip_ordr_num;
539 End If;
540 If (p_rec.oipl_ordr_num= hr_api.g_number) then
541 p_rec.oipl_ordr_num:=
542 ben_epe_shd.g_old_rec.oipl_ordr_num;
543 End If;
544 -- cwb
545 If (p_rec.comments = hr_api.g_varchar2) then
546 p_rec.comments :=
547 ben_epe_shd.g_old_rec.comments;
548 End If;
549 If (p_rec.elig_flag = hr_api.g_varchar2) then
550 p_rec.elig_flag :=
551 ben_epe_shd.g_old_rec.elig_flag;
552 End If;
553 If (p_rec.elig_ovrid_dt = hr_api.g_date) then
554 p_rec.elig_ovrid_dt :=
555 ben_epe_shd.g_old_rec.elig_ovrid_dt;
556 End If;
557 If (p_rec.elig_ovrid_person_id = hr_api.g_number) then
558 p_rec.elig_ovrid_person_id :=
559 ben_epe_shd.g_old_rec.elig_ovrid_person_id;
560 End If;
561 If (p_rec.inelig_rsn_cd = hr_api.g_varchar2) then
562 p_rec.inelig_rsn_cd :=
563 ben_epe_shd.g_old_rec.inelig_rsn_cd;
564 End If;
565 If (p_rec.mgr_ovrid_dt = hr_api.g_date) then
566 p_rec.mgr_ovrid_dt :=
567 ben_epe_shd.g_old_rec.mgr_ovrid_dt;
568 End If;
569 If (p_rec.mgr_ovrid_person_id = hr_api.g_number) then
570 p_rec.mgr_ovrid_person_id :=
571 ben_epe_shd.g_old_rec.mgr_ovrid_person_id;
572 End If;
573 If (p_rec.ws_mgr_id = hr_api.g_number) then
574 p_rec.ws_mgr_id :=
575 ben_epe_shd.g_old_rec.ws_mgr_id;
576 End If;
577 -- cwb
578 If (p_rec.epe_attribute_category = hr_api.g_varchar2) then
579 p_rec.epe_attribute_category :=
580 ben_epe_shd.g_old_rec.epe_attribute_category;
581 End If;
582 If (p_rec.epe_attribute1 = hr_api.g_varchar2) then
586 If (p_rec.epe_attribute2 = hr_api.g_varchar2) then
583 p_rec.epe_attribute1 :=
584 ben_epe_shd.g_old_rec.epe_attribute1;
585 End If;
587 p_rec.epe_attribute2 :=
588 ben_epe_shd.g_old_rec.epe_attribute2;
589 End If;
590 If (p_rec.epe_attribute3 = hr_api.g_varchar2) then
591 p_rec.epe_attribute3 :=
592 ben_epe_shd.g_old_rec.epe_attribute3;
593 End If;
594 If (p_rec.epe_attribute4 = hr_api.g_varchar2) then
595 p_rec.epe_attribute4 :=
596 ben_epe_shd.g_old_rec.epe_attribute4;
597 End If;
598 If (p_rec.epe_attribute5 = hr_api.g_varchar2) then
599 p_rec.epe_attribute5 :=
600 ben_epe_shd.g_old_rec.epe_attribute5;
601 End If;
602 If (p_rec.epe_attribute6 = hr_api.g_varchar2) then
603 p_rec.epe_attribute6 :=
604 ben_epe_shd.g_old_rec.epe_attribute6;
605 End If;
606 If (p_rec.epe_attribute7 = hr_api.g_varchar2) then
607 p_rec.epe_attribute7 :=
608 ben_epe_shd.g_old_rec.epe_attribute7;
609 End If;
610 If (p_rec.epe_attribute8 = hr_api.g_varchar2) then
611 p_rec.epe_attribute8 :=
612 ben_epe_shd.g_old_rec.epe_attribute8;
613 End If;
614 If (p_rec.epe_attribute9 = hr_api.g_varchar2) then
615 p_rec.epe_attribute9 :=
616 ben_epe_shd.g_old_rec.epe_attribute9;
617 End If;
618 If (p_rec.epe_attribute10 = hr_api.g_varchar2) then
619 p_rec.epe_attribute10 :=
620 ben_epe_shd.g_old_rec.epe_attribute10;
621 End If;
622 If (p_rec.epe_attribute11 = hr_api.g_varchar2) then
623 p_rec.epe_attribute11 :=
624 ben_epe_shd.g_old_rec.epe_attribute11;
625 End If;
626 If (p_rec.epe_attribute12 = hr_api.g_varchar2) then
627 p_rec.epe_attribute12 :=
628 ben_epe_shd.g_old_rec.epe_attribute12;
629 End If;
630 If (p_rec.epe_attribute13 = hr_api.g_varchar2) then
631 p_rec.epe_attribute13 :=
632 ben_epe_shd.g_old_rec.epe_attribute13;
633 End If;
634 If (p_rec.epe_attribute14 = hr_api.g_varchar2) then
635 p_rec.epe_attribute14 :=
636 ben_epe_shd.g_old_rec.epe_attribute14;
637 End If;
638 If (p_rec.epe_attribute15 = hr_api.g_varchar2) then
639 p_rec.epe_attribute15 :=
640 ben_epe_shd.g_old_rec.epe_attribute15;
641 End If;
642 If (p_rec.epe_attribute16 = hr_api.g_varchar2) then
643 p_rec.epe_attribute16 :=
644 ben_epe_shd.g_old_rec.epe_attribute16;
645 End If;
646 If (p_rec.epe_attribute17 = hr_api.g_varchar2) then
647 p_rec.epe_attribute17 :=
648 ben_epe_shd.g_old_rec.epe_attribute17;
649 End If;
650 If (p_rec.epe_attribute18 = hr_api.g_varchar2) then
651 p_rec.epe_attribute18 :=
652 ben_epe_shd.g_old_rec.epe_attribute18;
653 End If;
654 If (p_rec.epe_attribute19 = hr_api.g_varchar2) then
655 p_rec.epe_attribute19 :=
656 ben_epe_shd.g_old_rec.epe_attribute19;
657 End If;
658 If (p_rec.epe_attribute20 = hr_api.g_varchar2) then
659 p_rec.epe_attribute20 :=
660 ben_epe_shd.g_old_rec.epe_attribute20;
661 End If;
662 If (p_rec.epe_attribute21 = hr_api.g_varchar2) then
663 p_rec.epe_attribute21 :=
664 ben_epe_shd.g_old_rec.epe_attribute21;
665 End If;
666 If (p_rec.epe_attribute22 = hr_api.g_varchar2) then
667 p_rec.epe_attribute22 :=
668 ben_epe_shd.g_old_rec.epe_attribute22;
669 End If;
670 If (p_rec.epe_attribute23 = hr_api.g_varchar2) then
671 p_rec.epe_attribute23 :=
672 ben_epe_shd.g_old_rec.epe_attribute23;
673 End If;
674 If (p_rec.epe_attribute24 = hr_api.g_varchar2) then
675 p_rec.epe_attribute24 :=
676 ben_epe_shd.g_old_rec.epe_attribute24;
677 End If;
678 If (p_rec.epe_attribute25 = hr_api.g_varchar2) then
679 p_rec.epe_attribute25 :=
680 ben_epe_shd.g_old_rec.epe_attribute25;
681 End If;
682 If (p_rec.epe_attribute26 = hr_api.g_varchar2) then
683 p_rec.epe_attribute26 :=
684 ben_epe_shd.g_old_rec.epe_attribute26;
685 End If;
686 If (p_rec.epe_attribute27 = hr_api.g_varchar2) then
687 p_rec.epe_attribute27 :=
688 ben_epe_shd.g_old_rec.epe_attribute27;
689 End If;
690 If (p_rec.epe_attribute28 = hr_api.g_varchar2) then
691 p_rec.epe_attribute28 :=
692 ben_epe_shd.g_old_rec.epe_attribute28;
693 End If;
694 If (p_rec.epe_attribute29 = hr_api.g_varchar2) then
695 p_rec.epe_attribute29 :=
696 ben_epe_shd.g_old_rec.epe_attribute29;
697 End If;
698 If (p_rec.epe_attribute30 = hr_api.g_varchar2) then
699 p_rec.epe_attribute30 :=
700 ben_epe_shd.g_old_rec.epe_attribute30;
701 End If;
702 If (p_rec.approval_status_cd = hr_api.g_varchar2) then
703 p_rec.approval_status_cd :=
704 ben_epe_shd.g_old_rec.approval_status_cd;
705 End If;
706 If (p_rec.fonm_cvg_strt_dt = hr_api.g_date) then
707 p_rec.fonm_cvg_strt_dt :=
708 ben_epe_shd.g_old_rec.fonm_cvg_strt_dt;
709 End If;
710 If (p_rec.cryfwd_elig_dpnt_cd = hr_api.g_varchar2) then
711 p_rec.cryfwd_elig_dpnt_cd :=
712 ben_epe_shd.g_old_rec.cryfwd_elig_dpnt_cd;
713 End If;
714 If (p_rec.request_id = hr_api.g_number) then
715 p_rec.request_id :=
716 ben_epe_shd.g_old_rec.request_id;
717 End If;
718 If (p_rec.program_application_id = hr_api.g_number) then
719 p_rec.program_application_id :=
720 ben_epe_shd.g_old_rec.program_application_id;
721 End If;
722 If (p_rec.program_id = hr_api.g_number) then
723 p_rec.program_id :=
724 ben_epe_shd.g_old_rec.program_id;
725 End If;
726 If (p_rec.program_update_date = hr_api.g_date) then
727 p_rec.program_update_date :=
728 ben_epe_shd.g_old_rec.program_update_date;
729 End If;
730
731 --
732 hr_utility.set_location(' Leaving:'||l_proc, 10);
736 -- ----------------------------------------------------------------------------
733 --
734 End convert_defs;
735 --
737 -- |---------------------------------< upd >----------------------------------|
738 -- ----------------------------------------------------------------------------
739 Procedure upd
740 (
741 p_effective_date in date,
742 p_rec in out nocopy ben_epe_shd.g_rec_type
743 ) is
744 --
745 l_proc varchar2(72) := g_package||'upd';
746 --
747 Begin
748 hr_utility.set_location('Entering:'||l_proc, 5);
749 --
750 -- We must lock the row which we need to update.
751 --
752 ben_epe_shd.lck
753 (
754 p_rec.elig_per_elctbl_chc_id,
755 p_rec.object_version_number
756 );
757 --
758 -- 1. During an update system defaults are used to determine if
759 -- arguments have been defaulted or not. We must therefore
760 -- derive the full record structure values to be updated.
761 --
762 -- 2. Call the supporting update validate operations.
763 --
764 convert_defs(p_rec);
765 ben_epe_bus.update_validate(p_rec,p_effective_date);
766 --
767 -- Call the supporting pre-update operation
768 --
769 pre_update(p_rec);
770 --
771 -- Update the row.
772 --
773 update_dml(p_rec);
774 --
775 -- Call the supporting post-update operation
776 --
777 post_update(p_rec);
778 End upd;
779 --
780 -- ----------------------------------------------------------------------------
781 -- |---------------------------------< upd >----------------------------------|
782 -- ----------------------------------------------------------------------------
783 Procedure upd
784 (
785 p_effective_date in date,
786 p_elig_per_elctbl_chc_id in number,
787 -- p_enrt_typ_cycl_cd in varchar2 default hr_api.g_varchar2,
788 p_enrt_cvg_strt_dt_cd in varchar2 default hr_api.g_varchar2,
789 -- p_enrt_perd_end_dt in date default hr_api.g_date,
790 -- p_enrt_perd_strt_dt in date default hr_api.g_date,
791 p_enrt_cvg_strt_dt_rl in varchar2 default hr_api.g_varchar2,
792 -- p_rt_strt_dt in date default hr_api.g_date,
793 -- p_rt_strt_dt_rl in varchar2 default hr_api.g_varchar2,
794 -- p_rt_strt_dt_cd in varchar2 default hr_api.g_varchar2,
795 p_ctfn_rqd_flag in varchar2 default hr_api.g_varchar2,
796 p_pil_elctbl_chc_popl_id in number default hr_api.g_number,
797 p_roll_crs_flag in varchar2 default hr_api.g_varchar2,
798 p_crntly_enrd_flag in varchar2 default hr_api.g_varchar2,
799 p_dflt_flag in varchar2 default hr_api.g_varchar2,
800 p_elctbl_flag in varchar2 default hr_api.g_varchar2,
801 p_mndtry_flag in varchar2 default hr_api.g_varchar2,
802 p_in_pndg_wkflow_flag in varchar2 default hr_api.g_varchar2,
803 -- p_dflt_enrt_dt in date default hr_api.g_date,
804 p_dpnt_cvg_strt_dt_cd in varchar2 default hr_api.g_varchar2,
805 p_dpnt_cvg_strt_dt_rl in varchar2 default hr_api.g_varchar2,
806 p_enrt_cvg_strt_dt in date default hr_api.g_date,
807 p_alws_dpnt_dsgn_flag in varchar2 default hr_api.g_varchar2,
808 p_dpnt_dsgn_cd in varchar2 default hr_api.g_varchar2,
809 p_ler_chg_dpnt_cvg_cd in varchar2 default hr_api.g_varchar2,
810 p_erlst_deenrt_dt in date default hr_api.g_date,
811 p_procg_end_dt in date default hr_api.g_date,
812 p_comp_lvl_cd in varchar2 default hr_api.g_varchar2,
813 p_pl_id in number default hr_api.g_number,
814 p_oipl_id in number default hr_api.g_number,
815 p_pgm_id in number default hr_api.g_number,
816 p_plip_id in number default hr_api.g_number,
817 p_ptip_id in number default hr_api.g_number,
818 p_pl_typ_id in number default hr_api.g_number,
819 p_oiplip_id in number default hr_api.g_number,
820 p_cmbn_plip_id in number default hr_api.g_number,
821 p_cmbn_ptip_id in number default hr_api.g_number,
822 p_cmbn_ptip_opt_id in number default hr_api.g_number,
823 p_assignment_id in number default hr_api.g_number,
824 p_spcl_rt_pl_id in number default hr_api.g_number,
825 p_spcl_rt_oipl_id in number default hr_api.g_number,
826 p_must_enrl_anthr_pl_id in number default hr_api.g_number,
827 p_int_elig_per_elctbl_chc_id in number default hr_api.g_number,
828 p_prtt_enrt_rslt_id in number default hr_api.g_number,
829 p_bnft_prvdr_pool_id in number default hr_api.g_number,
830 p_per_in_ler_id in number default hr_api.g_number,
831 p_yr_perd_id in number default hr_api.g_number,
832 p_auto_enrt_flag in varchar2 default hr_api.g_varchar2,
833 p_business_group_id in number default hr_api.g_number,
834 p_pl_ordr_num in number default hr_api.g_number,
835 p_plip_ordr_num in number default hr_api.g_number,
836 p_ptip_ordr_num in number default hr_api.g_number,
837 p_oipl_ordr_num in number default hr_api.g_number,
841 p_elig_ovrid_dt in date default hr_api.g_date,
838 -- cwb
839 p_comments in varchar2 default hr_api.g_varchar2,
840 p_elig_flag in varchar2 default hr_api.g_varchar2,
842 p_elig_ovrid_person_id in number default hr_api.g_number,
843 p_inelig_rsn_cd in varchar2 default hr_api.g_varchar2,
844 p_mgr_ovrid_dt in date default hr_api.g_date,
845 p_mgr_ovrid_person_id in number default hr_api.g_number,
846 p_ws_mgr_id in number default hr_api.g_number,
847 -- cwb
848 p_epe_attribute_category in varchar2 default hr_api.g_varchar2,
849 p_epe_attribute1 in varchar2 default hr_api.g_varchar2,
850 p_epe_attribute2 in varchar2 default hr_api.g_varchar2,
851 p_epe_attribute3 in varchar2 default hr_api.g_varchar2,
852 p_epe_attribute4 in varchar2 default hr_api.g_varchar2,
853 p_epe_attribute5 in varchar2 default hr_api.g_varchar2,
854 p_epe_attribute6 in varchar2 default hr_api.g_varchar2,
855 p_epe_attribute7 in varchar2 default hr_api.g_varchar2,
856 p_epe_attribute8 in varchar2 default hr_api.g_varchar2,
857 p_epe_attribute9 in varchar2 default hr_api.g_varchar2,
858 p_epe_attribute10 in varchar2 default hr_api.g_varchar2,
859 p_epe_attribute11 in varchar2 default hr_api.g_varchar2,
860 p_epe_attribute12 in varchar2 default hr_api.g_varchar2,
861 p_epe_attribute13 in varchar2 default hr_api.g_varchar2,
862 p_epe_attribute14 in varchar2 default hr_api.g_varchar2,
863 p_epe_attribute15 in varchar2 default hr_api.g_varchar2,
864 p_epe_attribute16 in varchar2 default hr_api.g_varchar2,
865 p_epe_attribute17 in varchar2 default hr_api.g_varchar2,
866 p_epe_attribute18 in varchar2 default hr_api.g_varchar2,
867 p_epe_attribute19 in varchar2 default hr_api.g_varchar2,
868 p_epe_attribute20 in varchar2 default hr_api.g_varchar2,
869 p_epe_attribute21 in varchar2 default hr_api.g_varchar2,
870 p_epe_attribute22 in varchar2 default hr_api.g_varchar2,
871 p_epe_attribute23 in varchar2 default hr_api.g_varchar2,
872 p_epe_attribute24 in varchar2 default hr_api.g_varchar2,
873 p_epe_attribute25 in varchar2 default hr_api.g_varchar2,
874 p_epe_attribute26 in varchar2 default hr_api.g_varchar2,
875 p_epe_attribute27 in varchar2 default hr_api.g_varchar2,
876 p_epe_attribute28 in varchar2 default hr_api.g_varchar2,
877 p_epe_attribute29 in varchar2 default hr_api.g_varchar2,
878 p_epe_attribute30 in varchar2 default hr_api.g_varchar2,
879 p_approval_status_cd in varchar2 default hr_api.g_varchar2,
880 p_fonm_cvg_strt_dt in date default hr_api.g_date,
881 p_cryfwd_elig_dpnt_cd in varchar2 default hr_api.g_varchar2,
882 p_request_id in number default hr_api.g_number,
883 p_program_application_id in number default hr_api.g_number,
884 p_program_id in number default hr_api.g_number,
885 p_program_update_date in date default hr_api.g_date,
886 p_object_version_number in out nocopy number
887 ) is
888 --
889 l_rec ben_epe_shd.g_rec_type;
890 l_proc varchar2(72) := g_package||'upd';
891 --
892 Begin
893 hr_utility.set_location('Entering:'||l_proc, 5);
894 --
895 -- Call conversion function to turn arguments into the
896 -- l_rec structure.
897 --
898 l_rec :=
899 ben_epe_shd.convert_args
900 (
901 p_elig_per_elctbl_chc_id,
902 -- p_enrt_typ_cycl_cd,
903 p_enrt_cvg_strt_dt_cd,
904 -- p_enrt_perd_end_dt,
905 -- p_enrt_perd_strt_dt,
906 p_enrt_cvg_strt_dt_rl,
907 -- p_rt_strt_dt,
908 -- p_rt_strt_dt_rl,
909 -- p_rt_strt_dt_cd,
910 p_ctfn_rqd_flag,
911 p_pil_elctbl_chc_popl_id,
912 p_roll_crs_flag,
913 p_crntly_enrd_flag,
914 p_dflt_flag,
915 p_elctbl_flag,
916 p_mndtry_flag,
917 p_in_pndg_wkflow_flag,
918 -- p_dflt_enrt_dt,
919 p_dpnt_cvg_strt_dt_cd,
920 p_dpnt_cvg_strt_dt_rl,
921 p_enrt_cvg_strt_dt,
922 p_alws_dpnt_dsgn_flag,
923 p_dpnt_dsgn_cd,
924 p_ler_chg_dpnt_cvg_cd,
925 p_erlst_deenrt_dt,
926 p_procg_end_dt,
927 p_comp_lvl_cd,
928 p_pl_id,
929 p_oipl_id,
930 p_pgm_id,
931 p_plip_id,
932 p_ptip_id,
933 p_pl_typ_id,
934 p_oiplip_id,
935 p_cmbn_plip_id,
936 p_cmbn_ptip_id,
937 p_cmbn_ptip_opt_id,
938 p_assignment_id,
939 p_spcl_rt_pl_id,
940 p_spcl_rt_oipl_id,
941 p_must_enrl_anthr_pl_id,
942 p_int_elig_per_elctbl_chc_id,
943 p_prtt_enrt_rslt_id,
944 p_bnft_prvdr_pool_id,
945 p_per_in_ler_id,
946 p_yr_perd_id,
947 p_auto_enrt_flag,
948 p_business_group_id,
949 p_pl_ordr_num,
950 p_plip_ordr_num,
951 p_ptip_ordr_num,
952 p_oipl_ordr_num,
953 -- cwb
954 p_comments,
955 p_elig_flag,
956 p_elig_ovrid_dt,
957 p_elig_ovrid_person_id,
958 p_inelig_rsn_cd,
959 p_mgr_ovrid_dt,
960 p_mgr_ovrid_person_id,
961 p_ws_mgr_id,
962 -- cwb
963 p_epe_attribute_category,
964 p_epe_attribute1,
965 p_epe_attribute2,
966 p_epe_attribute3,
967 p_epe_attribute4,
968 p_epe_attribute5,
969 p_epe_attribute6,
970 p_epe_attribute7,
971 p_epe_attribute8,
972 p_epe_attribute9,
973 p_epe_attribute10,
974 p_epe_attribute11,
975 p_epe_attribute12,
976 p_epe_attribute13,
977 p_epe_attribute14,
978 p_epe_attribute15,
979 p_epe_attribute16,
980 p_epe_attribute17,
981 p_epe_attribute18,
982 p_epe_attribute19,
983 p_epe_attribute20,
984 p_epe_attribute21,
985 p_epe_attribute22,
986 p_epe_attribute23,
987 p_epe_attribute24,
988 p_epe_attribute25,
989 p_epe_attribute26,
990 p_epe_attribute27,
991 p_epe_attribute28,
992 p_epe_attribute29,
993 p_epe_attribute30,
994 p_approval_status_cd,
995 p_fonm_cvg_strt_dt,
996 p_cryfwd_elig_dpnt_cd,
997 p_request_id,
998 p_program_application_id,
999 p_program_id,
1000 p_program_update_date,
1001 p_object_version_number
1002 );
1003 --
1004 -- Having converted the arguments into the
1005 -- plsql record structure we call the corresponding record
1006 -- business process.
1007 --
1008 upd(p_effective_date,l_rec);
1009 p_object_version_number := l_rec.object_version_number;
1010 --
1011 hr_utility.set_location(' Leaving:'||l_proc, 10);
1012 End upd;
1013 --
1014 end ben_epe_upd;