[Home] [Help]
PACKAGE BODY: APPS.BEN_PEN_UPD
Source
1 Package Body ben_pen_upd as
2 /* $Header: bepenrhi.pkb 120.21.12010000.2 2008/08/05 15:11:10 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pen_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the execution of dml from the datetrack mode
17 -- of CORRECTION only. It is important to note that the object version
18 -- number is only increment by 1 because the datetrack correction is
19 -- soley for one datetracked row.
20 -- This procedure controls the actual dml update logic. The functions of this
21 -- procedure are as follows:
22 -- 1) Get the next object_version_number.
23 -- 2) To set and unset the g_api_dml status as required (as we are about to
24 -- perform dml).
25 -- 3) To update the specified row in the schema using the primary key in
26 -- the predicates.
27 -- 4) To trap any constraint violations that may have occurred.
28 -- 5) To raise any other errors.
29 --
30 -- Prerequisites:
31 -- This is an internal private procedure which must be called from the
32 -- update_dml procedure.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structre.
36 --
37 -- Post Success:
38 -- The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 -- On the update dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- The update 'set' arguments list should be modified if any of your
50 -- attributes are not updateable.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58 (p_rec in out nocopy ben_pen_shd.g_rec_type,
59 p_effective_date in date,
60 p_datetrack_mode in varchar2,
61 p_validation_start_date in date,
62 p_validation_end_date in date) is
63 --
64 l_proc varchar2(72) := g_package||'dt_update_dml';
65 --
66 Begin
67 hr_utility.set_location('Entering:'||l_proc, 5);
68 --
69 If (p_datetrack_mode = 'CORRECTION') then
70 hr_utility.set_location(l_proc, 10);
71 --
72 -- Because we are updating a row we must get the next object
73 -- version number.
74 --
75 p_rec.object_version_number :=
76 dt_api.get_object_version_number
77 (p_base_table_name => 'ben_prtt_enrt_rslt_f',
78 p_base_key_column => 'prtt_enrt_rslt_id',
79 p_base_key_value => p_rec.prtt_enrt_rslt_id);
80 --
81 ben_pen_shd.g_api_dml := true; -- Set the api dml status
82 --
83 -- Update the ben_prtt_enrt_rslt_f Row
84 --
85 update ben_prtt_enrt_rslt_f
86 set
87 prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id,
88 business_group_id = p_rec.business_group_id,
89 oipl_id = p_rec.oipl_id,
90 person_id = p_rec.person_id,
91 assignment_id = p_rec.assignment_id,
92 pgm_id = p_rec.pgm_id,
93 pl_id = p_rec.pl_id,
94 rplcs_sspndd_rslt_id = p_rec.rplcs_sspndd_rslt_id,
95 ptip_id = p_rec.ptip_id,
96 pl_typ_id = p_rec.pl_typ_id,
97 ler_id = p_rec.ler_id,
98 sspndd_flag = p_rec.sspndd_flag,
99 prtt_is_cvrd_flag = p_rec.prtt_is_cvrd_flag,
100 bnft_amt = p_rec.bnft_amt,
101 uom = p_rec.uom ,
102 orgnl_enrt_dt = p_rec.orgnl_enrt_dt,
103 enrt_mthd_cd = p_rec.enrt_mthd_cd,
104 no_lngr_elig_flag = p_rec.no_lngr_elig_flag,
105 enrt_ovridn_flag = p_rec.enrt_ovridn_flag,
106 enrt_ovrid_rsn_cd = p_rec.enrt_ovrid_rsn_cd,
107 erlst_deenrt_dt = p_rec.erlst_deenrt_dt,
108 enrt_cvg_strt_dt = p_rec.enrt_cvg_strt_dt,
109 enrt_cvg_thru_dt = p_rec.enrt_cvg_thru_dt,
110 enrt_ovrid_thru_dt = p_rec.enrt_ovrid_thru_dt,
111 pl_ordr_num = p_rec.pl_ordr_num,
112 plip_ordr_num = p_rec.plip_ordr_num,
113 ptip_ordr_num = p_rec.ptip_ordr_num,
114 oipl_ordr_num = p_rec.oipl_ordr_num,
115 pen_attribute_category = p_rec.pen_attribute_category,
116 pen_attribute1 = p_rec.pen_attribute1,
117 pen_attribute2 = p_rec.pen_attribute2,
118 pen_attribute3 = p_rec.pen_attribute3,
119 pen_attribute4 = p_rec.pen_attribute4,
120 pen_attribute5 = p_rec.pen_attribute5,
121 pen_attribute6 = p_rec.pen_attribute6,
122 pen_attribute7 = p_rec.pen_attribute7,
123 pen_attribute8 = p_rec.pen_attribute8,
124 pen_attribute9 = p_rec.pen_attribute9,
125 pen_attribute10 = p_rec.pen_attribute10,
126 pen_attribute11 = p_rec.pen_attribute11,
127 pen_attribute12 = p_rec.pen_attribute12,
128 pen_attribute13 = p_rec.pen_attribute13,
129 pen_attribute14 = p_rec.pen_attribute14,
130 pen_attribute15 = p_rec.pen_attribute15,
131 pen_attribute16 = p_rec.pen_attribute16,
132 pen_attribute17 = p_rec.pen_attribute17,
133 pen_attribute18 = p_rec.pen_attribute18,
134 pen_attribute19 = p_rec.pen_attribute19,
135 pen_attribute20 = p_rec.pen_attribute20,
136 pen_attribute21 = p_rec.pen_attribute21,
137 pen_attribute22 = p_rec.pen_attribute22,
138 pen_attribute23 = p_rec.pen_attribute23,
139 pen_attribute24 = p_rec.pen_attribute24,
140 pen_attribute25 = p_rec.pen_attribute25,
141 pen_attribute26 = p_rec.pen_attribute26,
142 pen_attribute27 = p_rec.pen_attribute27,
143 pen_attribute28 = p_rec.pen_attribute28,
144 pen_attribute29 = p_rec.pen_attribute29,
145 pen_attribute30 = p_rec.pen_attribute30,
146 request_id = p_rec.request_id,
147 program_application_id = p_rec.program_application_id,
148 program_id = p_rec.program_id,
149 program_update_date = p_rec.program_update_date,
150 object_version_number = p_rec.object_version_number,
151 per_in_ler_id = p_rec.per_in_ler_id,
152 bnft_typ_cd = p_rec.bnft_typ_cd,
153 bnft_ordr_num = p_rec.bnft_ordr_num,
154 prtt_enrt_rslt_stat_cd = p_rec.prtt_enrt_rslt_stat_cd,
155 bnft_nnmntry_uom = p_rec.bnft_nnmntry_uom,
156 comp_lvl_cd = p_rec.comp_lvl_cd
157 where prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id
158 and effective_start_date = p_validation_start_date
159 and effective_end_date = p_validation_end_date;
160 --
161 ben_pen_shd.g_api_dml := false; -- Unset the api dml status
162 --
163 -- Set the effective start and end dates
164 --
165 p_rec.effective_start_date := p_validation_start_date;
166 p_rec.effective_end_date := p_validation_end_date;
167 End If;
168 --
169 hr_utility.set_location(' Leaving:'||l_proc, 15);
170 Exception
171 When hr_api.check_integrity_violated Then
172 -- A check constraint has been violated
173 ben_pen_shd.g_api_dml := false; -- Unset the api dml status
174 ben_pen_shd.constraint_error
175 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
176 When hr_api.unique_integrity_violated Then
177 -- Unique integrity has been violated
178 ben_pen_shd.g_api_dml := false; -- Unset the api dml status
179 ben_pen_shd.constraint_error
180 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
181 When Others Then
182 ben_pen_shd.g_api_dml := false; -- Unset the api dml status
183 Raise;
184 End dt_update_dml;
185 --
186 -- ----------------------------------------------------------------------------
187 -- |------------------------------< update_dml >------------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 -- This procedure calls the dt_update_dml control logic which handles
193 -- the actual datetrack dml.
194 --
195 -- Prerequisites:
196 -- This is an internal private procedure which must be called from the upd
197 -- procedure.
198 --
199 -- In Parameters:
200 -- A Pl/Sql record structre.
201 --
202 -- Post Success:
203 -- Processing contines.
204 --
205 -- Post Failure:
206 -- No specific error handling is required within this procedure.
207 --
208 -- Developer Implementation Notes:
209 -- The update 'set' arguments list should be modified if any of your
210 -- attributes are not updateable.
211 --
212 -- Access Status:
213 -- Internal Row Handler Use Only.
214 --
215 -- {End Of Comments}
216 -- ----------------------------------------------------------------------------
217 Procedure update_dml
218 (p_rec in out nocopy ben_pen_shd.g_rec_type,
219 p_effective_date in date,
220 p_datetrack_mode in varchar2,
221 p_validation_start_date in date,
222 p_validation_end_date in date) is
223 --
224 l_proc varchar2(72) := g_package||'update_dml';
225 --
226 Begin
227 hr_utility.set_location('Entering:'||l_proc, 5);
228 --
229 dt_update_dml(p_rec => p_rec,
230 p_effective_date => p_effective_date,
231 p_datetrack_mode => p_datetrack_mode,
232 p_validation_start_date => p_validation_start_date,
233 p_validation_end_date => p_validation_end_date);
234 --
235 hr_utility.set_location(' Leaving:'||l_proc, 10);
236 End update_dml;
237 --
238 -- ----------------------------------------------------------------------------
239 -- |----------------------------< dt_pre_update >-----------------------------|
240 -- ----------------------------------------------------------------------------
241 -- {Start Of Comments}
242 --
243 -- Description:
244 -- The dt_pre_update procedure controls the execution
245 -- of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
246 -- and UPDATE_CHANGE_INSERT only. The execution required is as
247 -- follows:
248 --
249 -- 1) Providing the datetrack update mode is not 'CORRECTION'
250 -- then set the effective end date of the current row (this
251 -- will be the validation_start_date - 1).
252 -- 2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
253 -- corresponding delete_dml process to delete any future rows
254 -- where the effective_start_date is greater than or equal to
255 -- the validation_start_date.
256 -- 3) Call the insert_dml process to insert the new updated row
257 -- details..
258 --
259 -- Prerequisites:
260 -- This is an internal procedure which is called from the
261 -- pre_update procedure.
262 --
263 -- In Parameters:
264 --
265 -- Post Success:
266 -- Processing continues.
267 --
268 -- Post Failure:
269 -- If an error has occurred, an error message and exception will be raised
270 -- but not handled.
271 --
272 -- Developer Implementation Notes:
273 -- This is an internal procedure which is required by Datetrack. Don't
274 -- remove or modify.
275 --
276 -- Access Status:
277 -- Internal Row Handler Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Procedure dt_pre_update
282 (p_rec in out nocopy ben_pen_shd.g_rec_type,
283 p_effective_date in date,
284 p_datetrack_mode in varchar2,
285 p_validation_start_date in date,
286 p_validation_end_date in date) is
287 --
288 l_proc varchar2(72) := g_package||'dt_pre_update';
289 l_dummy_version_number number;
290 --
291 Begin
292 hr_utility.set_location('Entering:'||l_proc, 5);
293 If (p_datetrack_mode <> 'CORRECTION') then
294 hr_utility.set_location(l_proc, 10);
295 --
296 -- Update the current effective end date
297 --
298 -- 3843657: When PEN record is date-track VOID-ed,
299 -- both the new and old records' prtt_enrt_rslt_stat_cd is set to VOIDD.
300 --
301 if (p_rec.prtt_enrt_rslt_stat_cd = 'VOIDD' /* or
302 p_rec.prtt_enrt_rslt_stat_cd = 'BCKDT' */ ) then
303 --
304 ben_pen_shd.upd_effective_end_date
305 (p_effective_date => p_effective_date,
306 p_base_key_value => p_rec.prtt_enrt_rslt_id,
307 p_new_effective_end_date => (p_validation_start_date - 1),
308 p_validation_start_date => p_validation_start_date,
309 p_validation_end_date => p_validation_end_date,
310 p_prtt_enrt_rslt_stat_cd => p_rec.prtt_enrt_rslt_stat_cd,
311 p_object_version_number => l_dummy_version_number);
312 -- 3843657 Ends
313 --
314 else
315 --
316 ben_pen_shd.upd_effective_end_date
317 (p_effective_date => p_effective_date,
318 p_base_key_value => p_rec.prtt_enrt_rslt_id,
319 p_new_effective_end_date => (p_validation_start_date - 1),
320 p_validation_start_date => p_validation_start_date,
321 p_validation_end_date => p_validation_end_date,
322 p_object_version_number => l_dummy_version_number);
323 --
324 end if;
325 --
326 If (p_datetrack_mode = 'UPDATE_OVERRIDE') then
327 hr_utility.set_location(l_proc, 15);
328 --
329 -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
330 -- delete any future rows
331 --
332 ben_pen_del.delete_dml
333 (p_rec => p_rec,
334 p_effective_date => p_effective_date,
335 p_datetrack_mode => p_datetrack_mode,
336 p_validation_start_date => p_validation_start_date,
337 p_validation_end_date => p_validation_end_date);
338 End If;
339 hr_utility.set_location(l_proc, 20);
340 --
341 -- We must now insert the updated row
342 --
343 ben_pen_ins.insert_dml
344 (p_rec => p_rec,
345 p_effective_date => p_effective_date,
346 p_datetrack_mode => p_datetrack_mode,
347 p_validation_start_date => p_validation_start_date,
348 p_validation_end_date => p_validation_end_date);
349 End If;
350 hr_utility.set_location(' Leaving:'||l_proc, 20);
351 End dt_pre_update;
352 --
353 -- ----------------------------------------------------------------------------
354 -- |------------------------------< pre_update >------------------------------|
355 -- ----------------------------------------------------------------------------
356 -- {Start Of Comments}
357 --
358 -- Description:
359 -- This private procedure contains any processing which is required before
360 -- the update dml.
361 --
362 -- Prerequisites:
363 -- This is an internal procedure which is called from the upd procedure.
364 --
365 -- In Parameters:
366 -- A Pl/Sql record structre.
367 --
368 -- Post Success:
369 -- Processing continues.
370 --
371 -- Post Failure:
372 -- If an error has occurred, an error message and exception will be raised
373 -- but not handled.
374 --
375 -- Developer Implementation Notes:
376 -- Any pre-processing required before the update dml is issued should be
377 -- coded within this procedure. It is important to note that any 3rd party
378 -- maintenance should be reviewed before placing in this procedure. The call
379 -- to the dt_update_dml procedure should NOT be removed.
380 --
381 -- Access Status:
382 -- Internal Row Handler Use Only.
383 --
384 -- {End Of Comments}
385 -- ----------------------------------------------------------------------------
386 Procedure pre_update
387 (p_rec in out nocopy ben_pen_shd.g_rec_type,
388 p_effective_date in date,
389 p_datetrack_mode in varchar2,
390 p_validation_start_date in date,
391 p_validation_end_date in date) is
392 --
393 cursor c1 is
394 select elig_per_elctbl_chc_id, object_version_number
395 from ben_elig_per_elctbl_chc
396 where prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id;
397
398 l_chc_id number := null;
399 l_chc_ovn number := null;
400
401 l_proc varchar2(72) := g_package||'pre_update';
402 l_rowid varchar2(72);
403 l_esd date;
404 l_eed date;
405 --
406 cursor csr_rowid is
407 select rowid, effective_start_date, effective_end_date
408 from ben_prtt_enrt_rslt_f
409 where prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id
410 and p_effective_date between
411 effective_start_date and effective_end_date;
412
413 cursor csr_rowid_u is
414 select rowid
415 from ben_prtt_enrt_rslt_f
416 where prtt_enrt_rslt_id = p_rec.prtt_enrt_rslt_id
417 and p_effective_date -1 between
418 effective_start_date and effective_end_date;
419 --
420 Begin
421 hr_utility.set_location('Entering:'||l_proc, 5);
422
423 if p_rec.enrt_cvg_strt_dt >
424 nvl(p_rec.enrt_cvg_thru_dt, p_rec.enrt_cvg_strt_dt)
425 and NVL(p_rec.prtt_enrt_rslt_stat_cd,'VOIDD') <> 'BCKDT' then -- BUG 4739922 / 5360430
426 p_rec.prtt_enrt_rslt_stat_cd := 'VOIDD';
427 end if;
428
429 if p_rec.prtt_enrt_rslt_stat_cd = 'VOIDD' or
430 p_rec.prtt_enrt_rslt_stat_cd = 'BCKDT' then
431 open c1;
432 fetch c1 into l_chc_id, l_chc_ovn;
433 close c1;
434 if l_chc_id is not null then
435 ben_ELIG_PER_ELC_CHC_api.update_ELIG_PER_ELC_CHC
436 (p_validate => FALSE
437 ,p_elig_per_elctbl_chc_id => l_chc_id
438 ,p_prtt_enrt_rslt_id => NULL
439 ,p_object_version_number => l_chc_ovn
440 ,p_effective_date => p_effective_date
441 );
442 end if;
443 end if;
444
445 dt_pre_update
446 (p_rec => p_rec,
447 p_effective_date => p_effective_date,
448 p_datetrack_mode => p_datetrack_mode,
449 p_validation_start_date => p_validation_start_date,
450 p_validation_end_date => p_validation_end_date);
451 --
452 --
453 if p_datetrack_mode <> 'CORRECTION' then
454 open csr_rowid_u;
455 fetch csr_rowid_u into l_rowid;
456 close csr_rowid_u;
457 l_esd := p_rec.effective_start_date;
458 l_eed := p_rec.effective_end_date;
459 else
460 open csr_rowid;
461 fetch csr_rowid into l_rowid, l_esd, l_eed;
462 close csr_rowid;
463 end if;
464 --
465 hr_utility.set_location(' pen rhi esd:'||p_rec.effective_start_date, 10);
466 hr_utility.set_location(' pen rhi eed:'||p_rec.effective_end_date, 10);
467 hr_utility.set_location(' pen rhi l_esd:'||l_esd, 10);
468 hr_utility.set_location(' pen rhi l_eed:'||l_eed, 10);
469
470 ben_dt_trgr_handle.prtt_enrt_rslt
471 (p_rowid => l_rowid
472 ,p_prtt_enrt_rslt_id => p_rec.prtt_enrt_rslt_id
473 ,p_business_group_id => p_rec.business_group_id
474 ,p_person_id => p_rec.person_id
475 ,p_enrt_cvg_strt_dt => p_rec.enrt_cvg_strt_dt
476 ,p_enrt_cvg_thru_dt => p_rec.enrt_cvg_thru_dt
477 ,p_bnft_amt => p_rec.bnft_amt
478 ,p_effective_start_date => l_esd
479 ,p_effective_end_date => l_eed
480 );
481
482 hr_utility.set_location(' Leaving:'||l_proc, 10);
483 End pre_update;
484 --
485 -- ----------------------------------------------------------------------------
486 -- |-----------------------------< post_update >------------------------------|
487 -- ----------------------------------------------------------------------------
488 -- {Start Of Comments}
489 --
490 -- Description:
491 -- This private procedure contains any processing which is required after the
492 -- update dml.
493 --
494 -- Prerequisites:
495 -- This is an internal procedure which is called from the upd procedure.
496 --
497 -- In Parameters:
498 -- A Pl/Sql record structre.
499 --
500 -- Post Success:
501 -- Processing continues.
502 --
503 -- Post Failure:
504 -- If an error has occurred, an error message and exception will be raised
505 -- but not handled.
506 --
507 -- Developer Implementation Notes:
508 -- Any post-processing required after the update dml is issued should be
509 -- coded within this procedure. It is important to note that any 3rd party
510 -- maintenance should be reviewed before placing in this procedure.
511 --
512 -- Access Status:
513 -- Internal Row Handler Use Only.
514 --
515 -- {End Of Comments}
516 -- ----------------------------------------------------------------------------
517 Procedure post_update
518 (p_rec in ben_pen_shd.g_rec_type,
519 p_effective_date in date,
520 p_datetrack_mode in varchar2,
521 p_validation_start_date in date,
522 p_validation_end_date in date) is
523 --
524 l_proc varchar2(72) := g_package||'post_update';
525 --
526 Begin
527 hr_utility.set_location('Entering:'||l_proc, 5);
528 --
529 --
530 -- Start of API User Hook for post_update.
531 --
532 begin
533 ben_pen_rku.after_update
534 (
535 p_prtt_enrt_rslt_id =>p_rec.prtt_enrt_rslt_id
536 ,p_effective_start_date =>p_rec.effective_start_date
537 ,p_effective_end_date =>p_rec.effective_end_date
538 ,p_business_group_id =>p_rec.business_group_id
539 ,p_oipl_id =>p_rec.oipl_id
540 ,p_person_id =>p_rec.person_id
541 ,p_assignment_id =>p_rec.assignment_id
542 ,p_pgm_id =>p_rec.pgm_id
543 ,p_pl_id =>p_rec.pl_id
544 ,p_rplcs_sspndd_rslt_id =>p_rec.rplcs_sspndd_rslt_id
545 ,p_ptip_id =>p_rec.ptip_id
546 ,p_pl_typ_id =>p_rec.pl_typ_id
547 ,p_ler_id =>p_rec.ler_id
548 ,p_sspndd_flag =>p_rec.sspndd_flag
549 ,p_prtt_is_cvrd_flag =>p_rec.prtt_is_cvrd_flag
550 ,p_bnft_amt =>p_rec.bnft_amt
551 ,p_uom =>p_rec.uom
552 ,p_orgnl_enrt_dt =>p_rec.orgnl_enrt_dt
553 ,p_enrt_mthd_cd =>p_rec.enrt_mthd_cd
554 ,p_no_lngr_elig_flag =>p_rec.no_lngr_elig_flag
555 ,p_enrt_ovridn_flag =>p_rec.enrt_ovridn_flag
556 ,p_enrt_ovrid_rsn_cd =>p_rec.enrt_ovrid_rsn_cd
557 ,p_erlst_deenrt_dt =>p_rec.erlst_deenrt_dt
558 ,p_enrt_cvg_strt_dt =>p_rec.enrt_cvg_strt_dt
559 ,p_enrt_cvg_thru_dt =>p_rec.enrt_cvg_thru_dt
560 ,p_enrt_ovrid_thru_dt =>p_rec.enrt_ovrid_thru_dt
561 ,p_pl_ordr_num =>p_rec.pl_ordr_num
562 ,p_plip_ordr_num =>p_rec.plip_ordr_num
563 ,p_ptip_ordr_num =>p_rec.ptip_ordr_num
564 ,p_oipl_ordr_num =>p_rec.oipl_ordr_num
565 ,p_pen_attribute_category =>p_rec.pen_attribute_category
566 ,p_pen_attribute1 =>p_rec.pen_attribute1
567 ,p_pen_attribute2 =>p_rec.pen_attribute2
568 ,p_pen_attribute3 =>p_rec.pen_attribute3
569 ,p_pen_attribute4 =>p_rec.pen_attribute4
570 ,p_pen_attribute5 =>p_rec.pen_attribute5
571 ,p_pen_attribute6 =>p_rec.pen_attribute6
572 ,p_pen_attribute7 =>p_rec.pen_attribute7
573 ,p_pen_attribute8 =>p_rec.pen_attribute8
574 ,p_pen_attribute9 =>p_rec.pen_attribute9
575 ,p_pen_attribute10 =>p_rec.pen_attribute10
576 ,p_pen_attribute11 =>p_rec.pen_attribute11
577 ,p_pen_attribute12 =>p_rec.pen_attribute12
578 ,p_pen_attribute13 =>p_rec.pen_attribute13
579 ,p_pen_attribute14 =>p_rec.pen_attribute14
580 ,p_pen_attribute15 =>p_rec.pen_attribute15
581 ,p_pen_attribute16 =>p_rec.pen_attribute16
582 ,p_pen_attribute17 =>p_rec.pen_attribute17
583 ,p_pen_attribute18 =>p_rec.pen_attribute18
584 ,p_pen_attribute19 =>p_rec.pen_attribute19
585 ,p_pen_attribute20 =>p_rec.pen_attribute20
586 ,p_pen_attribute21 =>p_rec.pen_attribute21
587 ,p_pen_attribute22 =>p_rec.pen_attribute22
588 ,p_pen_attribute23 =>p_rec.pen_attribute23
589 ,p_pen_attribute24 =>p_rec.pen_attribute24
590 ,p_pen_attribute25 =>p_rec.pen_attribute25
591 ,p_pen_attribute26 =>p_rec.pen_attribute26
592 ,p_pen_attribute27 =>p_rec.pen_attribute27
593 ,p_pen_attribute28 =>p_rec.pen_attribute28
594 ,p_pen_attribute29 =>p_rec.pen_attribute29
595 ,p_pen_attribute30 =>p_rec.pen_attribute30
596 ,p_request_id =>p_rec.request_id
597 ,p_program_application_id =>p_rec.program_application_id
598 ,p_program_id =>p_rec.program_id
599 ,p_program_update_date =>p_rec.program_update_date
600 ,p_object_version_number =>p_rec.object_version_number
601 ,p_per_in_ler_id =>p_rec.per_in_ler_id
602 ,p_bnft_typ_cd =>p_rec.bnft_typ_cd
603 ,p_bnft_ordr_num =>p_rec.bnft_ordr_num
604 ,p_prtt_enrt_rslt_stat_cd =>p_rec.prtt_enrt_rslt_stat_cd
605 ,p_bnft_nnmntry_uom =>p_rec.bnft_nnmntry_uom
606 ,p_comp_lvl_cd =>p_rec.comp_lvl_cd
607 ,p_effective_date =>p_effective_date
608 ,p_datetrack_mode =>p_datetrack_mode
609 ,p_validation_start_date =>p_validation_start_date
610 ,p_validation_end_date =>p_validation_end_date
611 ,p_effective_start_date_o =>ben_pen_shd.g_old_rec.effective_start_date
612 ,p_effective_end_date_o =>ben_pen_shd.g_old_rec.effective_end_date
613 ,p_business_group_id_o =>ben_pen_shd.g_old_rec.business_group_id
614 ,p_oipl_id_o =>ben_pen_shd.g_old_rec.oipl_id
615 ,p_person_id_o =>ben_pen_shd.g_old_rec.person_id
616 ,p_assignment_id_o =>ben_pen_shd.g_old_rec.assignment_id
617 ,p_pgm_id_o =>ben_pen_shd.g_old_rec.pgm_id
618 ,p_pl_id_o =>ben_pen_shd.g_old_rec.pl_id
619 ,p_rplcs_sspndd_rslt_id_o =>ben_pen_shd.g_old_rec.rplcs_sspndd_rslt_id
620 ,p_ptip_id_o =>ben_pen_shd.g_old_rec.ptip_id
621 ,p_pl_typ_id_o =>ben_pen_shd.g_old_rec.pl_typ_id
622 ,p_ler_id_o =>ben_pen_shd.g_old_rec.ler_id
623 ,p_sspndd_flag_o =>ben_pen_shd.g_old_rec.sspndd_flag
624 ,p_prtt_is_cvrd_flag_o =>ben_pen_shd.g_old_rec.prtt_is_cvrd_flag
625 ,p_bnft_amt_o =>ben_pen_shd.g_old_rec.bnft_amt
626 ,p_uom_o =>ben_pen_shd.g_old_rec.uom
627 ,p_orgnl_enrt_dt_o =>ben_pen_shd.g_old_rec.orgnl_enrt_dt
628 ,p_enrt_mthd_cd_o =>ben_pen_shd.g_old_rec.enrt_mthd_cd
629 ,p_no_lngr_elig_flag_o =>ben_pen_shd.g_old_rec.no_lngr_elig_flag
630 ,p_enrt_ovridn_flag_o =>ben_pen_shd.g_old_rec.enrt_ovridn_flag
631 ,p_enrt_ovrid_rsn_cd_o =>ben_pen_shd.g_old_rec.enrt_ovrid_rsn_cd
632 ,p_erlst_deenrt_dt_o =>ben_pen_shd.g_old_rec.erlst_deenrt_dt
633 ,p_enrt_cvg_strt_dt_o =>ben_pen_shd.g_old_rec.enrt_cvg_strt_dt
634 ,p_enrt_cvg_thru_dt_o =>ben_pen_shd.g_old_rec.enrt_cvg_thru_dt
635 ,p_enrt_ovrid_thru_dt_o =>ben_pen_shd.g_old_rec.enrt_ovrid_thru_dt
636 ,p_pl_ordr_num_o =>ben_pen_shd.g_old_rec.pl_ordr_num
637 ,p_plip_ordr_num_o =>ben_pen_shd.g_old_rec.plip_ordr_num
638 ,p_ptip_ordr_num_o =>ben_pen_shd.g_old_rec.ptip_ordr_num
639 ,p_oipl_ordr_num_o =>ben_pen_shd.g_old_rec.oipl_ordr_num
640 ,p_pen_attribute_category_o =>ben_pen_shd.g_old_rec.pen_attribute_category
641 ,p_pen_attribute1_o =>ben_pen_shd.g_old_rec.pen_attribute1
642 ,p_pen_attribute2_o =>ben_pen_shd.g_old_rec.pen_attribute2
643 ,p_pen_attribute3_o =>ben_pen_shd.g_old_rec.pen_attribute3
644 ,p_pen_attribute4_o =>ben_pen_shd.g_old_rec.pen_attribute4
645 ,p_pen_attribute5_o =>ben_pen_shd.g_old_rec.pen_attribute5
646 ,p_pen_attribute6_o =>ben_pen_shd.g_old_rec.pen_attribute6
647 ,p_pen_attribute7_o =>ben_pen_shd.g_old_rec.pen_attribute7
648 ,p_pen_attribute8_o =>ben_pen_shd.g_old_rec.pen_attribute8
649 ,p_pen_attribute9_o =>ben_pen_shd.g_old_rec.pen_attribute9
650 ,p_pen_attribute10_o =>ben_pen_shd.g_old_rec.pen_attribute10
651 ,p_pen_attribute11_o =>ben_pen_shd.g_old_rec.pen_attribute11
652 ,p_pen_attribute12_o =>ben_pen_shd.g_old_rec.pen_attribute12
653 ,p_pen_attribute13_o =>ben_pen_shd.g_old_rec.pen_attribute13
654 ,p_pen_attribute14_o =>ben_pen_shd.g_old_rec.pen_attribute14
655 ,p_pen_attribute15_o =>ben_pen_shd.g_old_rec.pen_attribute15
656 ,p_pen_attribute16_o =>ben_pen_shd.g_old_rec.pen_attribute16
657 ,p_pen_attribute17_o =>ben_pen_shd.g_old_rec.pen_attribute17
658 ,p_pen_attribute18_o =>ben_pen_shd.g_old_rec.pen_attribute18
659 ,p_pen_attribute19_o =>ben_pen_shd.g_old_rec.pen_attribute19
660 ,p_pen_attribute20_o =>ben_pen_shd.g_old_rec.pen_attribute20
661 ,p_pen_attribute21_o =>ben_pen_shd.g_old_rec.pen_attribute21
662 ,p_pen_attribute22_o =>ben_pen_shd.g_old_rec.pen_attribute22
663 ,p_pen_attribute23_o =>ben_pen_shd.g_old_rec.pen_attribute23
664 ,p_pen_attribute24_o =>ben_pen_shd.g_old_rec.pen_attribute24
665 ,p_pen_attribute25_o =>ben_pen_shd.g_old_rec.pen_attribute25
666 ,p_pen_attribute26_o =>ben_pen_shd.g_old_rec.pen_attribute26
667 ,p_pen_attribute27_o =>ben_pen_shd.g_old_rec.pen_attribute27
668 ,p_pen_attribute28_o =>ben_pen_shd.g_old_rec.pen_attribute28
669 ,p_pen_attribute29_o =>ben_pen_shd.g_old_rec.pen_attribute29
670 ,p_pen_attribute30_o =>ben_pen_shd.g_old_rec.pen_attribute30
671 ,p_request_id_o =>ben_pen_shd.g_old_rec.request_id
672 ,p_program_application_id_o =>ben_pen_shd.g_old_rec.program_application_id
673 ,p_program_id_o =>ben_pen_shd.g_old_rec.program_id
674 ,p_program_update_date_o =>ben_pen_shd.g_old_rec.program_update_date
675 ,p_object_version_number_o =>ben_pen_shd.g_old_rec.object_version_number
676 ,p_per_in_ler_id_o =>ben_pen_shd.g_old_rec.per_in_ler_id
677 ,p_bnft_typ_cd_o =>ben_pen_shd.g_old_rec.bnft_typ_cd
678 ,p_bnft_ordr_num_o =>ben_pen_shd.g_old_rec.bnft_ordr_num
679 ,p_prtt_enrt_rslt_stat_cd_o =>ben_pen_shd.g_old_rec.prtt_enrt_rslt_stat_cd
680 ,p_bnft_nnmntry_uom_o =>ben_pen_shd.g_old_rec.bnft_nnmntry_uom
681 ,p_comp_lvl_cd_o =>ben_pen_shd.g_old_rec.comp_lvl_cd
682 );
683
684 exception
685 when hr_api.cannot_find_prog_unit then
686 hr_api.cannot_find_prog_unit_error
687 (p_module_name => 'ben_prtt_enrt_rslt_f'
688 ,p_hook_type => 'AU');
689 end;
690 --
691 -- End of API User Hook for post_update.
692 --
693 --
694 hr_utility.set_location(' Leaving:'||l_proc, 10);
695 End post_update;
696 --
697 -- ----------------------------------------------------------------------------
698 -- |-----------------------------< convert_defs >-----------------------------|
699 -- ----------------------------------------------------------------------------
700 -- {Start Of Comments}
701 --
702 -- Description:
703 -- The Convert_Defs procedure has one very important function:
704 -- It must return the record structure for the row with all system defaulted
705 -- values converted into its corresponding parameter value for update. When
706 -- we attempt to update a row through the Upd process , certain
707 -- parameters can be defaulted which enables flexibility in the calling of
708 -- the upd process (e.g. only attributes which need to be updated need to be
709 -- specified). For the upd process to determine which attributes
710 -- have NOT been specified we need to check if the parameter has a reserved
711 -- system default value. Therefore, for all parameters which have a
712 -- corresponding reserved system default mechanism specified we need to
713 -- check if a system default is being used. If a system default is being
714 -- used then we convert the defaulted value into its corresponding attribute
715 -- value held in the g_old_rec data structure.
716 --
717 -- Prerequisites:
718 -- This private function can only be called from the upd process.
719 --
720 -- In Parameters:
721 -- A Pl/Sql record structre.
722 --
723 -- Post Success:
724 -- The record structure will be returned with all system defaulted parameter
725 -- values converted into its current row attribute value.
726 --
727 -- Post Failure:
728 -- No direct error handling is required within this function. Any possible
729 -- errors within this procedure will be a PL/SQL value error due to
730 -- conversion of datatypes or data lengths.
731 --
732 -- Developer Implementation Notes:
733 -- None.
734 --
735 -- Access Status:
736 -- Internal Row Handler Use Only.
737 --
738 -- {End Of Comments}
739 -- ----------------------------------------------------------------------------
740 Procedure convert_defs(p_rec in out nocopy ben_pen_shd.g_rec_type) is
741 --
742 l_proc varchar2(72) := g_package||'convert_defs';
743 --
744 Begin
745 --
746 hr_utility.set_location('Entering:'||l_proc, 5);
747 --
748 -- We must now examine each argument value in the
749 -- p_rec plsql record structure
750 -- to see if a system default is being used. If a system default
751 -- is being used then we must set to the 'current' argument value.
752 --
753 If (p_rec.business_group_id = hr_api.g_number) then
754 p_rec.business_group_id :=
755 ben_pen_shd.g_old_rec.business_group_id;
756 End If;
757 If (p_rec.oipl_id = hr_api.g_number) then
758 p_rec.oipl_id :=
759 ben_pen_shd.g_old_rec.oipl_id;
760 End If;
761 If (p_rec.person_id = hr_api.g_number) then
762 p_rec.person_id :=
763 ben_pen_shd.g_old_rec.person_id;
764 End If;
765 If (p_rec.assignment_id = hr_api.g_number) then
766 p_rec.assignment_id :=
767 ben_pen_shd.g_old_rec.assignment_id;
768 End If;
769 If (p_rec.pgm_id = hr_api.g_number) then
770 p_rec.pgm_id :=
771 ben_pen_shd.g_old_rec.pgm_id;
772 End If;
773 If (p_rec.pl_id = hr_api.g_number) then
774 p_rec.pl_id :=
775 ben_pen_shd.g_old_rec.pl_id;
776 End If;
777 If (p_rec.rplcs_sspndd_rslt_id = hr_api.g_number) then
778 p_rec.rplcs_sspndd_rslt_id :=
779 ben_pen_shd.g_old_rec.rplcs_sspndd_rslt_id;
780 End If;
781 If (p_rec.ptip_id = hr_api.g_number) then
782 p_rec.ptip_id :=
783 ben_pen_shd.g_old_rec.ptip_id;
784 End If;
785 If (p_rec.pl_typ_id = hr_api.g_number) then
786 p_rec.pl_typ_id :=
787 ben_pen_shd.g_old_rec.pl_typ_id;
788 End If;
789 If (p_rec.ler_id = hr_api.g_number) then
790 p_rec.ler_id :=
791 ben_pen_shd.g_old_rec.ler_id;
792 End If;
793 If (p_rec.sspndd_flag = hr_api.g_varchar2) then
794 p_rec.sspndd_flag :=
795 ben_pen_shd.g_old_rec.sspndd_flag;
796 End If;
797 If (p_rec.prtt_is_cvrd_flag = hr_api.g_varchar2) then
798 p_rec.prtt_is_cvrd_flag :=
799 ben_pen_shd.g_old_rec.prtt_is_cvrd_flag;
800 End If;
801 If (p_rec.bnft_amt = hr_api.g_number) then
802 p_rec.bnft_amt :=
803 ben_pen_shd.g_old_rec.bnft_amt;
804 End If;
805 If (p_rec.uom = hr_api.g_varchar2) then
806 p_rec.uom :=
807 ben_pen_shd.g_old_rec.uom ;
808 End If;
809 If (p_rec.orgnl_enrt_dt = hr_api.g_date) then
810 p_rec.orgnl_enrt_dt :=
811 ben_pen_shd.g_old_rec.orgnl_enrt_dt;
812 End If;
813 If (p_rec.enrt_mthd_cd = hr_api.g_varchar2) then
814 p_rec.enrt_mthd_cd :=
815 ben_pen_shd.g_old_rec.enrt_mthd_cd;
816 End If;
817 If (p_rec.no_lngr_elig_flag = hr_api.g_varchar2) then
818 p_rec.no_lngr_elig_flag :=
819 ben_pen_shd.g_old_rec.no_lngr_elig_flag;
820 End If;
821 If (p_rec.enrt_ovridn_flag = hr_api.g_varchar2) then
822 p_rec.enrt_ovridn_flag :=
823 ben_pen_shd.g_old_rec.enrt_ovridn_flag;
824 End If;
825 If (p_rec.enrt_ovrid_rsn_cd = hr_api.g_varchar2) then
826 p_rec.enrt_ovrid_rsn_cd :=
827 ben_pen_shd.g_old_rec.enrt_ovrid_rsn_cd;
828 End If;
829 If (p_rec.erlst_deenrt_dt = hr_api.g_date) then
830 p_rec.erlst_deenrt_dt :=
831 ben_pen_shd.g_old_rec.erlst_deenrt_dt;
832 End If;
833 If (p_rec.enrt_cvg_strt_dt = hr_api.g_date) then
834 p_rec.enrt_cvg_strt_dt :=
835 ben_pen_shd.g_old_rec.enrt_cvg_strt_dt;
836 End If;
837 If (p_rec.enrt_cvg_thru_dt = hr_api.g_date) then
838 p_rec.enrt_cvg_thru_dt :=
839 ben_pen_shd.g_old_rec.enrt_cvg_thru_dt;
840 End If;
841 If (p_rec.enrt_ovrid_thru_dt = hr_api.g_date) then
842 p_rec.enrt_ovrid_thru_dt :=
843 ben_pen_shd.g_old_rec.enrt_ovrid_thru_dt;
844 End If;
845 If (p_rec.pl_ordr_num = hr_api.g_number) then
846 p_rec.pl_ordr_num :=
847 ben_pen_shd.g_old_rec.pl_ordr_num;
848 End If;
849 If (p_rec.plip_ordr_num = hr_api.g_number) then
850 p_rec.plip_ordr_num :=
851 ben_pen_shd.g_old_rec.plip_ordr_num;
852 End If;
853 If (p_rec.ptip_ordr_num = hr_api.g_number) then
854 p_rec.ptip_ordr_num :=
855 ben_pen_shd.g_old_rec.ptip_ordr_num;
856 End If;
857 If (p_rec.oipl_ordr_num = hr_api.g_number) then
858 p_rec.oipl_ordr_num :=
859 ben_pen_shd.g_old_rec.oipl_ordr_num;
860 End If;
861 If (p_rec.pen_attribute_category = hr_api.g_varchar2) then
862 p_rec.pen_attribute_category :=
863 ben_pen_shd.g_old_rec.pen_attribute_category;
864 End If;
865 If (p_rec.pen_attribute1 = hr_api.g_varchar2) then
866 p_rec.pen_attribute1 :=
867 ben_pen_shd.g_old_rec.pen_attribute1;
868 End If;
869 If (p_rec.pen_attribute2 = hr_api.g_varchar2) then
870 p_rec.pen_attribute2 :=
871 ben_pen_shd.g_old_rec.pen_attribute2;
872 End If;
873 If (p_rec.pen_attribute3 = hr_api.g_varchar2) then
874 p_rec.pen_attribute3 :=
875 ben_pen_shd.g_old_rec.pen_attribute3;
876 End If;
877 If (p_rec.pen_attribute4 = hr_api.g_varchar2) then
878 p_rec.pen_attribute4 :=
879 ben_pen_shd.g_old_rec.pen_attribute4;
880 End If;
881 If (p_rec.pen_attribute5 = hr_api.g_varchar2) then
882 p_rec.pen_attribute5 :=
883 ben_pen_shd.g_old_rec.pen_attribute5;
884 End If;
885 If (p_rec.pen_attribute6 = hr_api.g_varchar2) then
886 p_rec.pen_attribute6 :=
887 ben_pen_shd.g_old_rec.pen_attribute6;
888 End If;
889 If (p_rec.pen_attribute7 = hr_api.g_varchar2) then
890 p_rec.pen_attribute7 :=
891 ben_pen_shd.g_old_rec.pen_attribute7;
892 End If;
893 If (p_rec.pen_attribute8 = hr_api.g_varchar2) then
894 p_rec.pen_attribute8 :=
895 ben_pen_shd.g_old_rec.pen_attribute8;
896 End If;
897 If (p_rec.pen_attribute9 = hr_api.g_varchar2) then
898 p_rec.pen_attribute9 :=
899 ben_pen_shd.g_old_rec.pen_attribute9;
900 End If;
901 If (p_rec.pen_attribute10 = hr_api.g_varchar2) then
902 p_rec.pen_attribute10 :=
903 ben_pen_shd.g_old_rec.pen_attribute10;
904 End If;
905 If (p_rec.pen_attribute11 = hr_api.g_varchar2) then
906 p_rec.pen_attribute11 :=
907 ben_pen_shd.g_old_rec.pen_attribute11;
908 End If;
909 If (p_rec.pen_attribute12 = hr_api.g_varchar2) then
910 p_rec.pen_attribute12 :=
911 ben_pen_shd.g_old_rec.pen_attribute12;
912 End If;
913 If (p_rec.pen_attribute13 = hr_api.g_varchar2) then
914 p_rec.pen_attribute13 :=
915 ben_pen_shd.g_old_rec.pen_attribute13;
916 End If;
917 If (p_rec.pen_attribute14 = hr_api.g_varchar2) then
918 p_rec.pen_attribute14 :=
919 ben_pen_shd.g_old_rec.pen_attribute14;
920 End If;
921 If (p_rec.pen_attribute15 = hr_api.g_varchar2) then
922 p_rec.pen_attribute15 :=
923 ben_pen_shd.g_old_rec.pen_attribute15;
924 End If;
925 If (p_rec.pen_attribute16 = hr_api.g_varchar2) then
926 p_rec.pen_attribute16 :=
927 ben_pen_shd.g_old_rec.pen_attribute16;
928 End If;
929 If (p_rec.pen_attribute17 = hr_api.g_varchar2) then
930 p_rec.pen_attribute17 :=
931 ben_pen_shd.g_old_rec.pen_attribute17;
932 End If;
933 If (p_rec.pen_attribute18 = hr_api.g_varchar2) then
934 p_rec.pen_attribute18 :=
935 ben_pen_shd.g_old_rec.pen_attribute18;
936 End If;
937 If (p_rec.pen_attribute19 = hr_api.g_varchar2) then
938 p_rec.pen_attribute19 :=
939 ben_pen_shd.g_old_rec.pen_attribute19;
940 End If;
941 If (p_rec.pen_attribute20 = hr_api.g_varchar2) then
942 p_rec.pen_attribute20 :=
943 ben_pen_shd.g_old_rec.pen_attribute20;
944 End If;
945 If (p_rec.pen_attribute21 = hr_api.g_varchar2) then
946 p_rec.pen_attribute21 :=
947 ben_pen_shd.g_old_rec.pen_attribute21;
948 End If;
949 If (p_rec.pen_attribute22 = hr_api.g_varchar2) then
950 p_rec.pen_attribute22 :=
951 ben_pen_shd.g_old_rec.pen_attribute22;
952 End If;
953 If (p_rec.pen_attribute23 = hr_api.g_varchar2) then
954 p_rec.pen_attribute23 :=
955 ben_pen_shd.g_old_rec.pen_attribute23;
956 End If;
957 If (p_rec.pen_attribute24 = hr_api.g_varchar2) then
958 p_rec.pen_attribute24 :=
959 ben_pen_shd.g_old_rec.pen_attribute24;
960 End If;
961 If (p_rec.pen_attribute25 = hr_api.g_varchar2) then
962 p_rec.pen_attribute25 :=
963 ben_pen_shd.g_old_rec.pen_attribute25;
964 End If;
965 If (p_rec.pen_attribute26 = hr_api.g_varchar2) then
966 p_rec.pen_attribute26 :=
967 ben_pen_shd.g_old_rec.pen_attribute26;
968 End If;
969 If (p_rec.pen_attribute27 = hr_api.g_varchar2) then
970 p_rec.pen_attribute27 :=
971 ben_pen_shd.g_old_rec.pen_attribute27;
972 End If;
973 If (p_rec.pen_attribute28 = hr_api.g_varchar2) then
974 p_rec.pen_attribute28 :=
975 ben_pen_shd.g_old_rec.pen_attribute28;
976 End If;
977 If (p_rec.pen_attribute29 = hr_api.g_varchar2) then
978 p_rec.pen_attribute29 :=
979 ben_pen_shd.g_old_rec.pen_attribute29;
980 End If;
981 If (p_rec.pen_attribute30 = hr_api.g_varchar2) then
982 p_rec.pen_attribute30 :=
983 ben_pen_shd.g_old_rec.pen_attribute30;
984 End If;
985 If (p_rec.request_id = hr_api.g_number) then
986 p_rec.request_id :=
987 ben_pen_shd.g_old_rec.request_id;
988 End If;
989 If (p_rec.program_application_id = hr_api.g_number) then
990 p_rec.program_application_id :=
991 ben_pen_shd.g_old_rec.program_application_id;
992 End If;
993 If (p_rec.program_id = hr_api.g_number) then
994 p_rec.program_id :=
995 ben_pen_shd.g_old_rec.program_id;
996 End If;
997 If (p_rec.program_update_date = hr_api.g_date) then
998 p_rec.program_update_date :=
999 ben_pen_shd.g_old_rec.program_update_date;
1000 End If;
1001 If (p_rec.per_in_ler_id = hr_api.g_number) then
1002 p_rec.per_in_ler_id :=
1003 ben_pen_shd.g_old_rec.per_in_ler_id;
1004 End If;
1005 If (p_rec.bnft_typ_cd = hr_api.g_varchar2) then
1006 p_rec.bnft_typ_cd :=
1007 ben_pen_shd.g_old_rec.bnft_typ_cd;
1008 End If;
1009 If (p_rec.bnft_ordr_num = hr_api.g_number) then
1010 p_rec.bnft_ordr_num :=
1011 ben_pen_shd.g_old_rec.bnft_ordr_num;
1012 End If;
1013 If (p_rec.prtt_enrt_rslt_stat_cd = hr_api.g_varchar2) then
1014 p_rec.prtt_enrt_rslt_stat_cd :=
1015 ben_pen_shd.g_old_rec.prtt_enrt_rslt_stat_cd;
1016 End If;
1017 If (p_rec.bnft_nnmntry_uom = hr_api.g_varchar2) then
1018 p_rec.bnft_nnmntry_uom :=
1019 ben_pen_shd.g_old_rec.bnft_nnmntry_uom;
1020 End If;
1021 If (p_rec.comp_lvl_cd = hr_api.g_varchar2) then
1022 p_rec.comp_lvl_cd :=
1023 ben_pen_shd.g_old_rec.comp_lvl_cd;
1024 End If;
1025
1026 --
1027 hr_utility.set_location(' Leaving:'||l_proc, 10);
1028 --
1029 End convert_defs;
1030 --
1031 -- ----------------------------------------------------------------------------
1032 -- |---------------------------------< upd >----------------------------------|
1033 -- ----------------------------------------------------------------------------
1034 Procedure upd
1035 (
1036 p_rec in out nocopy ben_pen_shd.g_rec_type,
1037 p_effective_date in date,
1038 p_datetrack_mode in varchar2
1039 ) is
1040 --
1041 l_proc varchar2(72) := g_package||'upd';
1042 l_validation_start_date date;
1043 l_validation_end_date date;
1044 --
1045 Begin
1046 hr_utility.set_location('Entering:'||l_proc, 5);
1047 --
1048 -- Ensure that the DateTrack update mode is valid
1049 --
1050 dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
1051 --
1052 -- We must lock the row which we need to update.
1053 --
1054 ben_pen_shd.lck
1055 (p_effective_date => p_effective_date,
1056 p_datetrack_mode => p_datetrack_mode,
1057 p_prtt_enrt_rslt_id => p_rec.prtt_enrt_rslt_id,
1058 p_object_version_number => p_rec.object_version_number,
1059 p_validation_start_date => l_validation_start_date,
1060 p_validation_end_date => l_validation_end_date);
1061 --
1062 -- 1. During an update system defaults are used to determine if
1063 -- arguments have been defaulted or not. We must therefore
1064 -- derive the full record structure values to be updated.
1065 --
1066 -- 2. Call the supporting update validate operations.
1067 --
1068 convert_defs(p_rec);
1069 ben_pen_bus.update_validate
1070 (p_rec => p_rec,
1071 p_effective_date => p_effective_date,
1072 p_datetrack_mode => p_datetrack_mode,
1073 p_validation_start_date => l_validation_start_date,
1074 p_validation_end_date => l_validation_end_date);
1075 --
1076 -- Call the supporting pre-update operation
1077 --
1078 pre_update
1079 (p_rec => p_rec,
1080 p_effective_date => p_effective_date,
1081 p_datetrack_mode => p_datetrack_mode,
1082 p_validation_start_date => l_validation_start_date,
1083 p_validation_end_date => l_validation_end_date);
1084 --
1085 -- Update the row.
1086 --
1087 update_dml
1088 (p_rec => p_rec,
1089 p_effective_date => p_effective_date,
1090 p_datetrack_mode => p_datetrack_mode,
1091 p_validation_start_date => l_validation_start_date,
1092 p_validation_end_date => l_validation_end_date);
1093 --
1094 -- Call Multi_rows_Edit validation
1095 --
1096 if (ben_prtt_enrt_result_api.g_multi_rows_validate) then
1097 ben_pen_bus.multi_rows_edit
1098 (p_person_id => p_rec.person_id,
1099 p_effective_date => p_effective_date,
1100 p_business_group_id => p_rec.business_group_id,
1101 p_pgm_id => p_rec.pgm_id
1102 );
1103 end if;
1104 --
1105 -- Call the supporting post-update operation
1106 --
1107 post_update
1108 (p_rec => p_rec,
1109 p_effective_date => p_effective_date,
1110 p_datetrack_mode => p_datetrack_mode,
1111 p_validation_start_date => l_validation_start_date,
1112 p_validation_end_date => l_validation_end_date);
1113
1114 --
1115 -- DBI - Added DBI Event Logging Hooks
1116 /* Commented. Need to uncomment when DBI goes into mainline
1117 5554590 : Enabled DBI logging into mainline */
1118 if HRI_BPL_BEN_UTIL.enable_ben_col_evt_que then
1119 hr_utility.set_location(' Logging PEN update event'||l_proc, 5);
1120 hri_opl_ben_elig_enrl_eq.update_event (
1121 p_rec => p_rec ,
1122 p_effective_date => p_effective_date,
1123 p_datetrack_mode => p_datetrack_mode );
1124 end if;
1125 --
1126 End upd;
1127 --
1128 -- ----------------------------------------------------------------------------
1129 -- |---------------------------------< upd >----------------------------------|
1130 -- ----------------------------------------------------------------------------
1131 Procedure upd
1132 (
1133 p_prtt_enrt_rslt_id in number,
1134 p_effective_start_date out nocopy date,
1135 p_effective_end_date out nocopy date,
1136 p_business_group_id in number default hr_api.g_number,
1137 p_oipl_id in number default hr_api.g_number,
1138 p_person_id in number default hr_api.g_number,
1139 p_assignment_id in number default hr_api.g_number,
1140 p_pgm_id in number default hr_api.g_number,
1141 p_pl_id in number default hr_api.g_number,
1142 p_rplcs_sspndd_rslt_id in number default hr_api.g_number,
1143 p_ptip_id in number default hr_api.g_number,
1144 p_pl_typ_id in number default hr_api.g_number,
1145 p_ler_id in number default hr_api.g_number,
1146 p_sspndd_flag in varchar2 default hr_api.g_varchar2,
1147 p_prtt_is_cvrd_flag in varchar2 default hr_api.g_varchar2,
1148 p_bnft_amt in number default hr_api.g_number,
1149 p_uom in varchar2 default hr_api.g_varchar2,
1150 p_orgnl_enrt_dt in date default hr_api.g_date,
1151 p_enrt_mthd_cd in varchar2 default hr_api.g_varchar2,
1152 p_no_lngr_elig_flag in varchar2 default hr_api.g_varchar2,
1153 p_enrt_ovridn_flag in varchar2 default hr_api.g_varchar2,
1154 p_enrt_ovrid_rsn_cd in varchar2 default hr_api.g_varchar2,
1155 p_erlst_deenrt_dt in date default hr_api.g_date,
1156 p_enrt_cvg_strt_dt in date default hr_api.g_date,
1157 p_enrt_cvg_thru_dt in date default hr_api.g_date,
1158 p_enrt_ovrid_thru_dt in date default hr_api.g_date,
1159 p_pl_ordr_num in number default hr_api.g_number,
1160 p_plip_ordr_num in number default hr_api.g_number,
1161 p_ptip_ordr_num in number default hr_api.g_number,
1162 p_oipl_ordr_num in number default hr_api.g_number,
1163 p_pen_attribute_category in varchar2 default hr_api.g_varchar2,
1164 p_pen_attribute1 in varchar2 default hr_api.g_varchar2,
1165 p_pen_attribute2 in varchar2 default hr_api.g_varchar2,
1166 p_pen_attribute3 in varchar2 default hr_api.g_varchar2,
1167 p_pen_attribute4 in varchar2 default hr_api.g_varchar2,
1168 p_pen_attribute5 in varchar2 default hr_api.g_varchar2,
1169 p_pen_attribute6 in varchar2 default hr_api.g_varchar2,
1170 p_pen_attribute7 in varchar2 default hr_api.g_varchar2,
1171 p_pen_attribute8 in varchar2 default hr_api.g_varchar2,
1172 p_pen_attribute9 in varchar2 default hr_api.g_varchar2,
1173 p_pen_attribute10 in varchar2 default hr_api.g_varchar2,
1174 p_pen_attribute11 in varchar2 default hr_api.g_varchar2,
1175 p_pen_attribute12 in varchar2 default hr_api.g_varchar2,
1176 p_pen_attribute13 in varchar2 default hr_api.g_varchar2,
1177 p_pen_attribute14 in varchar2 default hr_api.g_varchar2,
1178 p_pen_attribute15 in varchar2 default hr_api.g_varchar2,
1179 p_pen_attribute16 in varchar2 default hr_api.g_varchar2,
1180 p_pen_attribute17 in varchar2 default hr_api.g_varchar2,
1181 p_pen_attribute18 in varchar2 default hr_api.g_varchar2,
1182 p_pen_attribute19 in varchar2 default hr_api.g_varchar2,
1183 p_pen_attribute20 in varchar2 default hr_api.g_varchar2,
1184 p_pen_attribute21 in varchar2 default hr_api.g_varchar2,
1185 p_pen_attribute22 in varchar2 default hr_api.g_varchar2,
1186 p_pen_attribute23 in varchar2 default hr_api.g_varchar2,
1187 p_pen_attribute24 in varchar2 default hr_api.g_varchar2,
1188 p_pen_attribute25 in varchar2 default hr_api.g_varchar2,
1189 p_pen_attribute26 in varchar2 default hr_api.g_varchar2,
1190 p_pen_attribute27 in varchar2 default hr_api.g_varchar2,
1191 p_pen_attribute28 in varchar2 default hr_api.g_varchar2,
1192 p_pen_attribute29 in varchar2 default hr_api.g_varchar2,
1193 p_pen_attribute30 in varchar2 default hr_api.g_varchar2,
1194 p_request_id in number default hr_api.g_number,
1195 p_program_application_id in number default hr_api.g_number,
1196 p_program_id in number default hr_api.g_number,
1197 p_program_update_date in date default hr_api.g_date,
1198 p_object_version_number in out nocopy number,
1199 p_per_in_ler_id in number default hr_api.g_number,
1200 p_bnft_typ_cd in varchar2 default hr_api.g_varchar2,
1201 p_bnft_ordr_num in number default hr_api.g_number,
1202 p_prtt_enrt_rslt_stat_cd in varchar2 default hr_api.g_varchar2,
1203 p_bnft_nnmntry_uom in varchar2 default hr_api.g_varchar2,
1204 p_comp_lvl_cd in varchar2 default hr_api.g_varchar2,
1205 p_effective_date in date,
1206 p_datetrack_mode in varchar2
1207 ) is
1208 --
1209 l_rec ben_pen_shd.g_rec_type;
1210 l_proc varchar2(72) := g_package||'upd';
1211 --
1212 Begin
1213 hr_utility.set_location('Entering:'||l_proc, 5);
1214 --
1215 -- Call conversion function to turn arguments into the
1216 -- l_rec structure.
1217 --
1218 l_rec :=
1219 ben_pen_shd.convert_args
1220 (
1221 p_prtt_enrt_rslt_id,
1222 null,
1223 null,
1224 p_business_group_id,
1225 p_oipl_id,
1226 p_person_id,
1227 p_assignment_id,
1228 p_pgm_id,
1229 p_pl_id,
1230 p_rplcs_sspndd_rslt_id,
1231 p_ptip_id,
1232 p_pl_typ_id,
1233 p_ler_id,
1234 p_sspndd_flag,
1235 p_prtt_is_cvrd_flag,
1236 p_bnft_amt,
1237 p_uom ,
1238 p_orgnl_enrt_dt,
1239 p_enrt_mthd_cd,
1240 p_no_lngr_elig_flag,
1241 p_enrt_ovridn_flag,
1242 p_enrt_ovrid_rsn_cd,
1243 p_erlst_deenrt_dt,
1244 p_enrt_cvg_strt_dt,
1245 p_enrt_cvg_thru_dt,
1246 p_enrt_ovrid_thru_dt,
1247 p_pl_ordr_num,
1248 p_plip_ordr_num,
1249 p_ptip_ordr_num,
1250 p_oipl_ordr_num,
1251 p_pen_attribute_category,
1252 p_pen_attribute1,
1253 p_pen_attribute2,
1254 p_pen_attribute3,
1255 p_pen_attribute4,
1256 p_pen_attribute5,
1257 p_pen_attribute6,
1258 p_pen_attribute7,
1259 p_pen_attribute8,
1260 p_pen_attribute9,
1261 p_pen_attribute10,
1262 p_pen_attribute11,
1263 p_pen_attribute12,
1264 p_pen_attribute13,
1265 p_pen_attribute14,
1266 p_pen_attribute15,
1267 p_pen_attribute16,
1268 p_pen_attribute17,
1269 p_pen_attribute18,
1270 p_pen_attribute19,
1271 p_pen_attribute20,
1272 p_pen_attribute21,
1273 p_pen_attribute22,
1274 p_pen_attribute23,
1275 p_pen_attribute24,
1276 p_pen_attribute25,
1277 p_pen_attribute26,
1278 p_pen_attribute27,
1279 p_pen_attribute28,
1280 p_pen_attribute29,
1281 p_pen_attribute30,
1282 p_request_id,
1283 p_program_application_id,
1284 p_program_id,
1285 p_program_update_date,
1286 p_object_version_number,
1287 p_per_in_ler_id,
1288 p_bnft_typ_cd,
1289 p_bnft_ordr_num,
1290 p_prtt_enrt_rslt_stat_cd,
1291 p_bnft_nnmntry_uom,
1292 p_comp_lvl_cd
1293 );
1294 --
1295 -- Having converted the arguments into the
1296 -- plsql record structure we call the corresponding record
1297 -- business process.
1298 --
1299 upd(l_rec, p_effective_date, p_datetrack_mode);
1300 p_object_version_number := l_rec.object_version_number;
1301 p_effective_start_date := l_rec.effective_start_date;
1302 p_effective_end_date := l_rec.effective_end_date;
1303 --
1304 --
1305 hr_utility.set_location(' Leaving:'||l_proc, 10);
1306 End upd;
1307 --
1308 end ben_pen_upd;