1 Package Body ben_pil_upd as
2 /* $Header: bepilrhi.pkb 120.3 2006/09/26 10:56:35 bmanyam noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pil_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_pil_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_pil_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_per_in_ler Row
68 --
69 update ben_per_in_ler
70 set
71 per_in_ler_id = p_rec.per_in_ler_id,
72 per_in_ler_stat_cd = p_rec.per_in_ler_stat_cd,
73 prvs_stat_cd = p_rec.prvs_stat_cd,
74 lf_evt_ocrd_dt = p_rec.lf_evt_ocrd_dt,
75 trgr_table_pk_id = p_rec.trgr_table_pk_id,
76 procd_dt = p_rec.procd_dt,
77 strtd_dt = p_rec.strtd_dt,
78 voidd_dt = p_rec.voidd_dt,
79 bckt_dt = p_rec.bckt_dt,
80 clsd_dt = p_rec.clsd_dt,
81 ntfn_dt = p_rec.ntfn_dt,
82 ptnl_ler_for_per_id = p_rec.ptnl_ler_for_per_id,
83 bckt_per_in_ler_id = p_rec.bckt_per_in_ler_id,
84 ler_id = p_rec.ler_id,
85 person_id = p_rec.person_id,
86 business_group_id = p_rec.business_group_id,
87 ASSIGNMENT_ID = p_rec.ASSIGNMENT_ID,
88 WS_MGR_ID = p_rec.WS_MGR_ID,
89 GROUP_PL_ID = p_rec.GROUP_PL_ID,
90 MGR_OVRID_PERSON_ID = p_rec.MGR_OVRID_PERSON_ID,
91 MGR_OVRID_DT = p_rec.MGR_OVRID_DT,
92 pil_attribute_category = p_rec.pil_attribute_category,
93 pil_attribute1 = p_rec.pil_attribute1,
94 pil_attribute2 = p_rec.pil_attribute2,
95 pil_attribute3 = p_rec.pil_attribute3,
96 pil_attribute4 = p_rec.pil_attribute4,
97 pil_attribute5 = p_rec.pil_attribute5,
98 pil_attribute6 = p_rec.pil_attribute6,
99 pil_attribute7 = p_rec.pil_attribute7,
100 pil_attribute8 = p_rec.pil_attribute8,
101 pil_attribute9 = p_rec.pil_attribute9,
102 pil_attribute10 = p_rec.pil_attribute10,
103 pil_attribute11 = p_rec.pil_attribute11,
104 pil_attribute12 = p_rec.pil_attribute12,
105 pil_attribute13 = p_rec.pil_attribute13,
106 pil_attribute14 = p_rec.pil_attribute14,
107 pil_attribute15 = p_rec.pil_attribute15,
108 pil_attribute16 = p_rec.pil_attribute16,
109 pil_attribute17 = p_rec.pil_attribute17,
110 pil_attribute18 = p_rec.pil_attribute18,
111 pil_attribute19 = p_rec.pil_attribute19,
112 pil_attribute20 = p_rec.pil_attribute20,
113 pil_attribute21 = p_rec.pil_attribute21,
114 pil_attribute22 = p_rec.pil_attribute22,
115 pil_attribute23 = p_rec.pil_attribute23,
116 pil_attribute24 = p_rec.pil_attribute24,
117 pil_attribute25 = p_rec.pil_attribute25,
118 pil_attribute26 = p_rec.pil_attribute26,
119 pil_attribute27 = p_rec.pil_attribute27,
120 pil_attribute28 = p_rec.pil_attribute28,
121 pil_attribute29 = p_rec.pil_attribute29,
122 pil_attribute30 = p_rec.pil_attribute30,
123 request_id = p_rec.request_id,
124 program_application_id = p_rec.program_application_id,
125 program_id = p_rec.program_id,
126 program_update_date = p_rec.program_update_date,
127 object_version_number = p_rec.object_version_number
128 where per_in_ler_id = p_rec.per_in_ler_id;
129 --
130 ben_pil_shd.g_api_dml := false; -- Unset the api dml status
131 --
132 hr_utility.set_location(' Leaving:'||l_proc, 10);
133 --
134 Exception
135 When hr_api.check_integrity_violated Then
136 -- A check constraint has been violated
137 ben_pil_shd.g_api_dml := false; -- Unset the api dml status
138 ben_pil_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
140 When hr_api.parent_integrity_violated Then
141 -- Parent integrity has been violated
142 ben_pil_shd.g_api_dml := false; -- Unset the api dml status
143 ben_pil_shd.constraint_error
144 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
145 When hr_api.unique_integrity_violated Then
146 -- Unique integrity has been violated
147 ben_pil_shd.g_api_dml := false; -- Unset the api dml status
148 ben_pil_shd.constraint_error
149 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
150 When Others Then
151 ben_pil_shd.g_api_dml := false; -- Unset the api dml status
152 Raise;
153 End update_dml;
154 --
155 -- ----------------------------------------------------------------------------
156 -- |------------------------------< pre_update >------------------------------|
157 -- ----------------------------------------------------------------------------
158 -- {Start Of Comments}
159 --
160 -- Description:
161 -- This private procedure contains any processing which is required before
162 -- the update dml.
163 --
164 -- Prerequisites:
165 -- This is an internal procedure which is called from the upd procedure.
166 --
167 -- In Parameters:
168 -- A Pl/Sql record structre.
169 --
170 -- Post Success:
171 -- Processing continues.
172 --
173 -- Post Failure:
174 -- If an error has occurred, an error message and exception will be raised
175 -- but not handled.
176 --
177 -- Developer Implementation Notes:
178 -- Any pre-processing required before the update dml is issued should be
179 -- coded within this procedure. It is important to note that any 3rd party
180 -- maintenance should be reviewed before placing in this procedure.
181 --
182 -- Access Status:
183 -- Internal Row Handler Use Only.
184 --
185 -- {End Of Comments}
186 -- ----------------------------------------------------------------------------
187 Procedure pre_update(p_rec in ben_pil_shd.g_rec_type) is
188 --
189 l_proc varchar2(72) := g_package||'pre_update';
190 --
191 Begin
192 hr_utility.set_location('Entering:'||l_proc, 5);
193 --
194 hr_utility.set_location(' Leaving:'||l_proc, 10);
195 End pre_update;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |-----------------------------< post_update >------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 -- This private procedure contains any processing which is required after the
204 -- update dml.
205 --
206 -- Prerequisites:
207 -- This is an internal procedure which is called from the upd procedure.
208 --
209 -- In Parameters:
210 -- A Pl/Sql record structre.
211 --
212 -- Post Success:
213 -- Processing continues.
214 --
215 -- Post Failure:
216 -- If an error has occurred, an error message and exception will be raised
217 -- but not handled.
218 --
219 -- Developer Implementation Notes:
220 -- Any post-processing required after the update dml is issued should be
221 -- coded within this procedure. It is important to note that any 3rd party
222 -- maintenance should be reviewed before placing in this procedure.
223 --
224 -- Access Status:
225 -- Internal Row Handler Use Only.
226 --
227 -- {End Of Comments}
228 -- ----------------------------------------------------------------------------
229 Procedure post_update(
230 p_effective_date in date,p_rec in ben_pil_shd.g_rec_type) is
231 --
232 l_proc varchar2(72) := g_package||'post_update';
233 --
234 Begin
235 hr_utility.set_location('Entering:'||l_proc, 5);
236 --
237 --
238 -- Start of API User Hook for post_update.
239 --
240 begin
241 --
242 ben_pil_rku.after_update
243 (
244 p_per_in_ler_id =>p_rec.per_in_ler_id
245 ,p_per_in_ler_stat_cd =>p_rec.per_in_ler_stat_cd
246 ,p_prvs_stat_cd =>p_rec.prvs_stat_cd
247 ,p_lf_evt_ocrd_dt =>p_rec.lf_evt_ocrd_dt
248 ,p_trgr_table_pk_id =>p_rec.trgr_table_pk_id
249 ,p_procd_dt =>p_rec.procd_dt
250 ,p_strtd_dt =>p_rec.strtd_dt
251 ,p_voidd_dt =>p_rec.voidd_dt
252 ,p_bckt_dt =>p_rec.bckt_dt
253 ,p_clsd_dt =>p_rec.clsd_dt
254 ,p_ntfn_dt =>p_rec.ntfn_dt
255 ,p_ptnl_ler_for_per_id =>p_rec.ptnl_ler_for_per_id
256 ,p_bckt_per_in_ler_id =>p_rec.bckt_per_in_ler_id
257 ,p_ler_id =>p_rec.ler_id
258 ,p_person_id =>p_rec.person_id
259 ,p_business_group_id =>p_rec.business_group_id
260 ,p_ASSIGNMENT_ID => p_rec.ASSIGNMENT_ID
261 ,p_WS_MGR_ID => p_rec.WS_MGR_ID
262 ,p_GROUP_PL_ID => p_rec.GROUP_PL_ID
263 ,p_MGR_OVRID_PERSON_ID => p_rec.MGR_OVRID_PERSON_ID
264 ,p_MGR_OVRID_DT => p_rec.MGR_OVRID_DT
265 ,p_pil_attribute_category =>p_rec.pil_attribute_category
266 ,p_pil_attribute1 =>p_rec.pil_attribute1
267 ,p_pil_attribute2 =>p_rec.pil_attribute2
268 ,p_pil_attribute3 =>p_rec.pil_attribute3
269 ,p_pil_attribute4 =>p_rec.pil_attribute4
270 ,p_pil_attribute5 =>p_rec.pil_attribute5
271 ,p_pil_attribute6 =>p_rec.pil_attribute6
272 ,p_pil_attribute7 =>p_rec.pil_attribute7
273 ,p_pil_attribute8 =>p_rec.pil_attribute8
274 ,p_pil_attribute9 =>p_rec.pil_attribute9
275 ,p_pil_attribute10 =>p_rec.pil_attribute10
276 ,p_pil_attribute11 =>p_rec.pil_attribute11
277 ,p_pil_attribute12 =>p_rec.pil_attribute12
278 ,p_pil_attribute13 =>p_rec.pil_attribute13
279 ,p_pil_attribute14 =>p_rec.pil_attribute14
280 ,p_pil_attribute15 =>p_rec.pil_attribute15
281 ,p_pil_attribute16 =>p_rec.pil_attribute16
282 ,p_pil_attribute17 =>p_rec.pil_attribute17
283 ,p_pil_attribute18 =>p_rec.pil_attribute18
284 ,p_pil_attribute19 =>p_rec.pil_attribute19
285 ,p_pil_attribute20 =>p_rec.pil_attribute20
286 ,p_pil_attribute21 =>p_rec.pil_attribute21
287 ,p_pil_attribute22 =>p_rec.pil_attribute22
288 ,p_pil_attribute23 =>p_rec.pil_attribute23
289 ,p_pil_attribute24 =>p_rec.pil_attribute24
290 ,p_pil_attribute25 =>p_rec.pil_attribute25
291 ,p_pil_attribute26 =>p_rec.pil_attribute26
292 ,p_pil_attribute27 =>p_rec.pil_attribute27
293 ,p_pil_attribute28 =>p_rec.pil_attribute28
294 ,p_pil_attribute29 =>p_rec.pil_attribute29
295 ,p_pil_attribute30 =>p_rec.pil_attribute30
296 ,p_request_id =>p_rec.request_id
297 ,p_program_application_id =>p_rec.program_application_id
298 ,p_program_id =>p_rec.program_id
299 ,p_program_update_date =>p_rec.program_update_date
300 ,p_object_version_number =>p_rec.object_version_number
301 ,p_effective_date =>p_effective_date
302 ,p_per_in_ler_stat_cd_o =>ben_pil_shd.g_old_rec.per_in_ler_stat_cd
303 ,p_prvs_stat_cd_o =>ben_pil_shd.g_old_rec.prvs_stat_cd
304 ,p_lf_evt_ocrd_dt_o =>ben_pil_shd.g_old_rec.lf_evt_ocrd_dt
305 ,p_trgr_table_pk_id_o =>ben_pil_shd.g_old_rec.trgr_table_pk_id
306 ,p_procd_dt_o =>ben_pil_shd.g_old_rec.procd_dt
307 ,p_strtd_dt_o =>ben_pil_shd.g_old_rec.strtd_dt
308 ,p_voidd_dt_o =>ben_pil_shd.g_old_rec.voidd_dt
309 ,p_bckt_dt_o =>ben_pil_shd.g_old_rec.bckt_dt
310 ,p_clsd_dt_o =>ben_pil_shd.g_old_rec.clsd_dt
311 ,p_ntfn_dt_o =>ben_pil_shd.g_old_rec.ntfn_dt
312 ,p_ptnl_ler_for_per_id_o =>ben_pil_shd.g_old_rec.ptnl_ler_for_per_id
313 ,p_bckt_per_in_ler_id_o =>ben_pil_shd.g_old_rec.bckt_per_in_ler_id
314 ,p_ler_id_o =>ben_pil_shd.g_old_rec.ler_id
315 ,p_person_id_o =>ben_pil_shd.g_old_rec.person_id
316 ,p_business_group_id_o =>ben_pil_shd.g_old_rec.business_group_id
317 ,p_ASSIGNMENT_ID_o => ben_pil_shd.g_old_rec.ASSIGNMENT_ID
318 ,p_WS_MGR_ID_o => ben_pil_shd.g_old_rec.WS_MGR_ID
319 ,p_GROUP_PL_ID_o => ben_pil_shd.g_old_rec.GROUP_PL_ID
320 ,p_MGR_OVRID_PERSON_ID_o => ben_pil_shd.g_old_rec.MGR_OVRID_PERSON_ID
321 ,p_MGR_OVRID_DT_o => ben_pil_shd.g_old_rec.MGR_OVRID_DT
322 ,p_pil_attribute_category_o =>ben_pil_shd.g_old_rec.pil_attribute_category
323 ,p_pil_attribute1_o =>ben_pil_shd.g_old_rec.pil_attribute1
324 ,p_pil_attribute2_o =>ben_pil_shd.g_old_rec.pil_attribute2
325 ,p_pil_attribute3_o =>ben_pil_shd.g_old_rec.pil_attribute3
326 ,p_pil_attribute4_o =>ben_pil_shd.g_old_rec.pil_attribute4
327 ,p_pil_attribute5_o =>ben_pil_shd.g_old_rec.pil_attribute5
328 ,p_pil_attribute6_o =>ben_pil_shd.g_old_rec.pil_attribute6
329 ,p_pil_attribute7_o =>ben_pil_shd.g_old_rec.pil_attribute7
330 ,p_pil_attribute8_o =>ben_pil_shd.g_old_rec.pil_attribute8
331 ,p_pil_attribute9_o =>ben_pil_shd.g_old_rec.pil_attribute9
332 ,p_pil_attribute10_o =>ben_pil_shd.g_old_rec.pil_attribute10
333 ,p_pil_attribute11_o =>ben_pil_shd.g_old_rec.pil_attribute11
334 ,p_pil_attribute12_o =>ben_pil_shd.g_old_rec.pil_attribute12
335 ,p_pil_attribute13_o =>ben_pil_shd.g_old_rec.pil_attribute13
336 ,p_pil_attribute14_o =>ben_pil_shd.g_old_rec.pil_attribute14
337 ,p_pil_attribute15_o =>ben_pil_shd.g_old_rec.pil_attribute15
338 ,p_pil_attribute16_o =>ben_pil_shd.g_old_rec.pil_attribute16
339 ,p_pil_attribute17_o =>ben_pil_shd.g_old_rec.pil_attribute17
340 ,p_pil_attribute18_o =>ben_pil_shd.g_old_rec.pil_attribute18
341 ,p_pil_attribute19_o =>ben_pil_shd.g_old_rec.pil_attribute19
342 ,p_pil_attribute20_o =>ben_pil_shd.g_old_rec.pil_attribute20
343 ,p_pil_attribute21_o =>ben_pil_shd.g_old_rec.pil_attribute21
344 ,p_pil_attribute22_o =>ben_pil_shd.g_old_rec.pil_attribute22
345 ,p_pil_attribute23_o =>ben_pil_shd.g_old_rec.pil_attribute23
346 ,p_pil_attribute24_o =>ben_pil_shd.g_old_rec.pil_attribute24
347 ,p_pil_attribute25_o =>ben_pil_shd.g_old_rec.pil_attribute25
348 ,p_pil_attribute26_o =>ben_pil_shd.g_old_rec.pil_attribute26
349 ,p_pil_attribute27_o =>ben_pil_shd.g_old_rec.pil_attribute27
350 ,p_pil_attribute28_o =>ben_pil_shd.g_old_rec.pil_attribute28
351 ,p_pil_attribute29_o =>ben_pil_shd.g_old_rec.pil_attribute29
352 ,p_pil_attribute30_o =>ben_pil_shd.g_old_rec.pil_attribute30
353 ,p_request_id_o =>ben_pil_shd.g_old_rec.request_id
354 ,p_program_application_id_o =>ben_pil_shd.g_old_rec.program_application_id
355 ,p_program_id_o =>ben_pil_shd.g_old_rec.program_id
356 ,p_program_update_date_o =>ben_pil_shd.g_old_rec.program_update_date
357 ,p_object_version_number_o =>ben_pil_shd.g_old_rec.object_version_number
358 );
359 --
360 exception
361 --
362 when hr_api.cannot_find_prog_unit then
363 --
364 hr_api.cannot_find_prog_unit_error
365 (p_module_name => 'ben_per_in_ler'
366 ,p_hook_type => 'AU');
367 --
368 end;
369 --
370 -- End of API User Hook for post_update.
371 --
372 --
373 hr_utility.set_location(' Leaving:'||l_proc, 10);
374 End post_update;
375 --
376 -- ----------------------------------------------------------------------------
377 -- |-----------------------------< convert_defs >-----------------------------|
378 -- ----------------------------------------------------------------------------
379 -- {Start Of Comments}
380 --
381 -- Description:
382 -- The Convert_Defs procedure has one very important function:
383 -- It must return the record structure for the row with all system defaulted
384 -- values converted into its corresponding parameter value for update. When
385 -- we attempt to update a row through the Upd process , certain
386 -- parameters can be defaulted which enables flexibility in the calling of
387 -- the upd process (e.g. only attributes which need to be updated need to be
388 -- specified). For the upd process to determine which attributes
389 -- have NOT been specified we need to check if the parameter has a reserved
390 -- system default value. Therefore, for all parameters which have a
391 -- corresponding reserved system default mechanism specified we need to
392 -- check if a system default is being used. If a system default is being
393 -- used then we convert the defaulted value into its corresponding attribute
394 -- value held in the g_old_rec data structure.
395 --
396 -- Prerequisites:
397 -- This private function can only be called from the upd process.
398 --
399 -- In Parameters:
400 -- A Pl/Sql record structre.
401 --
402 -- Post Success:
403 -- The record structure will be returned with all system defaulted parameter
404 -- values converted into its current row attribute value.
405 --
406 -- Post Failure:
407 -- No direct error handling is required within this function. Any possible
408 -- errors within this procedure will be a PL/SQL value error due to conversion
409 -- of datatypes or data lengths.
410 --
411 -- Developer Implementation Notes:
412 -- None.
413 --
414 -- Access Status:
415 -- Internal Row Handler Use Only.
416 --
417 -- {End Of Comments}
418 -- ----------------------------------------------------------------------------
419 Procedure convert_defs(p_rec in out nocopy ben_pil_shd.g_rec_type) is
420 --
421 l_proc varchar2(72) := g_package||'convert_defs';
422 --
423 Begin
424 --
425 hr_utility.set_location('Entering:'||l_proc, 5);
426 --
427 -- We must now examine each argument value in the
428 -- p_rec plsql record structure
429 -- to see if a system default is being used. If a system default
430 -- is being used then we must set to the 'current' argument value.
431 --
432 If (p_rec.per_in_ler_stat_cd = hr_api.g_varchar2) then
433 p_rec.per_in_ler_stat_cd :=
434 ben_pil_shd.g_old_rec.per_in_ler_stat_cd;
435 End If;
436 If (p_rec.prvs_stat_cd = hr_api.g_varchar2) then
437 p_rec.prvs_stat_cd :=
438 ben_pil_shd.g_old_rec.prvs_stat_cd ;
439 End If;
440 If (p_rec.lf_evt_ocrd_dt = hr_api.g_date) then
441 p_rec.lf_evt_ocrd_dt :=
442 ben_pil_shd.g_old_rec.lf_evt_ocrd_dt;
443 End If;
444 If (p_rec.trgr_table_pk_id = hr_api.g_number) then
445 p_rec.trgr_table_pk_id :=
446 ben_pil_shd.g_old_rec.trgr_table_pk_id;
447 End If;
448 If (p_rec.procd_dt = hr_api.g_date) then
449 p_rec.procd_dt :=
450 ben_pil_shd.g_old_rec.procd_dt;
451 End If;
452 If (p_rec.strtd_dt = hr_api.g_date) then
453 p_rec.strtd_dt :=
454 ben_pil_shd.g_old_rec.strtd_dt;
455 End If;
456 If (p_rec.voidd_dt = hr_api.g_date) then
457 p_rec.voidd_dt :=
458 ben_pil_shd.g_old_rec.voidd_dt;
459 End If;
460 If (p_rec.bckt_dt = hr_api.g_date) then
461 p_rec.bckt_dt :=
462 ben_pil_shd.g_old_rec.bckt_dt;
463 End If;
464 If (p_rec.clsd_dt = hr_api.g_date) then
465 p_rec.clsd_dt :=
466 ben_pil_shd.g_old_rec.clsd_dt;
467 End If;
468 If (p_rec.ntfn_dt = hr_api.g_date) then
469 p_rec.ntfn_dt :=
470 ben_pil_shd.g_old_rec.ntfn_dt;
471 End If;
472 If (p_rec.ptnl_ler_for_per_id = hr_api.g_number) then
473 p_rec.ptnl_ler_for_per_id :=
474 ben_pil_shd.g_old_rec.ptnl_ler_for_per_id;
475 End If;
476 If (p_rec.bckt_per_in_ler_id = hr_api.g_number) then
477 p_rec.bckt_per_in_ler_id :=
478 ben_pil_shd.g_old_rec.bckt_per_in_ler_id ;
479 End If;
480 If (p_rec.ler_id = hr_api.g_number) then
481 p_rec.ler_id :=
482 ben_pil_shd.g_old_rec.ler_id;
483 End If;
484 If (p_rec.person_id = hr_api.g_number) then
485 p_rec.person_id :=
486 ben_pil_shd.g_old_rec.person_id;
487 End If;
488 If (p_rec.business_group_id = hr_api.g_number) then
489 p_rec.business_group_id :=
490 ben_pil_shd.g_old_rec.business_group_id;
491 End If;
492 If (p_rec.ASSIGNMENT_ID = hr_api.g_number) then
493 p_rec.ASSIGNMENT_ID :=
494 ben_pil_shd.g_old_rec.ASSIGNMENT_ID;
495 End If;
496 If (p_rec.WS_MGR_ID = hr_api.g_number) then
497 p_rec.WS_MGR_ID :=
498 ben_pil_shd.g_old_rec.WS_MGR_ID;
499 End If;
500 If (p_rec.GROUP_PL_ID = hr_api.g_number) then
501 p_rec.GROUP_PL_ID :=
502 ben_pil_shd.g_old_rec.GROUP_PL_ID;
503 End If;
504 If (p_rec.MGR_OVRID_PERSON_ID = hr_api.g_number) then
505 p_rec.MGR_OVRID_PERSON_ID :=
506 ben_pil_shd.g_old_rec.MGR_OVRID_PERSON_ID;
507 End If;
508 If (p_rec.MGR_OVRID_DT = hr_api.g_date) then
509 p_rec.MGR_OVRID_DT :=
510 ben_pil_shd.g_old_rec.MGR_OVRID_DT;
511 End If;
512 If (p_rec.pil_attribute_category = hr_api.g_varchar2) then
513 p_rec.pil_attribute_category :=
514 ben_pil_shd.g_old_rec.pil_attribute_category;
515 End If;
516 If (p_rec.pil_attribute1 = hr_api.g_varchar2) then
517 p_rec.pil_attribute1 :=
518 ben_pil_shd.g_old_rec.pil_attribute1;
519 End If;
520 If (p_rec.pil_attribute2 = hr_api.g_varchar2) then
521 p_rec.pil_attribute2 :=
522 ben_pil_shd.g_old_rec.pil_attribute2;
523 End If;
524 If (p_rec.pil_attribute3 = hr_api.g_varchar2) then
525 p_rec.pil_attribute3 :=
526 ben_pil_shd.g_old_rec.pil_attribute3;
527 End If;
528 If (p_rec.pil_attribute4 = hr_api.g_varchar2) then
529 p_rec.pil_attribute4 :=
530 ben_pil_shd.g_old_rec.pil_attribute4;
531 End If;
532 If (p_rec.pil_attribute5 = hr_api.g_varchar2) then
533 p_rec.pil_attribute5 :=
534 ben_pil_shd.g_old_rec.pil_attribute5;
535 End If;
536 If (p_rec.pil_attribute6 = hr_api.g_varchar2) then
537 p_rec.pil_attribute6 :=
538 ben_pil_shd.g_old_rec.pil_attribute6;
539 End If;
540 If (p_rec.pil_attribute7 = hr_api.g_varchar2) then
541 p_rec.pil_attribute7 :=
542 ben_pil_shd.g_old_rec.pil_attribute7;
543 End If;
544 If (p_rec.pil_attribute8 = hr_api.g_varchar2) then
545 p_rec.pil_attribute8 :=
546 ben_pil_shd.g_old_rec.pil_attribute8;
547 End If;
548 If (p_rec.pil_attribute9 = hr_api.g_varchar2) then
549 p_rec.pil_attribute9 :=
550 ben_pil_shd.g_old_rec.pil_attribute9;
551 End If;
552 If (p_rec.pil_attribute10 = hr_api.g_varchar2) then
553 p_rec.pil_attribute10 :=
554 ben_pil_shd.g_old_rec.pil_attribute10;
555 End If;
556 If (p_rec.pil_attribute11 = hr_api.g_varchar2) then
557 p_rec.pil_attribute11 :=
558 ben_pil_shd.g_old_rec.pil_attribute11;
559 End If;
560 If (p_rec.pil_attribute12 = hr_api.g_varchar2) then
561 p_rec.pil_attribute12 :=
562 ben_pil_shd.g_old_rec.pil_attribute12;
563 End If;
564 If (p_rec.pil_attribute13 = hr_api.g_varchar2) then
565 p_rec.pil_attribute13 :=
566 ben_pil_shd.g_old_rec.pil_attribute13;
567 End If;
568 If (p_rec.pil_attribute14 = hr_api.g_varchar2) then
569 p_rec.pil_attribute14 :=
570 ben_pil_shd.g_old_rec.pil_attribute14;
571 End If;
572 If (p_rec.pil_attribute15 = hr_api.g_varchar2) then
573 p_rec.pil_attribute15 :=
574 ben_pil_shd.g_old_rec.pil_attribute15;
575 End If;
576 If (p_rec.pil_attribute16 = hr_api.g_varchar2) then
577 p_rec.pil_attribute16 :=
578 ben_pil_shd.g_old_rec.pil_attribute16;
579 End If;
580 If (p_rec.pil_attribute17 = hr_api.g_varchar2) then
581 p_rec.pil_attribute17 :=
582 ben_pil_shd.g_old_rec.pil_attribute17;
583 End If;
584 If (p_rec.pil_attribute18 = hr_api.g_varchar2) then
585 p_rec.pil_attribute18 :=
586 ben_pil_shd.g_old_rec.pil_attribute18;
587 End If;
588 If (p_rec.pil_attribute19 = hr_api.g_varchar2) then
589 p_rec.pil_attribute19 :=
590 ben_pil_shd.g_old_rec.pil_attribute19;
591 End If;
592 If (p_rec.pil_attribute20 = hr_api.g_varchar2) then
593 p_rec.pil_attribute20 :=
594 ben_pil_shd.g_old_rec.pil_attribute20;
595 End If;
596 If (p_rec.pil_attribute21 = hr_api.g_varchar2) then
597 p_rec.pil_attribute21 :=
598 ben_pil_shd.g_old_rec.pil_attribute21;
599 End If;
600 If (p_rec.pil_attribute22 = hr_api.g_varchar2) then
601 p_rec.pil_attribute22 :=
602 ben_pil_shd.g_old_rec.pil_attribute22;
603 End If;
604 If (p_rec.pil_attribute23 = hr_api.g_varchar2) then
605 p_rec.pil_attribute23 :=
606 ben_pil_shd.g_old_rec.pil_attribute23;
607 End If;
608 If (p_rec.pil_attribute24 = hr_api.g_varchar2) then
609 p_rec.pil_attribute24 :=
610 ben_pil_shd.g_old_rec.pil_attribute24;
611 End If;
612 If (p_rec.pil_attribute25 = hr_api.g_varchar2) then
613 p_rec.pil_attribute25 :=
614 ben_pil_shd.g_old_rec.pil_attribute25;
615 End If;
616 If (p_rec.pil_attribute26 = hr_api.g_varchar2) then
617 p_rec.pil_attribute26 :=
618 ben_pil_shd.g_old_rec.pil_attribute26;
619 End If;
620 If (p_rec.pil_attribute27 = hr_api.g_varchar2) then
621 p_rec.pil_attribute27 :=
622 ben_pil_shd.g_old_rec.pil_attribute27;
623 End If;
624 If (p_rec.pil_attribute28 = hr_api.g_varchar2) then
625 p_rec.pil_attribute28 :=
626 ben_pil_shd.g_old_rec.pil_attribute28;
627 End If;
628 If (p_rec.pil_attribute29 = hr_api.g_varchar2) then
629 p_rec.pil_attribute29 :=
630 ben_pil_shd.g_old_rec.pil_attribute29;
631 End If;
632 If (p_rec.pil_attribute30 = hr_api.g_varchar2) then
633 p_rec.pil_attribute30 :=
634 ben_pil_shd.g_old_rec.pil_attribute30;
635 End If;
636 If (p_rec.request_id = hr_api.g_number) then
637 p_rec.request_id :=
638 ben_pil_shd.g_old_rec.request_id;
639 End If;
640 If (p_rec.program_application_id = hr_api.g_number) then
641 p_rec.program_application_id :=
642 ben_pil_shd.g_old_rec.program_application_id;
643 End If;
644 If (p_rec.program_id = hr_api.g_number) then
645 p_rec.program_id :=
646 ben_pil_shd.g_old_rec.program_id;
647 End If;
648 If (p_rec.program_update_date = hr_api.g_date) then
649 p_rec.program_update_date :=
650 ben_pil_shd.g_old_rec.program_update_date;
651 End If;
652
653 --
654 hr_utility.set_location(' Leaving:'||l_proc, 10);
655 --
656 End convert_defs;
657 --
658 -- ----------------------------------------------------------------------------
659 -- |---------------------------------< upd >----------------------------------|
660 -- ----------------------------------------------------------------------------
661 Procedure upd
662 (
663 p_effective_date in date,
664 p_rec in out nocopy ben_pil_shd.g_rec_type
665 ) is
666 --
667 l_proc varchar2(72) := g_package||'upd';
668 --
669 Begin
670 hr_utility.set_location('Entering:'||l_proc, 5);
671 --
672 -- We must lock the row which we need to update.
673 --
674 ben_pil_shd.lck
675 (
676 p_rec.per_in_ler_id,
677 p_rec.object_version_number
678 );
679 --
680 -- 1. During an update system defaults are used to determine if
681 -- arguments have been defaulted or not. We must therefore
682 -- derive the full record structure values to be updated.
683 --
684 -- 2. Call the supporting update validate operations.
685 --
686 convert_defs(p_rec);
687 ben_pil_bus.update_validate(p_rec
688 ,p_effective_date);
689 --
690 -- Call the supporting pre-update operation
691 --
692 pre_update(p_rec);
693 --
694 -- Update the row.
695 --
696 update_dml(p_rec);
697 --
698 -- Call the supporting post-update operation
699 --
700 post_update(
701 p_effective_date,p_rec);
702 --
703 -- DBI - Added DBI Event Logging Hooks
704 /* Commented. Need to uncomment when DBI goes into mainline
705 5554590 : Enabled DBI logging into mainline. */
706 if HRI_BPL_BEN_UTIL.enable_ben_col_evt_que then
707 HRI_OPL_BEN_ELCTN_EVNTS_EQ.update_event (p_rec => null ,
708 p_pil_rec => p_rec ,
709 p_called_from => 'PIL' ,
710 p_effective_date => p_effective_date,
711 p_datetrack_mode => 'UPDATE' );
712 end if;
713
714 --
715 End upd;
716 --
717 -- ----------------------------------------------------------------------------
718 -- |---------------------------------< upd >----------------------------------|
719 -- ----------------------------------------------------------------------------
720 Procedure upd
721 (
722 p_effective_date in date,
723 p_per_in_ler_id in number,
724 p_per_in_ler_stat_cd in varchar2 default hr_api.g_varchar2,
725 p_prvs_stat_cd in varchar2 default hr_api.g_varchar2,
726 p_lf_evt_ocrd_dt in date default hr_api.g_date,
727 p_trgr_table_pk_id in number default hr_api.g_number,
728 p_procd_dt in date default hr_api.g_date,
729 p_strtd_dt in date default hr_api.g_date,
730 p_voidd_dt in date default hr_api.g_date,
731 p_bckt_dt in date default hr_api.g_date,
732 p_clsd_dt in date default hr_api.g_date,
733 p_ntfn_dt in date default hr_api.g_date,
734 p_ptnl_ler_for_per_id in number default hr_api.g_number,
735 p_bckt_per_in_ler_id in number default hr_api.g_number,
736 p_ler_id in number default hr_api.g_number,
737 p_person_id in number default hr_api.g_number,
738 p_business_group_id in number default hr_api.g_number,
739 p_ASSIGNMENT_ID in number default hr_api.g_number,
740 p_WS_MGR_ID in number default hr_api.g_number,
741 p_GROUP_PL_ID in number default hr_api.g_number,
742 p_MGR_OVRID_PERSON_ID in number default hr_api.g_number,
743 p_MGR_OVRID_DT in date default hr_api.g_date,
744 p_pil_attribute_category in varchar2 default hr_api.g_varchar2,
745 p_pil_attribute1 in varchar2 default hr_api.g_varchar2,
746 p_pil_attribute2 in varchar2 default hr_api.g_varchar2,
747 p_pil_attribute3 in varchar2 default hr_api.g_varchar2,
748 p_pil_attribute4 in varchar2 default hr_api.g_varchar2,
749 p_pil_attribute5 in varchar2 default hr_api.g_varchar2,
750 p_pil_attribute6 in varchar2 default hr_api.g_varchar2,
751 p_pil_attribute7 in varchar2 default hr_api.g_varchar2,
752 p_pil_attribute8 in varchar2 default hr_api.g_varchar2,
753 p_pil_attribute9 in varchar2 default hr_api.g_varchar2,
754 p_pil_attribute10 in varchar2 default hr_api.g_varchar2,
755 p_pil_attribute11 in varchar2 default hr_api.g_varchar2,
756 p_pil_attribute12 in varchar2 default hr_api.g_varchar2,
757 p_pil_attribute13 in varchar2 default hr_api.g_varchar2,
758 p_pil_attribute14 in varchar2 default hr_api.g_varchar2,
759 p_pil_attribute15 in varchar2 default hr_api.g_varchar2,
760 p_pil_attribute16 in varchar2 default hr_api.g_varchar2,
761 p_pil_attribute17 in varchar2 default hr_api.g_varchar2,
762 p_pil_attribute18 in varchar2 default hr_api.g_varchar2,
763 p_pil_attribute19 in varchar2 default hr_api.g_varchar2,
764 p_pil_attribute20 in varchar2 default hr_api.g_varchar2,
765 p_pil_attribute21 in varchar2 default hr_api.g_varchar2,
766 p_pil_attribute22 in varchar2 default hr_api.g_varchar2,
767 p_pil_attribute23 in varchar2 default hr_api.g_varchar2,
768 p_pil_attribute24 in varchar2 default hr_api.g_varchar2,
769 p_pil_attribute25 in varchar2 default hr_api.g_varchar2,
770 p_pil_attribute26 in varchar2 default hr_api.g_varchar2,
771 p_pil_attribute27 in varchar2 default hr_api.g_varchar2,
772 p_pil_attribute28 in varchar2 default hr_api.g_varchar2,
773 p_pil_attribute29 in varchar2 default hr_api.g_varchar2,
774 p_pil_attribute30 in varchar2 default hr_api.g_varchar2,
775 p_request_id in number default hr_api.g_number,
776 p_program_application_id in number default hr_api.g_number,
777 p_program_id in number default hr_api.g_number,
778 p_program_update_date in date default hr_api.g_date,
779 p_object_version_number in out nocopy number
780 ) is
781 --
782 l_rec ben_pil_shd.g_rec_type;
783 l_proc varchar2(72) := g_package||'upd';
784 --
785 Begin
786 hr_utility.set_location('Entering:'||l_proc, 5);
787 --
788 -- Call conversion function to turn arguments into the
789 -- l_rec structure.
790 --
791 l_rec :=
792 ben_pil_shd.convert_args
793 (
794 p_per_in_ler_id,
795 p_per_in_ler_stat_cd,
796 p_prvs_stat_cd ,
797 p_lf_evt_ocrd_dt,
798 p_trgr_table_pk_id,
799 p_procd_dt,
800 p_strtd_dt,
801 p_voidd_dt,
802 p_bckt_dt,
803 p_clsd_dt,
804 p_ntfn_dt,
805 p_ptnl_ler_for_per_id,
806 p_bckt_per_in_ler_id ,
807 p_ler_id,
808 p_person_id,
809 p_business_group_id,
810 p_ASSIGNMENT_ID,
811 p_WS_MGR_ID,
812 p_GROUP_PL_ID,
813 p_MGR_OVRID_PERSON_ID,
814 p_MGR_OVRID_DT,
815 p_pil_attribute_category,
816 p_pil_attribute1,
817 p_pil_attribute2,
818 p_pil_attribute3,
819 p_pil_attribute4,
820 p_pil_attribute5,
821 p_pil_attribute6,
822 p_pil_attribute7,
823 p_pil_attribute8,
824 p_pil_attribute9,
825 p_pil_attribute10,
826 p_pil_attribute11,
827 p_pil_attribute12,
828 p_pil_attribute13,
829 p_pil_attribute14,
830 p_pil_attribute15,
831 p_pil_attribute16,
832 p_pil_attribute17,
833 p_pil_attribute18,
834 p_pil_attribute19,
835 p_pil_attribute20,
836 p_pil_attribute21,
837 p_pil_attribute22,
838 p_pil_attribute23,
839 p_pil_attribute24,
840 p_pil_attribute25,
841 p_pil_attribute26,
842 p_pil_attribute27,
843 p_pil_attribute28,
844 p_pil_attribute29,
845 p_pil_attribute30,
846 p_request_id,
847 p_program_application_id,
848 p_program_id,
849 p_program_update_date,
850 p_object_version_number
851 );
852 --
853 -- Having converted the arguments into the
854 -- plsql record structure we call the corresponding record
855 -- business process.
856 --
857 upd(
858 p_effective_date,l_rec);
859 p_object_version_number := l_rec.object_version_number;
860 --
861 hr_utility.set_location(' Leaving:'||l_proc, 10);
862 End upd;
863 --
864 end ben_pil_upd;