1 Package Body ben_xcr_upd as
2 /* $Header: bexcrrhi.pkb 120.0 2005/05/28 12:25:40 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_xcr_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_xcr_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_xcr_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_ext_crit_prfl Row
68 --
69 update ben_ext_crit_prfl
70 set
71 ext_crit_prfl_id = p_rec.ext_crit_prfl_id,
72 name = p_rec.name,
73 business_group_id = p_rec.business_group_id,
74 legislation_code = p_rec.legislation_code,
75 xcr_attribute_category = p_rec.xcr_attribute_category,
76 xcr_attribute1 = p_rec.xcr_attribute1,
77 xcr_attribute2 = p_rec.xcr_attribute2,
78 xcr_attribute3 = p_rec.xcr_attribute3,
79 xcr_attribute4 = p_rec.xcr_attribute4,
80 xcr_attribute5 = p_rec.xcr_attribute5,
81 xcr_attribute6 = p_rec.xcr_attribute6,
82 xcr_attribute7 = p_rec.xcr_attribute7,
83 xcr_attribute8 = p_rec.xcr_attribute8,
84 xcr_attribute9 = p_rec.xcr_attribute9,
85 xcr_attribute10 = p_rec.xcr_attribute10,
86 xcr_attribute11 = p_rec.xcr_attribute11,
87 xcr_attribute12 = p_rec.xcr_attribute12,
88 xcr_attribute13 = p_rec.xcr_attribute13,
89 xcr_attribute14 = p_rec.xcr_attribute14,
90 xcr_attribute15 = p_rec.xcr_attribute15,
91 xcr_attribute16 = p_rec.xcr_attribute16,
92 xcr_attribute17 = p_rec.xcr_attribute17,
93 xcr_attribute18 = p_rec.xcr_attribute18,
94 xcr_attribute19 = p_rec.xcr_attribute19,
95 xcr_attribute20 = p_rec.xcr_attribute20,
96 xcr_attribute21 = p_rec.xcr_attribute21,
97 xcr_attribute22 = p_rec.xcr_attribute22,
98 xcr_attribute23 = p_rec.xcr_attribute23,
99 xcr_attribute24 = p_rec.xcr_attribute24,
100 xcr_attribute25 = p_rec.xcr_attribute25,
101 xcr_attribute26 = p_rec.xcr_attribute26,
102 xcr_attribute27 = p_rec.xcr_attribute27,
103 xcr_attribute28 = p_rec.xcr_attribute28,
104 xcr_attribute29 = p_rec.xcr_attribute29,
105 xcr_attribute30 = p_rec.xcr_attribute30,
106 ext_global_flag = p_rec.ext_global_flag,
107 last_update_date = p_rec.last_update_date,
108 last_updated_by = p_rec.last_updated_by,
109 last_update_login = p_rec.last_update_login,
110 object_version_number = p_rec.object_version_number
111 where ext_crit_prfl_id = p_rec.ext_crit_prfl_id;
112 --
113 ben_xcr_shd.g_api_dml := false; -- Unset the api dml status
114 --
115 hr_utility.set_location(' Leaving:'||l_proc, 10);
116 --
117 Exception
118 When hr_api.check_integrity_violated Then
119 -- A check constraint has been violated
120 ben_xcr_shd.g_api_dml := false; -- Unset the api dml status
121 ben_xcr_shd.constraint_error
122 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
123 When hr_api.parent_integrity_violated Then
124 -- Parent integrity has been violated
125 ben_xcr_shd.g_api_dml := false; -- Unset the api dml status
126 ben_xcr_shd.constraint_error
127 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
128 When hr_api.unique_integrity_violated Then
129 -- Unique integrity has been violated
130 ben_xcr_shd.g_api_dml := false; -- Unset the api dml status
131 ben_xcr_shd.constraint_error
132 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133 When Others Then
134 ben_xcr_shd.g_api_dml := false; -- Unset the api dml status
135 Raise;
136 End update_dml;
137 --
138 -- ----------------------------------------------------------------------------
139 -- |------------------------------< pre_update >------------------------------|
140 -- ----------------------------------------------------------------------------
141 -- {Start Of Comments}
142 --
143 -- Description:
144 -- This private procedure contains any processing which is required before
145 -- the update dml.
146 --
147 -- Prerequisites:
148 -- This is an internal procedure which is called from the upd procedure.
149 --
150 -- In Parameters:
151 -- A Pl/Sql record structre.
152 --
153 -- Post Success:
154 -- Processing continues.
155 --
156 -- Post Failure:
157 -- If an error has occurred, an error message and exception will be raised
158 -- but not handled.
159 --
160 -- Developer Implementation Notes:
161 -- Any pre-processing required before the update dml is issued should be
162 -- coded within this procedure. It is important to note that any 3rd party
163 -- maintenance should be reviewed before placing in this procedure.
164 --
165 -- Access Status:
166 -- Internal Row Handler Use Only.
167 --
168 -- {End Of Comments}
169 -- ----------------------------------------------------------------------------
170 Procedure pre_update(p_rec in ben_xcr_shd.g_rec_type) is
171 --
172 l_proc varchar2(72) := g_package||'pre_update';
173 --
174 Begin
175 hr_utility.set_location('Entering:'||l_proc, 5);
176 --
177 hr_utility.set_location(' Leaving:'||l_proc, 10);
178 End pre_update;
179 --
180 -- ----------------------------------------------------------------------------
181 -- |-----------------------------< post_update >------------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 -- This private procedure contains any processing which is required after the
187 -- update dml.
188 --
189 -- Prerequisites:
190 -- This is an internal procedure which is called from the upd procedure.
191 --
192 -- In Parameters:
193 -- A Pl/Sql record structre.
194 --
195 -- Post Success:
196 -- Processing continues.
197 --
198 -- Post Failure:
199 -- If an error has occurred, an error message and exception will be raised
200 -- but not handled.
201 --
202 -- Developer Implementation Notes:
203 -- Any post-processing required after the update dml is issued should be
204 -- coded within this procedure. It is important to note that any 3rd party
205 -- maintenance should be reviewed before placing in this procedure.
206 --
207 -- Access Status:
208 -- Internal Row Handler Use Only.
209 --
210 -- {End Of Comments}
211 -- ----------------------------------------------------------------------------
212 Procedure post_update(p_rec in ben_xcr_shd.g_rec_type) is
213 --
214 l_proc varchar2(72) := g_package||'post_update';
215 --
216 Begin
217 hr_utility.set_location('Entering:'||l_proc, 5);
218 --
219 --
220 -- Start of API User Hook for post_update.
221 --
222 begin
223 --
224 ben_xcr_rku.after_update
225 (
226 p_ext_crit_prfl_id =>p_rec.ext_crit_prfl_id
227 ,p_name =>p_rec.name
228 ,p_business_group_id =>p_rec.business_group_id
229 ,p_legislation_code =>p_rec.legislation_code
230 ,p_xcr_attribute_category =>p_rec.xcr_attribute_category
231 ,p_xcr_attribute1 =>p_rec.xcr_attribute1
232 ,p_xcr_attribute2 =>p_rec.xcr_attribute2
233 ,p_xcr_attribute3 =>p_rec.xcr_attribute3
234 ,p_xcr_attribute4 =>p_rec.xcr_attribute4
235 ,p_xcr_attribute5 =>p_rec.xcr_attribute5
236 ,p_xcr_attribute6 =>p_rec.xcr_attribute6
237 ,p_xcr_attribute7 =>p_rec.xcr_attribute7
238 ,p_xcr_attribute8 =>p_rec.xcr_attribute8
239 ,p_xcr_attribute9 =>p_rec.xcr_attribute9
240 ,p_xcr_attribute10 =>p_rec.xcr_attribute10
241 ,p_xcr_attribute11 =>p_rec.xcr_attribute11
242 ,p_xcr_attribute12 =>p_rec.xcr_attribute12
243 ,p_xcr_attribute13 =>p_rec.xcr_attribute13
244 ,p_xcr_attribute14 =>p_rec.xcr_attribute14
245 ,p_xcr_attribute15 =>p_rec.xcr_attribute15
246 ,p_xcr_attribute16 =>p_rec.xcr_attribute16
247 ,p_xcr_attribute17 =>p_rec.xcr_attribute17
248 ,p_xcr_attribute18 =>p_rec.xcr_attribute18
249 ,p_xcr_attribute19 =>p_rec.xcr_attribute19
250 ,p_xcr_attribute20 =>p_rec.xcr_attribute20
251 ,p_xcr_attribute21 =>p_rec.xcr_attribute21
252 ,p_xcr_attribute22 =>p_rec.xcr_attribute22
253 ,p_xcr_attribute23 =>p_rec.xcr_attribute23
254 ,p_xcr_attribute24 =>p_rec.xcr_attribute24
255 ,p_xcr_attribute25 =>p_rec.xcr_attribute25
256 ,p_xcr_attribute26 =>p_rec.xcr_attribute26
257 ,p_xcr_attribute27 =>p_rec.xcr_attribute27
258 ,p_xcr_attribute28 =>p_rec.xcr_attribute28
259 ,p_xcr_attribute29 =>p_rec.xcr_attribute29
260 ,p_xcr_attribute30 =>p_rec.xcr_attribute30
261 ,p_ext_global_flag =>p_rec.ext_global_flag
262 ,p_object_version_number =>p_rec.object_version_number
263 ,p_name_o =>ben_xcr_shd.g_old_rec.name
264 ,p_business_group_id_o =>ben_xcr_shd.g_old_rec.business_group_id
265 ,p_legislation_code_o =>ben_xcr_shd.g_old_rec.legislation_code
266 ,p_xcr_attribute_category_o =>ben_xcr_shd.g_old_rec.xcr_attribute_category
267 ,p_xcr_attribute1_o =>ben_xcr_shd.g_old_rec.xcr_attribute1
268 ,p_xcr_attribute2_o =>ben_xcr_shd.g_old_rec.xcr_attribute2
269 ,p_xcr_attribute3_o =>ben_xcr_shd.g_old_rec.xcr_attribute3
270 ,p_xcr_attribute4_o =>ben_xcr_shd.g_old_rec.xcr_attribute4
271 ,p_xcr_attribute5_o =>ben_xcr_shd.g_old_rec.xcr_attribute5
272 ,p_xcr_attribute6_o =>ben_xcr_shd.g_old_rec.xcr_attribute6
273 ,p_xcr_attribute7_o =>ben_xcr_shd.g_old_rec.xcr_attribute7
274 ,p_xcr_attribute8_o =>ben_xcr_shd.g_old_rec.xcr_attribute8
275 ,p_xcr_attribute9_o =>ben_xcr_shd.g_old_rec.xcr_attribute9
276 ,p_xcr_attribute10_o =>ben_xcr_shd.g_old_rec.xcr_attribute10
277 ,p_xcr_attribute11_o =>ben_xcr_shd.g_old_rec.xcr_attribute11
278 ,p_xcr_attribute12_o =>ben_xcr_shd.g_old_rec.xcr_attribute12
279 ,p_xcr_attribute13_o =>ben_xcr_shd.g_old_rec.xcr_attribute13
280 ,p_xcr_attribute14_o =>ben_xcr_shd.g_old_rec.xcr_attribute14
281 ,p_xcr_attribute15_o =>ben_xcr_shd.g_old_rec.xcr_attribute15
282 ,p_xcr_attribute16_o =>ben_xcr_shd.g_old_rec.xcr_attribute16
283 ,p_xcr_attribute17_o =>ben_xcr_shd.g_old_rec.xcr_attribute17
284 ,p_xcr_attribute18_o =>ben_xcr_shd.g_old_rec.xcr_attribute18
285 ,p_xcr_attribute19_o =>ben_xcr_shd.g_old_rec.xcr_attribute19
286 ,p_xcr_attribute20_o =>ben_xcr_shd.g_old_rec.xcr_attribute20
287 ,p_xcr_attribute21_o =>ben_xcr_shd.g_old_rec.xcr_attribute21
288 ,p_xcr_attribute22_o =>ben_xcr_shd.g_old_rec.xcr_attribute22
289 ,p_xcr_attribute23_o =>ben_xcr_shd.g_old_rec.xcr_attribute23
290 ,p_xcr_attribute24_o =>ben_xcr_shd.g_old_rec.xcr_attribute24
291 ,p_xcr_attribute25_o =>ben_xcr_shd.g_old_rec.xcr_attribute25
292 ,p_xcr_attribute26_o =>ben_xcr_shd.g_old_rec.xcr_attribute26
293 ,p_xcr_attribute27_o =>ben_xcr_shd.g_old_rec.xcr_attribute27
294 ,p_xcr_attribute28_o =>ben_xcr_shd.g_old_rec.xcr_attribute28
295 ,p_xcr_attribute29_o =>ben_xcr_shd.g_old_rec.xcr_attribute29
296 ,p_xcr_attribute30_o =>ben_xcr_shd.g_old_rec.xcr_attribute30
297 ,p_ext_global_flag_o =>ben_xcr_shd.g_old_rec.ext_global_flag
298 ,p_object_version_number_o =>ben_xcr_shd.g_old_rec.object_version_number
299 );
300 --
301 exception
302 --
303 when hr_api.cannot_find_prog_unit then
304 --
305 hr_api.cannot_find_prog_unit_error
306 (p_module_name => 'ben_ext_crit_prfl'
307 ,p_hook_type => 'AU');
308 --
309 end;
310 --
311 -- End of API User Hook for post_update.
312 --
313 --
314 hr_utility.set_location(' Leaving:'||l_proc, 10);
315 End post_update;
316 --
317 -- ----------------------------------------------------------------------------
318 -- |-----------------------------< convert_defs >-----------------------------|
319 -- ----------------------------------------------------------------------------
320 -- {Start Of Comments}
321 --
322 -- Description:
323 -- The Convert_Defs procedure has one very important function:
324 -- It must return the record structure for the row with all system defaulted
325 -- values converted into its corresponding parameter value for update. When
326 -- we attempt to update a row through the Upd process , certain
327 -- parameters can be defaulted which enables flexibility in the calling of
328 -- the upd process (e.g. only attributes which need to be updated need to be
329 -- specified). For the upd process to determine which attributes
330 -- have NOT been specified we need to check if the parameter has a reserved
331 -- system default value. Therefore, for all parameters which have a
332 -- corresponding reserved system default mechanism specified we need to
333 -- check if a system default is being used. If a system default is being
334 -- used then we convert the defaulted value into its corresponding attribute
335 -- value held in the g_old_rec data structure.
336 --
337 -- Prerequisites:
338 -- This private function can only be called from the upd process.
339 --
340 -- In Parameters:
341 -- A Pl/Sql record structre.
342 --
343 -- Post Success:
344 -- The record structure will be returned with all system defaulted parameter
345 -- values converted into its current row attribute value.
346 --
347 -- Post Failure:
348 -- No direct error handling is required within this function. Any possible
349 -- errors within this procedure will be a PL/SQL value error due to conversion
350 -- of datatypes or data lengths.
351 --
352 -- Developer Implementation Notes:
353 -- None.
354 --
355 -- Access Status:
356 -- Internal Row Handler Use Only.
357 --
358 -- {End Of Comments}
359 -- ----------------------------------------------------------------------------
360 Procedure convert_defs(p_rec in out nocopy ben_xcr_shd.g_rec_type) is
361 --
362 l_proc varchar2(72) := g_package||'convert_defs';
363 --
364 Begin
365 --
366 hr_utility.set_location('Entering:'||l_proc, 5);
367 --
368 -- We must now examine each argument value in the
369 -- p_rec plsql record structure
370 -- to see if a system default is being used. If a system default
371 -- is being used then we must set to the 'current' argument value.
372 --
373 If (p_rec.name = hr_api.g_varchar2) then
374 p_rec.name :=
375 ben_xcr_shd.g_old_rec.name;
376 End If;
377 If (p_rec.business_group_id = hr_api.g_number) then
378 p_rec.business_group_id :=
379 ben_xcr_shd.g_old_rec.business_group_id;
380 End If;
381 If (p_rec.legislation_code = hr_api.g_varchar2) then
382 p_rec.legislation_code :=
383 ben_xcr_shd.g_old_rec.legislation_code;
384 End If;
385 If (p_rec.xcr_attribute_category = hr_api.g_varchar2) then
386 p_rec.xcr_attribute_category :=
387 ben_xcr_shd.g_old_rec.xcr_attribute_category;
388 End If;
389 If (p_rec.xcr_attribute1 = hr_api.g_varchar2) then
390 p_rec.xcr_attribute1 :=
391 ben_xcr_shd.g_old_rec.xcr_attribute1;
392 End If;
393 If (p_rec.xcr_attribute2 = hr_api.g_varchar2) then
394 p_rec.xcr_attribute2 :=
395 ben_xcr_shd.g_old_rec.xcr_attribute2;
396 End If;
397 If (p_rec.xcr_attribute3 = hr_api.g_varchar2) then
398 p_rec.xcr_attribute3 :=
399 ben_xcr_shd.g_old_rec.xcr_attribute3;
400 End If;
401 If (p_rec.xcr_attribute4 = hr_api.g_varchar2) then
402 p_rec.xcr_attribute4 :=
403 ben_xcr_shd.g_old_rec.xcr_attribute4;
404 End If;
405 If (p_rec.xcr_attribute5 = hr_api.g_varchar2) then
406 p_rec.xcr_attribute5 :=
407 ben_xcr_shd.g_old_rec.xcr_attribute5;
408 End If;
409 If (p_rec.xcr_attribute6 = hr_api.g_varchar2) then
410 p_rec.xcr_attribute6 :=
411 ben_xcr_shd.g_old_rec.xcr_attribute6;
412 End If;
413 If (p_rec.xcr_attribute7 = hr_api.g_varchar2) then
414 p_rec.xcr_attribute7 :=
415 ben_xcr_shd.g_old_rec.xcr_attribute7;
416 End If;
417 If (p_rec.xcr_attribute8 = hr_api.g_varchar2) then
418 p_rec.xcr_attribute8 :=
419 ben_xcr_shd.g_old_rec.xcr_attribute8;
420 End If;
421 If (p_rec.xcr_attribute9 = hr_api.g_varchar2) then
422 p_rec.xcr_attribute9 :=
423 ben_xcr_shd.g_old_rec.xcr_attribute9;
424 End If;
425 If (p_rec.xcr_attribute10 = hr_api.g_varchar2) then
426 p_rec.xcr_attribute10 :=
427 ben_xcr_shd.g_old_rec.xcr_attribute10;
428 End If;
429 If (p_rec.xcr_attribute11 = hr_api.g_varchar2) then
430 p_rec.xcr_attribute11 :=
431 ben_xcr_shd.g_old_rec.xcr_attribute11;
432 End If;
433 If (p_rec.xcr_attribute12 = hr_api.g_varchar2) then
434 p_rec.xcr_attribute12 :=
435 ben_xcr_shd.g_old_rec.xcr_attribute12;
436 End If;
437 If (p_rec.xcr_attribute13 = hr_api.g_varchar2) then
438 p_rec.xcr_attribute13 :=
439 ben_xcr_shd.g_old_rec.xcr_attribute13;
440 End If;
441 If (p_rec.xcr_attribute14 = hr_api.g_varchar2) then
442 p_rec.xcr_attribute14 :=
443 ben_xcr_shd.g_old_rec.xcr_attribute14;
444 End If;
445 If (p_rec.xcr_attribute15 = hr_api.g_varchar2) then
446 p_rec.xcr_attribute15 :=
447 ben_xcr_shd.g_old_rec.xcr_attribute15;
448 End If;
449 If (p_rec.xcr_attribute16 = hr_api.g_varchar2) then
450 p_rec.xcr_attribute16 :=
451 ben_xcr_shd.g_old_rec.xcr_attribute16;
452 End If;
453 If (p_rec.xcr_attribute17 = hr_api.g_varchar2) then
454 p_rec.xcr_attribute17 :=
455 ben_xcr_shd.g_old_rec.xcr_attribute17;
456 End If;
457 If (p_rec.xcr_attribute18 = hr_api.g_varchar2) then
458 p_rec.xcr_attribute18 :=
459 ben_xcr_shd.g_old_rec.xcr_attribute18;
460 End If;
461 If (p_rec.xcr_attribute19 = hr_api.g_varchar2) then
462 p_rec.xcr_attribute19 :=
463 ben_xcr_shd.g_old_rec.xcr_attribute19;
464 End If;
465 If (p_rec.xcr_attribute20 = hr_api.g_varchar2) then
466 p_rec.xcr_attribute20 :=
467 ben_xcr_shd.g_old_rec.xcr_attribute20;
468 End If;
469 If (p_rec.xcr_attribute21 = hr_api.g_varchar2) then
470 p_rec.xcr_attribute21 :=
471 ben_xcr_shd.g_old_rec.xcr_attribute21;
472 End If;
473 If (p_rec.xcr_attribute22 = hr_api.g_varchar2) then
474 p_rec.xcr_attribute22 :=
475 ben_xcr_shd.g_old_rec.xcr_attribute22;
476 End If;
477 If (p_rec.xcr_attribute23 = hr_api.g_varchar2) then
478 p_rec.xcr_attribute23 :=
479 ben_xcr_shd.g_old_rec.xcr_attribute23;
480 End If;
481 If (p_rec.xcr_attribute24 = hr_api.g_varchar2) then
482 p_rec.xcr_attribute24 :=
483 ben_xcr_shd.g_old_rec.xcr_attribute24;
484 End If;
485 If (p_rec.xcr_attribute25 = hr_api.g_varchar2) then
486 p_rec.xcr_attribute25 :=
487 ben_xcr_shd.g_old_rec.xcr_attribute25;
488 End If;
489 If (p_rec.xcr_attribute26 = hr_api.g_varchar2) then
490 p_rec.xcr_attribute26 :=
491 ben_xcr_shd.g_old_rec.xcr_attribute26;
492 End If;
493 If (p_rec.xcr_attribute27 = hr_api.g_varchar2) then
494 p_rec.xcr_attribute27 :=
495 ben_xcr_shd.g_old_rec.xcr_attribute27;
496 End If;
497 If (p_rec.xcr_attribute28 = hr_api.g_varchar2) then
498 p_rec.xcr_attribute28 :=
499 ben_xcr_shd.g_old_rec.xcr_attribute28;
500 End If;
501 If (p_rec.xcr_attribute29 = hr_api.g_varchar2) then
502 p_rec.xcr_attribute29 :=
503 ben_xcr_shd.g_old_rec.xcr_attribute29;
504 End If;
505 If (p_rec.xcr_attribute30 = hr_api.g_varchar2) then
506 p_rec.xcr_attribute30 :=
507 ben_xcr_shd.g_old_rec.xcr_attribute30;
508 End If;
509
510 If (p_rec.ext_global_flag = hr_api.g_varchar2) then
511 p_rec.ext_global_flag :=
512 ben_xcr_shd.g_old_rec.ext_global_flag;
513 End If;
514
515 --
516 hr_utility.set_location(' Leaving:'||l_proc, 10);
517 --
518 End convert_defs;
519 --
520 -- ----------------------------------------------------------------------------
521 -- |---------------------------------< upd >----------------------------------|
522 -- ----------------------------------------------------------------------------
523 Procedure upd
524 (
525 p_rec in out nocopy ben_xcr_shd.g_rec_type
526 ) is
527 --
528 l_proc varchar2(72) := g_package||'upd';
529 --
530 Begin
531 hr_utility.set_location('Entering:'||l_proc, 5);
532 --
533 -- We must lock the row which we need to update.
534 --
535 ben_xcr_shd.lck
536 (
537 p_rec.ext_crit_prfl_id,
538 p_rec.object_version_number
539 );
540 --
541 -- 1. During an update system defaults are used to determine if
542 -- arguments have been defaulted or not. We must therefore
543 -- derive the full record structure values to be updated.
544 --
545 -- 2. Call the supporting update validate operations.
546 --
547 convert_defs(p_rec);
548 ben_xcr_bus.update_validate(p_rec);
549 --
550 -- Call the supporting pre-update operation
551 --
552 pre_update(p_rec);
553 --
554 -- Update the row.
555 --
556 update_dml(p_rec);
557 --
558 -- Call the supporting post-update operation
559 --
560 post_update(p_rec);
561 End upd;
562 --
563 -- ----------------------------------------------------------------------------
564 -- |---------------------------------< upd >----------------------------------|
565 -- ----------------------------------------------------------------------------
566 Procedure upd
567 (
568 p_ext_crit_prfl_id in number,
569 p_name in varchar2 default hr_api.g_varchar2,
570 p_business_group_id in number default hr_api.g_number,
571 p_legislation_code in varchar2 default hr_api.g_varchar2,
572 p_xcr_attribute_category in varchar2 default hr_api.g_varchar2,
573 p_xcr_attribute1 in varchar2 default hr_api.g_varchar2,
574 p_xcr_attribute2 in varchar2 default hr_api.g_varchar2,
575 p_xcr_attribute3 in varchar2 default hr_api.g_varchar2,
576 p_xcr_attribute4 in varchar2 default hr_api.g_varchar2,
577 p_xcr_attribute5 in varchar2 default hr_api.g_varchar2,
578 p_xcr_attribute6 in varchar2 default hr_api.g_varchar2,
579 p_xcr_attribute7 in varchar2 default hr_api.g_varchar2,
580 p_xcr_attribute8 in varchar2 default hr_api.g_varchar2,
581 p_xcr_attribute9 in varchar2 default hr_api.g_varchar2,
582 p_xcr_attribute10 in varchar2 default hr_api.g_varchar2,
583 p_xcr_attribute11 in varchar2 default hr_api.g_varchar2,
584 p_xcr_attribute12 in varchar2 default hr_api.g_varchar2,
585 p_xcr_attribute13 in varchar2 default hr_api.g_varchar2,
586 p_xcr_attribute14 in varchar2 default hr_api.g_varchar2,
587 p_xcr_attribute15 in varchar2 default hr_api.g_varchar2,
588 p_xcr_attribute16 in varchar2 default hr_api.g_varchar2,
589 p_xcr_attribute17 in varchar2 default hr_api.g_varchar2,
590 p_xcr_attribute18 in varchar2 default hr_api.g_varchar2,
591 p_xcr_attribute19 in varchar2 default hr_api.g_varchar2,
592 p_xcr_attribute20 in varchar2 default hr_api.g_varchar2,
593 p_xcr_attribute21 in varchar2 default hr_api.g_varchar2,
594 p_xcr_attribute22 in varchar2 default hr_api.g_varchar2,
595 p_xcr_attribute23 in varchar2 default hr_api.g_varchar2,
596 p_xcr_attribute24 in varchar2 default hr_api.g_varchar2,
597 p_xcr_attribute25 in varchar2 default hr_api.g_varchar2,
598 p_xcr_attribute26 in varchar2 default hr_api.g_varchar2,
599 p_xcr_attribute27 in varchar2 default hr_api.g_varchar2,
600 p_xcr_attribute28 in varchar2 default hr_api.g_varchar2,
601 p_xcr_attribute29 in varchar2 default hr_api.g_varchar2,
602 p_xcr_attribute30 in varchar2 default hr_api.g_varchar2,
603 p_ext_global_flag in varchar2 default hr_api.g_varchar2,
604 p_last_update_date in date default hr_api.g_date,
605 p_creation_date in date default hr_api.g_date,
606 p_last_updated_by in number default hr_api.g_number,
607 p_last_update_login in number default hr_api.g_number,
608 p_created_by in number default hr_api.g_number,
609 p_object_version_number in out nocopy number
610 ) is
611 --
612 l_rec ben_xcr_shd.g_rec_type;
613 l_proc varchar2(72) := g_package||'upd';
614 --
615 Begin
616 hr_utility.set_location('Entering:'||l_proc, 5);
617 --
618 -- Call conversion function to turn arguments into the
619 -- l_rec structure.
620 --
621 l_rec :=
622 ben_xcr_shd.convert_args
623 (
624 p_ext_crit_prfl_id,
625 p_name,
626 p_business_group_id,
627 p_legislation_code,
628 p_xcr_attribute_category,
629 p_xcr_attribute1,
630 p_xcr_attribute2,
631 p_xcr_attribute3,
632 p_xcr_attribute4,
633 p_xcr_attribute5,
634 p_xcr_attribute6,
635 p_xcr_attribute7,
636 p_xcr_attribute8,
637 p_xcr_attribute9,
638 p_xcr_attribute10,
639 p_xcr_attribute11,
640 p_xcr_attribute12,
641 p_xcr_attribute13,
642 p_xcr_attribute14,
643 p_xcr_attribute15,
644 p_xcr_attribute16,
645 p_xcr_attribute17,
646 p_xcr_attribute18,
647 p_xcr_attribute19,
648 p_xcr_attribute20,
649 p_xcr_attribute21,
650 p_xcr_attribute22,
651 p_xcr_attribute23,
652 p_xcr_attribute24,
653 p_xcr_attribute25,
654 p_xcr_attribute26,
655 p_xcr_attribute27,
656 p_xcr_attribute28,
657 p_xcr_attribute29,
658 p_xcr_attribute30,
659 p_ext_global_flag,
660 p_last_update_date ,
661 p_creation_date ,
662 p_last_updated_by ,
663 p_last_update_login,
664 p_created_by ,
665 p_object_version_number
666 );
667 --
668 -- Having converted the arguments into the
669 -- plsql record structure we call the corresponding record
670 -- business process.
671 --
672 upd(l_rec);
673 p_object_version_number := l_rec.object_version_number;
674 --
675 hr_utility.set_location(' Leaving:'||l_proc, 10);
676 End upd;
677 --
678 end ben_xcr_upd;