DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_RVC_UPD

Source


1 Package Body ben_rvc_upd as
2 /* $Header: bervcrhi.pkb 115.2 2002/12/11 11:18:06 hnarayan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_rvc_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_rvc_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_rvc_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_prtt_rt_val_ctfn_prvdd Row
68   --
69   update ben_prtt_rt_val_ctfn_prvdd
70   set
71   prtt_rt_val_ctfn_prvdd_id         = p_rec.prtt_rt_val_ctfn_prvdd_id,
72   enrt_ctfn_typ_cd                  = p_rec.enrt_ctfn_typ_cd,
73   enrt_ctfn_rqd_flag                = p_rec.enrt_ctfn_rqd_flag,
74   enrt_ctfn_recd_dt                 = p_rec.enrt_ctfn_recd_dt,
75   enrt_ctfn_dnd_dt                  = p_rec.enrt_ctfn_dnd_dt,
76   prtt_rt_val_id                    = p_rec.prtt_rt_val_id,
77   business_group_id                 = p_rec.business_group_id,
78   rvc_attribute_category            = p_rec.rvc_attribute_category,
79   rvc_attribute1                    = p_rec.rvc_attribute1,
80   rvc_attribute2                    = p_rec.rvc_attribute2,
81   rvc_attribute3                    = p_rec.rvc_attribute3,
82   rvc_attribute4                    = p_rec.rvc_attribute4,
83   rvc_attribute5                    = p_rec.rvc_attribute5,
84   rvc_attribute6                    = p_rec.rvc_attribute6,
85   rvc_attribute7                    = p_rec.rvc_attribute7,
86   rvc_attribute8                    = p_rec.rvc_attribute8,
87   rvc_attribute9                    = p_rec.rvc_attribute9,
88   rvc_attribute10                   = p_rec.rvc_attribute10,
89   rvc_attribute11                   = p_rec.rvc_attribute11,
90   rvc_attribute12                   = p_rec.rvc_attribute12,
91   rvc_attribute13                   = p_rec.rvc_attribute13,
92   rvc_attribute14                   = p_rec.rvc_attribute14,
93   rvc_attribute15                   = p_rec.rvc_attribute15,
94   rvc_attribute16                   = p_rec.rvc_attribute16,
95   rvc_attribute17                   = p_rec.rvc_attribute17,
96   rvc_attribute18                   = p_rec.rvc_attribute18,
97   rvc_attribute19                   = p_rec.rvc_attribute19,
98   rvc_attribute20                   = p_rec.rvc_attribute20,
99   rvc_attribute21                   = p_rec.rvc_attribute21,
100   rvc_attribute22                   = p_rec.rvc_attribute22,
101   rvc_attribute23                   = p_rec.rvc_attribute23,
102   rvc_attribute24                   = p_rec.rvc_attribute24,
103   rvc_attribute25                   = p_rec.rvc_attribute25,
104   rvc_attribute26                   = p_rec.rvc_attribute26,
105   rvc_attribute27                   = p_rec.rvc_attribute27,
106   rvc_attribute28                   = p_rec.rvc_attribute28,
107   rvc_attribute29                   = p_rec.rvc_attribute29,
108   rvc_attribute30                   = p_rec.rvc_attribute30,
109   request_id                        = p_rec.request_id,
110   program_application_id            = p_rec.program_application_id,
111   program_id                        = p_rec.program_id,
112   program_update_date               = p_rec.program_update_date,
113   object_version_number             = p_rec.object_version_number
114   where prtt_rt_val_ctfn_prvdd_id = p_rec.prtt_rt_val_ctfn_prvdd_id;
115   --
116   ben_rvc_shd.g_api_dml := false;   -- Unset the api dml status
117   --
118   hr_utility.set_location(' Leaving:'||l_proc, 10);
119 --
120 Exception
121   When hr_api.check_integrity_violated Then
122     -- A check constraint has been violated
123     ben_rvc_shd.g_api_dml := false;   -- Unset the api dml status
124     ben_rvc_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When hr_api.parent_integrity_violated Then
127     -- Parent integrity has been violated
128     ben_rvc_shd.g_api_dml := false;   -- Unset the api dml status
129     ben_rvc_shd.constraint_error
130       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131   When hr_api.unique_integrity_violated Then
132     -- Unique integrity has been violated
133     ben_rvc_shd.g_api_dml := false;   -- Unset the api dml status
134     ben_rvc_shd.constraint_error
135       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136   When Others Then
137     ben_rvc_shd.g_api_dml := false;   -- Unset the api dml status
138     Raise;
139 End update_dml;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |------------------------------< pre_update >------------------------------|
143 -- ----------------------------------------------------------------------------
144 -- {Start Of Comments}
145 --
146 -- Description:
147 --   This private procedure contains any processing which is required before
148 --   the update dml.
149 --
150 -- Prerequisites:
151 --   This is an internal procedure which is called from the upd procedure.
152 --
153 -- In Parameters:
154 --   A Pl/Sql record structre.
155 --
156 -- Post Success:
157 --   Processing continues.
158 --
159 -- Post Failure:
160 --   If an error has occurred, an error message and exception will be raised
161 --   but not handled.
162 --
163 -- Developer Implementation Notes:
164 --   Any pre-processing required before the update dml is issued should be
165 --   coded within this procedure. It is important to note that any 3rd party
166 --   maintenance should be reviewed before placing in this procedure.
167 --
168 -- Access Status:
169 --   Internal Row Handler Use Only.
170 --
171 -- {End Of Comments}
172 -- ----------------------------------------------------------------------------
173 Procedure pre_update(p_rec in ben_rvc_shd.g_rec_type) is
174 --
175   l_proc  varchar2(72) := g_package||'pre_update';
176 --
177 Begin
178   hr_utility.set_location('Entering:'||l_proc, 5);
179   --
180   hr_utility.set_location(' Leaving:'||l_proc, 10);
181 End pre_update;
182 --
183 -- ----------------------------------------------------------------------------
184 -- |-----------------------------< post_update >------------------------------|
185 -- ----------------------------------------------------------------------------
186 -- {Start Of Comments}
187 --
188 -- Description:
189 --   This private procedure contains any processing which is required after the
190 --   update dml.
191 --
192 -- Prerequisites:
193 --   This is an internal procedure which is called from the upd procedure.
194 --
195 -- In Parameters:
196 --   A Pl/Sql record structre.
197 --
198 -- Post Success:
199 --   Processing continues.
200 --
201 -- Post Failure:
202 --   If an error has occurred, an error message and exception will be raised
203 --   but not handled.
204 --
205 -- Developer Implementation Notes:
206 --   Any post-processing required after the update dml is issued should be
207 --   coded within this procedure. It is important to note that any 3rd party
208 --   maintenance should be reviewed before placing in this procedure.
209 --
210 -- Access Status:
211 --   Internal Row Handler Use Only.
212 --
213 -- {End Of Comments}
214 -- ----------------------------------------------------------------------------
215 Procedure post_update(
216 p_effective_date in date,p_rec in ben_rvc_shd.g_rec_type) is
217 --
218   l_proc  varchar2(72) := g_package||'post_update';
219 --
220 Begin
221   hr_utility.set_location('Entering:'||l_proc, 5);
222 --
223   --
224   -- Start of API User Hook for post_update.
225   --
226   begin
227     --
228     ben_rvc_rku.after_update
229       (
230   p_prtt_rt_val_ctfn_prvdd_id     =>p_rec.prtt_rt_val_ctfn_prvdd_id
231  ,p_enrt_ctfn_typ_cd              =>p_rec.enrt_ctfn_typ_cd
232  ,p_enrt_ctfn_rqd_flag            =>p_rec.enrt_ctfn_rqd_flag
233  ,p_enrt_ctfn_recd_dt             =>p_rec.enrt_ctfn_recd_dt
234  ,p_enrt_ctfn_dnd_dt              =>p_rec.enrt_ctfn_dnd_dt
235  ,p_prtt_rt_val_id                =>p_rec.prtt_rt_val_id
236  ,p_business_group_id             =>p_rec.business_group_id
237  ,p_rvc_attribute_category        =>p_rec.rvc_attribute_category
238  ,p_rvc_attribute1                =>p_rec.rvc_attribute1
239  ,p_rvc_attribute2                =>p_rec.rvc_attribute2
240  ,p_rvc_attribute3                =>p_rec.rvc_attribute3
241  ,p_rvc_attribute4                =>p_rec.rvc_attribute4
242  ,p_rvc_attribute5                =>p_rec.rvc_attribute5
243  ,p_rvc_attribute6                =>p_rec.rvc_attribute6
244  ,p_rvc_attribute7                =>p_rec.rvc_attribute7
245  ,p_rvc_attribute8                =>p_rec.rvc_attribute8
246  ,p_rvc_attribute9                =>p_rec.rvc_attribute9
247  ,p_rvc_attribute10               =>p_rec.rvc_attribute10
248  ,p_rvc_attribute11               =>p_rec.rvc_attribute11
249  ,p_rvc_attribute12               =>p_rec.rvc_attribute12
250  ,p_rvc_attribute13               =>p_rec.rvc_attribute13
251  ,p_rvc_attribute14               =>p_rec.rvc_attribute14
252  ,p_rvc_attribute15               =>p_rec.rvc_attribute15
253  ,p_rvc_attribute16               =>p_rec.rvc_attribute16
254  ,p_rvc_attribute17               =>p_rec.rvc_attribute17
255  ,p_rvc_attribute18               =>p_rec.rvc_attribute18
256  ,p_rvc_attribute19               =>p_rec.rvc_attribute19
257  ,p_rvc_attribute20               =>p_rec.rvc_attribute20
258  ,p_rvc_attribute21               =>p_rec.rvc_attribute21
259  ,p_rvc_attribute22               =>p_rec.rvc_attribute22
260  ,p_rvc_attribute23               =>p_rec.rvc_attribute23
261  ,p_rvc_attribute24               =>p_rec.rvc_attribute24
262  ,p_rvc_attribute25               =>p_rec.rvc_attribute25
263  ,p_rvc_attribute26               =>p_rec.rvc_attribute26
264  ,p_rvc_attribute27               =>p_rec.rvc_attribute27
265  ,p_rvc_attribute28               =>p_rec.rvc_attribute28
266  ,p_rvc_attribute29               =>p_rec.rvc_attribute29
267  ,p_rvc_attribute30               =>p_rec.rvc_attribute30
268  ,p_request_id                    =>p_rec.request_id
269  ,p_program_application_id        =>p_rec.program_application_id
270  ,p_program_id                    =>p_rec.program_id
271  ,p_program_update_date           =>p_rec.program_update_date
272  ,p_object_version_number         =>p_rec.object_version_number
273  ,p_effective_date                =>p_effective_date
274  ,p_enrt_ctfn_typ_cd_o            =>ben_rvc_shd.g_old_rec.enrt_ctfn_typ_cd
275  ,p_enrt_ctfn_rqd_flag_o          =>ben_rvc_shd.g_old_rec.enrt_ctfn_rqd_flag
276  ,p_enrt_ctfn_recd_dt_o           =>ben_rvc_shd.g_old_rec.enrt_ctfn_recd_dt
277  ,p_enrt_ctfn_dnd_dt_o            =>ben_rvc_shd.g_old_rec.enrt_ctfn_dnd_dt
278  ,p_prtt_rt_val_id_o              =>ben_rvc_shd.g_old_rec.prtt_rt_val_id
279  ,p_business_group_id_o           =>ben_rvc_shd.g_old_rec.business_group_id
280  ,p_rvc_attribute_category_o      =>ben_rvc_shd.g_old_rec.rvc_attribute_category
281  ,p_rvc_attribute1_o              =>ben_rvc_shd.g_old_rec.rvc_attribute1
282  ,p_rvc_attribute2_o              =>ben_rvc_shd.g_old_rec.rvc_attribute2
283  ,p_rvc_attribute3_o              =>ben_rvc_shd.g_old_rec.rvc_attribute3
284  ,p_rvc_attribute4_o              =>ben_rvc_shd.g_old_rec.rvc_attribute4
285  ,p_rvc_attribute5_o              =>ben_rvc_shd.g_old_rec.rvc_attribute5
286  ,p_rvc_attribute6_o              =>ben_rvc_shd.g_old_rec.rvc_attribute6
287  ,p_rvc_attribute7_o              =>ben_rvc_shd.g_old_rec.rvc_attribute7
288  ,p_rvc_attribute8_o              =>ben_rvc_shd.g_old_rec.rvc_attribute8
289  ,p_rvc_attribute9_o              =>ben_rvc_shd.g_old_rec.rvc_attribute9
290  ,p_rvc_attribute10_o             =>ben_rvc_shd.g_old_rec.rvc_attribute10
291  ,p_rvc_attribute11_o             =>ben_rvc_shd.g_old_rec.rvc_attribute11
292  ,p_rvc_attribute12_o             =>ben_rvc_shd.g_old_rec.rvc_attribute12
293  ,p_rvc_attribute13_o             =>ben_rvc_shd.g_old_rec.rvc_attribute13
294  ,p_rvc_attribute14_o             =>ben_rvc_shd.g_old_rec.rvc_attribute14
295  ,p_rvc_attribute15_o             =>ben_rvc_shd.g_old_rec.rvc_attribute15
296  ,p_rvc_attribute16_o             =>ben_rvc_shd.g_old_rec.rvc_attribute16
297  ,p_rvc_attribute17_o             =>ben_rvc_shd.g_old_rec.rvc_attribute17
298  ,p_rvc_attribute18_o             =>ben_rvc_shd.g_old_rec.rvc_attribute18
299  ,p_rvc_attribute19_o             =>ben_rvc_shd.g_old_rec.rvc_attribute19
300  ,p_rvc_attribute20_o             =>ben_rvc_shd.g_old_rec.rvc_attribute20
301  ,p_rvc_attribute21_o             =>ben_rvc_shd.g_old_rec.rvc_attribute21
302  ,p_rvc_attribute22_o             =>ben_rvc_shd.g_old_rec.rvc_attribute22
303  ,p_rvc_attribute23_o             =>ben_rvc_shd.g_old_rec.rvc_attribute23
304  ,p_rvc_attribute24_o             =>ben_rvc_shd.g_old_rec.rvc_attribute24
305  ,p_rvc_attribute25_o             =>ben_rvc_shd.g_old_rec.rvc_attribute25
306  ,p_rvc_attribute26_o             =>ben_rvc_shd.g_old_rec.rvc_attribute26
307  ,p_rvc_attribute27_o             =>ben_rvc_shd.g_old_rec.rvc_attribute27
308  ,p_rvc_attribute28_o             =>ben_rvc_shd.g_old_rec.rvc_attribute28
309  ,p_rvc_attribute29_o             =>ben_rvc_shd.g_old_rec.rvc_attribute29
310  ,p_rvc_attribute30_o             =>ben_rvc_shd.g_old_rec.rvc_attribute30
311  ,p_request_id_o                  =>ben_rvc_shd.g_old_rec.request_id
312  ,p_program_application_id_o      =>ben_rvc_shd.g_old_rec.program_application_id
313  ,p_program_id_o                  =>ben_rvc_shd.g_old_rec.program_id
314  ,p_program_update_date_o         =>ben_rvc_shd.g_old_rec.program_update_date
315  ,p_object_version_number_o       =>ben_rvc_shd.g_old_rec.object_version_number
316       );
317     --
318   exception
319     --
320     when hr_api.cannot_find_prog_unit then
321       --
322       hr_api.cannot_find_prog_unit_error
323         (p_module_name => 'ben_prv_ctfn_prvdd'
324         ,p_hook_type   => 'AU');
325       --
326   end;
327   --
328   -- End of API User Hook for post_update.
329   --
330   --
331   hr_utility.set_location(' Leaving:'||l_proc, 10);
332 End post_update;
333 --
334 -- ----------------------------------------------------------------------------
335 -- |-----------------------------< convert_defs >-----------------------------|
336 -- ----------------------------------------------------------------------------
337 -- {Start Of Comments}
338 --
339 -- Description:
340 --   The Convert_Defs procedure has one very important function:
341 --   It must return the record structure for the row with all system defaulted
342 --   values converted into its corresponding parameter value for update. When
343 --   we attempt to update a row through the Upd process , certain
344 --   parameters can be defaulted which enables flexibility in the calling of
345 --   the upd process (e.g. only attributes which need to be updated need to be
346 --   specified). For the upd process to determine which attributes
347 --   have NOT been specified we need to check if the parameter has a reserved
348 --   system default value. Therefore, for all parameters which have a
349 --   corresponding reserved system default mechanism specified we need to
350 --   check if a system default is being used. If a system default is being
351 --   used then we convert the defaulted value into its corresponding attribute
352 --   value held in the g_old_rec data structure.
353 --
354 -- Prerequisites:
355 --   This private function can only be called from the upd process.
356 --
357 -- In Parameters:
358 --   A Pl/Sql record structre.
359 --
360 -- Post Success:
361 --   The record structure will be returned with all system defaulted parameter
362 --   values converted into its current row attribute value.
363 --
364 -- Post Failure:
365 --   No direct error handling is required within this function. Any possible
366 --   errors within this procedure will be a PL/SQL value error due to conversion
367 --   of datatypes or data lengths.
368 --
369 -- Developer Implementation Notes:
370 --   None.
371 --
372 -- Access Status:
373 --   Internal Row Handler Use Only.
374 --
375 -- {End Of Comments}
376 -- ----------------------------------------------------------------------------
377 Procedure convert_defs(p_rec in out nocopy ben_rvc_shd.g_rec_type) is
378 --
379   l_proc  varchar2(72) := g_package||'convert_defs';
380 --
381 Begin
382   --
383   hr_utility.set_location('Entering:'||l_proc, 5);
384   --
385   -- We must now examine each argument value in the
386   -- p_rec plsql record structure
387   -- to see if a system default is being used. If a system default
388   -- is being used then we must set to the 'current' argument value.
389   --
390   If (p_rec.enrt_ctfn_typ_cd = hr_api.g_varchar2) then
391     p_rec.enrt_ctfn_typ_cd :=
392     ben_rvc_shd.g_old_rec.enrt_ctfn_typ_cd;
393   End If;
394   --
395   If (p_rec.enrt_ctfn_rqd_flag = hr_api.g_varchar2) then
396     p_rec.enrt_ctfn_rqd_flag :=
397     ben_rvc_shd.g_old_rec.enrt_ctfn_rqd_flag;
398   End If;
399   If (p_rec.enrt_ctfn_recd_dt = hr_api.g_date) then
400     p_rec.enrt_ctfn_recd_dt :=
401     ben_rvc_shd.g_old_rec.enrt_ctfn_recd_dt;
402   End If;
403   If (p_rec.enrt_ctfn_dnd_dt = hr_api.g_date) then
404     p_rec.enrt_ctfn_dnd_dt :=
405     ben_rvc_shd.g_old_rec.enrt_ctfn_dnd_dt;
406   End If;
407   --
408   If (p_rec.prtt_rt_val_id = hr_api.g_number) then
409     p_rec.prtt_rt_val_id :=
410     ben_rvc_shd.g_old_rec.prtt_rt_val_id;
411   End If;
412   If (p_rec.business_group_id = hr_api.g_number) then
413     p_rec.business_group_id :=
414     ben_rvc_shd.g_old_rec.business_group_id;
415   End If;
416   If (p_rec.rvc_attribute_category = hr_api.g_varchar2) then
417     p_rec.rvc_attribute_category :=
418     ben_rvc_shd.g_old_rec.rvc_attribute_category;
419   End If;
420   If (p_rec.rvc_attribute1 = hr_api.g_varchar2) then
421     p_rec.rvc_attribute1 :=
422     ben_rvc_shd.g_old_rec.rvc_attribute1;
423   End If;
424   If (p_rec.rvc_attribute2 = hr_api.g_varchar2) then
425     p_rec.rvc_attribute2 :=
426     ben_rvc_shd.g_old_rec.rvc_attribute2;
427   End If;
428   If (p_rec.rvc_attribute3 = hr_api.g_varchar2) then
429     p_rec.rvc_attribute3 :=
430     ben_rvc_shd.g_old_rec.rvc_attribute3;
431   End If;
432   If (p_rec.rvc_attribute4 = hr_api.g_varchar2) then
433     p_rec.rvc_attribute4 :=
434     ben_rvc_shd.g_old_rec.rvc_attribute4;
435   End If;
436   If (p_rec.rvc_attribute5 = hr_api.g_varchar2) then
437     p_rec.rvc_attribute5 :=
438     ben_rvc_shd.g_old_rec.rvc_attribute5;
439   End If;
440   If (p_rec.rvc_attribute6 = hr_api.g_varchar2) then
441     p_rec.rvc_attribute6 :=
442     ben_rvc_shd.g_old_rec.rvc_attribute6;
443   End If;
444   If (p_rec.rvc_attribute7 = hr_api.g_varchar2) then
445     p_rec.rvc_attribute7 :=
446     ben_rvc_shd.g_old_rec.rvc_attribute7;
447   End If;
448   If (p_rec.rvc_attribute8 = hr_api.g_varchar2) then
449     p_rec.rvc_attribute8 :=
450     ben_rvc_shd.g_old_rec.rvc_attribute8;
451   End If;
452   If (p_rec.rvc_attribute9 = hr_api.g_varchar2) then
453     p_rec.rvc_attribute9 :=
454     ben_rvc_shd.g_old_rec.rvc_attribute9;
455   End If;
456   If (p_rec.rvc_attribute10 = hr_api.g_varchar2) then
457     p_rec.rvc_attribute10 :=
458     ben_rvc_shd.g_old_rec.rvc_attribute10;
459   End If;
460   If (p_rec.rvc_attribute11 = hr_api.g_varchar2) then
461     p_rec.rvc_attribute11 :=
462     ben_rvc_shd.g_old_rec.rvc_attribute11;
463   End If;
464   If (p_rec.rvc_attribute12 = hr_api.g_varchar2) then
465     p_rec.rvc_attribute12 :=
466     ben_rvc_shd.g_old_rec.rvc_attribute12;
467   End If;
468   If (p_rec.rvc_attribute13 = hr_api.g_varchar2) then
469     p_rec.rvc_attribute13 :=
470     ben_rvc_shd.g_old_rec.rvc_attribute13;
471   End If;
472   If (p_rec.rvc_attribute14 = hr_api.g_varchar2) then
473     p_rec.rvc_attribute14 :=
474     ben_rvc_shd.g_old_rec.rvc_attribute14;
475   End If;
476   If (p_rec.rvc_attribute15 = hr_api.g_varchar2) then
477     p_rec.rvc_attribute15 :=
478     ben_rvc_shd.g_old_rec.rvc_attribute15;
479   End If;
480   If (p_rec.rvc_attribute16 = hr_api.g_varchar2) then
481     p_rec.rvc_attribute16 :=
482     ben_rvc_shd.g_old_rec.rvc_attribute16;
483   End If;
484   If (p_rec.rvc_attribute17 = hr_api.g_varchar2) then
485     p_rec.rvc_attribute17 :=
486     ben_rvc_shd.g_old_rec.rvc_attribute17;
487   End If;
488   If (p_rec.rvc_attribute18 = hr_api.g_varchar2) then
489     p_rec.rvc_attribute18 :=
490     ben_rvc_shd.g_old_rec.rvc_attribute18;
491   End If;
492   If (p_rec.rvc_attribute19 = hr_api.g_varchar2) then
493     p_rec.rvc_attribute19 :=
494     ben_rvc_shd.g_old_rec.rvc_attribute19;
495   End If;
496   If (p_rec.rvc_attribute20 = hr_api.g_varchar2) then
497     p_rec.rvc_attribute20 :=
498     ben_rvc_shd.g_old_rec.rvc_attribute20;
499   End If;
500   If (p_rec.rvc_attribute21 = hr_api.g_varchar2) then
501     p_rec.rvc_attribute21 :=
502     ben_rvc_shd.g_old_rec.rvc_attribute21;
503   End If;
504   If (p_rec.rvc_attribute22 = hr_api.g_varchar2) then
505     p_rec.rvc_attribute22 :=
506     ben_rvc_shd.g_old_rec.rvc_attribute22;
507   End If;
508   If (p_rec.rvc_attribute23 = hr_api.g_varchar2) then
509     p_rec.rvc_attribute23 :=
510     ben_rvc_shd.g_old_rec.rvc_attribute23;
511   End If;
512   If (p_rec.rvc_attribute24 = hr_api.g_varchar2) then
513     p_rec.rvc_attribute24 :=
514     ben_rvc_shd.g_old_rec.rvc_attribute24;
515   End If;
516   If (p_rec.rvc_attribute25 = hr_api.g_varchar2) then
517     p_rec.rvc_attribute25 :=
518     ben_rvc_shd.g_old_rec.rvc_attribute25;
519   End If;
520   If (p_rec.rvc_attribute26 = hr_api.g_varchar2) then
521     p_rec.rvc_attribute26 :=
522     ben_rvc_shd.g_old_rec.rvc_attribute26;
523   End If;
524   If (p_rec.rvc_attribute27 = hr_api.g_varchar2) then
525     p_rec.rvc_attribute27 :=
526     ben_rvc_shd.g_old_rec.rvc_attribute27;
527   End If;
528   If (p_rec.rvc_attribute28 = hr_api.g_varchar2) then
529     p_rec.rvc_attribute28 :=
530     ben_rvc_shd.g_old_rec.rvc_attribute28;
531   End If;
532   If (p_rec.rvc_attribute29 = hr_api.g_varchar2) then
533     p_rec.rvc_attribute29 :=
534     ben_rvc_shd.g_old_rec.rvc_attribute29;
535   End If;
536   If (p_rec.rvc_attribute30 = hr_api.g_varchar2) then
537     p_rec.rvc_attribute30 :=
538     ben_rvc_shd.g_old_rec.rvc_attribute30;
539   End If;
540   If (p_rec.request_id = hr_api.g_number) then
541     p_rec.request_id :=
542     ben_rvc_shd.g_old_rec.request_id;
543   End If;
544   If (p_rec.program_application_id = hr_api.g_number) then
545     p_rec.program_application_id :=
546     ben_rvc_shd.g_old_rec.program_application_id;
547   End If;
548   If (p_rec.program_id = hr_api.g_number) then
549     p_rec.program_id :=
550     ben_rvc_shd.g_old_rec.program_id;
551   End If;
552   If (p_rec.program_update_date = hr_api.g_date) then
553     p_rec.program_update_date :=
554     ben_rvc_shd.g_old_rec.program_update_date;
555   End If;
556 
557   --
558   hr_utility.set_location(' Leaving:'||l_proc, 10);
559 --
560 End convert_defs;
561 --
562 -- ----------------------------------------------------------------------------
563 -- |---------------------------------< upd >----------------------------------|
564 -- ----------------------------------------------------------------------------
565 Procedure upd
566   (
567   p_effective_date in date,
568   p_rec        in out nocopy ben_rvc_shd.g_rec_type
569   ) is
570 --
571   l_proc  varchar2(72) := g_package||'upd';
572 --
573 Begin
574   hr_utility.set_location('Entering:'||l_proc, 5);
575   --
576   -- We must lock the row which we need to update.
577   --
578   ben_rvc_shd.lck
579 	(
580 	p_rec.prtt_rt_val_ctfn_prvdd_id,
581 	p_rec.object_version_number
582 	);
583   --
584   -- 1. During an update system defaults are used to determine if
585   --    arguments have been defaulted or not. We must therefore
586   --    derive the full record structure values to be updated.
587   --
588   -- 2. Call the supporting update validate operations.
589   --
590   convert_defs(p_rec);
591   ben_rvc_bus.update_validate(p_rec
592   ,p_effective_date);
593   --
594   -- Call the supporting pre-update operation
595   --
596   pre_update(p_rec);
597   --
598   -- Update the row.
599   --
600   update_dml(p_rec);
601   --
602   -- Call the supporting post-update operation
603   --
604   post_update(
605 p_effective_date,p_rec);
606 End upd;
607 --
608 -- ----------------------------------------------------------------------------
609 -- |---------------------------------< upd >----------------------------------|
610 -- ----------------------------------------------------------------------------
611 Procedure upd
612   (
613   p_effective_date in date,
614   p_prtt_rt_val_ctfn_prvdd_id           in number,
615   p_enrt_ctfn_typ_cd             in varchar2         default hr_api.g_varchar2,
616   p_enrt_ctfn_rqd_flag           in varchar2         default hr_api.g_varchar2,
617   p_enrt_ctfn_recd_dt            in date             default hr_api.g_date,
618   p_enrt_ctfn_dnd_dt             in date             default hr_api.g_date,
619   p_prtt_rt_val_id       in number           default hr_api.g_number,
620   p_business_group_id            in number           default hr_api.g_number,
621   p_rvc_attribute_category       in varchar2         default hr_api.g_varchar2,
622   p_rvc_attribute1               in varchar2         default hr_api.g_varchar2,
623   p_rvc_attribute2               in varchar2         default hr_api.g_varchar2,
624   p_rvc_attribute3               in varchar2         default hr_api.g_varchar2,
625   p_rvc_attribute4               in varchar2         default hr_api.g_varchar2,
626   p_rvc_attribute5               in varchar2         default hr_api.g_varchar2,
627   p_rvc_attribute6               in varchar2         default hr_api.g_varchar2,
628   p_rvc_attribute7               in varchar2         default hr_api.g_varchar2,
629   p_rvc_attribute8               in varchar2         default hr_api.g_varchar2,
630   p_rvc_attribute9               in varchar2         default hr_api.g_varchar2,
631   p_rvc_attribute10              in varchar2         default hr_api.g_varchar2,
632   p_rvc_attribute11              in varchar2         default hr_api.g_varchar2,
633   p_rvc_attribute12              in varchar2         default hr_api.g_varchar2,
634   p_rvc_attribute13              in varchar2         default hr_api.g_varchar2,
635   p_rvc_attribute14              in varchar2         default hr_api.g_varchar2,
636   p_rvc_attribute15              in varchar2         default hr_api.g_varchar2,
637   p_rvc_attribute16              in varchar2         default hr_api.g_varchar2,
638   p_rvc_attribute17              in varchar2         default hr_api.g_varchar2,
639   p_rvc_attribute18              in varchar2         default hr_api.g_varchar2,
640   p_rvc_attribute19              in varchar2         default hr_api.g_varchar2,
641   p_rvc_attribute20              in varchar2         default hr_api.g_varchar2,
642   p_rvc_attribute21              in varchar2         default hr_api.g_varchar2,
643   p_rvc_attribute22              in varchar2         default hr_api.g_varchar2,
644   p_rvc_attribute23              in varchar2         default hr_api.g_varchar2,
645   p_rvc_attribute24              in varchar2         default hr_api.g_varchar2,
646   p_rvc_attribute25              in varchar2         default hr_api.g_varchar2,
647   p_rvc_attribute26              in varchar2         default hr_api.g_varchar2,
648   p_rvc_attribute27              in varchar2         default hr_api.g_varchar2,
649   p_rvc_attribute28              in varchar2         default hr_api.g_varchar2,
650   p_rvc_attribute29              in varchar2         default hr_api.g_varchar2,
651   p_rvc_attribute30              in varchar2         default hr_api.g_varchar2,
652   p_request_id                   in number           default hr_api.g_number,
653   p_program_application_id       in number           default hr_api.g_number,
654   p_program_id                   in number           default hr_api.g_number,
655   p_program_update_date          in date             default hr_api.g_date,
656   p_object_version_number        in out nocopy number
657   ) is
658 --
659   l_rec	  ben_rvc_shd.g_rec_type;
660   l_proc  varchar2(72) := g_package||'upd';
661 --
662 Begin
663   hr_utility.set_location('Entering:'||l_proc, 5);
664   --
665   -- Call conversion function to turn arguments into the
666   -- l_rec structure.
667   --
668   l_rec :=
669   ben_rvc_shd.convert_args
670   (
671   p_prtt_rt_val_ctfn_prvdd_id,
672   p_enrt_ctfn_typ_cd,
673   p_enrt_ctfn_rqd_flag,
674   p_enrt_ctfn_recd_dt,
675   p_enrt_ctfn_dnd_dt,
676   p_prtt_rt_val_id,
677   p_business_group_id,
678   p_rvc_attribute_category,
679   p_rvc_attribute1,
680   p_rvc_attribute2,
681   p_rvc_attribute3,
682   p_rvc_attribute4,
683   p_rvc_attribute5,
684   p_rvc_attribute6,
685   p_rvc_attribute7,
686   p_rvc_attribute8,
687   p_rvc_attribute9,
688   p_rvc_attribute10,
689   p_rvc_attribute11,
690   p_rvc_attribute12,
691   p_rvc_attribute13,
692   p_rvc_attribute14,
693   p_rvc_attribute15,
694   p_rvc_attribute16,
695   p_rvc_attribute17,
696   p_rvc_attribute18,
697   p_rvc_attribute19,
698   p_rvc_attribute20,
699   p_rvc_attribute21,
700   p_rvc_attribute22,
701   p_rvc_attribute23,
702   p_rvc_attribute24,
703   p_rvc_attribute25,
704   p_rvc_attribute26,
705   p_rvc_attribute27,
706   p_rvc_attribute28,
707   p_rvc_attribute29,
708   p_rvc_attribute30,
709   p_request_id,
710   p_program_application_id,
711   p_program_id,
712   p_program_update_date,
713   p_object_version_number
714   );
715   --
716   -- Having converted the arguments into the
717   -- plsql record structure we call the corresponding record
718   -- business process.
719   --
720   upd(
721     p_effective_date,l_rec);
722   p_object_version_number := l_rec.object_version_number;
723   --
724   hr_utility.set_location(' Leaving:'||l_proc, 10);
725 End upd;
726 --
727 end ben_rvc_upd;