DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_LSF_UPD

Source


1 Package Body ben_lsf_upd as
2 /* $Header: belsfrhi.pkb 120.0 2005/05/28 03:37:45 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_lsf_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_lsf_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_lsf_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_los_fctr Row
68   --
69   update ben_los_fctr
70   set
71   los_fctr_id                       = p_rec.los_fctr_id,
72   name                              = p_rec.name,
73   business_group_id                 = p_rec.business_group_id,
74   los_det_cd                        = p_rec.los_det_cd,
75   los_det_rl                        = p_rec.los_det_rl,
76   mn_los_num                        = p_rec.mn_los_num,
77   mx_los_num                        = p_rec.mx_los_num,
78   no_mx_los_num_apls_flag           = p_rec.no_mx_los_num_apls_flag,
79   no_mn_los_num_apls_flag           = p_rec.no_mn_los_num_apls_flag,
80   rndg_cd                           = p_rec.rndg_cd,
81   rndg_rl                           = p_rec.rndg_rl,
82   los_dt_to_use_cd                  = p_rec.los_dt_to_use_cd,
83   los_dt_to_use_rl                  = p_rec.los_dt_to_use_rl,
84   los_uom                           = p_rec.los_uom,
85   los_calc_rl                       = p_rec.los_calc_rl,
86   los_alt_val_to_use_cd             = p_rec.los_alt_val_to_use_cd,
87   lsf_attribute_category            = p_rec.lsf_attribute_category,
88   lsf_attribute1                    = p_rec.lsf_attribute1,
89   lsf_attribute2                    = p_rec.lsf_attribute2,
90   lsf_attribute3                    = p_rec.lsf_attribute3,
91   lsf_attribute4                    = p_rec.lsf_attribute4,
92   lsf_attribute5                    = p_rec.lsf_attribute5,
93   lsf_attribute6                    = p_rec.lsf_attribute6,
94   lsf_attribute7                    = p_rec.lsf_attribute7,
95   lsf_attribute8                    = p_rec.lsf_attribute8,
96   lsf_attribute9                    = p_rec.lsf_attribute9,
97   lsf_attribute10                   = p_rec.lsf_attribute10,
98   lsf_attribute11                   = p_rec.lsf_attribute11,
99   lsf_attribute12                   = p_rec.lsf_attribute12,
100   lsf_attribute13                   = p_rec.lsf_attribute13,
101   lsf_attribute14                   = p_rec.lsf_attribute14,
102   lsf_attribute15                   = p_rec.lsf_attribute15,
103   lsf_attribute16                   = p_rec.lsf_attribute16,
104   lsf_attribute17                   = p_rec.lsf_attribute17,
105   lsf_attribute18                   = p_rec.lsf_attribute18,
106   lsf_attribute19                   = p_rec.lsf_attribute19,
107   lsf_attribute20                   = p_rec.lsf_attribute20,
108   lsf_attribute21                   = p_rec.lsf_attribute21,
109   lsf_attribute22                   = p_rec.lsf_attribute22,
110   lsf_attribute23                   = p_rec.lsf_attribute23,
111   lsf_attribute24                   = p_rec.lsf_attribute24,
112   lsf_attribute25                   = p_rec.lsf_attribute25,
113   lsf_attribute26                   = p_rec.lsf_attribute26,
114   lsf_attribute27                   = p_rec.lsf_attribute27,
115   lsf_attribute28                   = p_rec.lsf_attribute28,
116   lsf_attribute29                   = p_rec.lsf_attribute29,
117   lsf_attribute30                   = p_rec.lsf_attribute30,
118   object_version_number             = p_rec.object_version_number,
119   use_overid_svc_dt_flag            = p_rec.use_overid_svc_dt_flag
120   where los_fctr_id = p_rec.los_fctr_id;
121   --
122   ben_lsf_shd.g_api_dml := false;   -- Unset the api dml status
123   --
124   hr_utility.set_location(' Leaving:'||l_proc, 10);
125 --
126 Exception
127   When hr_api.check_integrity_violated Then
128     -- A check constraint has been violated
129     ben_lsf_shd.g_api_dml := false;   -- Unset the api dml status
130     ben_lsf_shd.constraint_error
131       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
132   When hr_api.parent_integrity_violated Then
133     -- Parent integrity has been violated
134     ben_lsf_shd.g_api_dml := false;   -- Unset the api dml status
135     ben_lsf_shd.constraint_error
136       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
137   When hr_api.unique_integrity_violated Then
138     -- Unique integrity has been violated
139     ben_lsf_shd.g_api_dml := false;   -- Unset the api dml status
140     ben_lsf_shd.constraint_error
141       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
142   When Others Then
143     ben_lsf_shd.g_api_dml := false;   -- Unset the api dml status
144     Raise;
145 End update_dml;
146 --
147 -- ----------------------------------------------------------------------------
148 -- |------------------------------< pre_update >------------------------------|
149 -- ----------------------------------------------------------------------------
150 -- {Start Of Comments}
151 --
152 -- Description:
153 --   This private procedure contains any processing which is required before
154 --   the update dml.
155 --
156 -- Prerequisites:
157 --   This is an internal procedure which is called from the upd procedure.
158 --
159 -- In Parameters:
160 --   A Pl/Sql record structre.
161 --
162 -- Post Success:
163 --   Processing continues.
164 --
165 -- Post Failure:
166 --   If an error has occurred, an error message and exception will be raised
167 --   but not handled.
168 --
169 -- Developer Implementation Notes:
170 --   Any pre-processing required before the update dml is issued should be
171 --   coded within this procedure. It is important to note that any 3rd party
172 --   maintenance should be reviewed before placing in this procedure.
173 --
174 -- Access Status:
175 --   Internal Row Handler Use Only.
176 --
177 -- {End Of Comments}
178 -- ----------------------------------------------------------------------------
179 Procedure pre_update(p_rec in ben_lsf_shd.g_rec_type) is
180 --
181   l_proc  varchar2(72) := g_package||'pre_update';
182 --
183 Begin
184   hr_utility.set_location('Entering:'||l_proc, 5);
185   --
186   hr_utility.set_location(' Leaving:'||l_proc, 10);
187 End pre_update;
188 --
189 -- ----------------------------------------------------------------------------
190 -- |-----------------------------< post_update >------------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start Of Comments}
193 --
194 -- Description:
195 --   This private procedure contains any processing which is required after the
196 --   update dml.
197 --
198 -- Prerequisites:
199 --   This is an internal procedure which is called from the upd procedure.
200 --
201 -- In Parameters:
202 --   A Pl/Sql record structre.
203 --
204 -- Post Success:
205 --   Processing continues.
206 --
207 -- Post Failure:
208 --   If an error has occurred, an error message and exception will be raised
209 --   but not handled.
210 --
211 -- Developer Implementation Notes:
212 --   Any post-processing required after the update dml is issued should be
213 --   coded within this procedure. It is important to note that any 3rd party
214 --   maintenance should be reviewed before placing in this procedure.
215 --
216 -- Access Status:
217 --   Internal Row Handler Use Only.
218 --
219 -- {End Of Comments}
220 -- ----------------------------------------------------------------------------
221 Procedure post_update(
222 p_effective_date in date,p_rec in ben_lsf_shd.g_rec_type) is
223 --
224   l_proc  varchar2(72) := g_package||'post_update';
225 --
226 Begin
227   hr_utility.set_location('Entering:'||l_proc, 5);
228 --
229   --
230   -- Start of API User Hook for post_update.
231   --
232   begin
233     --
234     ben_lsf_rku.after_update
235       (
236   p_los_fctr_id                   =>p_rec.los_fctr_id
237  ,p_name                          =>p_rec.name
238  ,p_business_group_id             =>p_rec.business_group_id
239  ,p_los_det_cd                    =>p_rec.los_det_cd
240  ,p_los_det_rl                    =>p_rec.los_det_rl
241  ,p_mn_los_num                    =>p_rec.mn_los_num
242  ,p_mx_los_num                    =>p_rec.mx_los_num
243  ,p_no_mx_los_num_apls_flag       =>p_rec.no_mx_los_num_apls_flag
244  ,p_no_mn_los_num_apls_flag       =>p_rec.no_mn_los_num_apls_flag
245  ,p_rndg_cd                       =>p_rec.rndg_cd
246  ,p_rndg_rl                       =>p_rec.rndg_rl
247  ,p_los_dt_to_use_cd              =>p_rec.los_dt_to_use_cd
248  ,p_los_dt_to_use_rl              =>p_rec.los_dt_to_use_rl
249  ,p_los_uom                       =>p_rec.los_uom
250  ,p_los_calc_rl                   =>p_rec.los_calc_rl
251  ,p_los_alt_val_to_use_cd         =>p_rec.los_alt_val_to_use_cd
252  ,p_lsf_attribute_category        =>p_rec.lsf_attribute_category
253  ,p_lsf_attribute1                =>p_rec.lsf_attribute1
254  ,p_lsf_attribute2                =>p_rec.lsf_attribute2
255  ,p_lsf_attribute3                =>p_rec.lsf_attribute3
256  ,p_lsf_attribute4                =>p_rec.lsf_attribute4
257  ,p_lsf_attribute5                =>p_rec.lsf_attribute5
258  ,p_lsf_attribute6                =>p_rec.lsf_attribute6
259  ,p_lsf_attribute7                =>p_rec.lsf_attribute7
260  ,p_lsf_attribute8                =>p_rec.lsf_attribute8
261  ,p_lsf_attribute9                =>p_rec.lsf_attribute9
262  ,p_lsf_attribute10               =>p_rec.lsf_attribute10
263  ,p_lsf_attribute11               =>p_rec.lsf_attribute11
264  ,p_lsf_attribute12               =>p_rec.lsf_attribute12
265  ,p_lsf_attribute13               =>p_rec.lsf_attribute13
266  ,p_lsf_attribute14               =>p_rec.lsf_attribute14
267  ,p_lsf_attribute15               =>p_rec.lsf_attribute15
268  ,p_lsf_attribute16               =>p_rec.lsf_attribute16
269  ,p_lsf_attribute17               =>p_rec.lsf_attribute17
270  ,p_lsf_attribute18               =>p_rec.lsf_attribute18
271  ,p_lsf_attribute19               =>p_rec.lsf_attribute19
272  ,p_lsf_attribute20               =>p_rec.lsf_attribute20
273  ,p_lsf_attribute21               =>p_rec.lsf_attribute21
274  ,p_lsf_attribute22               =>p_rec.lsf_attribute22
275  ,p_lsf_attribute23               =>p_rec.lsf_attribute23
276  ,p_lsf_attribute24               =>p_rec.lsf_attribute24
277  ,p_lsf_attribute25               =>p_rec.lsf_attribute25
278  ,p_lsf_attribute26               =>p_rec.lsf_attribute26
279  ,p_lsf_attribute27               =>p_rec.lsf_attribute27
280  ,p_lsf_attribute28               =>p_rec.lsf_attribute28
281  ,p_lsf_attribute29               =>p_rec.lsf_attribute29
282  ,p_lsf_attribute30               =>p_rec.lsf_attribute30
283  ,p_object_version_number         =>p_rec.object_version_number
284  ,p_use_overid_svc_dt_flag        =>p_rec.use_overid_svc_dt_flag
285  ,p_effective_date                =>p_effective_date
286  ,p_name_o                        =>ben_lsf_shd.g_old_rec.name
287  ,p_business_group_id_o           =>ben_lsf_shd.g_old_rec.business_group_id
288  ,p_los_det_cd_o                  =>ben_lsf_shd.g_old_rec.los_det_cd
289  ,p_los_det_rl_o                  =>ben_lsf_shd.g_old_rec.los_det_rl
290  ,p_mn_los_num_o                  =>ben_lsf_shd.g_old_rec.mn_los_num
291  ,p_mx_los_num_o                  =>ben_lsf_shd.g_old_rec.mx_los_num
292  ,p_no_mx_los_num_apls_flag_o     =>ben_lsf_shd.g_old_rec.no_mx_los_num_apls_flag
293  ,p_no_mn_los_num_apls_flag_o     =>ben_lsf_shd.g_old_rec.no_mn_los_num_apls_flag
294  ,p_rndg_cd_o                     =>ben_lsf_shd.g_old_rec.rndg_cd
295  ,p_rndg_rl_o                     =>ben_lsf_shd.g_old_rec.rndg_rl
296  ,p_los_dt_to_use_cd_o            =>ben_lsf_shd.g_old_rec.los_dt_to_use_cd
297  ,p_los_dt_to_use_rl_o            =>ben_lsf_shd.g_old_rec.los_dt_to_use_rl
298  ,p_los_uom_o                     =>ben_lsf_shd.g_old_rec.los_uom
299  ,p_los_calc_rl_o                 =>ben_lsf_shd.g_old_rec.los_calc_rl
300  ,p_los_alt_val_to_use_cd_o       =>ben_lsf_shd.g_old_rec.los_alt_val_to_use_cd
301  ,p_lsf_attribute_category_o      =>ben_lsf_shd.g_old_rec.lsf_attribute_category
302  ,p_lsf_attribute1_o              =>ben_lsf_shd.g_old_rec.lsf_attribute1
303  ,p_lsf_attribute2_o              =>ben_lsf_shd.g_old_rec.lsf_attribute2
304  ,p_lsf_attribute3_o              =>ben_lsf_shd.g_old_rec.lsf_attribute3
305  ,p_lsf_attribute4_o              =>ben_lsf_shd.g_old_rec.lsf_attribute4
306  ,p_lsf_attribute5_o              =>ben_lsf_shd.g_old_rec.lsf_attribute5
307  ,p_lsf_attribute6_o              =>ben_lsf_shd.g_old_rec.lsf_attribute6
308  ,p_lsf_attribute7_o              =>ben_lsf_shd.g_old_rec.lsf_attribute7
309  ,p_lsf_attribute8_o              =>ben_lsf_shd.g_old_rec.lsf_attribute8
310  ,p_lsf_attribute9_o              =>ben_lsf_shd.g_old_rec.lsf_attribute9
311  ,p_lsf_attribute10_o             =>ben_lsf_shd.g_old_rec.lsf_attribute10
312  ,p_lsf_attribute11_o             =>ben_lsf_shd.g_old_rec.lsf_attribute11
313  ,p_lsf_attribute12_o             =>ben_lsf_shd.g_old_rec.lsf_attribute12
314  ,p_lsf_attribute13_o             =>ben_lsf_shd.g_old_rec.lsf_attribute13
315  ,p_lsf_attribute14_o             =>ben_lsf_shd.g_old_rec.lsf_attribute14
316  ,p_lsf_attribute15_o             =>ben_lsf_shd.g_old_rec.lsf_attribute15
317  ,p_lsf_attribute16_o             =>ben_lsf_shd.g_old_rec.lsf_attribute16
318  ,p_lsf_attribute17_o             =>ben_lsf_shd.g_old_rec.lsf_attribute17
319  ,p_lsf_attribute18_o             =>ben_lsf_shd.g_old_rec.lsf_attribute18
320  ,p_lsf_attribute19_o             =>ben_lsf_shd.g_old_rec.lsf_attribute19
321  ,p_lsf_attribute20_o             =>ben_lsf_shd.g_old_rec.lsf_attribute20
322  ,p_lsf_attribute21_o             =>ben_lsf_shd.g_old_rec.lsf_attribute21
323  ,p_lsf_attribute22_o             =>ben_lsf_shd.g_old_rec.lsf_attribute22
324  ,p_lsf_attribute23_o             =>ben_lsf_shd.g_old_rec.lsf_attribute23
325  ,p_lsf_attribute24_o             =>ben_lsf_shd.g_old_rec.lsf_attribute24
326  ,p_lsf_attribute25_o             =>ben_lsf_shd.g_old_rec.lsf_attribute25
327  ,p_lsf_attribute26_o             =>ben_lsf_shd.g_old_rec.lsf_attribute26
328  ,p_lsf_attribute27_o             =>ben_lsf_shd.g_old_rec.lsf_attribute27
329  ,p_lsf_attribute28_o             =>ben_lsf_shd.g_old_rec.lsf_attribute28
330  ,p_lsf_attribute29_o             =>ben_lsf_shd.g_old_rec.lsf_attribute29
331  ,p_lsf_attribute30_o             =>ben_lsf_shd.g_old_rec.lsf_attribute30
332  ,p_object_version_number_o       =>ben_lsf_shd.g_old_rec.object_version_number
333  ,p_use_overid_svc_dt_flag_o      =>ben_lsf_shd.g_old_rec.use_overid_svc_dt_flag
334       );
335     --
336   exception
337     --
338     when hr_api.cannot_find_prog_unit then
339       --
340       hr_api.cannot_find_prog_unit_error
341         (p_module_name => 'ben_los_fctr'
342         ,p_hook_type   => 'AU');
343       --
344   end;
345   --
346   -- End of API User Hook for post_update.
347   --
348   --
349   hr_utility.set_location(' Leaving:'||l_proc, 10);
350 End post_update;
351 --
352 -- ----------------------------------------------------------------------------
353 -- |-----------------------------< convert_defs >-----------------------------|
354 -- ----------------------------------------------------------------------------
355 -- {Start Of Comments}
356 --
357 -- Description:
358 --   The Convert_Defs procedure has one very important function:
359 --   It must return the record structure for the row with all system defaulted
360 --   values converted into its corresponding parameter value for update. When
361 --   we attempt to update a row through the Upd process , certain
362 --   parameters can be defaulted which enables flexibility in the calling of
363 --   the upd process (e.g. only attributes which need to be updated need to be
364 --   specified). For the upd process to determine which attributes
365 --   have NOT been specified we need to check if the parameter has a reserved
366 --   system default value. Therefore, for all parameters which have a
367 --   corresponding reserved system default mechanism specified we need to
368 --   check if a system default is being used. If a system default is being
369 --   used then we convert the defaulted value into its corresponding attribute
370 --   value held in the g_old_rec data structure.
371 --
372 -- Prerequisites:
373 --   This private function can only be called from the upd process.
374 --
375 -- In Parameters:
376 --   A Pl/Sql record structre.
377 --
378 -- Post Success:
379 --   The record structure will be returned with all system defaulted parameter
380 --   values converted into its current row attribute value.
381 --
382 -- Post Failure:
383 --   No direct error handling is required within this function. Any possible
384 --   errors within this procedure will be a PL/SQL value error due to conversion
385 --   of datatypes or data lengths.
386 --
387 -- Developer Implementation Notes:
388 --   None.
389 --
390 -- Access Status:
391 --   Internal Row Handler Use Only.
392 --
393 -- {End Of Comments}
394 -- ----------------------------------------------------------------------------
395 Procedure convert_defs(p_rec in out nocopy ben_lsf_shd.g_rec_type) is
396 --
397   l_proc  varchar2(72) := g_package||'convert_defs';
398 --
399 Begin
400   --
401   hr_utility.set_location('Entering:'||l_proc, 5);
402   --
403   -- We must now examine each argument value in the
404   -- p_rec plsql record structure
405   -- to see if a system default is being used. If a system default
406   -- is being used then we must set to the 'current' argument value.
407   --
408   If (p_rec.name = hr_api.g_varchar2) then
409     p_rec.name :=
410     ben_lsf_shd.g_old_rec.name;
411   End If;
412   If (p_rec.business_group_id = hr_api.g_number) then
413     p_rec.business_group_id :=
414     ben_lsf_shd.g_old_rec.business_group_id;
415   End If;
416   If (p_rec.los_det_cd = hr_api.g_varchar2) then
417     p_rec.los_det_cd :=
418     ben_lsf_shd.g_old_rec.los_det_cd;
419   End If;
420   If (p_rec.los_det_rl = hr_api.g_number) then
421     p_rec.los_det_rl :=
422     ben_lsf_shd.g_old_rec.los_det_rl;
423   End If;
424   If (p_rec.mn_los_num = hr_api.g_number) then
425     p_rec.mn_los_num :=
426     ben_lsf_shd.g_old_rec.mn_los_num;
427   End If;
428   If (p_rec.mx_los_num = hr_api.g_number) then
429     p_rec.mx_los_num :=
430     ben_lsf_shd.g_old_rec.mx_los_num;
431   End If;
432   If (p_rec.no_mx_los_num_apls_flag = hr_api.g_varchar2) then
433     p_rec.no_mx_los_num_apls_flag :=
434     ben_lsf_shd.g_old_rec.no_mx_los_num_apls_flag;
435   End If;
436   If (p_rec.no_mn_los_num_apls_flag = hr_api.g_varchar2) then
437     p_rec.no_mn_los_num_apls_flag :=
438     ben_lsf_shd.g_old_rec.no_mn_los_num_apls_flag;
439   End If;
440   If (p_rec.rndg_cd = hr_api.g_varchar2) then
441     p_rec.rndg_cd :=
442     ben_lsf_shd.g_old_rec.rndg_cd;
443   End If;
444   If (p_rec.rndg_rl = hr_api.g_number) then
445     p_rec.rndg_rl :=
446     ben_lsf_shd.g_old_rec.rndg_rl;
447   End If;
448   If (p_rec.los_dt_to_use_cd = hr_api.g_varchar2) then
449     p_rec.los_dt_to_use_cd :=
450     ben_lsf_shd.g_old_rec.los_dt_to_use_cd;
451   End If;
452   If (p_rec.los_dt_to_use_rl = hr_api.g_number) then
453     p_rec.los_dt_to_use_rl :=
454     ben_lsf_shd.g_old_rec.los_dt_to_use_rl;
455   End If;
456   If (p_rec.los_uom = hr_api.g_varchar2) then
457     p_rec.los_uom :=
458     ben_lsf_shd.g_old_rec.los_uom;
459   End If;
460   If (p_rec.los_calc_rl = hr_api.g_number) then
461     p_rec.los_calc_rl :=
462     ben_lsf_shd.g_old_rec.los_calc_rl;
463   End If;
464   If (p_rec.los_alt_val_to_use_cd = hr_api.g_varchar2) then
465     p_rec.los_alt_val_to_use_cd :=
466     ben_lsf_shd.g_old_rec.los_alt_val_to_use_cd;
467   End If;
468   If (p_rec.lsf_attribute_category = hr_api.g_varchar2) then
469     p_rec.lsf_attribute_category :=
470     ben_lsf_shd.g_old_rec.lsf_attribute_category;
471   End If;
472   If (p_rec.lsf_attribute1 = hr_api.g_varchar2) then
473     p_rec.lsf_attribute1 :=
474     ben_lsf_shd.g_old_rec.lsf_attribute1;
475   End If;
476   If (p_rec.lsf_attribute2 = hr_api.g_varchar2) then
477     p_rec.lsf_attribute2 :=
478     ben_lsf_shd.g_old_rec.lsf_attribute2;
479   End If;
480   If (p_rec.lsf_attribute3 = hr_api.g_varchar2) then
481     p_rec.lsf_attribute3 :=
482     ben_lsf_shd.g_old_rec.lsf_attribute3;
483   End If;
484   If (p_rec.lsf_attribute4 = hr_api.g_varchar2) then
485     p_rec.lsf_attribute4 :=
486     ben_lsf_shd.g_old_rec.lsf_attribute4;
487   End If;
488   If (p_rec.lsf_attribute5 = hr_api.g_varchar2) then
489     p_rec.lsf_attribute5 :=
490     ben_lsf_shd.g_old_rec.lsf_attribute5;
491   End If;
492   If (p_rec.lsf_attribute6 = hr_api.g_varchar2) then
493     p_rec.lsf_attribute6 :=
494     ben_lsf_shd.g_old_rec.lsf_attribute6;
495   End If;
496   If (p_rec.lsf_attribute7 = hr_api.g_varchar2) then
497     p_rec.lsf_attribute7 :=
498     ben_lsf_shd.g_old_rec.lsf_attribute7;
499   End If;
500   If (p_rec.lsf_attribute8 = hr_api.g_varchar2) then
501     p_rec.lsf_attribute8 :=
502     ben_lsf_shd.g_old_rec.lsf_attribute8;
503   End If;
504   If (p_rec.lsf_attribute9 = hr_api.g_varchar2) then
505     p_rec.lsf_attribute9 :=
506     ben_lsf_shd.g_old_rec.lsf_attribute9;
507   End If;
508   If (p_rec.lsf_attribute10 = hr_api.g_varchar2) then
509     p_rec.lsf_attribute10 :=
510     ben_lsf_shd.g_old_rec.lsf_attribute10;
511   End If;
512   If (p_rec.lsf_attribute11 = hr_api.g_varchar2) then
513     p_rec.lsf_attribute11 :=
514     ben_lsf_shd.g_old_rec.lsf_attribute11;
515   End If;
516   If (p_rec.lsf_attribute12 = hr_api.g_varchar2) then
517     p_rec.lsf_attribute12 :=
518     ben_lsf_shd.g_old_rec.lsf_attribute12;
519   End If;
520   If (p_rec.lsf_attribute13 = hr_api.g_varchar2) then
521     p_rec.lsf_attribute13 :=
522     ben_lsf_shd.g_old_rec.lsf_attribute13;
523   End If;
524   If (p_rec.lsf_attribute14 = hr_api.g_varchar2) then
525     p_rec.lsf_attribute14 :=
526     ben_lsf_shd.g_old_rec.lsf_attribute14;
527   End If;
528   If (p_rec.lsf_attribute15 = hr_api.g_varchar2) then
529     p_rec.lsf_attribute15 :=
530     ben_lsf_shd.g_old_rec.lsf_attribute15;
531   End If;
532   If (p_rec.lsf_attribute16 = hr_api.g_varchar2) then
533     p_rec.lsf_attribute16 :=
534     ben_lsf_shd.g_old_rec.lsf_attribute16;
535   End If;
536   If (p_rec.lsf_attribute17 = hr_api.g_varchar2) then
537     p_rec.lsf_attribute17 :=
538     ben_lsf_shd.g_old_rec.lsf_attribute17;
539   End If;
540   If (p_rec.lsf_attribute18 = hr_api.g_varchar2) then
541     p_rec.lsf_attribute18 :=
542     ben_lsf_shd.g_old_rec.lsf_attribute18;
543   End If;
544   If (p_rec.lsf_attribute19 = hr_api.g_varchar2) then
545     p_rec.lsf_attribute19 :=
546     ben_lsf_shd.g_old_rec.lsf_attribute19;
547   End If;
548   If (p_rec.lsf_attribute20 = hr_api.g_varchar2) then
549     p_rec.lsf_attribute20 :=
550     ben_lsf_shd.g_old_rec.lsf_attribute20;
551   End If;
552   If (p_rec.lsf_attribute21 = hr_api.g_varchar2) then
553     p_rec.lsf_attribute21 :=
554     ben_lsf_shd.g_old_rec.lsf_attribute21;
555   End If;
556   If (p_rec.lsf_attribute22 = hr_api.g_varchar2) then
557     p_rec.lsf_attribute22 :=
558     ben_lsf_shd.g_old_rec.lsf_attribute22;
559   End If;
560   If (p_rec.lsf_attribute23 = hr_api.g_varchar2) then
561     p_rec.lsf_attribute23 :=
562     ben_lsf_shd.g_old_rec.lsf_attribute23;
563   End If;
564   If (p_rec.lsf_attribute24 = hr_api.g_varchar2) then
565     p_rec.lsf_attribute24 :=
566     ben_lsf_shd.g_old_rec.lsf_attribute24;
567   End If;
568   If (p_rec.lsf_attribute25 = hr_api.g_varchar2) then
569     p_rec.lsf_attribute25 :=
570     ben_lsf_shd.g_old_rec.lsf_attribute25;
571   End If;
572   If (p_rec.lsf_attribute26 = hr_api.g_varchar2) then
573     p_rec.lsf_attribute26 :=
574     ben_lsf_shd.g_old_rec.lsf_attribute26;
575   End If;
576   If (p_rec.lsf_attribute27 = hr_api.g_varchar2) then
577     p_rec.lsf_attribute27 :=
578     ben_lsf_shd.g_old_rec.lsf_attribute27;
579   End If;
580   If (p_rec.lsf_attribute28 = hr_api.g_varchar2) then
581     p_rec.lsf_attribute28 :=
582     ben_lsf_shd.g_old_rec.lsf_attribute28;
583   End If;
584   If (p_rec.lsf_attribute29 = hr_api.g_varchar2) then
585     p_rec.lsf_attribute29 :=
586     ben_lsf_shd.g_old_rec.lsf_attribute29;
587   End If;
588   If (p_rec.lsf_attribute30 = hr_api.g_varchar2) then
589     p_rec.lsf_attribute30 :=
590     ben_lsf_shd.g_old_rec.lsf_attribute30;
591   End If;
592   If (p_rec.use_overid_svc_dt_flag = hr_api.g_varchar2) then
593     p_rec.use_overid_svc_dt_flag :=
594     ben_lsf_shd.g_old_rec.use_overid_svc_dt_flag;
595   End If;
596   --
597   hr_utility.set_location(' Leaving:'||l_proc, 10);
598 --
599 End convert_defs;
600 --
601 -- ----------------------------------------------------------------------------
602 -- |---------------------------------< upd >----------------------------------|
603 -- ----------------------------------------------------------------------------
604 Procedure upd
605   (
606   p_effective_date in date,
607   p_rec        in out nocopy ben_lsf_shd.g_rec_type
608   ) is
609 --
610   l_proc  varchar2(72) := g_package||'upd';
611 --
612 Begin
613   hr_utility.set_location('Entering:'||l_proc, 5);
614   --
615   -- We must lock the row which we need to update.
616   --
617   ben_lsf_shd.lck
618 	(
619 	p_rec.los_fctr_id,
620 	p_rec.object_version_number
621 	);
622   --
623   -- 1. During an update system defaults are used to determine if
624   --    arguments have been defaulted or not. We must therefore
625   --    derive the full record structure values to be updated.
626   --
627   -- 2. Call the supporting update validate operations.
628   --
629   convert_defs(p_rec);
630   ben_lsf_bus.update_validate(p_rec
631   ,p_effective_date);
632   --
633   -- Call the supporting pre-update operation
634   --
635   pre_update(p_rec);
636   --
637   -- Update the row.
638   --
639   update_dml(p_rec);
640   --
641   -- Call the supporting post-update operation
642   --
643   post_update(
644 p_effective_date,p_rec);
645 End upd;
646 --
647 -- ----------------------------------------------------------------------------
648 -- |---------------------------------< upd >----------------------------------|
649 -- ----------------------------------------------------------------------------
650 Procedure upd
651   (
652   p_effective_date in date,
653   p_los_fctr_id                  in number,
654   p_name                         in varchar2         default hr_api.g_varchar2,
655   p_business_group_id            in number           default hr_api.g_number,
656   p_los_det_cd                   in varchar2         default hr_api.g_varchar2,
657   p_los_det_rl                   in number           default hr_api.g_number,
658   p_mn_los_num                   in number           default hr_api.g_number,
659   p_mx_los_num                   in number           default hr_api.g_number,
660   p_no_mx_los_num_apls_flag      in varchar2         default hr_api.g_varchar2,
661   p_no_mn_los_num_apls_flag      in varchar2         default hr_api.g_varchar2,
662   p_rndg_cd                      in varchar2         default hr_api.g_varchar2,
663   p_rndg_rl                      in number           default hr_api.g_number,
664   p_los_dt_to_use_cd             in varchar2         default hr_api.g_varchar2,
665   p_los_dt_to_use_rl             in number           default hr_api.g_number,
666   p_los_uom                      in varchar2         default hr_api.g_varchar2,
667   p_los_calc_rl                  in number           default hr_api.g_number,
668   p_los_alt_val_to_use_cd        in varchar2         default hr_api.g_varchar2,
669   p_lsf_attribute_category       in varchar2         default hr_api.g_varchar2,
670   p_lsf_attribute1               in varchar2         default hr_api.g_varchar2,
671   p_lsf_attribute2               in varchar2         default hr_api.g_varchar2,
672   p_lsf_attribute3               in varchar2         default hr_api.g_varchar2,
673   p_lsf_attribute4               in varchar2         default hr_api.g_varchar2,
674   p_lsf_attribute5               in varchar2         default hr_api.g_varchar2,
675   p_lsf_attribute6               in varchar2         default hr_api.g_varchar2,
676   p_lsf_attribute7               in varchar2         default hr_api.g_varchar2,
677   p_lsf_attribute8               in varchar2         default hr_api.g_varchar2,
678   p_lsf_attribute9               in varchar2         default hr_api.g_varchar2,
679   p_lsf_attribute10              in varchar2         default hr_api.g_varchar2,
680   p_lsf_attribute11              in varchar2         default hr_api.g_varchar2,
681   p_lsf_attribute12              in varchar2         default hr_api.g_varchar2,
682   p_lsf_attribute13              in varchar2         default hr_api.g_varchar2,
683   p_lsf_attribute14              in varchar2         default hr_api.g_varchar2,
684   p_lsf_attribute15              in varchar2         default hr_api.g_varchar2,
685   p_lsf_attribute16              in varchar2         default hr_api.g_varchar2,
686   p_lsf_attribute17              in varchar2         default hr_api.g_varchar2,
687   p_lsf_attribute18              in varchar2         default hr_api.g_varchar2,
688   p_lsf_attribute19              in varchar2         default hr_api.g_varchar2,
689   p_lsf_attribute20              in varchar2         default hr_api.g_varchar2,
690   p_lsf_attribute21              in varchar2         default hr_api.g_varchar2,
691   p_lsf_attribute22              in varchar2         default hr_api.g_varchar2,
692   p_lsf_attribute23              in varchar2         default hr_api.g_varchar2,
693   p_lsf_attribute24              in varchar2         default hr_api.g_varchar2,
694   p_lsf_attribute25              in varchar2         default hr_api.g_varchar2,
695   p_lsf_attribute26              in varchar2         default hr_api.g_varchar2,
696   p_lsf_attribute27              in varchar2         default hr_api.g_varchar2,
697   p_lsf_attribute28              in varchar2         default hr_api.g_varchar2,
698   p_lsf_attribute29              in varchar2         default hr_api.g_varchar2,
699   p_lsf_attribute30              in varchar2         default hr_api.g_varchar2,
700   p_object_version_number        in out nocopy number,
701   p_use_overid_svc_dt_flag       in varchar2         default hr_api.g_varchar2
702   ) is
703 --
704   l_rec	  ben_lsf_shd.g_rec_type;
705   l_proc  varchar2(72) := g_package||'upd';
706 --
707 Begin
708   hr_utility.set_location('Entering:'||l_proc, 5);
709   --
710   -- Call conversion function to turn arguments into the
711   -- l_rec structure.
712   --
713   l_rec :=
714   ben_lsf_shd.convert_args
715   (
716   p_los_fctr_id,
717   p_name,
718   p_business_group_id,
719   p_los_det_cd,
720   p_los_det_rl,
721   p_mn_los_num,
722   p_mx_los_num,
723   p_no_mx_los_num_apls_flag,
724   p_no_mn_los_num_apls_flag,
725   p_rndg_cd,
726   p_rndg_rl,
727   p_los_dt_to_use_cd,
728   p_los_dt_to_use_rl,
729   p_los_uom,
730   p_los_calc_rl,
731   p_los_alt_val_to_use_cd,
732   p_lsf_attribute_category,
733   p_lsf_attribute1,
734   p_lsf_attribute2,
735   p_lsf_attribute3,
736   p_lsf_attribute4,
737   p_lsf_attribute5,
738   p_lsf_attribute6,
739   p_lsf_attribute7,
740   p_lsf_attribute8,
741   p_lsf_attribute9,
742   p_lsf_attribute10,
743   p_lsf_attribute11,
744   p_lsf_attribute12,
745   p_lsf_attribute13,
746   p_lsf_attribute14,
747   p_lsf_attribute15,
748   p_lsf_attribute16,
749   p_lsf_attribute17,
750   p_lsf_attribute18,
751   p_lsf_attribute19,
752   p_lsf_attribute20,
753   p_lsf_attribute21,
754   p_lsf_attribute22,
755   p_lsf_attribute23,
756   p_lsf_attribute24,
757   p_lsf_attribute25,
758   p_lsf_attribute26,
759   p_lsf_attribute27,
760   p_lsf_attribute28,
761   p_lsf_attribute29,
762   p_lsf_attribute30,
763   p_object_version_number,
764   p_use_overid_svc_dt_flag
765   );
766   --
767   -- Having converted the arguments into the
768   -- plsql record structure we call the corresponding record
769   -- business process.
770   --
771   upd(
772     p_effective_date,l_rec);
773   p_object_version_number := l_rec.object_version_number;
774   --
775   hr_utility.set_location(' Leaving:'||l_proc, 10);
776 End upd;
777 --
778 end ben_lsf_upd;