1 Package Body ben_pff_upd as
2 /* $Header: bepffrhi.pkb 120.0 2005/05/28 10:42:25 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pff_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_pff_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_pff_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_pct_fl_tm_fctr Row
68 --
69 update ben_pct_fl_tm_fctr
70 set
71 pct_fl_tm_fctr_id = p_rec.pct_fl_tm_fctr_id,
72 name = p_rec.name,
73 business_group_id = p_rec.business_group_id,
74 mx_pct_val = p_rec.mx_pct_val,
75 mn_pct_val = p_rec.mn_pct_val,
76 no_mn_pct_val_flag = p_rec.no_mn_pct_val_flag,
77 no_mx_pct_val_flag = p_rec.no_mx_pct_val_flag,
78 use_prmry_asnt_only_flag = p_rec.use_prmry_asnt_only_flag,
79 use_sum_of_all_asnts_flag = p_rec.use_sum_of_all_asnts_flag,
80 rndg_cd = p_rec.rndg_cd,
81 rndg_rl = p_rec.rndg_rl,
82 pff_attribute_category = p_rec.pff_attribute_category,
83 pff_attribute1 = p_rec.pff_attribute1,
84 pff_attribute2 = p_rec.pff_attribute2,
85 pff_attribute3 = p_rec.pff_attribute3,
86 pff_attribute4 = p_rec.pff_attribute4,
87 pff_attribute5 = p_rec.pff_attribute5,
88 pff_attribute6 = p_rec.pff_attribute6,
89 pff_attribute7 = p_rec.pff_attribute7,
90 pff_attribute8 = p_rec.pff_attribute8,
91 pff_attribute9 = p_rec.pff_attribute9,
92 pff_attribute10 = p_rec.pff_attribute10,
93 pff_attribute11 = p_rec.pff_attribute11,
94 pff_attribute12 = p_rec.pff_attribute12,
95 pff_attribute13 = p_rec.pff_attribute13,
96 pff_attribute14 = p_rec.pff_attribute14,
97 pff_attribute15 = p_rec.pff_attribute15,
98 pff_attribute16 = p_rec.pff_attribute16,
99 pff_attribute17 = p_rec.pff_attribute17,
100 pff_attribute18 = p_rec.pff_attribute18,
101 pff_attribute19 = p_rec.pff_attribute19,
102 pff_attribute20 = p_rec.pff_attribute20,
103 pff_attribute21 = p_rec.pff_attribute21,
104 pff_attribute22 = p_rec.pff_attribute22,
105 pff_attribute23 = p_rec.pff_attribute23,
106 pff_attribute24 = p_rec.pff_attribute24,
107 pff_attribute25 = p_rec.pff_attribute25,
108 pff_attribute26 = p_rec.pff_attribute26,
109 pff_attribute27 = p_rec.pff_attribute27,
110 pff_attribute28 = p_rec.pff_attribute28,
111 pff_attribute29 = p_rec.pff_attribute29,
112 pff_attribute30 = p_rec.pff_attribute30,
113 object_version_number = p_rec.object_version_number
114 where pct_fl_tm_fctr_id = p_rec.pct_fl_tm_fctr_id;
115 --
116 ben_pff_shd.g_api_dml := false; -- Unset the api dml status
117 --
118 hr_utility.set_location(' Leaving:'||l_proc, 10);
119 --
120 Exception
121 When hr_api.check_integrity_violated Then
122 -- A check constraint has been violated
123 ben_pff_shd.g_api_dml := false; -- Unset the api dml status
124 ben_pff_shd.constraint_error
125 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126 When hr_api.parent_integrity_violated Then
127 -- Parent integrity has been violated
128 ben_pff_shd.g_api_dml := false; -- Unset the api dml status
129 ben_pff_shd.constraint_error
130 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131 When hr_api.unique_integrity_violated Then
132 -- Unique integrity has been violated
133 ben_pff_shd.g_api_dml := false; -- Unset the api dml status
134 ben_pff_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When Others Then
137 ben_pff_shd.g_api_dml := false; -- Unset the api dml status
138 Raise;
139 End update_dml;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |------------------------------< pre_update >------------------------------|
143 -- ----------------------------------------------------------------------------
144 -- {Start Of Comments}
145 --
146 -- Description:
147 -- This private procedure contains any processing which is required before
148 -- the update dml.
149 --
150 -- Prerequisites:
151 -- This is an internal procedure which is called from the upd procedure.
152 --
153 -- In Parameters:
154 -- A Pl/Sql record structre.
155 --
156 -- Post Success:
157 -- Processing continues.
158 --
159 -- Post Failure:
160 -- If an error has occurred, an error message and exception will be raised
161 -- but not handled.
162 --
163 -- Developer Implementation Notes:
164 -- Any pre-processing required before the update dml is issued should be
165 -- coded within this procedure. It is important to note that any 3rd party
166 -- maintenance should be reviewed before placing in this procedure.
167 --
168 -- Access Status:
169 -- Internal Row Handler Use Only.
170 --
171 -- {End Of Comments}
172 -- ----------------------------------------------------------------------------
173 Procedure pre_update(p_rec in ben_pff_shd.g_rec_type) is
174 --
175 l_proc varchar2(72) := g_package||'pre_update';
176 --
177 Begin
178 hr_utility.set_location('Entering:'||l_proc, 5);
179 --
180 hr_utility.set_location(' Leaving:'||l_proc, 10);
181 End pre_update;
182 --
183 -- ----------------------------------------------------------------------------
184 -- |-----------------------------< post_update >------------------------------|
185 -- ----------------------------------------------------------------------------
186 -- {Start Of Comments}
187 --
188 -- Description:
189 -- This private procedure contains any processing which is required after the
190 -- update dml.
191 --
192 -- Prerequisites:
193 -- This is an internal procedure which is called from the upd procedure.
194 --
195 -- In Parameters:
196 -- A Pl/Sql record structre.
197 --
198 -- Post Success:
199 -- Processing continues.
200 --
201 -- Post Failure:
202 -- If an error has occurred, an error message and exception will be raised
203 -- but not handled.
204 --
205 -- Developer Implementation Notes:
206 -- Any post-processing required after the update dml is issued should be
207 -- coded within this procedure. It is important to note that any 3rd party
208 -- maintenance should be reviewed before placing in this procedure.
209 --
210 -- Access Status:
211 -- Internal Row Handler Use Only.
212 --
213 -- {End Of Comments}
214 -- ----------------------------------------------------------------------------
215 Procedure post_update(
216 p_effective_date in date,p_rec in ben_pff_shd.g_rec_type) is
217 --
218 l_proc varchar2(72) := g_package||'post_update';
219 --
220 Begin
221 hr_utility.set_location('Entering:'||l_proc, 5);
222 --
223 --
224 -- Start of API User Hook for post_update.
225 --
226 begin
227 --
228 ben_pff_rku.after_update
229 (
230 p_pct_fl_tm_fctr_id =>p_rec.pct_fl_tm_fctr_id
231 ,p_name =>p_rec.name
232 ,p_business_group_id =>p_rec.business_group_id
233 ,p_mx_pct_val =>p_rec.mx_pct_val
234 ,p_mn_pct_val =>p_rec.mn_pct_val
235 ,p_no_mn_pct_val_flag =>p_rec.no_mn_pct_val_flag
236 ,p_no_mx_pct_val_flag =>p_rec.no_mx_pct_val_flag
237 ,p_use_prmry_asnt_only_flag =>p_rec.use_prmry_asnt_only_flag
238 ,p_use_sum_of_all_asnts_flag =>p_rec.use_sum_of_all_asnts_flag
239 ,p_rndg_cd =>p_rec.rndg_cd
240 ,p_rndg_rl =>p_rec.rndg_rl
241 ,p_pff_attribute_category =>p_rec.pff_attribute_category
242 ,p_pff_attribute1 =>p_rec.pff_attribute1
243 ,p_pff_attribute2 =>p_rec.pff_attribute2
244 ,p_pff_attribute3 =>p_rec.pff_attribute3
245 ,p_pff_attribute4 =>p_rec.pff_attribute4
246 ,p_pff_attribute5 =>p_rec.pff_attribute5
247 ,p_pff_attribute6 =>p_rec.pff_attribute6
248 ,p_pff_attribute7 =>p_rec.pff_attribute7
249 ,p_pff_attribute8 =>p_rec.pff_attribute8
250 ,p_pff_attribute9 =>p_rec.pff_attribute9
251 ,p_pff_attribute10 =>p_rec.pff_attribute10
252 ,p_pff_attribute11 =>p_rec.pff_attribute11
253 ,p_pff_attribute12 =>p_rec.pff_attribute12
254 ,p_pff_attribute13 =>p_rec.pff_attribute13
255 ,p_pff_attribute14 =>p_rec.pff_attribute14
256 ,p_pff_attribute15 =>p_rec.pff_attribute15
257 ,p_pff_attribute16 =>p_rec.pff_attribute16
258 ,p_pff_attribute17 =>p_rec.pff_attribute17
259 ,p_pff_attribute18 =>p_rec.pff_attribute18
260 ,p_pff_attribute19 =>p_rec.pff_attribute19
261 ,p_pff_attribute20 =>p_rec.pff_attribute20
262 ,p_pff_attribute21 =>p_rec.pff_attribute21
263 ,p_pff_attribute22 =>p_rec.pff_attribute22
264 ,p_pff_attribute23 =>p_rec.pff_attribute23
265 ,p_pff_attribute24 =>p_rec.pff_attribute24
266 ,p_pff_attribute25 =>p_rec.pff_attribute25
267 ,p_pff_attribute26 =>p_rec.pff_attribute26
268 ,p_pff_attribute27 =>p_rec.pff_attribute27
269 ,p_pff_attribute28 =>p_rec.pff_attribute28
270 ,p_pff_attribute29 =>p_rec.pff_attribute29
271 ,p_pff_attribute30 =>p_rec.pff_attribute30
272 ,p_object_version_number =>p_rec.object_version_number
273 ,p_effective_date =>p_effective_date
274 ,p_name_o =>ben_pff_shd.g_old_rec.name
275 ,p_business_group_id_o =>ben_pff_shd.g_old_rec.business_group_id
276 ,p_mx_pct_val_o =>ben_pff_shd.g_old_rec.mx_pct_val
277 ,p_mn_pct_val_o =>ben_pff_shd.g_old_rec.mn_pct_val
278 ,p_no_mn_pct_val_flag_o =>ben_pff_shd.g_old_rec.no_mn_pct_val_flag
279 ,p_no_mx_pct_val_flag_o =>ben_pff_shd.g_old_rec.no_mx_pct_val_flag
280 ,p_use_prmry_asnt_only_flag_o =>ben_pff_shd.g_old_rec.use_prmry_asnt_only_flag
281 ,p_use_sum_of_all_asnts_flag_o =>ben_pff_shd.g_old_rec.use_sum_of_all_asnts_flag
282 ,p_rndg_cd_o =>ben_pff_shd.g_old_rec.rndg_cd
283 ,p_rndg_rl_o =>ben_pff_shd.g_old_rec.rndg_rl
284 ,p_pff_attribute_category_o =>ben_pff_shd.g_old_rec.pff_attribute_category
285 ,p_pff_attribute1_o =>ben_pff_shd.g_old_rec.pff_attribute1
286 ,p_pff_attribute2_o =>ben_pff_shd.g_old_rec.pff_attribute2
287 ,p_pff_attribute3_o =>ben_pff_shd.g_old_rec.pff_attribute3
288 ,p_pff_attribute4_o =>ben_pff_shd.g_old_rec.pff_attribute4
289 ,p_pff_attribute5_o =>ben_pff_shd.g_old_rec.pff_attribute5
290 ,p_pff_attribute6_o =>ben_pff_shd.g_old_rec.pff_attribute6
291 ,p_pff_attribute7_o =>ben_pff_shd.g_old_rec.pff_attribute7
292 ,p_pff_attribute8_o =>ben_pff_shd.g_old_rec.pff_attribute8
293 ,p_pff_attribute9_o =>ben_pff_shd.g_old_rec.pff_attribute9
294 ,p_pff_attribute10_o =>ben_pff_shd.g_old_rec.pff_attribute10
295 ,p_pff_attribute11_o =>ben_pff_shd.g_old_rec.pff_attribute11
296 ,p_pff_attribute12_o =>ben_pff_shd.g_old_rec.pff_attribute12
297 ,p_pff_attribute13_o =>ben_pff_shd.g_old_rec.pff_attribute13
298 ,p_pff_attribute14_o =>ben_pff_shd.g_old_rec.pff_attribute14
299 ,p_pff_attribute15_o =>ben_pff_shd.g_old_rec.pff_attribute15
300 ,p_pff_attribute16_o =>ben_pff_shd.g_old_rec.pff_attribute16
301 ,p_pff_attribute17_o =>ben_pff_shd.g_old_rec.pff_attribute17
302 ,p_pff_attribute18_o =>ben_pff_shd.g_old_rec.pff_attribute18
303 ,p_pff_attribute19_o =>ben_pff_shd.g_old_rec.pff_attribute19
304 ,p_pff_attribute20_o =>ben_pff_shd.g_old_rec.pff_attribute20
305 ,p_pff_attribute21_o =>ben_pff_shd.g_old_rec.pff_attribute21
306 ,p_pff_attribute22_o =>ben_pff_shd.g_old_rec.pff_attribute22
307 ,p_pff_attribute23_o =>ben_pff_shd.g_old_rec.pff_attribute23
308 ,p_pff_attribute24_o =>ben_pff_shd.g_old_rec.pff_attribute24
309 ,p_pff_attribute25_o =>ben_pff_shd.g_old_rec.pff_attribute25
310 ,p_pff_attribute26_o =>ben_pff_shd.g_old_rec.pff_attribute26
311 ,p_pff_attribute27_o =>ben_pff_shd.g_old_rec.pff_attribute27
312 ,p_pff_attribute28_o =>ben_pff_shd.g_old_rec.pff_attribute28
313 ,p_pff_attribute29_o =>ben_pff_shd.g_old_rec.pff_attribute29
314 ,p_pff_attribute30_o =>ben_pff_shd.g_old_rec.pff_attribute30
315 ,p_object_version_number_o =>ben_pff_shd.g_old_rec.object_version_number
316 );
317 --
318 exception
319 --
320 when hr_api.cannot_find_prog_unit then
321 --
322 hr_api.cannot_find_prog_unit_error
323 (p_module_name => 'ben_pct_fl_tm_fctr'
324 ,p_hook_type => 'AU');
325 --
326 end;
327 --
328 -- End of API User Hook for post_update.
329 --
330 --
331 hr_utility.set_location(' Leaving:'||l_proc, 10);
332 End post_update;
333 --
334 -- ----------------------------------------------------------------------------
335 -- |-----------------------------< convert_defs >-----------------------------|
336 -- ----------------------------------------------------------------------------
337 -- {Start Of Comments}
338 --
339 -- Description:
340 -- The Convert_Defs procedure has one very important function:
341 -- It must return the record structure for the row with all system defaulted
342 -- values converted into its corresponding parameter value for update. When
343 -- we attempt to update a row through the Upd process , certain
344 -- parameters can be defaulted which enables flexibility in the calling of
345 -- the upd process (e.g. only attributes which need to be updated need to be
346 -- specified). For the upd process to determine which attributes
347 -- have NOT been specified we need to check if the parameter has a reserved
348 -- system default value. Therefore, for all parameters which have a
349 -- corresponding reserved system default mechanism specified we need to
350 -- check if a system default is being used. If a system default is being
351 -- used then we convert the defaulted value into its corresponding attribute
352 -- value held in the g_old_rec data structure.
353 --
354 -- Prerequisites:
355 -- This private function can only be called from the upd process.
356 --
357 -- In Parameters:
358 -- A Pl/Sql record structre.
359 --
360 -- Post Success:
361 -- The record structure will be returned with all system defaulted parameter
362 -- values converted into its current row attribute value.
363 --
364 -- Post Failure:
365 -- No direct error handling is required within this function. Any possible
366 -- errors within this procedure will be a PL/SQL value error due to conversion
367 -- of datatypes or data lengths.
368 --
369 -- Developer Implementation Notes:
370 -- None.
371 --
372 -- Access Status:
373 -- Internal Row Handler Use Only.
374 --
375 -- {End Of Comments}
376 -- ----------------------------------------------------------------------------
377 Procedure convert_defs(p_rec in out nocopy ben_pff_shd.g_rec_type) is
378 --
379 l_proc varchar2(72) := g_package||'convert_defs';
380 --
381 Begin
382 --
383 hr_utility.set_location('Entering:'||l_proc, 5);
384 --
385 -- We must now examine each argument value in the
386 -- p_rec plsql record structure
387 -- to see if a system default is being used. If a system default
388 -- is being used then we must set to the 'current' argument value.
389 --
390 If (p_rec.name = hr_api.g_varchar2) then
391 p_rec.name :=
392 ben_pff_shd.g_old_rec.name;
393 End If;
394 If (p_rec.business_group_id = hr_api.g_number) then
395 p_rec.business_group_id :=
396 ben_pff_shd.g_old_rec.business_group_id;
397 End If;
398 If (p_rec.mx_pct_val = hr_api.g_number) then
399 p_rec.mx_pct_val :=
400 ben_pff_shd.g_old_rec.mx_pct_val;
401 End If;
402 If (p_rec.mn_pct_val = hr_api.g_number) then
403 p_rec.mn_pct_val :=
404 ben_pff_shd.g_old_rec.mn_pct_val;
405 End If;
406 If (p_rec.no_mn_pct_val_flag = hr_api.g_varchar2) then
407 p_rec.no_mn_pct_val_flag :=
408 ben_pff_shd.g_old_rec.no_mn_pct_val_flag;
409 End If;
410 If (p_rec.no_mx_pct_val_flag = hr_api.g_varchar2) then
411 p_rec.no_mx_pct_val_flag :=
412 ben_pff_shd.g_old_rec.no_mx_pct_val_flag;
413 End If;
414 If (p_rec.use_prmry_asnt_only_flag = hr_api.g_varchar2) then
415 p_rec.use_prmry_asnt_only_flag :=
416 ben_pff_shd.g_old_rec.use_prmry_asnt_only_flag;
417 End If;
418 If (p_rec.use_sum_of_all_asnts_flag = hr_api.g_varchar2) then
419 p_rec.use_sum_of_all_asnts_flag :=
420 ben_pff_shd.g_old_rec.use_sum_of_all_asnts_flag;
421 End If;
422 If (p_rec.rndg_cd = hr_api.g_varchar2) then
423 p_rec.rndg_cd :=
424 ben_pff_shd.g_old_rec.rndg_cd;
425 End If;
426 If (p_rec.rndg_rl = hr_api.g_number) then
427 p_rec.rndg_rl :=
428 ben_pff_shd.g_old_rec.rndg_rl;
429 End If;
430 If (p_rec.pff_attribute_category = hr_api.g_varchar2) then
431 p_rec.pff_attribute_category :=
432 ben_pff_shd.g_old_rec.pff_attribute_category;
433 End If;
434 If (p_rec.pff_attribute1 = hr_api.g_varchar2) then
435 p_rec.pff_attribute1 :=
436 ben_pff_shd.g_old_rec.pff_attribute1;
437 End If;
438 If (p_rec.pff_attribute2 = hr_api.g_varchar2) then
439 p_rec.pff_attribute2 :=
440 ben_pff_shd.g_old_rec.pff_attribute2;
441 End If;
442 If (p_rec.pff_attribute3 = hr_api.g_varchar2) then
443 p_rec.pff_attribute3 :=
444 ben_pff_shd.g_old_rec.pff_attribute3;
445 End If;
446 If (p_rec.pff_attribute4 = hr_api.g_varchar2) then
447 p_rec.pff_attribute4 :=
448 ben_pff_shd.g_old_rec.pff_attribute4;
449 End If;
450 If (p_rec.pff_attribute5 = hr_api.g_varchar2) then
451 p_rec.pff_attribute5 :=
452 ben_pff_shd.g_old_rec.pff_attribute5;
453 End If;
454 If (p_rec.pff_attribute6 = hr_api.g_varchar2) then
455 p_rec.pff_attribute6 :=
456 ben_pff_shd.g_old_rec.pff_attribute6;
457 End If;
458 If (p_rec.pff_attribute7 = hr_api.g_varchar2) then
459 p_rec.pff_attribute7 :=
460 ben_pff_shd.g_old_rec.pff_attribute7;
461 End If;
462 If (p_rec.pff_attribute8 = hr_api.g_varchar2) then
463 p_rec.pff_attribute8 :=
464 ben_pff_shd.g_old_rec.pff_attribute8;
465 End If;
466 If (p_rec.pff_attribute9 = hr_api.g_varchar2) then
467 p_rec.pff_attribute9 :=
468 ben_pff_shd.g_old_rec.pff_attribute9;
469 End If;
470 If (p_rec.pff_attribute10 = hr_api.g_varchar2) then
471 p_rec.pff_attribute10 :=
472 ben_pff_shd.g_old_rec.pff_attribute10;
473 End If;
474 If (p_rec.pff_attribute11 = hr_api.g_varchar2) then
475 p_rec.pff_attribute11 :=
476 ben_pff_shd.g_old_rec.pff_attribute11;
477 End If;
478 If (p_rec.pff_attribute12 = hr_api.g_varchar2) then
479 p_rec.pff_attribute12 :=
480 ben_pff_shd.g_old_rec.pff_attribute12;
481 End If;
482 If (p_rec.pff_attribute13 = hr_api.g_varchar2) then
483 p_rec.pff_attribute13 :=
484 ben_pff_shd.g_old_rec.pff_attribute13;
485 End If;
486 If (p_rec.pff_attribute14 = hr_api.g_varchar2) then
487 p_rec.pff_attribute14 :=
488 ben_pff_shd.g_old_rec.pff_attribute14;
489 End If;
490 If (p_rec.pff_attribute15 = hr_api.g_varchar2) then
491 p_rec.pff_attribute15 :=
492 ben_pff_shd.g_old_rec.pff_attribute15;
493 End If;
494 If (p_rec.pff_attribute16 = hr_api.g_varchar2) then
495 p_rec.pff_attribute16 :=
496 ben_pff_shd.g_old_rec.pff_attribute16;
497 End If;
498 If (p_rec.pff_attribute17 = hr_api.g_varchar2) then
499 p_rec.pff_attribute17 :=
500 ben_pff_shd.g_old_rec.pff_attribute17;
501 End If;
502 If (p_rec.pff_attribute18 = hr_api.g_varchar2) then
503 p_rec.pff_attribute18 :=
504 ben_pff_shd.g_old_rec.pff_attribute18;
505 End If;
506 If (p_rec.pff_attribute19 = hr_api.g_varchar2) then
507 p_rec.pff_attribute19 :=
508 ben_pff_shd.g_old_rec.pff_attribute19;
509 End If;
510 If (p_rec.pff_attribute20 = hr_api.g_varchar2) then
511 p_rec.pff_attribute20 :=
512 ben_pff_shd.g_old_rec.pff_attribute20;
513 End If;
514 If (p_rec.pff_attribute21 = hr_api.g_varchar2) then
515 p_rec.pff_attribute21 :=
516 ben_pff_shd.g_old_rec.pff_attribute21;
517 End If;
518 If (p_rec.pff_attribute22 = hr_api.g_varchar2) then
519 p_rec.pff_attribute22 :=
520 ben_pff_shd.g_old_rec.pff_attribute22;
521 End If;
522 If (p_rec.pff_attribute23 = hr_api.g_varchar2) then
523 p_rec.pff_attribute23 :=
524 ben_pff_shd.g_old_rec.pff_attribute23;
525 End If;
526 If (p_rec.pff_attribute24 = hr_api.g_varchar2) then
527 p_rec.pff_attribute24 :=
528 ben_pff_shd.g_old_rec.pff_attribute24;
529 End If;
530 If (p_rec.pff_attribute25 = hr_api.g_varchar2) then
531 p_rec.pff_attribute25 :=
532 ben_pff_shd.g_old_rec.pff_attribute25;
533 End If;
534 If (p_rec.pff_attribute26 = hr_api.g_varchar2) then
535 p_rec.pff_attribute26 :=
536 ben_pff_shd.g_old_rec.pff_attribute26;
537 End If;
538 If (p_rec.pff_attribute27 = hr_api.g_varchar2) then
539 p_rec.pff_attribute27 :=
540 ben_pff_shd.g_old_rec.pff_attribute27;
541 End If;
542 If (p_rec.pff_attribute28 = hr_api.g_varchar2) then
543 p_rec.pff_attribute28 :=
544 ben_pff_shd.g_old_rec.pff_attribute28;
545 End If;
546 If (p_rec.pff_attribute29 = hr_api.g_varchar2) then
547 p_rec.pff_attribute29 :=
548 ben_pff_shd.g_old_rec.pff_attribute29;
549 End If;
550 If (p_rec.pff_attribute30 = hr_api.g_varchar2) then
551 p_rec.pff_attribute30 :=
552 ben_pff_shd.g_old_rec.pff_attribute30;
553 End If;
554
555 --
556 hr_utility.set_location(' Leaving:'||l_proc, 10);
557 --
558 End convert_defs;
559 --
560 -- ----------------------------------------------------------------------------
561 -- |---------------------------------< upd >----------------------------------|
562 -- ----------------------------------------------------------------------------
563 Procedure upd
564 (
565 p_effective_date in date,
566 p_rec in out nocopy ben_pff_shd.g_rec_type
567 ) is
568 --
569 l_proc varchar2(72) := g_package||'upd';
570 --
571 Begin
572 hr_utility.set_location('Entering:'||l_proc, 5);
573 --
574 -- We must lock the row which we need to update.
575 --
576 ben_pff_shd.lck
577 (
578 p_rec.pct_fl_tm_fctr_id,
579 p_rec.object_version_number
580 );
581 --
582 -- 1. During an update system defaults are used to determine if
583 -- arguments have been defaulted or not. We must therefore
584 -- derive the full record structure values to be updated.
585 --
586 -- 2. Call the supporting update validate operations.
587 --
588 convert_defs(p_rec);
589 ben_pff_bus.update_validate(p_rec
590 ,p_effective_date);
591 --
592 -- Call the supporting pre-update operation
593 --
594 pre_update(p_rec);
595 --
596 -- Update the row.
597 --
598 update_dml(p_rec);
599 --
600 -- Call the supporting post-update operation
601 --
602 post_update(
603 p_effective_date,p_rec);
604 End upd;
605 --
606 -- ----------------------------------------------------------------------------
607 -- |---------------------------------< upd >----------------------------------|
608 -- ----------------------------------------------------------------------------
609 Procedure upd
610 (
611 p_effective_date in date,
612 p_pct_fl_tm_fctr_id in number,
613 p_name in varchar2 default hr_api.g_varchar2,
614 p_business_group_id in number default hr_api.g_number,
615 p_mx_pct_val in number default hr_api.g_number,
616 p_mn_pct_val in number default hr_api.g_number,
617 p_no_mn_pct_val_flag in varchar2 default hr_api.g_varchar2,
618 p_no_mx_pct_val_flag in varchar2 default hr_api.g_varchar2,
619 p_use_prmry_asnt_only_flag in varchar2 default hr_api.g_varchar2,
620 p_use_sum_of_all_asnts_flag in varchar2 default hr_api.g_varchar2,
621 p_rndg_cd in varchar2 default hr_api.g_varchar2,
622 p_rndg_rl in number default hr_api.g_number,
623 p_pff_attribute_category in varchar2 default hr_api.g_varchar2,
624 p_pff_attribute1 in varchar2 default hr_api.g_varchar2,
625 p_pff_attribute2 in varchar2 default hr_api.g_varchar2,
626 p_pff_attribute3 in varchar2 default hr_api.g_varchar2,
627 p_pff_attribute4 in varchar2 default hr_api.g_varchar2,
628 p_pff_attribute5 in varchar2 default hr_api.g_varchar2,
629 p_pff_attribute6 in varchar2 default hr_api.g_varchar2,
630 p_pff_attribute7 in varchar2 default hr_api.g_varchar2,
631 p_pff_attribute8 in varchar2 default hr_api.g_varchar2,
632 p_pff_attribute9 in varchar2 default hr_api.g_varchar2,
633 p_pff_attribute10 in varchar2 default hr_api.g_varchar2,
634 p_pff_attribute11 in varchar2 default hr_api.g_varchar2,
635 p_pff_attribute12 in varchar2 default hr_api.g_varchar2,
636 p_pff_attribute13 in varchar2 default hr_api.g_varchar2,
637 p_pff_attribute14 in varchar2 default hr_api.g_varchar2,
638 p_pff_attribute15 in varchar2 default hr_api.g_varchar2,
639 p_pff_attribute16 in varchar2 default hr_api.g_varchar2,
640 p_pff_attribute17 in varchar2 default hr_api.g_varchar2,
641 p_pff_attribute18 in varchar2 default hr_api.g_varchar2,
642 p_pff_attribute19 in varchar2 default hr_api.g_varchar2,
643 p_pff_attribute20 in varchar2 default hr_api.g_varchar2,
644 p_pff_attribute21 in varchar2 default hr_api.g_varchar2,
645 p_pff_attribute22 in varchar2 default hr_api.g_varchar2,
646 p_pff_attribute23 in varchar2 default hr_api.g_varchar2,
647 p_pff_attribute24 in varchar2 default hr_api.g_varchar2,
648 p_pff_attribute25 in varchar2 default hr_api.g_varchar2,
649 p_pff_attribute26 in varchar2 default hr_api.g_varchar2,
650 p_pff_attribute27 in varchar2 default hr_api.g_varchar2,
651 p_pff_attribute28 in varchar2 default hr_api.g_varchar2,
652 p_pff_attribute29 in varchar2 default hr_api.g_varchar2,
653 p_pff_attribute30 in varchar2 default hr_api.g_varchar2,
654 p_object_version_number in out nocopy number
655 ) is
656 --
657 l_rec ben_pff_shd.g_rec_type;
658 l_proc varchar2(72) := g_package||'upd';
659 --
660 Begin
661 hr_utility.set_location('Entering:'||l_proc, 5);
662 --
663 -- Call conversion function to turn arguments into the
664 -- l_rec structure.
665 --
666 l_rec :=
667 ben_pff_shd.convert_args
668 (
669 p_pct_fl_tm_fctr_id,
670 p_name,
671 p_business_group_id,
672 p_mx_pct_val,
673 p_mn_pct_val,
674 p_no_mn_pct_val_flag,
675 p_no_mx_pct_val_flag,
676 p_use_prmry_asnt_only_flag,
677 p_use_sum_of_all_asnts_flag,
678 p_rndg_cd,
679 p_rndg_rl,
680 p_pff_attribute_category,
681 p_pff_attribute1,
682 p_pff_attribute2,
683 p_pff_attribute3,
684 p_pff_attribute4,
685 p_pff_attribute5,
686 p_pff_attribute6,
687 p_pff_attribute7,
688 p_pff_attribute8,
689 p_pff_attribute9,
690 p_pff_attribute10,
691 p_pff_attribute11,
692 p_pff_attribute12,
693 p_pff_attribute13,
694 p_pff_attribute14,
695 p_pff_attribute15,
696 p_pff_attribute16,
697 p_pff_attribute17,
698 p_pff_attribute18,
699 p_pff_attribute19,
700 p_pff_attribute20,
701 p_pff_attribute21,
702 p_pff_attribute22,
703 p_pff_attribute23,
704 p_pff_attribute24,
705 p_pff_attribute25,
706 p_pff_attribute26,
707 p_pff_attribute27,
708 p_pff_attribute28,
709 p_pff_attribute29,
710 p_pff_attribute30,
711 p_object_version_number
712 );
713 --
714 -- Having converted the arguments into the
715 -- plsql record structure we call the corresponding record
716 -- business process.
717 --
718 upd(
719 p_effective_date,l_rec);
720 p_object_version_number := l_rec.object_version_number;
721 --
722 hr_utility.set_location(' Leaving:'||l_proc, 10);
723 End upd;
724 --
725 end ben_pff_upd;