DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_CLA_UPD

Source


1 Package Body ben_cla_upd as
2 /* $Header: beclarhi.pkb 120.0 2005/05/28 01:03:20 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_cla_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_cla_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_cla_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_cmbn_age_los_fctr Row
68   --
69   update ben_cmbn_age_los_fctr
70   set
71   cmbn_age_los_fctr_id              = p_rec.cmbn_age_los_fctr_id,
72   business_group_id                 = p_rec.business_group_id,
73   los_fctr_id                       = p_rec.los_fctr_id,
74   age_fctr_id                       = p_rec.age_fctr_id,
75   cmbnd_min_val                     = p_rec.cmbnd_min_val,
76   cmbnd_max_val                     = p_rec.cmbnd_max_val,
77   ordr_num                          = p_rec.ordr_num,
78   cla_attribute_category            = p_rec.cla_attribute_category,
79   cla_attribute1                    = p_rec.cla_attribute1,
80   cla_attribute2                    = p_rec.cla_attribute2,
81   cla_attribute3                    = p_rec.cla_attribute3,
82   cla_attribute4                    = p_rec.cla_attribute4,
83   cla_attribute5                    = p_rec.cla_attribute5,
84   cla_attribute6                    = p_rec.cla_attribute6,
85   cla_attribute7                    = p_rec.cla_attribute7,
86   cla_attribute8                    = p_rec.cla_attribute8,
87   cla_attribute9                    = p_rec.cla_attribute9,
88   cla_attribute10                   = p_rec.cla_attribute10,
89   cla_attribute11                   = p_rec.cla_attribute11,
90   cla_attribute12                   = p_rec.cla_attribute12,
91   cla_attribute13                   = p_rec.cla_attribute13,
92   cla_attribute14                   = p_rec.cla_attribute14,
93   cla_attribute15                   = p_rec.cla_attribute15,
94   cla_attribute16                   = p_rec.cla_attribute16,
95   cla_attribute17                   = p_rec.cla_attribute17,
96   cla_attribute18                   = p_rec.cla_attribute18,
97   cla_attribute19                   = p_rec.cla_attribute19,
98   cla_attribute20                   = p_rec.cla_attribute20,
99   cla_attribute21                   = p_rec.cla_attribute21,
100   cla_attribute22                   = p_rec.cla_attribute22,
101   cla_attribute23                   = p_rec.cla_attribute23,
102   cla_attribute24                   = p_rec.cla_attribute24,
103   cla_attribute25                   = p_rec.cla_attribute25,
104   cla_attribute26                   = p_rec.cla_attribute26,
105   cla_attribute27                   = p_rec.cla_attribute27,
106   cla_attribute28                   = p_rec.cla_attribute28,
107   cla_attribute29                   = p_rec.cla_attribute29,
108   cla_attribute30                   = p_rec.cla_attribute30,
109   object_version_number             = p_rec.object_version_number ,
110   name                              = p_rec.name
111   where cmbn_age_los_fctr_id = p_rec.cmbn_age_los_fctr_id;
112   --
113   ben_cla_shd.g_api_dml := false;   -- Unset the api dml status
114   --
115   hr_utility.set_location(' Leaving:'||l_proc, 10);
116 --
117 Exception
118   When hr_api.check_integrity_violated Then
119     -- A check constraint has been violated
120     ben_cla_shd.g_api_dml := false;   -- Unset the api dml status
121     ben_cla_shd.constraint_error
122       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
123   When hr_api.parent_integrity_violated Then
124     -- Parent integrity has been violated
125     ben_cla_shd.g_api_dml := false;   -- Unset the api dml status
126     ben_cla_shd.constraint_error
127       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
128   When hr_api.unique_integrity_violated Then
129     -- Unique integrity has been violated
130     ben_cla_shd.g_api_dml := false;   -- Unset the api dml status
131     ben_cla_shd.constraint_error
132       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133   When Others Then
134     ben_cla_shd.g_api_dml := false;   -- Unset the api dml status
135     Raise;
136 End update_dml;
137 --
138 -- ----------------------------------------------------------------------------
139 -- |------------------------------< pre_update >------------------------------|
140 -- ----------------------------------------------------------------------------
141 -- {Start Of Comments}
142 --
143 -- Description:
144 --   This private procedure contains any processing which is required before
145 --   the update dml.
146 --
147 -- Prerequisites:
148 --   This is an internal procedure which is called from the upd procedure.
149 --
150 -- In Parameters:
151 --   A Pl/Sql record structre.
152 --
153 -- Post Success:
154 --   Processing continues.
155 --
156 -- Post Failure:
157 --   If an error has occurred, an error message and exception will be raised
158 --   but not handled.
159 --
160 -- Developer Implementation Notes:
161 --   Any pre-processing required before the update dml is issued should be
162 --   coded within this procedure. It is important to note that any 3rd party
163 --   maintenance should be reviewed before placing in this procedure.
164 --
165 -- Access Status:
166 --   Internal Row Handler Use Only.
167 --
168 -- {End Of Comments}
169 -- ----------------------------------------------------------------------------
170 Procedure pre_update(p_rec in ben_cla_shd.g_rec_type) is
171 --
172   l_proc  varchar2(72) := g_package||'pre_update';
173 --
174 Begin
175   hr_utility.set_location('Entering:'||l_proc, 5);
176   --
177   hr_utility.set_location(' Leaving:'||l_proc, 10);
178 End pre_update;
179 --
180 -- ----------------------------------------------------------------------------
181 -- |-----------------------------< post_update >------------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 --   This private procedure contains any processing which is required after the
187 --   update dml.
188 --
189 -- Prerequisites:
190 --   This is an internal procedure which is called from the upd procedure.
191 --
192 -- In Parameters:
193 --   A Pl/Sql record structre.
194 --
195 -- Post Success:
196 --   Processing continues.
197 --
198 -- Post Failure:
199 --   If an error has occurred, an error message and exception will be raised
200 --   but not handled.
201 --
202 -- Developer Implementation Notes:
203 --   Any post-processing required after the update dml is issued should be
204 --   coded within this procedure. It is important to note that any 3rd party
205 --   maintenance should be reviewed before placing in this procedure.
206 --
207 -- Access Status:
208 --   Internal Row Handler Use Only.
209 --
210 -- {End Of Comments}
211 -- ----------------------------------------------------------------------------
212 Procedure post_update(p_rec in ben_cla_shd.g_rec_type) is
213 --
214   l_proc  varchar2(72) := g_package||'post_update';
215 --
216 Begin
217   hr_utility.set_location('Entering:'||l_proc, 5);
218 --
219   --
220   -- Start of API User Hook for post_update.
221   --
222   begin
223     --
224     ben_cla_rku.after_update
225       (
226   p_cmbn_age_los_fctr_id          =>p_rec.cmbn_age_los_fctr_id
227  ,p_business_group_id             =>p_rec.business_group_id
228  ,p_los_fctr_id                   =>p_rec.los_fctr_id
229  ,p_age_fctr_id                   =>p_rec.age_fctr_id
230  ,p_cmbnd_min_val                 =>p_rec.cmbnd_min_val
231  ,p_cmbnd_max_val                 =>p_rec.cmbnd_max_val
232  ,p_ordr_num                      =>p_rec.ordr_num
233  ,p_cla_attribute_category        =>p_rec.cla_attribute_category
234  ,p_cla_attribute1                =>p_rec.cla_attribute1
235  ,p_cla_attribute2                =>p_rec.cla_attribute2
236  ,p_cla_attribute3                =>p_rec.cla_attribute3
237  ,p_cla_attribute4                =>p_rec.cla_attribute4
238  ,p_cla_attribute5                =>p_rec.cla_attribute5
239  ,p_cla_attribute6                =>p_rec.cla_attribute6
240  ,p_cla_attribute7                =>p_rec.cla_attribute7
241  ,p_cla_attribute8                =>p_rec.cla_attribute8
242  ,p_cla_attribute9                =>p_rec.cla_attribute9
243  ,p_cla_attribute10               =>p_rec.cla_attribute10
244  ,p_cla_attribute11               =>p_rec.cla_attribute11
245  ,p_cla_attribute12               =>p_rec.cla_attribute12
246  ,p_cla_attribute13               =>p_rec.cla_attribute13
247  ,p_cla_attribute14               =>p_rec.cla_attribute14
248  ,p_cla_attribute15               =>p_rec.cla_attribute15
249  ,p_cla_attribute16               =>p_rec.cla_attribute16
250  ,p_cla_attribute17               =>p_rec.cla_attribute17
251  ,p_cla_attribute18               =>p_rec.cla_attribute18
252  ,p_cla_attribute19               =>p_rec.cla_attribute19
253  ,p_cla_attribute20               =>p_rec.cla_attribute20
254  ,p_cla_attribute21               =>p_rec.cla_attribute21
255  ,p_cla_attribute22               =>p_rec.cla_attribute22
256  ,p_cla_attribute23               =>p_rec.cla_attribute23
257  ,p_cla_attribute24               =>p_rec.cla_attribute24
258  ,p_cla_attribute25               =>p_rec.cla_attribute25
259  ,p_cla_attribute26               =>p_rec.cla_attribute26
260  ,p_cla_attribute27               =>p_rec.cla_attribute27
261  ,p_cla_attribute28               =>p_rec.cla_attribute28
262  ,p_cla_attribute29               =>p_rec.cla_attribute29
263  ,p_cla_attribute30               =>p_rec.cla_attribute30
264  ,p_object_version_number         =>p_rec.object_version_number
265  ,p_name                          =>p_rec.name
266  ,p_business_group_id_o           =>ben_cla_shd.g_old_rec.business_group_id
267  ,p_los_fctr_id_o                 =>ben_cla_shd.g_old_rec.los_fctr_id
268  ,p_age_fctr_id_o                 =>ben_cla_shd.g_old_rec.age_fctr_id
269  ,p_cmbnd_min_val_o               =>ben_cla_shd.g_old_rec.cmbnd_min_val
270  ,p_cmbnd_max_val_o               =>ben_cla_shd.g_old_rec.cmbnd_max_val
271  ,p_ordr_num_o                    =>ben_cla_shd.g_old_rec.ordr_num
272  ,p_cla_attribute_category_o      =>ben_cla_shd.g_old_rec.cla_attribute_category
273  ,p_cla_attribute1_o              =>ben_cla_shd.g_old_rec.cla_attribute1
274  ,p_cla_attribute2_o              =>ben_cla_shd.g_old_rec.cla_attribute2
275  ,p_cla_attribute3_o              =>ben_cla_shd.g_old_rec.cla_attribute3
276  ,p_cla_attribute4_o              =>ben_cla_shd.g_old_rec.cla_attribute4
277  ,p_cla_attribute5_o              =>ben_cla_shd.g_old_rec.cla_attribute5
278  ,p_cla_attribute6_o              =>ben_cla_shd.g_old_rec.cla_attribute6
279  ,p_cla_attribute7_o              =>ben_cla_shd.g_old_rec.cla_attribute7
280  ,p_cla_attribute8_o              =>ben_cla_shd.g_old_rec.cla_attribute8
281  ,p_cla_attribute9_o              =>ben_cla_shd.g_old_rec.cla_attribute9
282  ,p_cla_attribute10_o             =>ben_cla_shd.g_old_rec.cla_attribute10
283  ,p_cla_attribute11_o             =>ben_cla_shd.g_old_rec.cla_attribute11
284  ,p_cla_attribute12_o             =>ben_cla_shd.g_old_rec.cla_attribute12
285  ,p_cla_attribute13_o             =>ben_cla_shd.g_old_rec.cla_attribute13
286  ,p_cla_attribute14_o             =>ben_cla_shd.g_old_rec.cla_attribute14
287  ,p_cla_attribute15_o             =>ben_cla_shd.g_old_rec.cla_attribute15
288  ,p_cla_attribute16_o             =>ben_cla_shd.g_old_rec.cla_attribute16
289  ,p_cla_attribute17_o             =>ben_cla_shd.g_old_rec.cla_attribute17
290  ,p_cla_attribute18_o             =>ben_cla_shd.g_old_rec.cla_attribute18
291  ,p_cla_attribute19_o             =>ben_cla_shd.g_old_rec.cla_attribute19
292  ,p_cla_attribute20_o             =>ben_cla_shd.g_old_rec.cla_attribute20
293  ,p_cla_attribute21_o             =>ben_cla_shd.g_old_rec.cla_attribute21
294  ,p_cla_attribute22_o             =>ben_cla_shd.g_old_rec.cla_attribute22
295  ,p_cla_attribute23_o             =>ben_cla_shd.g_old_rec.cla_attribute23
296  ,p_cla_attribute24_o             =>ben_cla_shd.g_old_rec.cla_attribute24
297  ,p_cla_attribute25_o             =>ben_cla_shd.g_old_rec.cla_attribute25
298  ,p_cla_attribute26_o             =>ben_cla_shd.g_old_rec.cla_attribute26
299  ,p_cla_attribute27_o             =>ben_cla_shd.g_old_rec.cla_attribute27
300  ,p_cla_attribute28_o             =>ben_cla_shd.g_old_rec.cla_attribute28
301  ,p_cla_attribute29_o             =>ben_cla_shd.g_old_rec.cla_attribute29
302  ,p_cla_attribute30_o             =>ben_cla_shd.g_old_rec.cla_attribute30
303  ,p_object_version_number_o       =>ben_cla_shd.g_old_rec.object_version_number
304  ,p_name_o                        =>ben_cla_shd.g_old_rec.name
305       );
306     --
307   exception
308     --
309     when hr_api.cannot_find_prog_unit then
310       --
311       hr_api.cannot_find_prog_unit_error
312         (p_module_name => 'ben_cmbn_age_los_fctr'
313         ,p_hook_type   => 'AU');
314       --
315   end;
316   --
317   -- End of API User Hook for post_update.
318   --
319   --
320   hr_utility.set_location(' Leaving:'||l_proc, 10);
321 End post_update;
322 --
323 -- ----------------------------------------------------------------------------
324 -- |-----------------------------< convert_defs >-----------------------------|
325 -- ----------------------------------------------------------------------------
326 -- {Start Of Comments}
327 --
328 -- Description:
329 --   The Convert_Defs procedure has one very important function:
330 --   It must return the record structure for the row with all system defaulted
331 --   values converted into its corresponding parameter value for update. When
332 --   we attempt to update a row through the Upd process , certain
333 --   parameters can be defaulted which enables flexibility in the calling of
334 --   the upd process (e.g. only attributes which need to be updated need to be
335 --   specified). For the upd process to determine which attributes
336 --   have NOT been specified we need to check if the parameter has a reserved
337 --   system default value. Therefore, for all parameters which have a
338 --   corresponding reserved system default mechanism specified we need to
339 --   check if a system default is being used. If a system default is being
340 --   used then we convert the defaulted value into its corresponding attribute
341 --   value held in the g_old_rec data structure.
342 --
343 -- Prerequisites:
344 --   This private function can only be called from the upd process.
345 --
346 -- In Parameters:
347 --   A Pl/Sql record structre.
348 --
349 -- Post Success:
350 --   The record structure will be returned with all system defaulted parameter
351 --   values converted into its current row attribute value.
352 --
353 -- Post Failure:
354 --   No direct error handling is required within this function. Any possible
355 --   errors within this procedure will be a PL/SQL value error due to conversion
356 --   of datatypes or data lengths.
357 --
358 -- Developer Implementation Notes:
359 --   None.
360 --
361 -- Access Status:
362 --   Internal Row Handler Use Only.
363 --
364 -- {End Of Comments}
365 -- ----------------------------------------------------------------------------
366 Procedure convert_defs(p_rec in out nocopy ben_cla_shd.g_rec_type) is
367 --
368   l_proc  varchar2(72) := g_package||'convert_defs';
369 --
370 Begin
371   --
372   hr_utility.set_location('Entering:'||l_proc, 5);
373   --
374   -- We must now examine each argument value in the
375   -- p_rec plsql record structure
376   -- to see if a system default is being used. If a system default
377   -- is being used then we must set to the 'current' argument value.
378   --
379   If (p_rec.business_group_id = hr_api.g_number) then
380     p_rec.business_group_id :=
381     ben_cla_shd.g_old_rec.business_group_id;
382   End If;
383   If (p_rec.los_fctr_id = hr_api.g_number) then
384     p_rec.los_fctr_id :=
385     ben_cla_shd.g_old_rec.los_fctr_id;
386   End If;
387   If (p_rec.age_fctr_id = hr_api.g_number) then
388     p_rec.age_fctr_id :=
389     ben_cla_shd.g_old_rec.age_fctr_id;
390   End If;
391   If (p_rec.cmbnd_min_val = hr_api.g_number) then
392     p_rec.cmbnd_min_val :=
393     ben_cla_shd.g_old_rec.cmbnd_min_val;
394   End If;
395   If (p_rec.cmbnd_max_val = hr_api.g_number) then
396     p_rec.cmbnd_max_val :=
397     ben_cla_shd.g_old_rec.cmbnd_max_val;
398   End If;
399   If (p_rec.ordr_num = hr_api.g_number) then
400     p_rec.ordr_num :=
401     ben_cla_shd.g_old_rec.ordr_num;
402   End If;
403   If (p_rec.cla_attribute_category = hr_api.g_varchar2) then
404     p_rec.cla_attribute_category :=
405     ben_cla_shd.g_old_rec.cla_attribute_category;
406   End If;
407   If (p_rec.cla_attribute1 = hr_api.g_varchar2) then
408     p_rec.cla_attribute1 :=
409     ben_cla_shd.g_old_rec.cla_attribute1;
410   End If;
411   If (p_rec.cla_attribute2 = hr_api.g_varchar2) then
412     p_rec.cla_attribute2 :=
413     ben_cla_shd.g_old_rec.cla_attribute2;
414   End If;
415   If (p_rec.cla_attribute3 = hr_api.g_varchar2) then
416     p_rec.cla_attribute3 :=
417     ben_cla_shd.g_old_rec.cla_attribute3;
418   End If;
419   If (p_rec.cla_attribute4 = hr_api.g_varchar2) then
420     p_rec.cla_attribute4 :=
421     ben_cla_shd.g_old_rec.cla_attribute4;
422   End If;
423   If (p_rec.cla_attribute5 = hr_api.g_varchar2) then
424     p_rec.cla_attribute5 :=
425     ben_cla_shd.g_old_rec.cla_attribute5;
426   End If;
427   If (p_rec.cla_attribute6 = hr_api.g_varchar2) then
428     p_rec.cla_attribute6 :=
429     ben_cla_shd.g_old_rec.cla_attribute6;
430   End If;
431   If (p_rec.cla_attribute7 = hr_api.g_varchar2) then
432     p_rec.cla_attribute7 :=
433     ben_cla_shd.g_old_rec.cla_attribute7;
434   End If;
435   If (p_rec.cla_attribute8 = hr_api.g_varchar2) then
436     p_rec.cla_attribute8 :=
437     ben_cla_shd.g_old_rec.cla_attribute8;
438   End If;
439   If (p_rec.cla_attribute9 = hr_api.g_varchar2) then
440     p_rec.cla_attribute9 :=
441     ben_cla_shd.g_old_rec.cla_attribute9;
442   End If;
443   If (p_rec.cla_attribute10 = hr_api.g_varchar2) then
444     p_rec.cla_attribute10 :=
445     ben_cla_shd.g_old_rec.cla_attribute10;
446   End If;
447   If (p_rec.cla_attribute11 = hr_api.g_varchar2) then
448     p_rec.cla_attribute11 :=
449     ben_cla_shd.g_old_rec.cla_attribute11;
450   End If;
451   If (p_rec.cla_attribute12 = hr_api.g_varchar2) then
452     p_rec.cla_attribute12 :=
453     ben_cla_shd.g_old_rec.cla_attribute12;
454   End If;
455   If (p_rec.cla_attribute13 = hr_api.g_varchar2) then
456     p_rec.cla_attribute13 :=
457     ben_cla_shd.g_old_rec.cla_attribute13;
458   End If;
459   If (p_rec.cla_attribute14 = hr_api.g_varchar2) then
460     p_rec.cla_attribute14 :=
461     ben_cla_shd.g_old_rec.cla_attribute14;
462   End If;
463   If (p_rec.cla_attribute15 = hr_api.g_varchar2) then
464     p_rec.cla_attribute15 :=
465     ben_cla_shd.g_old_rec.cla_attribute15;
466   End If;
467   If (p_rec.cla_attribute16 = hr_api.g_varchar2) then
468     p_rec.cla_attribute16 :=
469     ben_cla_shd.g_old_rec.cla_attribute16;
470   End If;
471   If (p_rec.cla_attribute17 = hr_api.g_varchar2) then
472     p_rec.cla_attribute17 :=
473     ben_cla_shd.g_old_rec.cla_attribute17;
474   End If;
475   If (p_rec.cla_attribute18 = hr_api.g_varchar2) then
476     p_rec.cla_attribute18 :=
477     ben_cla_shd.g_old_rec.cla_attribute18;
478   End If;
479   If (p_rec.cla_attribute19 = hr_api.g_varchar2) then
480     p_rec.cla_attribute19 :=
481     ben_cla_shd.g_old_rec.cla_attribute19;
482   End If;
483   If (p_rec.cla_attribute20 = hr_api.g_varchar2) then
484     p_rec.cla_attribute20 :=
485     ben_cla_shd.g_old_rec.cla_attribute20;
486   End If;
487   If (p_rec.cla_attribute21 = hr_api.g_varchar2) then
488     p_rec.cla_attribute21 :=
489     ben_cla_shd.g_old_rec.cla_attribute21;
490   End If;
491   If (p_rec.cla_attribute22 = hr_api.g_varchar2) then
492     p_rec.cla_attribute22 :=
493     ben_cla_shd.g_old_rec.cla_attribute22;
494   End If;
495   If (p_rec.cla_attribute23 = hr_api.g_varchar2) then
496     p_rec.cla_attribute23 :=
497     ben_cla_shd.g_old_rec.cla_attribute23;
498   End If;
499   If (p_rec.cla_attribute24 = hr_api.g_varchar2) then
500     p_rec.cla_attribute24 :=
501     ben_cla_shd.g_old_rec.cla_attribute24;
502   End If;
503   If (p_rec.cla_attribute25 = hr_api.g_varchar2) then
504     p_rec.cla_attribute25 :=
505     ben_cla_shd.g_old_rec.cla_attribute25;
506   End If;
507   If (p_rec.cla_attribute26 = hr_api.g_varchar2) then
508     p_rec.cla_attribute26 :=
509     ben_cla_shd.g_old_rec.cla_attribute26;
510   End If;
511   If (p_rec.cla_attribute27 = hr_api.g_varchar2) then
512     p_rec.cla_attribute27 :=
513     ben_cla_shd.g_old_rec.cla_attribute27;
514   End If;
515   If (p_rec.cla_attribute28 = hr_api.g_varchar2) then
516     p_rec.cla_attribute28 :=
517     ben_cla_shd.g_old_rec.cla_attribute28;
518   End If;
519   If (p_rec.cla_attribute29 = hr_api.g_varchar2) then
520     p_rec.cla_attribute29 :=
521     ben_cla_shd.g_old_rec.cla_attribute29;
522   End If;
523   If (p_rec.cla_attribute30 = hr_api.g_varchar2) then
524     p_rec.cla_attribute30 :=
525     ben_cla_shd.g_old_rec.cla_attribute30;
526   End If;
527   If (p_rec.name = hr_api.g_varchar2) then
528       p_rec.name :=
529       ben_cla_shd.g_old_rec.name;
530   End If;
531 
532   --
533   hr_utility.set_location(' Leaving:'||l_proc, 10);
534 --
535 End convert_defs;
536 --
537 -- ----------------------------------------------------------------------------
538 -- |---------------------------------< upd >----------------------------------|
539 -- ----------------------------------------------------------------------------
540 Procedure upd
541   (
542   p_rec        in out nocopy ben_cla_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_cla_shd.lck
553 	(
554 	p_rec.cmbn_age_los_fctr_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_cla_bus.update_validate(p_rec);
566   --
567   -- Call the supporting pre-update operation
568   --
569   pre_update(p_rec);
570   --
571   -- Update the row.
572   --
573   update_dml(p_rec);
574   --
575   -- Call the supporting post-update operation
576   --
577   post_update(p_rec);
578 End upd;
579 --
580 -- ----------------------------------------------------------------------------
581 -- |---------------------------------< upd >----------------------------------|
582 -- ----------------------------------------------------------------------------
583 Procedure upd
584   (
585   p_cmbn_age_los_fctr_id         in number,
586   p_business_group_id            in number           default hr_api.g_number,
587   p_los_fctr_id                  in number           default hr_api.g_number,
588   p_age_fctr_id                  in number           default hr_api.g_number,
589   p_cmbnd_min_val                in number           default hr_api.g_number,
590   p_cmbnd_max_val                in number           default hr_api.g_number,
591   p_ordr_num                     in number           default hr_api.g_number,
592   p_cla_attribute_category       in varchar2         default hr_api.g_varchar2,
593   p_cla_attribute1               in varchar2         default hr_api.g_varchar2,
594   p_cla_attribute2               in varchar2         default hr_api.g_varchar2,
595   p_cla_attribute3               in varchar2         default hr_api.g_varchar2,
596   p_cla_attribute4               in varchar2         default hr_api.g_varchar2,
597   p_cla_attribute5               in varchar2         default hr_api.g_varchar2,
598   p_cla_attribute6               in varchar2         default hr_api.g_varchar2,
599   p_cla_attribute7               in varchar2         default hr_api.g_varchar2,
600   p_cla_attribute8               in varchar2         default hr_api.g_varchar2,
601   p_cla_attribute9               in varchar2         default hr_api.g_varchar2,
602   p_cla_attribute10              in varchar2         default hr_api.g_varchar2,
603   p_cla_attribute11              in varchar2         default hr_api.g_varchar2,
604   p_cla_attribute12              in varchar2         default hr_api.g_varchar2,
605   p_cla_attribute13              in varchar2         default hr_api.g_varchar2,
606   p_cla_attribute14              in varchar2         default hr_api.g_varchar2,
607   p_cla_attribute15              in varchar2         default hr_api.g_varchar2,
608   p_cla_attribute16              in varchar2         default hr_api.g_varchar2,
609   p_cla_attribute17              in varchar2         default hr_api.g_varchar2,
610   p_cla_attribute18              in varchar2         default hr_api.g_varchar2,
611   p_cla_attribute19              in varchar2         default hr_api.g_varchar2,
612   p_cla_attribute20              in varchar2         default hr_api.g_varchar2,
613   p_cla_attribute21              in varchar2         default hr_api.g_varchar2,
614   p_cla_attribute22              in varchar2         default hr_api.g_varchar2,
615   p_cla_attribute23              in varchar2         default hr_api.g_varchar2,
616   p_cla_attribute24              in varchar2         default hr_api.g_varchar2,
617   p_cla_attribute25              in varchar2         default hr_api.g_varchar2,
618   p_cla_attribute26              in varchar2         default hr_api.g_varchar2,
619   p_cla_attribute27              in varchar2         default hr_api.g_varchar2,
620   p_cla_attribute28              in varchar2         default hr_api.g_varchar2,
621   p_cla_attribute29              in varchar2         default hr_api.g_varchar2,
622   p_cla_attribute30              in varchar2         default hr_api.g_varchar2,
623   p_object_version_number        in out nocopy number,
624   p_name                         in varchar2         default hr_api.g_varchar2
625 
626   ) is
627 --
628   l_rec	  ben_cla_shd.g_rec_type;
629   l_proc  varchar2(72) := g_package||'upd';
630 --
631 Begin
632   hr_utility.set_location('Entering:'||l_proc, 5);
633   --
634   -- Call conversion function to turn arguments into the
635   -- l_rec structure.
636   --
637   l_rec :=
638   ben_cla_shd.convert_args
639   (
640   p_cmbn_age_los_fctr_id,
641   p_business_group_id,
642   p_los_fctr_id,
643   p_age_fctr_id,
644   p_cmbnd_min_val,
645   p_cmbnd_max_val,
646   p_ordr_num,
647   p_cla_attribute_category,
648   p_cla_attribute1,
649   p_cla_attribute2,
650   p_cla_attribute3,
651   p_cla_attribute4,
652   p_cla_attribute5,
653   p_cla_attribute6,
654   p_cla_attribute7,
655   p_cla_attribute8,
656   p_cla_attribute9,
657   p_cla_attribute10,
658   p_cla_attribute11,
659   p_cla_attribute12,
660   p_cla_attribute13,
661   p_cla_attribute14,
662   p_cla_attribute15,
663   p_cla_attribute16,
664   p_cla_attribute17,
665   p_cla_attribute18,
666   p_cla_attribute19,
667   p_cla_attribute20,
668   p_cla_attribute21,
669   p_cla_attribute22,
670   p_cla_attribute23,
671   p_cla_attribute24,
672   p_cla_attribute25,
673   p_cla_attribute26,
674   p_cla_attribute27,
675   p_cla_attribute28,
676   p_cla_attribute29,
677   p_cla_attribute30,
678   p_object_version_number ,
679   p_name
680   );
681   --
682   -- Having converted the arguments into the
683   -- plsql record structure we call the corresponding record
684   -- business process.
685   --
686   upd(l_rec);
687   p_object_version_number := l_rec.object_version_number;
688   --
689   hr_utility.set_location(' Leaving:'||l_proc, 10);
690 End upd;
691 --
692 end ben_cla_upd;