[Home] [Help]
PACKAGE BODY: APPS.BEN_EGL_UPD
Source
1 Package Body ben_egl_upd as
2
3
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_egl_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_egl_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_egl_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_eligy_criteria Row
68 --
69 update ben_eligy_criteria
70 set
71 eligy_criteria_id = p_rec.eligy_criteria_id
72 ,name = p_rec.name
73 ,short_code = p_rec.short_code
74 ,description = p_rec.description
75 ,criteria_type = p_rec.criteria_type
76 ,crit_col1_val_type_cd = p_rec.crit_col1_val_type_cd
77 ,crit_col1_datatype = p_rec.crit_col1_datatype
78 ,col1_lookup_type = p_rec.col1_lookup_type
79 ,col1_value_set_id = p_rec.col1_value_set_id
80 ,access_table_name1 = p_rec.access_table_name1
81 ,access_column_name1 = p_rec.access_column_name1
82 ,time_entry_access_table_name1 = p_rec.time_entry_access_tab_nam1
83 ,time_entry_access_col_name1 = p_rec.time_entry_access_col_nam1
84 ,crit_col2_val_type_cd = p_rec.crit_col2_val_type_cd
85 ,crit_col2_datatype = p_rec.crit_col2_datatype
86 ,col2_lookup_type = p_rec.col2_lookup_type
87 ,col2_value_set_id = p_rec.col2_value_set_id
88 ,access_table_name2 = p_rec.access_table_name2
89 ,access_column_name2 = p_rec.access_column_name2
90 ,time_entry_access_table_name2 = p_rec.time_entry_access_tab_nam2
91 ,time_entry_access_col_name2 = p_rec.time_entry_access_col_nam2
92 ,access_calc_rule = p_rec.access_calc_rule
93 ,allow_range_validation_flag = p_rec.allow_range_validation_flg
94 ,user_defined_flag = p_rec.user_defined_flag
95 ,business_group_id = p_rec.business_group_id
96 ,legislation_code = p_rec.legislation_code
97 ,egl_attribute_category = p_rec.egl_attribute_category
98 ,egl_attribute1 = p_rec.egl_attribute1
99 ,egl_attribute2 = p_rec.egl_attribute2
100 ,egl_attribute3 = p_rec.egl_attribute3
101 ,egl_attribute4 = p_rec.egl_attribute4
102 ,egl_attribute5 = p_rec.egl_attribute5
103 ,egl_attribute6 = p_rec.egl_attribute6
104 ,egl_attribute7 = p_rec.egl_attribute7
105 ,egl_attribute8 = p_rec.egl_attribute8
106 ,egl_attribute9 = p_rec.egl_attribute9
107 ,egl_attribute10 = p_rec.egl_attribute10
108 ,egl_attribute11 = p_rec.egl_attribute11
109 ,egl_attribute12 = p_rec.egl_attribute12
110 ,egl_attribute13 = p_rec.egl_attribute13
111 ,egl_attribute14 = p_rec.egl_attribute14
112 ,egl_attribute15 = p_rec.egl_attribute15
113 ,egl_attribute16 = p_rec.egl_attribute16
114 ,egl_attribute17 = p_rec.egl_attribute17
115 ,egl_attribute18 = p_rec.egl_attribute18
116 ,egl_attribute19 = p_rec.egl_attribute19
117 ,egl_attribute20 = p_rec.egl_attribute20
118 ,egl_attribute21 = p_rec.egl_attribute21
119 ,egl_attribute22 = p_rec.egl_attribute22
120 ,egl_attribute23 = p_rec.egl_attribute23
121 ,egl_attribute24 = p_rec.egl_attribute24
122 ,egl_attribute25 = p_rec.egl_attribute25
123 ,egl_attribute26 = p_rec.egl_attribute26
124 ,egl_attribute27 = p_rec.egl_attribute27
125 ,egl_attribute28 = p_rec.egl_attribute28
126 ,egl_attribute29 = p_rec.egl_attribute29
127 ,egl_attribute30 = p_rec.egl_attribute30
128 ,object_version_number = p_rec.object_version_number
129 ,allow_range_validation_flag2 = p_rec.allow_range_validation_flag2
130 ,access_calc_rule2 = p_rec.access_calc_rule2
131 ,time_access_calc_rule1 = p_rec.time_access_calc_rule1
132 ,time_access_calc_rule2 = p_rec.time_access_calc_rule2
133
134
135 where eligy_criteria_id = p_rec.eligy_criteria_id;
136 --
137 ben_egl_shd.g_api_dml := false; -- Unset the api dml status
138 --
139 hr_utility.set_location(' Leaving:'||l_proc, 10);
140 --
141 Exception
142 When hr_api.check_integrity_violated Then
143 -- A check constraint has been violated
144 ben_egl_shd.g_api_dml := false; -- Unset the api dml status
145 ben_egl_shd.constraint_error
146 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
147 When hr_api.parent_integrity_violated Then
148 -- Parent integrity has been violated
149 ben_egl_shd.g_api_dml := false; -- Unset the api dml status
150 ben_egl_shd.constraint_error
151 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
152 When hr_api.unique_integrity_violated Then
153 -- Unique integrity has been violated
154 ben_egl_shd.g_api_dml := false; -- Unset the api dml status
155 ben_egl_shd.constraint_error
156 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
157 When Others Then
158 ben_egl_shd.g_api_dml := false; -- Unset the api dml status
159 Raise;
160 End update_dml;
161 --
162 -- ----------------------------------------------------------------------------
163 -- |------------------------------< pre_update >------------------------------|
164 -- ----------------------------------------------------------------------------
165 -- {Start Of Comments}
166 --
167 -- Description:
168 -- This private procedure contains any processing which is required before
169 -- the update dml.
170 --
171 -- Prerequisites:
172 -- This is an internal procedure which is called from the upd procedure.
173 --
174 -- In Parameters:
175 -- A Pl/Sql record structre.
176 --
177 -- Post Success:
178 -- Processing continues.
179 --
180 -- Post Failure:
181 -- If an error has occurred, an error message and exception will be raised
182 -- but not handled.
183 --
184 -- Developer Implementation Notes:
185 -- Any pre-processing required before the update dml is issued should be
186 -- coded within this procedure. It is important to note that any 3rd party
187 -- maintenance should be reviewed before placing in this procedure.
188 --
189 -- Access Status:
190 -- Internal Row Handler Use Only.
191 --
192 -- {End Of Comments}
193 -- ----------------------------------------------------------------------------
194 Procedure pre_update(p_rec in ben_egl_shd.g_rec_type) is
195 --
196 l_proc varchar2(72) := g_package||'pre_update';
197 --
198 Begin
199 hr_utility.set_location('Entering:'||l_proc, 5);
200 --
201 hr_utility.set_location(' Leaving:'||l_proc, 10);
202 End pre_update;
203 --
204 -- ----------------------------------------------------------------------------
205 -- |-----------------------------< post_update >------------------------------|
206 -- ----------------------------------------------------------------------------
207 -- {Start Of Comments}
208 --
209 -- Description:
210 -- This private procedure contains any processing which is required after the
211 -- update dml.
212 --
213 -- Prerequisites:
214 -- This is an internal procedure which is called from the upd procedure.
215 --
216 -- In Parameters:
217 -- A Pl/Sql record structre.
218 --
219 -- Post Success:
220 -- Processing continues.
221 --
222 -- Post Failure:
223 -- If an error has occurred, an error message and exception will be raised
224 -- but not handled.
225 --
226 -- Developer Implementation Notes:
227 -- Any post-processing required after the update dml is issued should be
228 -- coded within this procedure. It is important to note that any 3rd party
229 -- maintenance should be reviewed before placing in this procedure.
230 --
231 -- Access Status:
232 -- Internal Row Handler Use Only.
233 --
234 -- {End Of Comments}
235 -- ----------------------------------------------------------------------------
236 Procedure post_update( p_rec in ben_egl_shd.g_rec_type
237 ,p_effective_date in date) is
238 --
239 l_proc varchar2(72) := g_package||'post_update';
240 --
241 Begin
242 hr_utility.set_location('Entering:'||l_proc, 5);
243 --
244 --
245 -- Start of API User Hook for post_update.
246 --
247 begin
248 --
249 ben_egl_rku.after_update
250 (
251 p_eligy_criteria_id => p_rec.eligy_criteria_id
252 ,p_name => p_rec.name
253 ,p_short_code => p_rec.short_code
254 ,p_description => p_rec.description
255 ,p_criteria_type => p_rec.criteria_type
256 ,p_crit_col1_val_type_cd => p_rec.crit_col1_val_type_cd
260 ,p_access_table_name1 => p_rec.access_table_name1
257 ,p_crit_col1_datatype => p_rec.crit_col1_datatype
258 ,p_col1_lookup_type => p_rec.col1_lookup_type
259 ,p_col1_value_set_id => p_rec.col1_value_set_id
261 ,p_access_column_name1 => p_rec.access_column_name1
262 ,p_time_entry_access_tab_nam1 => p_rec.time_entry_access_tab_nam1
263 ,p_time_entry_access_col_nam1 => p_rec.time_entry_access_col_nam1
264 ,p_crit_col2_val_type_cd => p_rec.crit_col2_val_type_cd
265 ,p_crit_col2_datatype => p_rec.crit_col2_datatype
266 ,p_col2_lookup_type => p_rec.col2_lookup_type
267 ,p_col2_value_set_id => p_rec.col2_value_set_id
268 ,p_access_table_name2 => p_rec.access_table_name2
269 ,p_access_column_name2 => p_rec.access_column_name2
270 ,p_time_entry_access_tab_nam2 => p_rec.time_entry_access_tab_nam2
271 ,p_time_entry_access_col_nam2 => p_rec.time_entry_access_col_nam2
272 ,p_access_calc_rule => p_rec.access_calc_rule
273 ,p_allow_range_validation_flg => p_rec.allow_range_validation_flg
274 ,p_user_defined_flag => p_rec.user_defined_flag
275 ,p_business_group_id => p_rec.business_group_id
276 ,p_legislation_code => p_rec.legislation_code
277 ,p_egl_attribute_category => p_rec.egl_attribute_category
278 ,p_egl_attribute1 => p_rec.egl_attribute1
279 ,p_egl_attribute2 => p_rec.egl_attribute2
280 ,p_egl_attribute3 => p_rec.egl_attribute3
281 ,p_egl_attribute4 => p_rec.egl_attribute4
282 ,p_egl_attribute5 => p_rec.egl_attribute5
283 ,p_egl_attribute6 => p_rec.egl_attribute6
284 ,p_egl_attribute7 => p_rec.egl_attribute7
285 ,p_egl_attribute8 => p_rec.egl_attribute8
286 ,p_egl_attribute9 => p_rec.egl_attribute9
287 ,p_egl_attribute10 => p_rec.egl_attribute10
288 ,p_egl_attribute11 => p_rec.egl_attribute11
289 ,p_egl_attribute12 => p_rec.egl_attribute12
290 ,p_egl_attribute13 => p_rec.egl_attribute13
291 ,p_egl_attribute14 => p_rec.egl_attribute14
292 ,p_egl_attribute15 => p_rec.egl_attribute15
293 ,p_egl_attribute16 => p_rec.egl_attribute16
294 ,p_egl_attribute17 => p_rec.egl_attribute17
295 ,p_egl_attribute18 => p_rec.egl_attribute18
296 ,p_egl_attribute19 => p_rec.egl_attribute19
297 ,p_egl_attribute20 => p_rec.egl_attribute20
298 ,p_egl_attribute21 => p_rec.egl_attribute21
299 ,p_egl_attribute22 => p_rec.egl_attribute22
300 ,p_egl_attribute23 => p_rec.egl_attribute23
301 ,p_egl_attribute24 => p_rec.egl_attribute24
302 ,p_egl_attribute25 => p_rec.egl_attribute25
303 ,p_egl_attribute26 => p_rec.egl_attribute26
304 ,p_egl_attribute27 => p_rec.egl_attribute27
305 ,p_egl_attribute28 => p_rec.egl_attribute28
306 ,p_egl_attribute29 => p_rec.egl_attribute29
307 ,p_egl_attribute30 => p_rec.egl_attribute30
308 ,p_object_version_number => p_rec.object_version_number
309 ,p_effective_date => p_effective_date
310 ,p_allow_range_validation_flag2 => p_rec.allow_range_validation_flag2
311 ,p_access_calc_rule2 => p_rec.access_calc_rule2
312 ,p_time_access_calc_rule1 => p_rec.time_access_calc_rule1
313 ,p_time_access_calc_rule2 => p_rec.time_access_calc_rule2
314 ,p_name_o => ben_egl_shd.g_old_rec.name
315 ,p_short_code_o => ben_egl_shd.g_old_rec.short_code
316 ,p_description_o => ben_egl_shd.g_old_rec.description
317 ,p_criteria_type_o => ben_egl_shd.g_old_rec.criteria_type
318 ,p_crit_col1_val_type_cd_o => ben_egl_shd.g_old_rec.crit_col1_val_type_cd
319 ,p_crit_col1_datatype_o => ben_egl_shd.g_old_rec.crit_col1_datatype
320 ,p_col1_lookup_type_o => ben_egl_shd.g_old_rec.col1_lookup_type
321 ,p_col1_value_set_id_o => ben_egl_shd.g_old_rec.col1_value_set_id
322 ,p_access_table_name1_o => ben_egl_shd.g_old_rec.access_table_name1
323 ,p_access_column_name1_o => ben_egl_shd.g_old_rec.access_column_name1
324 ,p_time_entry_access_tab_nam1_o => ben_egl_shd.g_old_rec.time_entry_access_tab_nam1
325 ,p_time_entry_access_col_nam1_o => ben_egl_shd.g_old_rec.time_entry_access_col_nam1
326 ,p_crit_col2_val_type_cd_o => ben_egl_shd.g_old_rec.crit_col2_val_type_cd
327 ,p_crit_col2_datatype_o => ben_egl_shd.g_old_rec.crit_col2_datatype
328 ,p_col2_lookup_type_o => ben_egl_shd.g_old_rec.col2_lookup_type
329 ,p_col2_value_set_id_o => ben_egl_shd.g_old_rec.col2_value_set_id
330 ,p_access_table_name2_o => ben_egl_shd.g_old_rec.access_table_name2
331 ,p_access_column_name2_o => ben_egl_shd.g_old_rec.access_column_name2
332 ,p_time_entry_access_tab_nam2_o => ben_egl_shd.g_old_rec.time_entry_access_tab_nam2
333 ,p_time_entry_access_col_nam2_o => ben_egl_shd.g_old_rec.time_entry_access_col_nam2
334 ,p_access_calc_rule_o => ben_egl_shd.g_old_rec.access_calc_rule
335 ,p_allow_range_validation_flg_o => ben_egl_shd.g_old_rec.allow_range_validation_flg
336 ,p_user_defined_flag_o => ben_egl_shd.g_old_rec.user_defined_flag
337 ,p_business_group_id_o => ben_egl_shd.g_old_rec.business_group_id
338 ,p_legislation_code_o => ben_egl_shd.g_old_rec.legislation_code
339 ,p_egl_attribute_category_o => ben_egl_shd.g_old_rec.egl_attribute_category
343 ,p_egl_attribute4_o => ben_egl_shd.g_old_rec.egl_attribute4
340 ,p_egl_attribute1_o => ben_egl_shd.g_old_rec.egl_attribute1
341 ,p_egl_attribute2_o => ben_egl_shd.g_old_rec.egl_attribute2
342 ,p_egl_attribute3_o => ben_egl_shd.g_old_rec.egl_attribute3
344 ,p_egl_attribute5_o => ben_egl_shd.g_old_rec.egl_attribute5
345 ,p_egl_attribute6_o => ben_egl_shd.g_old_rec.egl_attribute6
346 ,p_egl_attribute7_o => ben_egl_shd.g_old_rec.egl_attribute7
347 ,p_egl_attribute8_o => ben_egl_shd.g_old_rec.egl_attribute8
348 ,p_egl_attribute9_o => ben_egl_shd.g_old_rec.egl_attribute9
349 ,p_egl_attribute10_o => ben_egl_shd.g_old_rec.egl_attribute10
350 ,p_egl_attribute11_o => ben_egl_shd.g_old_rec.egl_attribute11
351 ,p_egl_attribute12_o => ben_egl_shd.g_old_rec.egl_attribute12
352 ,p_egl_attribute13_o => ben_egl_shd.g_old_rec.egl_attribute13
353 ,p_egl_attribute14_o => ben_egl_shd.g_old_rec.egl_attribute14
354 ,p_egl_attribute15_o => ben_egl_shd.g_old_rec.egl_attribute15
355 ,p_egl_attribute16_o => ben_egl_shd.g_old_rec.egl_attribute16
356 ,p_egl_attribute17_o => ben_egl_shd.g_old_rec.egl_attribute17
357 ,p_egl_attribute18_o => ben_egl_shd.g_old_rec.egl_attribute18
358 ,p_egl_attribute19_o => ben_egl_shd.g_old_rec.egl_attribute19
359 ,p_egl_attribute20_o => ben_egl_shd.g_old_rec.egl_attribute20
360 ,p_egl_attribute21_o => ben_egl_shd.g_old_rec.egl_attribute21
361 ,p_egl_attribute22_o => ben_egl_shd.g_old_rec.egl_attribute22
362 ,p_egl_attribute23_o => ben_egl_shd.g_old_rec.egl_attribute23
363 ,p_egl_attribute24_o => ben_egl_shd.g_old_rec.egl_attribute24
364 ,p_egl_attribute25_o => ben_egl_shd.g_old_rec.egl_attribute25
365 ,p_egl_attribute26_o => ben_egl_shd.g_old_rec.egl_attribute26
366 ,p_egl_attribute27_o => ben_egl_shd.g_old_rec.egl_attribute27
367 ,p_egl_attribute28_o => ben_egl_shd.g_old_rec.egl_attribute28
368 ,p_egl_attribute29_o => ben_egl_shd.g_old_rec.egl_attribute29
369 ,p_egl_attribute30_o => ben_egl_shd.g_old_rec.egl_attribute30
370 ,p_object_version_number_o => ben_egl_shd.g_old_rec.object_version_number
371 ,p_allw_range_validation_flg2_o => ben_egl_shd.g_old_rec.allow_range_validation_flag2
372 ,p_access_calc_rule2_o => ben_egl_shd.g_old_rec.access_calc_rule2
373 ,p_time_access_calc_rule1_o => ben_egl_shd.g_old_rec.time_access_calc_rule1
374 ,p_time_access_calc_rule2_o => ben_egl_shd.g_old_rec.time_access_calc_rule2
375 );
376 --
377 exception
378 --
379 when hr_api.cannot_find_prog_unit then
380 --
381 hr_api.cannot_find_prog_unit_error
382 (p_module_name => 'ben_eligy_criteria'
383 ,p_hook_type => 'AU');
384 --
385 end;
386 --
387 -- End of API User Hook for post_update.
388 --
389 --
390 hr_utility.set_location(' Leaving:'||l_proc, 10);
391 End post_update;
392 --
393 -- ----------------------------------------------------------------------------
394 -- |-----------------------------< convert_defs >-----------------------------|
395 -- ----------------------------------------------------------------------------
396 -- {Start Of Comments}
397 --
398 -- Description:
399 -- The Convert_Defs procedure has one very important function:
400 -- It must return the record structure for the row with all system defaulted
401 -- values converted into its corresponding parameter value for update. When
402 -- we attempt to update a row through the Upd process , certain
403 -- parameters can be defaulted which enables flexibility in the calling of
404 -- the upd process (e.g. only attributes which need to be updated need to be
405 -- specified). For the upd process to determine which attributes
406 -- have NOT been specified we need to check if the parameter has a reserved
407 -- system default value. Therefore, for all parameters which have a
408 -- corresponding reserved system default mechanism specified we need to
409 -- check if a system default is being used. If a system default is being
410 -- used then we convert the defaulted value into its corresponding attribute
411 -- value held in the g_old_rec data structure.
412 --
413 -- Prerequisites:
414 -- This private function can only be called from the upd process.
415 --
416 -- In Parameters:
417 -- A Pl/Sql record structre.
418 --
419 -- Post Success:
420 -- The record structure will be returned with all system defaulted parameter
421 -- values converted into its current row attribute value.
422 --
423 -- Post Failure:
424 -- No direct error handling is required within this function. Any possible
425 -- errors within this procedure will be a PL/SQL value error due to conversion
426 -- of datatypes or data lengths.
427 --
428 -- Developer Implementation Notes:
429 -- None.
430 --
431 -- Access Status:
432 -- Internal Row Handler Use Only.
433 --
434 -- {End Of Comments}
435 -- ----------------------------------------------------------------------------
436 Procedure convert_defs(p_rec in out nocopy ben_egl_shd.g_rec_type) is
437 --
438 l_proc varchar2(72) := g_package||'convert_defs';
439 --
440 Begin
441 --
442 hr_utility.set_location('Entering:'||l_proc, 5);
443 --
444 -- We must now examine each argument value in the
445 -- p_rec plsql record structure
446 -- to see if a system default is being used. If a system default
450 If (p_rec.name = hr_api.g_varchar2) then
447 -- is being used then we must set to the 'current' argument value.
448 --
449
451 p_rec.name :=
452 ben_egl_shd.g_old_rec.name;
453 End If;
454 If (p_rec.short_code = hr_api.g_varchar2) then
455 p_rec.short_code :=
456 ben_egl_shd.g_old_rec.short_code;
457 End If;
458 If (p_rec.description = hr_api.g_varchar2) then
459 p_rec.description :=
460 ben_egl_shd.g_old_rec.description;
461 End If;
462 If (p_rec.criteria_type = hr_api.g_varchar2) then
463 p_rec.criteria_type :=
464 ben_egl_shd.g_old_rec.criteria_type;
465 End If;
466 If (p_rec.crit_col1_val_type_cd = hr_api.g_varchar2) then
467 p_rec.crit_col1_val_type_cd :=
468 ben_egl_shd.g_old_rec.crit_col1_val_type_cd;
469 End If;
470 If (p_rec.crit_col1_datatype = hr_api.g_varchar2) then
471 p_rec.crit_col1_datatype :=
472 ben_egl_shd.g_old_rec.crit_col1_datatype;
473 End If;
474 If (p_rec.col1_lookup_type = hr_api.g_varchar2) then
475 p_rec.col1_lookup_type :=
476 ben_egl_shd.g_old_rec.col1_lookup_type;
477 End If;
478 If (p_rec.col1_value_set_id = hr_api.g_number) then
479 p_rec.col1_value_set_id :=
480 ben_egl_shd.g_old_rec.col1_value_set_id;
481 End If;
482 If (p_rec.access_table_name1 = hr_api.g_varchar2) then
483 p_rec.access_table_name1 :=
484 ben_egl_shd.g_old_rec.access_table_name1;
485 End If;
486 If (p_rec.access_column_name1 = hr_api.g_varchar2) then
487 p_rec.access_column_name1 :=
488 ben_egl_shd.g_old_rec.access_column_name1;
489 End If;
490 If (p_rec.time_entry_access_tab_nam1 = hr_api.g_varchar2) then
491 p_rec.time_entry_access_tab_nam1 :=
492 ben_egl_shd.g_old_rec.time_entry_access_tab_nam1;
493 End If;
494 If (p_rec.time_entry_access_col_nam1 = hr_api.g_varchar2) then
495 p_rec.time_entry_access_col_nam1 :=
496 ben_egl_shd.g_old_rec.time_entry_access_col_nam1;
497 End If;
498 If (p_rec.crit_col2_val_type_cd = hr_api.g_varchar2) then
499 p_rec.crit_col2_val_type_cd :=
500 ben_egl_shd.g_old_rec.crit_col2_val_type_cd;
501 End If;
502 If (p_rec.crit_col2_datatype = hr_api.g_varchar2) then
503 p_rec.crit_col2_datatype :=
504 ben_egl_shd.g_old_rec.crit_col2_datatype;
505 End If;
506 If (p_rec.col2_lookup_type = hr_api.g_varchar2) then
507 p_rec.col2_lookup_type :=
508 ben_egl_shd.g_old_rec.col2_lookup_type;
509 End If;
510 If (p_rec.col2_value_set_id = hr_api.g_number) then
511 p_rec.col2_value_set_id :=
512 ben_egl_shd.g_old_rec.col2_value_set_id;
513 End If;
514 If (p_rec.access_table_name2 = hr_api.g_varchar2) then
515 p_rec.access_table_name2 :=
516 ben_egl_shd.g_old_rec.access_table_name2;
517 End If;
518 If (p_rec.access_column_name2 = hr_api.g_varchar2) then
519 p_rec.access_column_name2 :=
520 ben_egl_shd.g_old_rec.access_column_name2;
521 End If;
522 If (p_rec.time_entry_access_tab_nam2 = hr_api.g_varchar2) then
523 p_rec.time_entry_access_tab_nam2 :=
524 ben_egl_shd.g_old_rec.time_entry_access_tab_nam2;
525 End If;
526 If (p_rec.time_entry_access_col_nam2 = hr_api.g_varchar2) then
527 p_rec.time_entry_access_col_nam2 :=
528 ben_egl_shd.g_old_rec.time_entry_access_col_nam2;
529 End If;
530 If (p_rec.access_calc_rule = hr_api.g_number) then
531 p_rec.access_calc_rule :=
532 ben_egl_shd.g_old_rec.access_calc_rule;
533 End If;
534 If (p_rec.allow_range_validation_flg = hr_api.g_varchar2) then
535 p_rec.allow_range_validation_flg :=
536 ben_egl_shd.g_old_rec.allow_range_validation_flg;
537 End If;
538 If (p_rec.user_defined_flag = hr_api.g_varchar2) then
539 p_rec.user_defined_flag :=
540 ben_egl_shd.g_old_rec.user_defined_flag;
541 End If;
542 If (p_rec.legislation_code = hr_api.g_varchar2) then
543 p_rec.legislation_code :=
544 ben_egl_shd.g_old_rec.legislation_code;
545 End If;
546 If (p_rec.business_group_id = hr_api.g_number) then
547 p_rec.business_group_id :=
548 ben_egl_shd.g_old_rec.business_group_id;
549 End If;
550
551 If (p_rec.egl_attribute_category = hr_api.g_varchar2) then
552 p_rec.egl_attribute_category :=
553 ben_egl_shd.g_old_rec.egl_attribute_category;
554 End If;
555 If (p_rec.egl_attribute1 = hr_api.g_varchar2) then
556 p_rec.egl_attribute1 :=
557 ben_egl_shd.g_old_rec.egl_attribute1;
558 End If;
559 If (p_rec.egl_attribute2 = hr_api.g_varchar2) then
560 p_rec.egl_attribute2 :=
561 ben_egl_shd.g_old_rec.egl_attribute2;
562 End If;
563 If (p_rec.egl_attribute3 = hr_api.g_varchar2) then
564 p_rec.egl_attribute3 :=
565 ben_egl_shd.g_old_rec.egl_attribute3;
566 End If;
567 If (p_rec.egl_attribute4 = hr_api.g_varchar2) then
568 p_rec.egl_attribute4 :=
569 ben_egl_shd.g_old_rec.egl_attribute4;
570 End If;
571 If (p_rec.egl_attribute5 = hr_api.g_varchar2) then
572 p_rec.egl_attribute5 :=
573 ben_egl_shd.g_old_rec.egl_attribute5;
574 End If;
575 If (p_rec.egl_attribute6 = hr_api.g_varchar2) then
576 p_rec.egl_attribute6 :=
577 ben_egl_shd.g_old_rec.egl_attribute6;
578 End If;
579 If (p_rec.egl_attribute7 = hr_api.g_varchar2) then
580 p_rec.egl_attribute7 :=
581 ben_egl_shd.g_old_rec.egl_attribute7;
582 End If;
583 If (p_rec.egl_attribute8 = hr_api.g_varchar2) then
584 p_rec.egl_attribute8 :=
585 ben_egl_shd.g_old_rec.egl_attribute8;
586 End If;
590 End If;
587 If (p_rec.egl_attribute9 = hr_api.g_varchar2) then
588 p_rec.egl_attribute9 :=
589 ben_egl_shd.g_old_rec.egl_attribute9;
591 If (p_rec.egl_attribute10 = hr_api.g_varchar2) then
592 p_rec.egl_attribute10 :=
593 ben_egl_shd.g_old_rec.egl_attribute10;
594 End If;
595 If (p_rec.egl_attribute11 = hr_api.g_varchar2) then
596 p_rec.egl_attribute11 :=
597 ben_egl_shd.g_old_rec.egl_attribute11;
598 End If;
599 If (p_rec.egl_attribute12 = hr_api.g_varchar2) then
600 p_rec.egl_attribute12 :=
601 ben_egl_shd.g_old_rec.egl_attribute12;
602 End If;
603 If (p_rec.egl_attribute13 = hr_api.g_varchar2) then
604 p_rec.egl_attribute13 :=
605 ben_egl_shd.g_old_rec.egl_attribute13;
606 End If;
607 If (p_rec.egl_attribute14 = hr_api.g_varchar2) then
608 p_rec.egl_attribute14 :=
609 ben_egl_shd.g_old_rec.egl_attribute14;
610 End If;
611 If (p_rec.egl_attribute15 = hr_api.g_varchar2) then
612 p_rec.egl_attribute15 :=
613 ben_egl_shd.g_old_rec.egl_attribute15;
614 End If;
615 If (p_rec.egl_attribute16 = hr_api.g_varchar2) then
616 p_rec.egl_attribute16 :=
617 ben_egl_shd.g_old_rec.egl_attribute16;
618 End If;
619 If (p_rec.egl_attribute17 = hr_api.g_varchar2) then
620 p_rec.egl_attribute17 :=
621 ben_egl_shd.g_old_rec.egl_attribute17;
622 End If;
623 If (p_rec.egl_attribute18 = hr_api.g_varchar2) then
624 p_rec.egl_attribute18 :=
625 ben_egl_shd.g_old_rec.egl_attribute18;
626 End If;
627 If (p_rec.egl_attribute19 = hr_api.g_varchar2) then
628 p_rec.egl_attribute19 :=
629 ben_egl_shd.g_old_rec.egl_attribute19;
630 End If;
631 If (p_rec.egl_attribute20 = hr_api.g_varchar2) then
632 p_rec.egl_attribute20 :=
633 ben_egl_shd.g_old_rec.egl_attribute20;
634 End If;
635 If (p_rec.egl_attribute21 = hr_api.g_varchar2) then
636 p_rec.egl_attribute21 :=
637 ben_egl_shd.g_old_rec.egl_attribute21;
638 End If;
639 If (p_rec.egl_attribute22 = hr_api.g_varchar2) then
640 p_rec.egl_attribute22 :=
641 ben_egl_shd.g_old_rec.egl_attribute22;
642 End If;
643 If (p_rec.egl_attribute23 = hr_api.g_varchar2) then
644 p_rec.egl_attribute23 :=
645 ben_egl_shd.g_old_rec.egl_attribute23;
646 End If;
647 If (p_rec.egl_attribute24 = hr_api.g_varchar2) then
648 p_rec.egl_attribute24 :=
649 ben_egl_shd.g_old_rec.egl_attribute24;
650 End If;
651 If (p_rec.egl_attribute25 = hr_api.g_varchar2) then
652 p_rec.egl_attribute25 :=
653 ben_egl_shd.g_old_rec.egl_attribute25;
654 End If;
655 If (p_rec.egl_attribute26 = hr_api.g_varchar2) then
656 p_rec.egl_attribute26 :=
657 ben_egl_shd.g_old_rec.egl_attribute26;
658 End If;
659 If (p_rec.egl_attribute27 = hr_api.g_varchar2) then
660 p_rec.egl_attribute27 :=
661 ben_egl_shd.g_old_rec.egl_attribute27;
662 End If;
663 If (p_rec.egl_attribute28 = hr_api.g_varchar2) then
664 p_rec.egl_attribute28 :=
665 ben_egl_shd.g_old_rec.egl_attribute28;
666 End If;
667 If (p_rec.egl_attribute29 = hr_api.g_varchar2) then
668 p_rec.egl_attribute29 :=
669 ben_egl_shd.g_old_rec.egl_attribute29;
670 End If;
671 If (p_rec.egl_attribute30 = hr_api.g_varchar2) then
672 p_rec.egl_attribute30 :=
673 ben_egl_shd.g_old_rec.egl_attribute30;
674 End If;
675 If (p_rec.allow_range_validation_flag2 = hr_api.g_varchar2) then
676 p_rec.allow_range_validation_flag2 :=
677 ben_egl_shd.g_old_rec.allow_range_validation_flag2;
678 End If;
679 If (p_rec.access_calc_rule2 = hr_api.g_number) then
680 p_rec.access_calc_rule2 :=
681 ben_egl_shd.g_old_rec.access_calc_rule2;
682 End If;
683 If (p_rec.time_access_calc_rule1 = hr_api.g_number) then
684 p_rec.time_access_calc_rule1 :=
685 ben_egl_shd.g_old_rec.time_access_calc_rule1;
686 End If;
687 If (p_rec.time_access_calc_rule2 = hr_api.g_number) then
688 p_rec.time_access_calc_rule2 :=
689 ben_egl_shd.g_old_rec.time_access_calc_rule2;
690 End If;
691
692 --
693 hr_utility.set_location(' Leaving:'||l_proc, 10);
694 --
695 End convert_defs;
696 --
697 -- ----------------------------------------------------------------------------
698 -- |---------------------------------< upd >----------------------------------|
699 -- ----------------------------------------------------------------------------
700 Procedure upd
701 (
702 p_rec in out nocopy ben_egl_shd.g_rec_type
703 ,p_effective_date in date
704 ) is
705 --
706 l_proc varchar2(72) := g_package||'upd';
707 --
708 Begin
709 hr_utility.set_location('Entering:'||l_proc, 5);
710 --
711 -- We must lock the row which we need to update.
712
713 --
714 ben_egl_shd.lck(p_rec.eligy_criteria_id,
715 p_rec.object_version_number);
716 --
717 -- 1. During an update system defaults are used to determine if
718 -- arguments have been defaulted or not. We must therefore
719 -- derive the full record structure values to be updated.
720 --
721 -- 2. Call the supporting update validate operations.
722 --
723 convert_defs(p_rec);
724 ben_egl_bus.update_validate(p_rec,p_effective_date);
725 --
726 -- Call the supporting pre-update operation
727 --
728 pre_update(p_rec);
729 --
730 -- Update the row.
731 --
732 update_dml(p_rec);
733 --
734 -- Call the supporting post-update operation
735 --
736 post_update(p_rec,p_effective_date);
737 End upd;
738 --
739 -- ----------------------------------------------------------------------------
743 (
740 -- |---------------------------------< upd >----------------------------------|
741 -- ----------------------------------------------------------------------------
742 Procedure upd
744 p_eligy_criteria_id in number
745 ,p_name in varchar2 default hr_api.g_varchar2
746 ,p_short_code in varchar2 default hr_api.g_varchar2
747 ,p_description in varchar2 default hr_api.g_varchar2
748 ,p_criteria_type in varchar2 default hr_api.g_varchar2
749 ,p_crit_col1_val_type_cd in varchar2 default hr_api.g_varchar2
750 ,p_crit_col1_datatype in varchar2 default hr_api.g_varchar2
751 ,p_col1_lookup_type in varchar2 default hr_api.g_varchar2
752 ,p_col1_value_set_id in number default hr_api.g_number
753 ,p_access_table_name1 in varchar2 default hr_api.g_varchar2
754 ,p_access_column_name1 in varchar2 default hr_api.g_varchar2
755 ,p_time_entry_access_tab_nam1 in varchar2 default hr_api.g_varchar2
756 ,p_time_entry_access_col_nam1 in varchar2 default hr_api.g_varchar2
757 ,p_crit_col2_val_type_cd in varchar2 default hr_api.g_varchar2
758 ,p_crit_col2_datatype in varchar2 default hr_api.g_varchar2
759 ,p_col2_lookup_type in varchar2 default hr_api.g_varchar2
760 ,p_col2_value_set_id in number default hr_api.g_number
761 ,p_access_table_name2 in varchar2 default hr_api.g_varchar2
762 ,p_access_column_name2 in varchar2 default hr_api.g_varchar2
763 ,p_time_entry_access_tab_nam2 in varchar2 default hr_api.g_varchar2
764 ,p_time_entry_access_col_nam2 in varchar2 default hr_api.g_varchar2
765 ,p_access_calc_rule in number default hr_api.g_number
766 ,p_allow_range_validation_flg in varchar2 default hr_api.g_varchar2
767 ,p_user_defined_flag in varchar2 default hr_api.g_varchar2
768 ,p_business_group_id in number default hr_api.g_number
769 ,p_legislation_code in varchar2 default hr_api.g_varchar2
770 ,p_egl_attribute_category in varchar2 default hr_api.g_varchar2
771 ,p_egl_attribute1 in varchar2 default hr_api.g_varchar2
772 ,p_egl_attribute2 in varchar2 default hr_api.g_varchar2
773 ,p_egl_attribute3 in varchar2 default hr_api.g_varchar2
774 ,p_egl_attribute4 in varchar2 default hr_api.g_varchar2
775 ,p_egl_attribute5 in varchar2 default hr_api.g_varchar2
776 ,p_egl_attribute6 in varchar2 default hr_api.g_varchar2
777 ,p_egl_attribute7 in varchar2 default hr_api.g_varchar2
778 ,p_egl_attribute8 in varchar2 default hr_api.g_varchar2
779 ,p_egl_attribute9 in varchar2 default hr_api.g_varchar2
780 ,p_egl_attribute10 in varchar2 default hr_api.g_varchar2
781 ,p_egl_attribute11 in varchar2 default hr_api.g_varchar2
782 ,p_egl_attribute12 in varchar2 default hr_api.g_varchar2
783 ,p_egl_attribute13 in varchar2 default hr_api.g_varchar2
784 ,p_egl_attribute14 in varchar2 default hr_api.g_varchar2
785 ,p_egl_attribute15 in varchar2 default hr_api.g_varchar2
786 ,p_egl_attribute16 in varchar2 default hr_api.g_varchar2
787 ,p_egl_attribute17 in varchar2 default hr_api.g_varchar2
788 ,p_egl_attribute18 in varchar2 default hr_api.g_varchar2
789 ,p_egl_attribute19 in varchar2 default hr_api.g_varchar2
790 ,p_egl_attribute20 in varchar2 default hr_api.g_varchar2
791 ,p_egl_attribute21 in varchar2 default hr_api.g_varchar2
792 ,p_egl_attribute22 in varchar2 default hr_api.g_varchar2
793 ,p_egl_attribute23 in varchar2 default hr_api.g_varchar2
794 ,p_egl_attribute24 in varchar2 default hr_api.g_varchar2
795 ,p_egl_attribute25 in varchar2 default hr_api.g_varchar2
796 ,p_egl_attribute26 in varchar2 default hr_api.g_varchar2
797 ,p_egl_attribute27 in varchar2 default hr_api.g_varchar2
798 ,p_egl_attribute28 in varchar2 default hr_api.g_varchar2
799 ,p_egl_attribute29 in varchar2 default hr_api.g_varchar2
800 ,p_egl_attribute30 in varchar2 default hr_api.g_varchar2
801 ,p_object_version_number in out nocopy number
802 ,p_effective_date in date
803 ,p_allow_range_validation_flag2 in varchar2 default hr_api.g_varchar2
804 ,p_access_calc_rule2 in number default hr_api.g_number
805 ,p_time_access_calc_rule1 in number default hr_api.g_number
806 ,p_time_access_calc_rule2 in number default hr_api.g_number
807 ) is
808 --
809 l_rec ben_egl_shd.g_rec_type;
810 l_proc varchar2(72) := g_package||'upd';
811 --
812 Begin
813 hr_utility.set_location('Entering:'||l_proc, 5);
814 --
815 -- Call conversion function to turn arguments into the
816 -- l_rec structure.
817 --
818 l_rec :=
819 ben_egl_shd.convert_args
820 (
821 p_eligy_criteria_id
822 ,p_name
823 ,p_short_code
824 ,p_description
825 ,p_criteria_type
826 ,p_crit_col1_val_type_cd
827 ,p_crit_col1_datatype
828 ,p_col1_lookup_type
829 ,p_col1_value_set_id
830 ,p_access_table_name1
831 ,p_access_column_name1
832 ,p_time_entry_access_tab_nam1
833 ,p_time_entry_access_col_nam1
834 ,p_crit_col2_val_type_cd
835 ,p_crit_col2_datatype
836 ,p_col2_lookup_type
837 ,p_col2_value_set_id
841 ,p_time_entry_access_col_nam2
838 ,p_access_table_name2
839 ,p_access_column_name2
840 ,p_time_entry_access_tab_nam2
842 ,p_access_calc_rule
843 ,p_allow_range_validation_flg
844 ,p_user_defined_flag
845 ,p_business_group_id
846 ,p_legislation_code
847 ,p_egl_attribute_category
848 ,p_egl_attribute1
849 ,p_egl_attribute2
850 ,p_egl_attribute3
851 ,p_egl_attribute4
852 ,p_egl_attribute5
853 ,p_egl_attribute6
854 ,p_egl_attribute7
855 ,p_egl_attribute8
856 ,p_egl_attribute9
857 ,p_egl_attribute10
858 ,p_egl_attribute11
859 ,p_egl_attribute12
860 ,p_egl_attribute13
861 ,p_egl_attribute14
862 ,p_egl_attribute15
863 ,p_egl_attribute16
864 ,p_egl_attribute17
865 ,p_egl_attribute18
866 ,p_egl_attribute19
867 ,p_egl_attribute20
868 ,p_egl_attribute21
869 ,p_egl_attribute22
870 ,p_egl_attribute23
871 ,p_egl_attribute24
872 ,p_egl_attribute25
873 ,p_egl_attribute26
874 ,p_egl_attribute27
875 ,p_egl_attribute28
876 ,p_egl_attribute29
877 ,p_egl_attribute30
878 ,p_object_version_number
879 ,p_allow_range_validation_flag2
880 ,p_access_calc_rule2
881 ,p_time_access_calc_rule1
882 ,p_time_access_calc_rule2
883 );
884 --
885 -- Having converted the arguments into the
886 -- plsql record structure we call the corresponding record
887 -- business process.
888 --
889
890 upd(l_rec,p_effective_date);
891 p_object_version_number := l_rec.object_version_number;
892 --
893 hr_utility.set_location(' Leaving:'||l_proc, 10);
894 End upd;
895 --
896 end ben_egl_upd;