1 Package Body ben_xrc_upd as
2 /* $Header: bexrcrhi.pkb 120.0 2005/05/28 12:37:58 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_xrc_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_xrc_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_xrc_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_ext_rcd Row
68 --
69 update ben_ext_rcd
70 set
71 ext_rcd_id = p_rec.ext_rcd_id,
72 name = p_rec.name,
73 xml_tag_name = p_rec.xml_tag_name,
74 rcd_type_cd = p_rec.rcd_type_cd,
75 low_lvl_cd = p_rec.low_lvl_cd,
76 business_group_id = p_rec.business_group_id,
77 legislation_code = p_rec.legislation_code,
78 xrc_attribute_category = p_rec.xrc_attribute_category,
79 xrc_attribute1 = p_rec.xrc_attribute1,
80 xrc_attribute2 = p_rec.xrc_attribute2,
81 xrc_attribute3 = p_rec.xrc_attribute3,
82 xrc_attribute4 = p_rec.xrc_attribute4,
83 xrc_attribute5 = p_rec.xrc_attribute5,
84 xrc_attribute6 = p_rec.xrc_attribute6,
85 xrc_attribute7 = p_rec.xrc_attribute7,
86 xrc_attribute8 = p_rec.xrc_attribute8,
87 xrc_attribute9 = p_rec.xrc_attribute9,
88 xrc_attribute10 = p_rec.xrc_attribute10,
89 xrc_attribute11 = p_rec.xrc_attribute11,
90 xrc_attribute12 = p_rec.xrc_attribute12,
91 xrc_attribute13 = p_rec.xrc_attribute13,
92 xrc_attribute14 = p_rec.xrc_attribute14,
93 xrc_attribute15 = p_rec.xrc_attribute15,
94 xrc_attribute16 = p_rec.xrc_attribute16,
95 xrc_attribute17 = p_rec.xrc_attribute17,
96 xrc_attribute18 = p_rec.xrc_attribute18,
97 xrc_attribute19 = p_rec.xrc_attribute19,
98 xrc_attribute20 = p_rec.xrc_attribute20,
99 xrc_attribute21 = p_rec.xrc_attribute21,
100 xrc_attribute22 = p_rec.xrc_attribute22,
101 xrc_attribute23 = p_rec.xrc_attribute23,
102 xrc_attribute24 = p_rec.xrc_attribute24,
103 xrc_attribute25 = p_rec.xrc_attribute25,
104 xrc_attribute26 = p_rec.xrc_attribute26,
105 xrc_attribute27 = p_rec.xrc_attribute27,
106 xrc_attribute28 = p_rec.xrc_attribute28,
107 xrc_attribute29 = p_rec.xrc_attribute29,
108 xrc_attribute30 = p_rec.xrc_attribute30,
109 last_update_date = p_rec.last_update_date,
110 last_updated_by = p_rec.last_updated_by,
111 last_update_login = p_rec.last_update_login,
112 object_version_number = p_rec.object_version_number
113 where ext_rcd_id = p_rec.ext_rcd_id;
114 --
115 ben_xrc_shd.g_api_dml := false; -- Unset the api dml status
116 --
117 hr_utility.set_location(' Leaving:'||l_proc, 10);
118 --
119 Exception
120 When hr_api.check_integrity_violated Then
121 -- A check constraint has been violated
122 ben_xrc_shd.g_api_dml := false; -- Unset the api dml status
123 ben_xrc_shd.constraint_error
124 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
125 When hr_api.parent_integrity_violated Then
126 -- Parent integrity has been violated
127 ben_xrc_shd.g_api_dml := false; -- Unset the api dml status
128 ben_xrc_shd.constraint_error
129 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
130 When hr_api.unique_integrity_violated Then
131 -- Unique integrity has been violated
132 ben_xrc_shd.g_api_dml := false; -- Unset the api dml status
133 ben_xrc_shd.constraint_error
134 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
135 When Others Then
136 ben_xrc_shd.g_api_dml := false; -- Unset the api dml status
137 Raise;
138 End update_dml;
139 --
140 -- ----------------------------------------------------------------------------
141 -- |------------------------------< pre_update >------------------------------|
142 -- ----------------------------------------------------------------------------
143 -- {Start Of Comments}
144 --
145 -- Description:
146 -- This private procedure contains any processing which is required before
147 -- the update dml.
148 --
149 -- Prerequisites:
150 -- This is an internal procedure which is called from the upd procedure.
151 --
152 -- In Parameters:
153 -- A Pl/Sql record structre.
154 --
155 -- Post Success:
156 -- Processing continues.
157 --
158 -- Post Failure:
159 -- If an error has occurred, an error message and exception will be raised
160 -- but not handled.
161 --
162 -- Developer Implementation Notes:
163 -- Any pre-processing required before the update dml is issued should be
164 -- coded within this procedure. It is important to note that any 3rd party
165 -- maintenance should be reviewed before placing in this procedure.
166 --
167 -- Access Status:
168 -- Internal Row Handler Use Only.
169 --
170 -- {End Of Comments}
171 -- ----------------------------------------------------------------------------
172 Procedure pre_update(p_rec in ben_xrc_shd.g_rec_type) is
173 --
174 l_proc varchar2(72) := g_package||'pre_update';
175 --
176 Begin
177 hr_utility.set_location('Entering:'||l_proc, 5);
178 --
179 hr_utility.set_location(' Leaving:'||l_proc, 10);
180 End pre_update;
181 --
182 -- ----------------------------------------------------------------------------
183 -- |-----------------------------< post_update >------------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 -- This private procedure contains any processing which is required after the
189 -- update dml.
190 --
191 -- Prerequisites:
192 -- This is an internal procedure which is called from the upd procedure.
193 --
194 -- In Parameters:
195 -- A Pl/Sql record structre.
196 --
197 -- Post Success:
198 -- Processing continues.
199 --
200 -- Post Failure:
201 -- If an error has occurred, an error message and exception will be raised
202 -- but not handled.
203 --
204 -- Developer Implementation Notes:
205 -- Any post-processing required after the update dml is issued should be
206 -- coded within this procedure. It is important to note that any 3rd party
207 -- maintenance should be reviewed before placing in this procedure.
208 --
209 -- Access Status:
210 -- Internal Row Handler Use Only.
211 --
212 -- {End Of Comments}
213 -- ----------------------------------------------------------------------------
214 Procedure post_update(
215 p_effective_date in date,p_rec in ben_xrc_shd.g_rec_type) is
216 --
217 l_proc varchar2(72) := g_package||'post_update';
218 --
219 Begin
220 hr_utility.set_location('Entering:'||l_proc, 5);
221 --
222 --
223 -- Start of API User Hook for post_update.
224 --
225 begin
226 --
227 ben_xrc_rku.after_update
228 (
229 p_ext_rcd_id =>p_rec.ext_rcd_id
230 ,p_name =>p_rec.name
231 ,p_xml_tag_name =>p_rec.xml_tag_name
232 ,p_rcd_type_cd =>p_rec.rcd_type_cd
233 ,p_low_lvl_cd =>p_rec.low_lvl_cd
234 ,p_business_group_id =>p_rec.business_group_id
235 ,p_legislation_code =>p_rec.legislation_code
236 ,p_xrc_attribute_category =>p_rec.xrc_attribute_category
237 ,p_xrc_attribute1 =>p_rec.xrc_attribute1
238 ,p_xrc_attribute2 =>p_rec.xrc_attribute2
239 ,p_xrc_attribute3 =>p_rec.xrc_attribute3
240 ,p_xrc_attribute4 =>p_rec.xrc_attribute4
241 ,p_xrc_attribute5 =>p_rec.xrc_attribute5
242 ,p_xrc_attribute6 =>p_rec.xrc_attribute6
243 ,p_xrc_attribute7 =>p_rec.xrc_attribute7
244 ,p_xrc_attribute8 =>p_rec.xrc_attribute8
245 ,p_xrc_attribute9 =>p_rec.xrc_attribute9
246 ,p_xrc_attribute10 =>p_rec.xrc_attribute10
247 ,p_xrc_attribute11 =>p_rec.xrc_attribute11
248 ,p_xrc_attribute12 =>p_rec.xrc_attribute12
249 ,p_xrc_attribute13 =>p_rec.xrc_attribute13
250 ,p_xrc_attribute14 =>p_rec.xrc_attribute14
251 ,p_xrc_attribute15 =>p_rec.xrc_attribute15
252 ,p_xrc_attribute16 =>p_rec.xrc_attribute16
253 ,p_xrc_attribute17 =>p_rec.xrc_attribute17
254 ,p_xrc_attribute18 =>p_rec.xrc_attribute18
255 ,p_xrc_attribute19 =>p_rec.xrc_attribute19
256 ,p_xrc_attribute20 =>p_rec.xrc_attribute20
257 ,p_xrc_attribute21 =>p_rec.xrc_attribute21
258 ,p_xrc_attribute22 =>p_rec.xrc_attribute22
259 ,p_xrc_attribute23 =>p_rec.xrc_attribute23
260 ,p_xrc_attribute24 =>p_rec.xrc_attribute24
261 ,p_xrc_attribute25 =>p_rec.xrc_attribute25
262 ,p_xrc_attribute26 =>p_rec.xrc_attribute26
263 ,p_xrc_attribute27 =>p_rec.xrc_attribute27
264 ,p_xrc_attribute28 =>p_rec.xrc_attribute28
265 ,p_xrc_attribute29 =>p_rec.xrc_attribute29
266 ,p_xrc_attribute30 =>p_rec.xrc_attribute30
267 ,p_object_version_number =>p_rec.object_version_number
268 ,p_effective_date =>p_effective_date
269 ,p_name_o =>ben_xrc_shd.g_old_rec.name
270 ,p_xml_tag_name_o =>ben_xrc_shd.g_old_rec.xml_tag_name
271 ,p_rcd_type_cd_o =>ben_xrc_shd.g_old_rec.rcd_type_cd
272 ,p_low_lvl_cd_o =>ben_xrc_shd.g_old_rec.low_lvl_cd
273 ,p_business_group_id_o =>ben_xrc_shd.g_old_rec.business_group_id
274 ,p_legislation_code_o =>ben_xrc_shd.g_old_rec.legislation_code
275 ,p_xrc_attribute_category_o =>ben_xrc_shd.g_old_rec.xrc_attribute_category
276 ,p_xrc_attribute1_o =>ben_xrc_shd.g_old_rec.xrc_attribute1
277 ,p_xrc_attribute2_o =>ben_xrc_shd.g_old_rec.xrc_attribute2
278 ,p_xrc_attribute3_o =>ben_xrc_shd.g_old_rec.xrc_attribute3
279 ,p_xrc_attribute4_o =>ben_xrc_shd.g_old_rec.xrc_attribute4
280 ,p_xrc_attribute5_o =>ben_xrc_shd.g_old_rec.xrc_attribute5
281 ,p_xrc_attribute6_o =>ben_xrc_shd.g_old_rec.xrc_attribute6
282 ,p_xrc_attribute7_o =>ben_xrc_shd.g_old_rec.xrc_attribute7
283 ,p_xrc_attribute8_o =>ben_xrc_shd.g_old_rec.xrc_attribute8
284 ,p_xrc_attribute9_o =>ben_xrc_shd.g_old_rec.xrc_attribute9
285 ,p_xrc_attribute10_o =>ben_xrc_shd.g_old_rec.xrc_attribute10
286 ,p_xrc_attribute11_o =>ben_xrc_shd.g_old_rec.xrc_attribute11
287 ,p_xrc_attribute12_o =>ben_xrc_shd.g_old_rec.xrc_attribute12
288 ,p_xrc_attribute13_o =>ben_xrc_shd.g_old_rec.xrc_attribute13
289 ,p_xrc_attribute14_o =>ben_xrc_shd.g_old_rec.xrc_attribute14
290 ,p_xrc_attribute15_o =>ben_xrc_shd.g_old_rec.xrc_attribute15
291 ,p_xrc_attribute16_o =>ben_xrc_shd.g_old_rec.xrc_attribute16
292 ,p_xrc_attribute17_o =>ben_xrc_shd.g_old_rec.xrc_attribute17
293 ,p_xrc_attribute18_o =>ben_xrc_shd.g_old_rec.xrc_attribute18
294 ,p_xrc_attribute19_o =>ben_xrc_shd.g_old_rec.xrc_attribute19
295 ,p_xrc_attribute20_o =>ben_xrc_shd.g_old_rec.xrc_attribute20
296 ,p_xrc_attribute21_o =>ben_xrc_shd.g_old_rec.xrc_attribute21
297 ,p_xrc_attribute22_o =>ben_xrc_shd.g_old_rec.xrc_attribute22
298 ,p_xrc_attribute23_o =>ben_xrc_shd.g_old_rec.xrc_attribute23
299 ,p_xrc_attribute24_o =>ben_xrc_shd.g_old_rec.xrc_attribute24
300 ,p_xrc_attribute25_o =>ben_xrc_shd.g_old_rec.xrc_attribute25
301 ,p_xrc_attribute26_o =>ben_xrc_shd.g_old_rec.xrc_attribute26
302 ,p_xrc_attribute27_o =>ben_xrc_shd.g_old_rec.xrc_attribute27
303 ,p_xrc_attribute28_o =>ben_xrc_shd.g_old_rec.xrc_attribute28
304 ,p_xrc_attribute29_o =>ben_xrc_shd.g_old_rec.xrc_attribute29
305 ,p_xrc_attribute30_o =>ben_xrc_shd.g_old_rec.xrc_attribute30
306 ,p_object_version_number_o =>ben_xrc_shd.g_old_rec.object_version_number
307 );
308 --
309 exception
310 --
311 when hr_api.cannot_find_prog_unit then
312 --
313 hr_api.cannot_find_prog_unit_error
314 (p_module_name => 'ben_ext_rcd'
315 ,p_hook_type => 'AU');
316 --
317 end;
318 --
319 -- End of API User Hook for post_update.
320 --
321 --
322 hr_utility.set_location(' Leaving:'||l_proc, 10);
323 End post_update;
324 --
325 -- ----------------------------------------------------------------------------
326 -- |-----------------------------< convert_defs >-----------------------------|
327 -- ----------------------------------------------------------------------------
328 -- {Start Of Comments}
329 --
330 -- Description:
331 -- The Convert_Defs procedure has one very important function:
332 -- It must return the record structure for the row with all system defaulted
333 -- values converted into its corresponding parameter value for update. When
334 -- we attempt to update a row through the Upd process , certain
335 -- parameters can be defaulted which enables flexibility in the calling of
336 -- the upd process (e.g. only attributes which need to be updated need to be
337 -- specified). For the upd process to determine which attributes
338 -- have NOT been specified we need to check if the parameter has a reserved
339 -- system default value. Therefore, for all parameters which have a
340 -- corresponding reserved system default mechanism specified we need to
341 -- check if a system default is being used. If a system default is being
342 -- used then we convert the defaulted value into its corresponding attribute
343 -- value held in the g_old_rec data structure.
344 --
345 -- Prerequisites:
346 -- This private function can only be called from the upd process.
347 --
348 -- In Parameters:
349 -- A Pl/Sql record structre.
350 --
351 -- Post Success:
352 -- The record structure will be returned with all system defaulted parameter
353 -- values converted into its current row attribute value.
354 --
355 -- Post Failure:
356 -- No direct error handling is required within this function. Any possible
357 -- errors within this procedure will be a PL/SQL value error due to conversion
358 -- of datatypes or data lengths.
359 --
360 -- Developer Implementation Notes:
361 -- None.
362 --
363 -- Access Status:
364 -- Internal Row Handler Use Only.
365 --
366 -- {End Of Comments}
367 -- ----------------------------------------------------------------------------
368 Procedure convert_defs(p_rec in out nocopy ben_xrc_shd.g_rec_type) is
369 --
370 l_proc varchar2(72) := g_package||'convert_defs';
371 --
372 Begin
373 --
374 hr_utility.set_location('Entering:'||l_proc, 5);
375 --
376 -- We must now examine each argument value in the
377 -- p_rec plsql record structure
378 -- to see if a system default is being used. If a system default
379 -- is being used then we must set to the 'current' argument value.
380 --
381 If (p_rec.name = hr_api.g_varchar2) then
382 p_rec.name :=
383 ben_xrc_shd.g_old_rec.name;
384 End If;
385
386 If (p_rec.xml_tag_name = hr_api.g_varchar2) then
387 p_rec.xml_tag_name :=
388 ben_xrc_shd.g_old_rec.xml_tag_name;
389 End If;
390 If (p_rec.rcd_type_cd = hr_api.g_varchar2) then
391 p_rec.rcd_type_cd :=
392 ben_xrc_shd.g_old_rec.rcd_type_cd;
393 End If;
394 If (p_rec.low_lvl_cd = hr_api.g_varchar2) then
395 p_rec.low_lvl_cd :=
396 ben_xrc_shd.g_old_rec.low_lvl_cd;
397 End If;
398 If (p_rec.business_group_id = hr_api.g_number) then
399 p_rec.business_group_id :=
400 ben_xrc_shd.g_old_rec.business_group_id;
401 End If;
402 If (p_rec.legislation_code = hr_api.g_varchar2) then
403 p_rec.legislation_code :=
404 ben_xrc_shd.g_old_rec.legislation_code;
405 End If;
406 If (p_rec.xrc_attribute_category = hr_api.g_varchar2) then
407 p_rec.xrc_attribute_category :=
408 ben_xrc_shd.g_old_rec.xrc_attribute_category;
409 End If;
410 If (p_rec.xrc_attribute1 = hr_api.g_varchar2) then
411 p_rec.xrc_attribute1 :=
412 ben_xrc_shd.g_old_rec.xrc_attribute1;
413 End If;
414 If (p_rec.xrc_attribute2 = hr_api.g_varchar2) then
415 p_rec.xrc_attribute2 :=
416 ben_xrc_shd.g_old_rec.xrc_attribute2;
417 End If;
418 If (p_rec.xrc_attribute3 = hr_api.g_varchar2) then
419 p_rec.xrc_attribute3 :=
420 ben_xrc_shd.g_old_rec.xrc_attribute3;
421 End If;
422 If (p_rec.xrc_attribute4 = hr_api.g_varchar2) then
423 p_rec.xrc_attribute4 :=
424 ben_xrc_shd.g_old_rec.xrc_attribute4;
425 End If;
426 If (p_rec.xrc_attribute5 = hr_api.g_varchar2) then
427 p_rec.xrc_attribute5 :=
428 ben_xrc_shd.g_old_rec.xrc_attribute5;
429 End If;
430 If (p_rec.xrc_attribute6 = hr_api.g_varchar2) then
431 p_rec.xrc_attribute6 :=
432 ben_xrc_shd.g_old_rec.xrc_attribute6;
433 End If;
434 If (p_rec.xrc_attribute7 = hr_api.g_varchar2) then
435 p_rec.xrc_attribute7 :=
436 ben_xrc_shd.g_old_rec.xrc_attribute7;
437 End If;
438 If (p_rec.xrc_attribute8 = hr_api.g_varchar2) then
439 p_rec.xrc_attribute8 :=
440 ben_xrc_shd.g_old_rec.xrc_attribute8;
441 End If;
442 If (p_rec.xrc_attribute9 = hr_api.g_varchar2) then
443 p_rec.xrc_attribute9 :=
444 ben_xrc_shd.g_old_rec.xrc_attribute9;
445 End If;
446 If (p_rec.xrc_attribute10 = hr_api.g_varchar2) then
447 p_rec.xrc_attribute10 :=
448 ben_xrc_shd.g_old_rec.xrc_attribute10;
449 End If;
450 If (p_rec.xrc_attribute11 = hr_api.g_varchar2) then
451 p_rec.xrc_attribute11 :=
452 ben_xrc_shd.g_old_rec.xrc_attribute11;
453 End If;
454 If (p_rec.xrc_attribute12 = hr_api.g_varchar2) then
455 p_rec.xrc_attribute12 :=
456 ben_xrc_shd.g_old_rec.xrc_attribute12;
457 End If;
458 If (p_rec.xrc_attribute13 = hr_api.g_varchar2) then
459 p_rec.xrc_attribute13 :=
460 ben_xrc_shd.g_old_rec.xrc_attribute13;
461 End If;
462 If (p_rec.xrc_attribute14 = hr_api.g_varchar2) then
463 p_rec.xrc_attribute14 :=
464 ben_xrc_shd.g_old_rec.xrc_attribute14;
465 End If;
466 If (p_rec.xrc_attribute15 = hr_api.g_varchar2) then
467 p_rec.xrc_attribute15 :=
468 ben_xrc_shd.g_old_rec.xrc_attribute15;
469 End If;
470 If (p_rec.xrc_attribute16 = hr_api.g_varchar2) then
471 p_rec.xrc_attribute16 :=
472 ben_xrc_shd.g_old_rec.xrc_attribute16;
473 End If;
474 If (p_rec.xrc_attribute17 = hr_api.g_varchar2) then
475 p_rec.xrc_attribute17 :=
476 ben_xrc_shd.g_old_rec.xrc_attribute17;
477 End If;
478 If (p_rec.xrc_attribute18 = hr_api.g_varchar2) then
479 p_rec.xrc_attribute18 :=
480 ben_xrc_shd.g_old_rec.xrc_attribute18;
481 End If;
482 If (p_rec.xrc_attribute19 = hr_api.g_varchar2) then
483 p_rec.xrc_attribute19 :=
484 ben_xrc_shd.g_old_rec.xrc_attribute19;
485 End If;
486 If (p_rec.xrc_attribute20 = hr_api.g_varchar2) then
487 p_rec.xrc_attribute20 :=
488 ben_xrc_shd.g_old_rec.xrc_attribute20;
489 End If;
490 If (p_rec.xrc_attribute21 = hr_api.g_varchar2) then
491 p_rec.xrc_attribute21 :=
492 ben_xrc_shd.g_old_rec.xrc_attribute21;
493 End If;
494 If (p_rec.xrc_attribute22 = hr_api.g_varchar2) then
495 p_rec.xrc_attribute22 :=
496 ben_xrc_shd.g_old_rec.xrc_attribute22;
497 End If;
498 If (p_rec.xrc_attribute23 = hr_api.g_varchar2) then
499 p_rec.xrc_attribute23 :=
500 ben_xrc_shd.g_old_rec.xrc_attribute23;
501 End If;
502 If (p_rec.xrc_attribute24 = hr_api.g_varchar2) then
503 p_rec.xrc_attribute24 :=
504 ben_xrc_shd.g_old_rec.xrc_attribute24;
505 End If;
506 If (p_rec.xrc_attribute25 = hr_api.g_varchar2) then
507 p_rec.xrc_attribute25 :=
508 ben_xrc_shd.g_old_rec.xrc_attribute25;
509 End If;
510 If (p_rec.xrc_attribute26 = hr_api.g_varchar2) then
511 p_rec.xrc_attribute26 :=
512 ben_xrc_shd.g_old_rec.xrc_attribute26;
513 End If;
514 If (p_rec.xrc_attribute27 = hr_api.g_varchar2) then
515 p_rec.xrc_attribute27 :=
516 ben_xrc_shd.g_old_rec.xrc_attribute27;
517 End If;
518 If (p_rec.xrc_attribute28 = hr_api.g_varchar2) then
519 p_rec.xrc_attribute28 :=
520 ben_xrc_shd.g_old_rec.xrc_attribute28;
521 End If;
522 If (p_rec.xrc_attribute29 = hr_api.g_varchar2) then
523 p_rec.xrc_attribute29 :=
524 ben_xrc_shd.g_old_rec.xrc_attribute29;
525 End If;
526 If (p_rec.xrc_attribute30 = hr_api.g_varchar2) then
527 p_rec.xrc_attribute30 :=
528 ben_xrc_shd.g_old_rec.xrc_attribute30;
529 End If;
530
531 --
532 hr_utility.set_location(' Leaving:'||l_proc, 10);
533 --
534 End convert_defs;
535 --
536 -- ----------------------------------------------------------------------------
537 -- |---------------------------------< upd >----------------------------------|
538 -- ----------------------------------------------------------------------------
539 Procedure upd
540 (
541 p_effective_date in date,
542 p_rec in out nocopy ben_xrc_shd.g_rec_type
543 ) is
544 --
545 l_proc varchar2(72) := g_package||'upd';
546 --
547 Begin
548 hr_utility.set_location('Entering:'||l_proc, 5);
549 --
550 -- We must lock the row which we need to update.
551 --
552 ben_xrc_shd.lck
553 (
554 p_rec.ext_rcd_id,
555 p_rec.object_version_number
556 );
557 --
558 -- 1. During an update system defaults are used to determine if
559 -- arguments have been defaulted or not. We must therefore
560 -- derive the full record structure values to be updated.
561 --
562 -- 2. Call the supporting update validate operations.
563 --
564 convert_defs(p_rec);
565 ben_xrc_bus.update_validate(p_rec
566 ,p_effective_date);
567 --
568 ben_xel_bus.chk_xml_name_format
569 ( p_xml_tag_name => p_rec.xml_tag_name
570 ) ;
571
572 -- Call the supporting pre-update operation
573 --
574 pre_update(p_rec);
575 --
576 -- Update the row.
577 --
578 update_dml(p_rec);
579 --
580 -- Call the supporting post-update operation
581 --
582 post_update(
583 p_effective_date,p_rec);
584 End upd;
585 --
586 -- ----------------------------------------------------------------------------
587 -- |---------------------------------< upd >----------------------------------|
588 -- ----------------------------------------------------------------------------
589 Procedure upd
590 (
591 p_effective_date in date,
592 p_ext_rcd_id in number,
593 p_name in varchar2 default hr_api.g_varchar2,
594 p_xml_tag_name in varchar2 default hr_api.g_varchar2,
595 p_rcd_type_cd in varchar2 default hr_api.g_varchar2,
596 p_low_lvl_cd in varchar2 default hr_api.g_varchar2,
597 p_business_group_id in number default hr_api.g_number,
598 p_legislation_code in varchar2 default hr_api.g_varchar2,
599 p_xrc_attribute_category in varchar2 default hr_api.g_varchar2,
600 p_xrc_attribute1 in varchar2 default hr_api.g_varchar2,
601 p_xrc_attribute2 in varchar2 default hr_api.g_varchar2,
602 p_xrc_attribute3 in varchar2 default hr_api.g_varchar2,
603 p_xrc_attribute4 in varchar2 default hr_api.g_varchar2,
604 p_xrc_attribute5 in varchar2 default hr_api.g_varchar2,
605 p_xrc_attribute6 in varchar2 default hr_api.g_varchar2,
606 p_xrc_attribute7 in varchar2 default hr_api.g_varchar2,
607 p_xrc_attribute8 in varchar2 default hr_api.g_varchar2,
608 p_xrc_attribute9 in varchar2 default hr_api.g_varchar2,
609 p_xrc_attribute10 in varchar2 default hr_api.g_varchar2,
610 p_xrc_attribute11 in varchar2 default hr_api.g_varchar2,
611 p_xrc_attribute12 in varchar2 default hr_api.g_varchar2,
612 p_xrc_attribute13 in varchar2 default hr_api.g_varchar2,
613 p_xrc_attribute14 in varchar2 default hr_api.g_varchar2,
614 p_xrc_attribute15 in varchar2 default hr_api.g_varchar2,
615 p_xrc_attribute16 in varchar2 default hr_api.g_varchar2,
616 p_xrc_attribute17 in varchar2 default hr_api.g_varchar2,
617 p_xrc_attribute18 in varchar2 default hr_api.g_varchar2,
618 p_xrc_attribute19 in varchar2 default hr_api.g_varchar2,
619 p_xrc_attribute20 in varchar2 default hr_api.g_varchar2,
620 p_xrc_attribute21 in varchar2 default hr_api.g_varchar2,
621 p_xrc_attribute22 in varchar2 default hr_api.g_varchar2,
622 p_xrc_attribute23 in varchar2 default hr_api.g_varchar2,
623 p_xrc_attribute24 in varchar2 default hr_api.g_varchar2,
624 p_xrc_attribute25 in varchar2 default hr_api.g_varchar2,
625 p_xrc_attribute26 in varchar2 default hr_api.g_varchar2,
626 p_xrc_attribute27 in varchar2 default hr_api.g_varchar2,
627 p_xrc_attribute28 in varchar2 default hr_api.g_varchar2,
628 p_xrc_attribute29 in varchar2 default hr_api.g_varchar2,
629 p_xrc_attribute30 in varchar2 default hr_api.g_varchar2,
630 p_last_update_date in date default hr_api.g_date,
631 p_creation_date in date default hr_api.g_date,
632 p_last_updated_by in number default hr_api.g_number,
633 p_last_update_login in number default hr_api.g_number,
634 p_created_by in number default hr_api.g_number,
635 p_object_version_number in out nocopy number
636 ) is
637 --
638 l_rec ben_xrc_shd.g_rec_type;
639 l_proc varchar2(72) := g_package||'upd';
640 --
641 Begin
642 hr_utility.set_location('Entering:'||l_proc, 5);
643 --
644 -- Call conversion function to turn arguments into the
645 -- l_rec structure.
646 --
647 l_rec :=
648 ben_xrc_shd.convert_args
649 (
650 p_ext_rcd_id,
651 p_name,
652 p_xml_tag_name,
653 p_rcd_type_cd,
654 p_low_lvl_cd,
655 p_business_group_id,
656 p_legislation_code,
657 p_xrc_attribute_category,
658 p_xrc_attribute1,
659 p_xrc_attribute2,
660 p_xrc_attribute3,
661 p_xrc_attribute4,
662 p_xrc_attribute5,
663 p_xrc_attribute6,
664 p_xrc_attribute7,
665 p_xrc_attribute8,
666 p_xrc_attribute9,
667 p_xrc_attribute10,
668 p_xrc_attribute11,
669 p_xrc_attribute12,
670 p_xrc_attribute13,
671 p_xrc_attribute14,
672 p_xrc_attribute15,
673 p_xrc_attribute16,
674 p_xrc_attribute17,
675 p_xrc_attribute18,
676 p_xrc_attribute19,
677 p_xrc_attribute20,
678 p_xrc_attribute21,
679 p_xrc_attribute22,
680 p_xrc_attribute23,
681 p_xrc_attribute24,
682 p_xrc_attribute25,
683 p_xrc_attribute26,
684 p_xrc_attribute27,
685 p_xrc_attribute28,
686 p_xrc_attribute29,
687 p_xrc_attribute30,
688 p_last_update_date ,
689 p_creation_date ,
690 p_last_updated_by ,
691 p_last_update_login,
692 p_created_by ,
693 p_object_version_number
694 );
695 --
696 -- Having converted the arguments into the
697 -- plsql record structure we call the corresponding record
698 -- business process.
699 --
700 upd(
701 p_effective_date,l_rec);
702 p_object_version_number := l_rec.object_version_number;
703 --
704 hr_utility.set_location(' Leaving:'||l_proc, 10);
705 End upd;
706 --
707 end ben_xrc_upd;