1 Package Body ben_xdf_upd as
2 /* $Header: bexdfrhi.pkb 120.6 2006/07/10 21:53:55 tjesumic ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_xdf_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_xdf_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_xdf_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_ext_dfn Row
68 --
69 update ben_ext_dfn
70 set
71 ext_dfn_id = p_rec.ext_dfn_id,
72 name = p_rec.name,
73 xml_tag_name = p_rec.xml_tag_name,
74 xdo_template_id = p_rec.xdo_template_id,
75 data_typ_cd = p_rec.data_typ_cd,
76 ext_typ_cd = p_rec.ext_typ_cd,
77 output_name = p_rec.output_name,
78 output_type = p_rec.output_type,
79 apnd_rqst_id_flag = p_rec.apnd_rqst_id_flag,
80 prmy_sort_cd = p_rec.prmy_sort_cd,
81 scnd_sort_cd = p_rec.scnd_sort_cd,
82 strt_dt = p_rec.strt_dt,
83 end_dt = p_rec.end_dt,
84 ext_crit_prfl_id = p_rec.ext_crit_prfl_id,
85 ext_file_id = p_rec.ext_file_id,
86 business_group_id = p_rec.business_group_id,
87 legislation_code = p_rec.legislation_code,
88 xdf_attribute_category = p_rec.xdf_attribute_category,
89 xdf_attribute1 = p_rec.xdf_attribute1,
90 xdf_attribute2 = p_rec.xdf_attribute2,
91 xdf_attribute3 = p_rec.xdf_attribute3,
92 xdf_attribute4 = p_rec.xdf_attribute4,
93 xdf_attribute5 = p_rec.xdf_attribute5,
94 xdf_attribute6 = p_rec.xdf_attribute6,
95 xdf_attribute7 = p_rec.xdf_attribute7,
96 xdf_attribute8 = p_rec.xdf_attribute8,
97 xdf_attribute9 = p_rec.xdf_attribute9,
98 xdf_attribute10 = p_rec.xdf_attribute10,
99 xdf_attribute11 = p_rec.xdf_attribute11,
100 xdf_attribute12 = p_rec.xdf_attribute12,
101 xdf_attribute13 = p_rec.xdf_attribute13,
102 xdf_attribute14 = p_rec.xdf_attribute14,
103 xdf_attribute15 = p_rec.xdf_attribute15,
104 xdf_attribute16 = p_rec.xdf_attribute16,
105 xdf_attribute17 = p_rec.xdf_attribute17,
106 xdf_attribute18 = p_rec.xdf_attribute18,
107 xdf_attribute19 = p_rec.xdf_attribute19,
108 xdf_attribute20 = p_rec.xdf_attribute20,
109 xdf_attribute21 = p_rec.xdf_attribute21,
110 xdf_attribute22 = p_rec.xdf_attribute22,
111 xdf_attribute23 = p_rec.xdf_attribute23,
112 xdf_attribute24 = p_rec.xdf_attribute24,
113 xdf_attribute25 = p_rec.xdf_attribute25,
114 xdf_attribute26 = p_rec.xdf_attribute26,
115 xdf_attribute27 = p_rec.xdf_attribute27,
116 xdf_attribute28 = p_rec.xdf_attribute28,
117 xdf_attribute29 = p_rec.xdf_attribute29,
118 xdf_attribute30 = p_rec.xdf_attribute30,
119 last_update_date = p_rec.last_update_date,
120 last_updated_by = p_rec.last_updated_by,
121 last_update_login = p_rec.last_update_login,
122 object_version_number = p_rec.object_version_number,
123 drctry_name = p_rec.drctry_name,
124 kickoff_wrt_prc_flag = p_rec.kickoff_wrt_prc_flag,
125 upd_cm_sent_dt_flag = p_rec.upd_cm_sent_dt_flag,
126 spcl_hndl_flag = p_rec.spcl_hndl_flag,
127 ext_global_flag = p_rec.ext_global_flag,
128 cm_display_flag = p_rec.cm_display_flag,
129 use_eff_dt_for_chgs_flag = p_rec.use_eff_dt_for_chgs_flag,
130 ext_post_prcs_rl = p_rec.ext_post_prcs_rl
131 where ext_dfn_id = p_rec.ext_dfn_id;
132 --
133 ben_xdf_shd.g_api_dml := false; -- Unset the api dml status
134 --
135 hr_utility.set_location(' Leaving:'||l_proc, 10);
136 --
137 Exception
138 When hr_api.check_integrity_violated Then
139 -- A check constraint has been violated
140 ben_xdf_shd.g_api_dml := false; -- Unset the api dml status
141 ben_xdf_shd.constraint_error
142 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
143 When hr_api.parent_integrity_violated Then
144 -- Parent integrity has been violated
145 ben_xdf_shd.g_api_dml := false; -- Unset the api dml status
146 ben_xdf_shd.constraint_error
147 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
148 When hr_api.unique_integrity_violated Then
149 -- Unique integrity has been violated
150 ben_xdf_shd.g_api_dml := false; -- Unset the api dml status
151 ben_xdf_shd.constraint_error
152 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
153 When Others Then
154 ben_xdf_shd.g_api_dml := false; -- Unset the api dml status
155 Raise;
156 End update_dml;
157 --
158 -- ----------------------------------------------------------------------------
159 -- |------------------------------< pre_update >------------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start Of Comments}
162 --
163 -- Description:
164 -- This private procedure contains any processing which is required before
165 -- the update dml.
166 --
167 -- Prerequisites:
168 -- This is an internal procedure which is called from the upd procedure.
169 --
170 -- In Parameters:
171 -- A Pl/Sql record structre.
172 --
173 -- Post Success:
174 -- Processing continues.
175 --
176 -- Post Failure:
177 -- If an error has occurred, an error message and exception will be raised
178 -- but not handled.
179 --
180 -- Developer Implementation Notes:
181 -- Any pre-processing required before the update dml is issued should be
182 -- coded within this procedure. It is important to note that any 3rd party
183 -- maintenance should be reviewed before placing in this procedure.
184 --
185 -- Access Status:
186 -- Internal Row Handler Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Procedure pre_update(p_rec in ben_xdf_shd.g_rec_type) is
191 --
192 l_proc varchar2(72) := g_package||'pre_update';
193 --
194 Begin
195 hr_utility.set_location('Entering:'||l_proc, 5);
196 --
197 hr_utility.set_location(' Leaving:'||l_proc, 10);
198 End pre_update;
199 --
200 -- ----------------------------------------------------------------------------
201 -- |-----------------------------< post_update >------------------------------|
202 -- ----------------------------------------------------------------------------
203 -- {Start Of Comments}
204 --
205 -- Description:
206 -- This private procedure contains any processing which is required after the
207 -- update dml.
208 --
209 -- Prerequisites:
210 -- This is an internal procedure which is called from the upd procedure.
211 --
212 -- In Parameters:
213 -- A Pl/Sql record structre.
214 --
215 -- Post Success:
216 -- Processing continues.
217 --
218 -- Post Failure:
219 -- If an error has occurred, an error message and exception will be raised
220 -- but not handled.
221 --
222 -- Developer Implementation Notes:
223 -- Any post-processing required after the update dml is issued should be
224 -- coded within this procedure. It is important to note that any 3rd party
225 -- maintenance should be reviewed before placing in this procedure.
226 --
227 -- Access Status:
228 -- Internal Row Handler Use Only.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 Procedure post_update(
233 p_effective_date in date,p_rec in ben_xdf_shd.g_rec_type) is
234 --
235 l_proc varchar2(72) := g_package||'post_update';
236 --
237 Begin
238 hr_utility.set_location('Entering:'||l_proc, 5);
239 --
240 --
241 -- Start of API User Hook for post_update.
242 --
243 begin
244 --
245 ben_xdf_rku.after_update
246 (
247 p_ext_dfn_id =>p_rec.ext_dfn_id
248 ,p_name =>p_rec.name
249 ,p_xml_tag_name =>p_rec.xml_tag_name
250 ,p_xdo_template_id =>p_rec.xdo_template_id
251 ,p_data_typ_cd =>p_rec.data_typ_cd
252 ,p_ext_typ_cd =>p_rec.ext_typ_cd
253 ,p_output_name =>p_rec.output_name
254 ,p_output_type =>p_rec.output_type
255 ,p_apnd_rqst_id_flag =>p_rec.apnd_rqst_id_flag
256 ,p_prmy_sort_cd =>p_rec.prmy_sort_cd
257 ,p_scnd_sort_cd =>p_rec.scnd_sort_cd
258 ,p_strt_dt =>p_rec.strt_dt
259 ,p_end_dt =>p_rec.end_dt
260 ,p_ext_crit_prfl_id =>p_rec.ext_crit_prfl_id
261 ,p_ext_file_id =>p_rec.ext_file_id
262 ,p_business_group_id =>p_rec.business_group_id
263 ,p_legislation_code =>p_rec.legislation_code
264 ,p_xdf_attribute_category =>p_rec.xdf_attribute_category
265 ,p_xdf_attribute1 =>p_rec.xdf_attribute1
266 ,p_xdf_attribute2 =>p_rec.xdf_attribute2
267 ,p_xdf_attribute3 =>p_rec.xdf_attribute3
268 ,p_xdf_attribute4 =>p_rec.xdf_attribute4
269 ,p_xdf_attribute5 =>p_rec.xdf_attribute5
270 ,p_xdf_attribute6 =>p_rec.xdf_attribute6
271 ,p_xdf_attribute7 =>p_rec.xdf_attribute7
272 ,p_xdf_attribute8 =>p_rec.xdf_attribute8
273 ,p_xdf_attribute9 =>p_rec.xdf_attribute9
274 ,p_xdf_attribute10 =>p_rec.xdf_attribute10
275 ,p_xdf_attribute11 =>p_rec.xdf_attribute11
276 ,p_xdf_attribute12 =>p_rec.xdf_attribute12
277 ,p_xdf_attribute13 =>p_rec.xdf_attribute13
278 ,p_xdf_attribute14 =>p_rec.xdf_attribute14
279 ,p_xdf_attribute15 =>p_rec.xdf_attribute15
280 ,p_xdf_attribute16 =>p_rec.xdf_attribute16
281 ,p_xdf_attribute17 =>p_rec.xdf_attribute17
282 ,p_xdf_attribute18 =>p_rec.xdf_attribute18
283 ,p_xdf_attribute19 =>p_rec.xdf_attribute19
284 ,p_xdf_attribute20 =>p_rec.xdf_attribute20
285 ,p_xdf_attribute21 =>p_rec.xdf_attribute21
286 ,p_xdf_attribute22 =>p_rec.xdf_attribute22
287 ,p_xdf_attribute23 =>p_rec.xdf_attribute23
288 ,p_xdf_attribute24 =>p_rec.xdf_attribute24
289 ,p_xdf_attribute25 =>p_rec.xdf_attribute25
290 ,p_xdf_attribute26 =>p_rec.xdf_attribute26
291 ,p_xdf_attribute27 =>p_rec.xdf_attribute27
292 ,p_xdf_attribute28 =>p_rec.xdf_attribute28
293 ,p_xdf_attribute29 =>p_rec.xdf_attribute29
294 ,p_xdf_attribute30 =>p_rec.xdf_attribute30
295 ,p_object_version_number =>p_rec.object_version_number
296 ,p_drctry_name =>p_rec.drctry_name
297 ,p_kickoff_wrt_prc_flag =>p_rec.kickoff_wrt_prc_flag
298 ,p_upd_cm_sent_dt_flag =>p_rec.upd_cm_sent_dt_flag
299 ,p_spcl_hndl_flag =>p_rec.spcl_hndl_flag
300 ,p_ext_global_flag =>p_rec.ext_global_flag
301 ,p_cm_display_flag =>p_rec.cm_display_flag
302 ,p_use_eff_dt_for_chgs_flag =>p_rec.use_eff_dt_for_chgs_flag
303 ,p_ext_post_prcs_rl =>p_rec.ext_post_prcs_rl
304 ,p_effective_date =>p_effective_date
305 ,p_name_o =>ben_xdf_shd.g_old_rec.name
306 ,p_xml_tag_name_o =>ben_xdf_shd.g_old_rec.xml_tag_name
307 ,p_xdo_template_id_o =>ben_xdf_shd.g_old_rec.xdo_template_id
308 ,p_data_typ_cd_o =>ben_xdf_shd.g_old_rec.data_typ_cd
309 ,p_ext_typ_cd_o =>ben_xdf_shd.g_old_rec.ext_typ_cd
310 ,p_output_name_o =>ben_xdf_shd.g_old_rec.output_name
311 ,p_output_type_o =>ben_xdf_shd.g_old_rec.output_type
312 ,p_apnd_rqst_id_flag_o =>ben_xdf_shd.g_old_rec.apnd_rqst_id_flag
313 ,p_prmy_sort_cd_o =>ben_xdf_shd.g_old_rec.prmy_sort_cd
314 ,p_scnd_sort_cd_o =>ben_xdf_shd.g_old_rec.scnd_sort_cd
315 ,p_strt_dt_o =>ben_xdf_shd.g_old_rec.strt_dt
316 ,p_end_dt_o =>ben_xdf_shd.g_old_rec.end_dt
317 ,p_ext_crit_prfl_id_o =>ben_xdf_shd.g_old_rec.ext_crit_prfl_id
318 ,p_ext_file_id_o =>ben_xdf_shd.g_old_rec.ext_file_id
319 ,p_business_group_id_o =>ben_xdf_shd.g_old_rec.business_group_id
320 ,p_legislation_code_o =>ben_xdf_shd.g_old_rec.legislation_code
321 ,p_xdf_attribute_category_o =>ben_xdf_shd.g_old_rec.xdf_attribute_category
322 ,p_xdf_attribute1_o =>ben_xdf_shd.g_old_rec.xdf_attribute1
323 ,p_xdf_attribute2_o =>ben_xdf_shd.g_old_rec.xdf_attribute2
324 ,p_xdf_attribute3_o =>ben_xdf_shd.g_old_rec.xdf_attribute3
325 ,p_xdf_attribute4_o =>ben_xdf_shd.g_old_rec.xdf_attribute4
326 ,p_xdf_attribute5_o =>ben_xdf_shd.g_old_rec.xdf_attribute5
327 ,p_xdf_attribute6_o =>ben_xdf_shd.g_old_rec.xdf_attribute6
328 ,p_xdf_attribute7_o =>ben_xdf_shd.g_old_rec.xdf_attribute7
329 ,p_xdf_attribute8_o =>ben_xdf_shd.g_old_rec.xdf_attribute8
330 ,p_xdf_attribute9_o =>ben_xdf_shd.g_old_rec.xdf_attribute9
331 ,p_xdf_attribute10_o =>ben_xdf_shd.g_old_rec.xdf_attribute10
332 ,p_xdf_attribute11_o =>ben_xdf_shd.g_old_rec.xdf_attribute11
333 ,p_xdf_attribute12_o =>ben_xdf_shd.g_old_rec.xdf_attribute12
334 ,p_xdf_attribute13_o =>ben_xdf_shd.g_old_rec.xdf_attribute13
335 ,p_xdf_attribute14_o =>ben_xdf_shd.g_old_rec.xdf_attribute14
336 ,p_xdf_attribute15_o =>ben_xdf_shd.g_old_rec.xdf_attribute15
337 ,p_xdf_attribute16_o =>ben_xdf_shd.g_old_rec.xdf_attribute16
338 ,p_xdf_attribute17_o =>ben_xdf_shd.g_old_rec.xdf_attribute17
339 ,p_xdf_attribute18_o =>ben_xdf_shd.g_old_rec.xdf_attribute18
340 ,p_xdf_attribute19_o =>ben_xdf_shd.g_old_rec.xdf_attribute19
341 ,p_xdf_attribute20_o =>ben_xdf_shd.g_old_rec.xdf_attribute20
342 ,p_xdf_attribute21_o =>ben_xdf_shd.g_old_rec.xdf_attribute21
343 ,p_xdf_attribute22_o =>ben_xdf_shd.g_old_rec.xdf_attribute22
344 ,p_xdf_attribute23_o =>ben_xdf_shd.g_old_rec.xdf_attribute23
345 ,p_xdf_attribute24_o =>ben_xdf_shd.g_old_rec.xdf_attribute24
346 ,p_xdf_attribute25_o =>ben_xdf_shd.g_old_rec.xdf_attribute25
347 ,p_xdf_attribute26_o =>ben_xdf_shd.g_old_rec.xdf_attribute26
348 ,p_xdf_attribute27_o =>ben_xdf_shd.g_old_rec.xdf_attribute27
349 ,p_xdf_attribute28_o =>ben_xdf_shd.g_old_rec.xdf_attribute28
350 ,p_xdf_attribute29_o =>ben_xdf_shd.g_old_rec.xdf_attribute29
351 ,p_xdf_attribute30_o =>ben_xdf_shd.g_old_rec.xdf_attribute30
352 ,p_object_version_number_o =>ben_xdf_shd.g_old_rec.object_version_number
353 ,p_drctry_name_o =>ben_xdf_shd.g_old_rec.drctry_name
354 ,p_kickoff_wrt_prc_flag_o =>ben_xdf_shd.g_old_rec.kickoff_wrt_prc_flag
355 ,p_upd_cm_sent_dt_flag_o =>ben_xdf_shd.g_old_rec.upd_cm_sent_dt_flag
356 ,p_spcl_hndl_flag_o =>ben_xdf_shd.g_old_rec.spcl_hndl_flag
357 ,p_ext_global_flag_o =>ben_xdf_shd.g_old_rec.ext_global_flag
358 ,p_cm_display_flag_o =>ben_xdf_shd.g_old_rec.cm_display_flag
359 ,p_use_eff_dt_for_chgs_flag_o =>ben_xdf_shd.g_old_rec.use_eff_dt_for_chgs_flag
360 ,p_ext_post_prcs_rl_o =>ben_xdf_shd.g_old_rec.ext_post_prcs_rl
361 );
362 --
363 exception
364 --
365 when hr_api.cannot_find_prog_unit then
366 --
367 hr_api.cannot_find_prog_unit_error
368 (p_module_name => 'ben_ext_dfn'
369 ,p_hook_type => 'AU');
370 --
371 end;
372 --
373 -- End of API User Hook for post_update.
374 --
375 --
376 hr_utility.set_location(' Leaving:'||l_proc, 10);
377 End post_update;
378 --
379 -- ----------------------------------------------------------------------------
380 -- |-----------------------------< convert_defs >-----------------------------|
381 -- ----------------------------------------------------------------------------
382 -- {Start Of Comments}
383 --
384 -- Description:
385 -- The Convert_Defs procedure has one very important function:
386 -- It must return the record structure for the row with all system defaulted
387 -- values converted into its corresponding parameter value for update. When
388 -- we attempt to update a row through the Upd process , certain
389 -- parameters can be defaulted which enables flexibility in the calling of
390 -- the upd process (e.g. only attributes which need to be updated need to be
391 -- specified). For the upd process to determine which attributes
392 -- have NOT been specified we need to check if the parameter has a reserved
393 -- system default value. Therefore, for all parameters which have a
394 -- corresponding reserved system default mechanism specified we need to
395 -- check if a system default is being used. If a system default is being
396 -- used then we convert the defaulted value into its corresponding attribute
397 -- value held in the g_old_rec data structure.
398 --
399 -- Prerequisites:
400 -- This private function can only be called from the upd process.
401 --
402 -- In Parameters:
403 -- A Pl/Sql record structre.
404 --
405 -- Post Success:
406 -- The record structure will be returned with all system defaulted parameter
407 -- values converted into its current row attribute value.
408 --
409 -- Post Failure:
410 -- No direct error handling is required within this function. Any possible
411 -- errors within this procedure will be a PL/SQL value error due to conversion
412 -- of datatypes or data lengths.
413 --
414 -- Developer Implementation Notes:
415 -- None.
416 --
417 -- Access Status:
418 -- Internal Row Handler Use Only.
419 --
420 -- {End Of Comments}
421 -- ----------------------------------------------------------------------------
422 Procedure convert_defs(p_rec in out nocopy ben_xdf_shd.g_rec_type) is
423 --
424 l_proc varchar2(72) := g_package||'convert_defs';
425 --
426 Begin
427 --
428 hr_utility.set_location('Entering:'||l_proc, 5);
429 --
430 -- We must now examine each argument value in the
431 -- p_rec plsql record structure
432 -- to see if a system default is being used. If a system default
433 -- is being used then we must set to the 'current' argument value.
434 --
435 If (p_rec.name = hr_api.g_varchar2) then
436 p_rec.name :=
437 ben_xdf_shd.g_old_rec.name;
438 End If;
439
440 If (p_rec.xml_tag_name = hr_api.g_varchar2) then
441 p_rec.xml_tag_name :=
442 ben_xdf_shd.g_old_rec.xml_tag_name;
443 End If;
444
445 If (p_rec.xdo_template_id = hr_api.g_number) then
446 p_rec.xdo_template_id :=
447 ben_xdf_shd.g_old_rec.xdo_template_id;
448 End If;
449
450 If (p_rec.data_typ_cd = hr_api.g_varchar2) then
451 p_rec.data_typ_cd :=
452 ben_xdf_shd.g_old_rec.data_typ_cd;
453 End If;
454 If (p_rec.ext_typ_cd = hr_api.g_varchar2) then
455 p_rec.ext_typ_cd :=
456 ben_xdf_shd.g_old_rec.ext_typ_cd;
457 End If;
458 If (p_rec.output_name = hr_api.g_varchar2) then
459 p_rec.output_name :=
460 ben_xdf_shd.g_old_rec.output_name;
461 End If;
462 If (p_rec.apnd_rqst_id_flag = hr_api.g_varchar2) then
463 p_rec.apnd_rqst_id_flag :=
464 ben_xdf_shd.g_old_rec.apnd_rqst_id_flag;
465 End If;
466 If (p_rec.prmy_sort_cd = hr_api.g_varchar2) then
467 p_rec.prmy_sort_cd :=
468 ben_xdf_shd.g_old_rec.prmy_sort_cd;
469 End If;
470 If (p_rec.scnd_sort_cd = hr_api.g_varchar2) then
471 p_rec.scnd_sort_cd :=
472 ben_xdf_shd.g_old_rec.scnd_sort_cd;
473 End If;
474 If (p_rec.strt_dt = hr_api.g_varchar2) then
475 p_rec.strt_dt :=
476 ben_xdf_shd.g_old_rec.strt_dt;
477 End If;
478 If (p_rec.end_dt = hr_api.g_varchar2) then
479 p_rec.end_dt :=
480 ben_xdf_shd.g_old_rec.end_dt;
481 End If;
482 If (p_rec.ext_crit_prfl_id = hr_api.g_number) then
483 p_rec.ext_crit_prfl_id :=
484 ben_xdf_shd.g_old_rec.ext_crit_prfl_id;
485 End If;
486 If (p_rec.ext_file_id = hr_api.g_number) then
487 p_rec.ext_file_id :=
488 ben_xdf_shd.g_old_rec.ext_file_id;
489 End If;
490 If (p_rec.business_group_id = hr_api.g_number) then
491 p_rec.business_group_id :=
492 ben_xdf_shd.g_old_rec.business_group_id;
493 End If;
494 If (p_rec.legislation_code = hr_api.g_varchar2) then
495 p_rec.legislation_code :=
496 ben_xdf_shd.g_old_rec.legislation_code;
497 End If;
498 If (p_rec.xdf_attribute_category = hr_api.g_varchar2) then
499 p_rec.xdf_attribute_category :=
500 ben_xdf_shd.g_old_rec.xdf_attribute_category;
501 End If;
502 If (p_rec.xdf_attribute1 = hr_api.g_varchar2) then
503 p_rec.xdf_attribute1 :=
504 ben_xdf_shd.g_old_rec.xdf_attribute1;
505 End If;
506 If (p_rec.xdf_attribute2 = hr_api.g_varchar2) then
507 p_rec.xdf_attribute2 :=
508 ben_xdf_shd.g_old_rec.xdf_attribute2;
509 End If;
510 If (p_rec.xdf_attribute3 = hr_api.g_varchar2) then
511 p_rec.xdf_attribute3 :=
512 ben_xdf_shd.g_old_rec.xdf_attribute3;
513 End If;
514 If (p_rec.xdf_attribute4 = hr_api.g_varchar2) then
515 p_rec.xdf_attribute4 :=
516 ben_xdf_shd.g_old_rec.xdf_attribute4;
517 End If;
518 If (p_rec.xdf_attribute5 = hr_api.g_varchar2) then
519 p_rec.xdf_attribute5 :=
520 ben_xdf_shd.g_old_rec.xdf_attribute5;
521 End If;
522 If (p_rec.xdf_attribute6 = hr_api.g_varchar2) then
523 p_rec.xdf_attribute6 :=
524 ben_xdf_shd.g_old_rec.xdf_attribute6;
525 End If;
526 If (p_rec.xdf_attribute7 = hr_api.g_varchar2) then
527 p_rec.xdf_attribute7 :=
528 ben_xdf_shd.g_old_rec.xdf_attribute7;
529 End If;
530 If (p_rec.xdf_attribute8 = hr_api.g_varchar2) then
531 p_rec.xdf_attribute8 :=
532 ben_xdf_shd.g_old_rec.xdf_attribute8;
533 End If;
534 If (p_rec.xdf_attribute9 = hr_api.g_varchar2) then
535 p_rec.xdf_attribute9 :=
536 ben_xdf_shd.g_old_rec.xdf_attribute9;
537 End If;
538 If (p_rec.xdf_attribute10 = hr_api.g_varchar2) then
539 p_rec.xdf_attribute10 :=
540 ben_xdf_shd.g_old_rec.xdf_attribute10;
541 End If;
542 If (p_rec.xdf_attribute11 = hr_api.g_varchar2) then
543 p_rec.xdf_attribute11 :=
544 ben_xdf_shd.g_old_rec.xdf_attribute11;
545 End If;
546 If (p_rec.xdf_attribute12 = hr_api.g_varchar2) then
547 p_rec.xdf_attribute12 :=
548 ben_xdf_shd.g_old_rec.xdf_attribute12;
549 End If;
550 If (p_rec.xdf_attribute13 = hr_api.g_varchar2) then
551 p_rec.xdf_attribute13 :=
552 ben_xdf_shd.g_old_rec.xdf_attribute13;
553 End If;
554 If (p_rec.xdf_attribute14 = hr_api.g_varchar2) then
555 p_rec.xdf_attribute14 :=
556 ben_xdf_shd.g_old_rec.xdf_attribute14;
557 End If;
558 If (p_rec.xdf_attribute15 = hr_api.g_varchar2) then
559 p_rec.xdf_attribute15 :=
560 ben_xdf_shd.g_old_rec.xdf_attribute15;
561 End If;
562 If (p_rec.xdf_attribute16 = hr_api.g_varchar2) then
563 p_rec.xdf_attribute16 :=
564 ben_xdf_shd.g_old_rec.xdf_attribute16;
565 End If;
566 If (p_rec.xdf_attribute17 = hr_api.g_varchar2) then
567 p_rec.xdf_attribute17 :=
568 ben_xdf_shd.g_old_rec.xdf_attribute17;
569 End If;
570 If (p_rec.xdf_attribute18 = hr_api.g_varchar2) then
571 p_rec.xdf_attribute18 :=
572 ben_xdf_shd.g_old_rec.xdf_attribute18;
573 End If;
574 If (p_rec.xdf_attribute19 = hr_api.g_varchar2) then
575 p_rec.xdf_attribute19 :=
576 ben_xdf_shd.g_old_rec.xdf_attribute19;
577 End If;
578 If (p_rec.xdf_attribute20 = hr_api.g_varchar2) then
579 p_rec.xdf_attribute20 :=
580 ben_xdf_shd.g_old_rec.xdf_attribute20;
581 End If;
582 If (p_rec.xdf_attribute21 = hr_api.g_varchar2) then
583 p_rec.xdf_attribute21 :=
584 ben_xdf_shd.g_old_rec.xdf_attribute21;
585 End If;
586 If (p_rec.xdf_attribute22 = hr_api.g_varchar2) then
587 p_rec.xdf_attribute22 :=
588 ben_xdf_shd.g_old_rec.xdf_attribute22;
589 End If;
590 If (p_rec.xdf_attribute23 = hr_api.g_varchar2) then
591 p_rec.xdf_attribute23 :=
592 ben_xdf_shd.g_old_rec.xdf_attribute23;
593 End If;
594 If (p_rec.xdf_attribute24 = hr_api.g_varchar2) then
595 p_rec.xdf_attribute24 :=
596 ben_xdf_shd.g_old_rec.xdf_attribute24;
597 End If;
598 If (p_rec.xdf_attribute25 = hr_api.g_varchar2) then
599 p_rec.xdf_attribute25 :=
600 ben_xdf_shd.g_old_rec.xdf_attribute25;
601 End If;
602 If (p_rec.xdf_attribute26 = hr_api.g_varchar2) then
603 p_rec.xdf_attribute26 :=
604 ben_xdf_shd.g_old_rec.xdf_attribute26;
605 End If;
606 If (p_rec.xdf_attribute27 = hr_api.g_varchar2) then
607 p_rec.xdf_attribute27 :=
608 ben_xdf_shd.g_old_rec.xdf_attribute27;
609 End If;
610 If (p_rec.xdf_attribute28 = hr_api.g_varchar2) then
611 p_rec.xdf_attribute28 :=
612 ben_xdf_shd.g_old_rec.xdf_attribute28;
613 End If;
614 If (p_rec.xdf_attribute29 = hr_api.g_varchar2) then
615 p_rec.xdf_attribute29 :=
616 ben_xdf_shd.g_old_rec.xdf_attribute29;
617 End If;
618 If (p_rec.xdf_attribute30 = hr_api.g_varchar2) then
619 p_rec.xdf_attribute30 :=
620 ben_xdf_shd.g_old_rec.xdf_attribute30;
621 End If;
622 If (p_rec.drctry_name = hr_api.g_varchar2) then
623 p_rec.drctry_name :=
624 ben_xdf_shd.g_old_rec.drctry_name;
625 End If;
626 If (p_rec.kickoff_wrt_prc_flag = hr_api.g_varchar2) then
627 p_rec.kickoff_wrt_prc_flag :=
628 ben_xdf_shd.g_old_rec.kickoff_wrt_prc_flag;
629 End If;
630 If (p_rec.upd_cm_sent_dt_flag = hr_api.g_varchar2) then
631 p_rec.upd_cm_sent_dt_flag :=
632 ben_xdf_shd.g_old_rec.upd_cm_sent_dt_flag;
633 End If;
634 If (p_rec.spcl_hndl_flag = hr_api.g_varchar2) then
635 p_rec.spcl_hndl_flag :=
636 ben_xdf_shd.g_old_rec.spcl_hndl_flag;
637 End If;
638
639 If (p_rec.ext_global_flag = hr_api.g_varchar2) then
640 p_rec.ext_global_flag :=
641 ben_xdf_shd.g_old_rec.ext_global_flag;
642 End If;
643
644 If (p_rec.cm_display_flag = hr_api.g_varchar2) then
645 p_rec.cm_display_flag :=
646 ben_xdf_shd.g_old_rec.cm_display_flag;
647 End If;
648
649 If (p_rec.use_eff_dt_for_chgs_flag = hr_api.g_varchar2) then
650 p_rec.use_eff_dt_for_chgs_flag :=
651 ben_xdf_shd.g_old_rec.use_eff_dt_for_chgs_flag;
652 End If;
653 If (p_rec.ext_post_prcs_rl = hr_api.g_number) then
654 p_rec.ext_post_prcs_rl :=
655 ben_xdf_shd.g_old_rec.ext_post_prcs_rl;
656 End If;
657 --
658 hr_utility.set_location(' Leaving:'||l_proc, 10);
659 --
660 End convert_defs;
661 --
662 -- ----------------------------------------------------------------------------
663 -- |---------------------------------< upd >----------------------------------|
664 -- ----------------------------------------------------------------------------
665 Procedure upd
666 (
667 p_effective_date in date,
668 p_rec in out nocopy ben_xdf_shd.g_rec_type
669 ) is
670 --
671 l_proc varchar2(72) := g_package||'upd';
672 --
673 Begin
674 hr_utility.set_location('Entering:'||l_proc, 5);
675 --
676 -- We must lock the row which we need to update.
677 --
678 ben_xdf_shd.lck
679 (
680 p_rec.ext_dfn_id,
681 p_rec.object_version_number
682 );
683 --
684 -- 1. During an update system defaults are used to determine if
685 -- arguments have been defaulted or not. We must therefore
686 -- derive the full record structure values to be updated.
687 --
688 -- 2. Call the supporting update validate operations.
689 --
690 convert_defs(p_rec);
691 ben_xdf_bus.update_validate(p_rec
692 ,p_effective_date);
693 --- vlidate the xml_tag_name
694 ben_xel_bus.chk_xml_name_format
695 ( p_xml_tag_name => p_rec.xml_tag_name
696 ) ;
697 ---
698 -- Call the supporting pre-update operation
699 --
700 pre_update(p_rec);
701 --
702 -- Update the row.
703 --
704 update_dml(p_rec);
705 --
706 -- Call the supporting post-update operation
707 --
708 post_update(
709 p_effective_date,p_rec);
710 End upd;
711 --
712 -- ----------------------------------------------------------------------------
713 -- |---------------------------------< upd >----------------------------------|
714 -- ----------------------------------------------------------------------------
715 Procedure upd
716 (
717 p_effective_date in date,
718 p_ext_dfn_id in number,
719 p_name in varchar2 default hr_api.g_varchar2,
720 p_xml_tag_name in varchar2 default hr_api.g_varchar2,
721 p_xdo_template_id in number default hr_api.g_number,
722 p_data_typ_cd in varchar2 default hr_api.g_varchar2,
723 p_ext_typ_cd in varchar2 default hr_api.g_varchar2,
724 p_output_name in varchar2 default hr_api.g_varchar2,
725 p_output_type in varchar2 default hr_api.g_varchar2,
726 p_apnd_rqst_id_flag in varchar2 default hr_api.g_varchar2,
727 p_prmy_sort_cd in varchar2 default hr_api.g_varchar2,
728 p_scnd_sort_cd in varchar2 default hr_api.g_varchar2,
729 p_strt_dt in varchar2 default hr_api.g_varchar2,
730 p_end_dt in varchar2 default hr_api.g_varchar2,
731 p_ext_crit_prfl_id in number default hr_api.g_number,
732 p_ext_file_id in number default hr_api.g_number,
733 p_business_group_id in number default hr_api.g_number,
734 p_legislation_code in varchar2 default hr_api.g_varchar2,
735 p_xdf_attribute_category in varchar2 default hr_api.g_varchar2,
736 p_xdf_attribute1 in varchar2 default hr_api.g_varchar2,
737 p_xdf_attribute2 in varchar2 default hr_api.g_varchar2,
738 p_xdf_attribute3 in varchar2 default hr_api.g_varchar2,
739 p_xdf_attribute4 in varchar2 default hr_api.g_varchar2,
740 p_xdf_attribute5 in varchar2 default hr_api.g_varchar2,
741 p_xdf_attribute6 in varchar2 default hr_api.g_varchar2,
742 p_xdf_attribute7 in varchar2 default hr_api.g_varchar2,
743 p_xdf_attribute8 in varchar2 default hr_api.g_varchar2,
744 p_xdf_attribute9 in varchar2 default hr_api.g_varchar2,
745 p_xdf_attribute10 in varchar2 default hr_api.g_varchar2,
746 p_xdf_attribute11 in varchar2 default hr_api.g_varchar2,
747 p_xdf_attribute12 in varchar2 default hr_api.g_varchar2,
748 p_xdf_attribute13 in varchar2 default hr_api.g_varchar2,
749 p_xdf_attribute14 in varchar2 default hr_api.g_varchar2,
750 p_xdf_attribute15 in varchar2 default hr_api.g_varchar2,
751 p_xdf_attribute16 in varchar2 default hr_api.g_varchar2,
752 p_xdf_attribute17 in varchar2 default hr_api.g_varchar2,
753 p_xdf_attribute18 in varchar2 default hr_api.g_varchar2,
754 p_xdf_attribute19 in varchar2 default hr_api.g_varchar2,
755 p_xdf_attribute20 in varchar2 default hr_api.g_varchar2,
756 p_xdf_attribute21 in varchar2 default hr_api.g_varchar2,
757 p_xdf_attribute22 in varchar2 default hr_api.g_varchar2,
758 p_xdf_attribute23 in varchar2 default hr_api.g_varchar2,
759 p_xdf_attribute24 in varchar2 default hr_api.g_varchar2,
760 p_xdf_attribute25 in varchar2 default hr_api.g_varchar2,
761 p_xdf_attribute26 in varchar2 default hr_api.g_varchar2,
762 p_xdf_attribute27 in varchar2 default hr_api.g_varchar2,
763 p_xdf_attribute28 in varchar2 default hr_api.g_varchar2,
764 p_xdf_attribute29 in varchar2 default hr_api.g_varchar2,
765 p_xdf_attribute30 in varchar2 default hr_api.g_varchar2,
766 p_last_update_date in date default hr_api.g_date,
767 p_creation_date in date default hr_api.g_date,
768 p_last_updated_by in number default hr_api.g_number,
769 p_last_update_login in number default hr_api.g_number,
770 p_created_by in number default hr_api.g_number,
771 p_object_version_number in out nocopy number,
772 p_drctry_name in varchar2 default hr_api.g_varchar2,
773 p_kickoff_wrt_prc_flag in varchar2 default hr_api.g_varchar2,
774 p_upd_cm_sent_dt_flag in varchar2 default hr_api.g_varchar2,
775 p_spcl_hndl_flag in varchar2 default hr_api.g_varchar2,
776 p_ext_global_flag in varchar2 default hr_api.g_varchar2,
777 p_cm_display_flag in varchar2 default hr_api.g_varchar2,
778 p_use_eff_dt_for_chgs_flag in varchar2 default hr_api.g_varchar2,
779 p_ext_post_prcs_rl in number default hr_api.g_number
780 ) is
781 --
782 l_rec ben_xdf_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_xdf_shd.convert_args
793 (
794 p_ext_dfn_id,
795 p_name,
796 p_xml_tag_name,
797 p_xdo_template_id,
798 p_data_typ_cd,
799 p_ext_typ_cd,
800 p_output_name,
801 p_output_type,
802 p_apnd_rqst_id_flag,
803 p_prmy_sort_cd,
804 p_scnd_sort_cd,
805 p_strt_dt,
806 p_end_dt,
807 p_ext_crit_prfl_id,
808 p_ext_file_id,
809 p_business_group_id,
810 p_legislation_code,
811 p_xdf_attribute_category,
812 p_xdf_attribute1,
813 p_xdf_attribute2,
814 p_xdf_attribute3,
815 p_xdf_attribute4,
816 p_xdf_attribute5,
817 p_xdf_attribute6,
818 p_xdf_attribute7,
819 p_xdf_attribute8,
820 p_xdf_attribute9,
821 p_xdf_attribute10,
822 p_xdf_attribute11,
823 p_xdf_attribute12,
824 p_xdf_attribute13,
825 p_xdf_attribute14,
826 p_xdf_attribute15,
827 p_xdf_attribute16,
828 p_xdf_attribute17,
829 p_xdf_attribute18,
830 p_xdf_attribute19,
831 p_xdf_attribute20,
832 p_xdf_attribute21,
833 p_xdf_attribute22,
834 p_xdf_attribute23,
835 p_xdf_attribute24,
836 p_xdf_attribute25,
837 p_xdf_attribute26,
838 p_xdf_attribute27,
839 p_xdf_attribute28,
840 p_xdf_attribute29,
841 p_xdf_attribute30,
842 p_last_update_date ,
843 p_creation_date ,
844 p_last_updated_by ,
845 p_last_update_login,
846 p_created_by ,
847 p_object_version_number,
848 p_drctry_name,
849 p_kickoff_wrt_prc_flag,
850 p_upd_cm_sent_dt_flag,
851 p_spcl_hndl_flag,
852 p_ext_global_flag,
853 p_cm_display_flag,
854 p_use_eff_dt_for_chgs_flag,
855 p_ext_post_prcs_rl
856 );
857 --
858 -- Having converted the arguments into the
859 -- plsql record structure we call the corresponding record
860 -- business process.
861 --
862 upd(
863 p_effective_date,l_rec);
864 p_object_version_number := l_rec.object_version_number;
865 --
866 hr_utility.set_location(' Leaving:'||l_proc, 10);
867 End upd;
868 --
869 end ben_xdf_upd;