DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EIV_UPD

Source


1 Package Body ben_eiv_upd as
2 /* $Header: beeivrhi.pkb 115.4 2002/12/22 20:25:28 pabodla noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  ben_eiv_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
55   (p_rec in out nocopy ben_eiv_shd.g_rec_type
56   ) is
57 --
58   l_proc  varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61   hr_utility.set_location('Entering:'||l_proc, 5);
62   --
63   -- Increment the object version
64   p_rec.object_version_number := p_rec.object_version_number + 1;
65   --
66   ben_eiv_shd.g_api_dml := true;  -- Set the api dml status
67   --
68   -- Update the ben_extra_input_values Row
69   --
70   update ben_extra_input_values
71     set
72      extra_input_value_id            = p_rec.extra_input_value_id
73     ,acty_base_rt_id                 = p_rec.acty_base_rt_id
74     ,input_value_id                  = p_rec.input_value_id
75     ,input_text                      = p_rec.input_text
76     ,upd_when_ele_ended_cd           = p_rec.upd_when_ele_ended_cd
77     ,return_var_name                 = p_rec.return_var_name
78     ,business_group_id               = p_rec.business_group_id
79     ,eiv_attribute_category          = p_rec.eiv_attribute_category
80     ,eiv_attribute1                  = p_rec.eiv_attribute1
81     ,eiv_attribute2                  = p_rec.eiv_attribute2
82     ,eiv_attribute3                  = p_rec.eiv_attribute3
83     ,eiv_attribute4                  = p_rec.eiv_attribute4
84     ,eiv_attribute5                  = p_rec.eiv_attribute5
85     ,eiv_attribute6                  = p_rec.eiv_attribute6
86     ,eiv_attribute7                  = p_rec.eiv_attribute7
87     ,eiv_attribute8                  = p_rec.eiv_attribute8
88     ,eiv_attribute9                  = p_rec.eiv_attribute9
89     ,eiv_attribute10                 = p_rec.eiv_attribute10
90     ,eiv_attribute11                 = p_rec.eiv_attribute11
91     ,eiv_attribute12                 = p_rec.eiv_attribute12
92     ,eiv_attribute13                 = p_rec.eiv_attribute13
93     ,eiv_attribute14                 = p_rec.eiv_attribute14
94     ,eiv_attribute15                 = p_rec.eiv_attribute15
95     ,eiv_attribute16                 = p_rec.eiv_attribute16
96     ,eiv_attribute17                 = p_rec.eiv_attribute17
97     ,eiv_attribute18                 = p_rec.eiv_attribute18
98     ,eiv_attribute19                 = p_rec.eiv_attribute19
99     ,eiv_attribute20                 = p_rec.eiv_attribute20
100     ,eiv_attribute21                 = p_rec.eiv_attribute21
101     ,eiv_attribute22                 = p_rec.eiv_attribute22
102     ,eiv_attribute23                 = p_rec.eiv_attribute23
103     ,eiv_attribute24                 = p_rec.eiv_attribute24
104     ,eiv_attribute25                 = p_rec.eiv_attribute25
105     ,eiv_attribute26                 = p_rec.eiv_attribute26
106     ,eiv_attribute27                 = p_rec.eiv_attribute27
107     ,eiv_attribute28                 = p_rec.eiv_attribute28
108     ,eiv_attribute29                 = p_rec.eiv_attribute29
109     ,eiv_attribute30                 = p_rec.eiv_attribute30
110     ,object_version_number           = p_rec.object_version_number
111     where extra_input_value_id = p_rec.extra_input_value_id;
112   --
113   ben_eiv_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_eiv_shd.g_api_dml := false;   -- Unset the api dml status
121     ben_eiv_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_eiv_shd.g_api_dml := false;   -- Unset the api dml status
126     ben_eiv_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_eiv_shd.g_api_dml := false;   -- Unset the api dml status
131     ben_eiv_shd.constraint_error
132       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133   When Others Then
134     ben_eiv_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 structure.
152 --
153 -- Post Success:
154 --   Processing continues.
155 --
156 -- Post Failure:
157 --   If an error has occurred, an error message and exception wil 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
171   (p_effective_date in date
172   ,p_rec in ben_eiv_shd.g_rec_type
173   ) 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
190 --   the 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 structure.
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
217   ,p_rec                          in ben_eiv_shd.g_rec_type
218   ) is
219 --
220   l_proc  varchar2(72) := g_package||'post_update';
221 --
222 Begin
223   hr_utility.set_location('Entering:'||l_proc, 5);
224   begin
225     --
226     ben_eiv_rku.after_update
227       (p_extra_input_value_id
228       => p_rec.extra_input_value_id
229       ,p_acty_base_rt_id
230       => p_rec.acty_base_rt_id
231       ,p_input_value_id
232       => p_rec.input_value_id
233       ,p_input_text
234       => p_rec.input_text
235       ,p_upd_when_ele_ended_cd
236       => p_rec.upd_when_ele_ended_cd
237       ,p_return_var_name
238       => p_rec.return_var_name
239       ,p_business_group_id
240       => p_rec.business_group_id
241       ,p_eiv_attribute_category
242       => p_rec.eiv_attribute_category
243       ,p_eiv_attribute1
244       => p_rec.eiv_attribute1
245       ,p_eiv_attribute2
246       => p_rec.eiv_attribute2
247       ,p_eiv_attribute3
248       => p_rec.eiv_attribute3
249       ,p_eiv_attribute4
250       => p_rec.eiv_attribute4
251       ,p_eiv_attribute5
252       => p_rec.eiv_attribute5
253       ,p_eiv_attribute6
254       => p_rec.eiv_attribute6
255       ,p_eiv_attribute7
256       => p_rec.eiv_attribute7
257       ,p_eiv_attribute8
258       => p_rec.eiv_attribute8
259       ,p_eiv_attribute9
260       => p_rec.eiv_attribute9
261       ,p_eiv_attribute10
262       => p_rec.eiv_attribute10
263       ,p_eiv_attribute11
264       => p_rec.eiv_attribute11
265       ,p_eiv_attribute12
266       => p_rec.eiv_attribute12
267       ,p_eiv_attribute13
268       => p_rec.eiv_attribute13
269       ,p_eiv_attribute14
270       => p_rec.eiv_attribute14
271       ,p_eiv_attribute15
272       => p_rec.eiv_attribute15
273       ,p_eiv_attribute16
274       => p_rec.eiv_attribute16
275       ,p_eiv_attribute17
276       => p_rec.eiv_attribute17
277       ,p_eiv_attribute18
278       => p_rec.eiv_attribute18
279       ,p_eiv_attribute19
280       => p_rec.eiv_attribute19
281       ,p_eiv_attribute20
282       => p_rec.eiv_attribute20
283       ,p_eiv_attribute21
284       => p_rec.eiv_attribute21
285       ,p_eiv_attribute22
286       => p_rec.eiv_attribute22
287       ,p_eiv_attribute23
288       => p_rec.eiv_attribute23
289       ,p_eiv_attribute24
290       => p_rec.eiv_attribute24
291       ,p_eiv_attribute25
292       => p_rec.eiv_attribute25
293       ,p_eiv_attribute26
294       => p_rec.eiv_attribute26
295       ,p_eiv_attribute27
296       => p_rec.eiv_attribute27
297       ,p_eiv_attribute28
298       => p_rec.eiv_attribute28
299       ,p_eiv_attribute29
300       => p_rec.eiv_attribute29
301       ,p_eiv_attribute30
302       => p_rec.eiv_attribute30
303       ,p_object_version_number
304       => p_rec.object_version_number
305       ,p_effective_date
306       => p_effective_date
307       ,p_acty_base_rt_id_o
308       => ben_eiv_shd.g_old_rec.acty_base_rt_id
309       ,p_input_value_id_o
310       => ben_eiv_shd.g_old_rec.input_value_id
311       ,p_input_text_o
312       => ben_eiv_shd.g_old_rec.input_text
313       ,p_upd_when_ele_ended_cd_o
314       => ben_eiv_shd.g_old_rec.upd_when_ele_ended_cd
315       ,p_return_var_name_o
316       => ben_eiv_shd.g_old_rec.return_var_name
317       ,p_business_group_id_o
318       => ben_eiv_shd.g_old_rec.business_group_id
319       ,p_eiv_attribute_category_o
320       => ben_eiv_shd.g_old_rec.eiv_attribute_category
321       ,p_eiv_attribute1_o
322       => ben_eiv_shd.g_old_rec.eiv_attribute1
323       ,p_eiv_attribute2_o
324       => ben_eiv_shd.g_old_rec.eiv_attribute2
325       ,p_eiv_attribute3_o
326       => ben_eiv_shd.g_old_rec.eiv_attribute3
327       ,p_eiv_attribute4_o
328       => ben_eiv_shd.g_old_rec.eiv_attribute4
329       ,p_eiv_attribute5_o
330       => ben_eiv_shd.g_old_rec.eiv_attribute5
331       ,p_eiv_attribute6_o
332       => ben_eiv_shd.g_old_rec.eiv_attribute6
333       ,p_eiv_attribute7_o
334       => ben_eiv_shd.g_old_rec.eiv_attribute7
335       ,p_eiv_attribute8_o
336       => ben_eiv_shd.g_old_rec.eiv_attribute8
337       ,p_eiv_attribute9_o
338       => ben_eiv_shd.g_old_rec.eiv_attribute9
339       ,p_eiv_attribute10_o
340       => ben_eiv_shd.g_old_rec.eiv_attribute10
341       ,p_eiv_attribute11_o
342       => ben_eiv_shd.g_old_rec.eiv_attribute11
343       ,p_eiv_attribute12_o
344       => ben_eiv_shd.g_old_rec.eiv_attribute12
345       ,p_eiv_attribute13_o
346       => ben_eiv_shd.g_old_rec.eiv_attribute13
347       ,p_eiv_attribute14_o
348       => ben_eiv_shd.g_old_rec.eiv_attribute14
349       ,p_eiv_attribute15_o
350       => ben_eiv_shd.g_old_rec.eiv_attribute15
351       ,p_eiv_attribute16_o
352       => ben_eiv_shd.g_old_rec.eiv_attribute16
353       ,p_eiv_attribute17_o
354       => ben_eiv_shd.g_old_rec.eiv_attribute17
355       ,p_eiv_attribute18_o
356       => ben_eiv_shd.g_old_rec.eiv_attribute18
357       ,p_eiv_attribute19_o
358       => ben_eiv_shd.g_old_rec.eiv_attribute19
359       ,p_eiv_attribute20_o
360       => ben_eiv_shd.g_old_rec.eiv_attribute20
361       ,p_eiv_attribute21_o
362       => ben_eiv_shd.g_old_rec.eiv_attribute21
363       ,p_eiv_attribute22_o
364       => ben_eiv_shd.g_old_rec.eiv_attribute22
365       ,p_eiv_attribute23_o
366       => ben_eiv_shd.g_old_rec.eiv_attribute23
367       ,p_eiv_attribute24_o
368       => ben_eiv_shd.g_old_rec.eiv_attribute24
369       ,p_eiv_attribute25_o
370       => ben_eiv_shd.g_old_rec.eiv_attribute25
371       ,p_eiv_attribute26_o
372       => ben_eiv_shd.g_old_rec.eiv_attribute26
373       ,p_eiv_attribute27_o
374       => ben_eiv_shd.g_old_rec.eiv_attribute27
375       ,p_eiv_attribute28_o
376       => ben_eiv_shd.g_old_rec.eiv_attribute28
377       ,p_eiv_attribute29_o
378       => ben_eiv_shd.g_old_rec.eiv_attribute29
379       ,p_eiv_attribute30_o
380       => ben_eiv_shd.g_old_rec.eiv_attribute30
381       ,p_object_version_number_o
382       => ben_eiv_shd.g_old_rec.object_version_number
383       );
384     --
385   exception
386     --
387     when hr_api.cannot_find_prog_unit then
388       --
389       hr_api.cannot_find_prog_unit_error
390         (p_module_name => 'BEN_EXTRA_INPUT_VALUES'
391         ,p_hook_type   => 'AU');
392       --
393   end;
394   --
395   hr_utility.set_location(' Leaving:'||l_proc, 10);
396 End post_update;
397 --
398 -- ----------------------------------------------------------------------------
399 -- |-----------------------------< convert_defs >-----------------------------|
400 -- ----------------------------------------------------------------------------
401 -- {Start Of Comments}
402 --
403 -- Description:
404 --   The Convert_Defs procedure has one very important function:
405 --   It must return the record structure for the row with all system defaulted
406 --   values converted into its corresponding parameter value for update. When
407 --   we attempt to update a row through the Upd process , certain
408 --   parameters can be defaulted which enables flexibility in the calling of
409 --   the upd process (e.g. only attributes which need to be updated need to be
410 --   specified). For the upd process to determine which attributes
411 --   have NOT been specified we need to check if the parameter has a reserved
412 --   system default value. Therefore, for all parameters which have a
413 --   corresponding reserved system default mechanism specified we need to
414 --   check if a system default is being used. If a system default is being
415 --   used then we convert the defaulted value into its corresponding attribute
416 --   value held in the g_old_rec data structure.
417 --
418 -- Prerequisites:
419 --   This private function can only be called from the upd process.
420 --
421 -- In Parameters:
422 --   A Pl/Sql record structure.
423 --
424 -- Post Success:
425 --   The record structure will be returned with all system defaulted parameter
426 --   values converted into its current row attribute value.
427 --
428 -- Post Failure:
429 --   No direct error handling is required within this function. Any possible
430 --   errors within this procedure will be a PL/SQL value error due to
431 --   conversion of datatypes or data lengths.
432 --
433 -- Developer Implementation Notes:
434 --   None.
435 --
436 -- Access Status:
437 --   Internal Row Handler Use Only.
438 --
439 -- {End Of Comments}
440 -- ----------------------------------------------------------------------------
441 Procedure convert_defs
442   (p_rec in out nocopy ben_eiv_shd.g_rec_type
443   ) is
444 --
445 Begin
446   --
447   -- We must now examine each argument value in the
448   -- p_rec plsql record structure
449   -- to see if a system default is being used. If a system default
450   -- is being used then we must set to the 'current' argument value.
451   --
452   If (p_rec.acty_base_rt_id = hr_api.g_number) then
453     p_rec.acty_base_rt_id :=
454     ben_eiv_shd.g_old_rec.acty_base_rt_id;
455   End If;
456   If (p_rec.input_value_id = hr_api.g_number) then
457     p_rec.input_value_id :=
458     ben_eiv_shd.g_old_rec.input_value_id;
459   End If;
460   If (p_rec.input_text = hr_api.g_varchar2) then
461     p_rec.input_text :=
462     ben_eiv_shd.g_old_rec.input_text;
463   End If;
464   If (p_rec.upd_when_ele_ended_cd = hr_api.g_varchar2) then
465     p_rec.upd_when_ele_ended_cd :=
466     ben_eiv_shd.g_old_rec.upd_when_ele_ended_cd;
467   End If;
468   If (p_rec.return_var_name = hr_api.g_varchar2) then
469     p_rec.return_var_name :=
470     ben_eiv_shd.g_old_rec.return_var_name;
471   End If;
472   If (p_rec.business_group_id = hr_api.g_number) then
473     p_rec.business_group_id :=
474     ben_eiv_shd.g_old_rec.business_group_id;
475   End If;
476   If (p_rec.eiv_attribute_category = hr_api.g_varchar2) then
477     p_rec.eiv_attribute_category :=
478     ben_eiv_shd.g_old_rec.eiv_attribute_category;
479   End If;
480   If (p_rec.eiv_attribute1 = hr_api.g_varchar2) then
481     p_rec.eiv_attribute1 :=
482     ben_eiv_shd.g_old_rec.eiv_attribute1;
483   End If;
484   If (p_rec.eiv_attribute2 = hr_api.g_varchar2) then
485     p_rec.eiv_attribute2 :=
486     ben_eiv_shd.g_old_rec.eiv_attribute2;
487   End If;
488   If (p_rec.eiv_attribute3 = hr_api.g_varchar2) then
489     p_rec.eiv_attribute3 :=
490     ben_eiv_shd.g_old_rec.eiv_attribute3;
491   End If;
492   If (p_rec.eiv_attribute4 = hr_api.g_varchar2) then
493     p_rec.eiv_attribute4 :=
494     ben_eiv_shd.g_old_rec.eiv_attribute4;
495   End If;
496   If (p_rec.eiv_attribute5 = hr_api.g_varchar2) then
497     p_rec.eiv_attribute5 :=
498     ben_eiv_shd.g_old_rec.eiv_attribute5;
499   End If;
500   If (p_rec.eiv_attribute6 = hr_api.g_varchar2) then
501     p_rec.eiv_attribute6 :=
502     ben_eiv_shd.g_old_rec.eiv_attribute6;
503   End If;
504   If (p_rec.eiv_attribute7 = hr_api.g_varchar2) then
505     p_rec.eiv_attribute7 :=
506     ben_eiv_shd.g_old_rec.eiv_attribute7;
507   End If;
508   If (p_rec.eiv_attribute8 = hr_api.g_varchar2) then
509     p_rec.eiv_attribute8 :=
510     ben_eiv_shd.g_old_rec.eiv_attribute8;
511   End If;
512   If (p_rec.eiv_attribute9 = hr_api.g_varchar2) then
513     p_rec.eiv_attribute9 :=
514     ben_eiv_shd.g_old_rec.eiv_attribute9;
515   End If;
516   If (p_rec.eiv_attribute10 = hr_api.g_varchar2) then
517     p_rec.eiv_attribute10 :=
518     ben_eiv_shd.g_old_rec.eiv_attribute10;
519   End If;
520   If (p_rec.eiv_attribute11 = hr_api.g_varchar2) then
521     p_rec.eiv_attribute11 :=
522     ben_eiv_shd.g_old_rec.eiv_attribute11;
523   End If;
524   If (p_rec.eiv_attribute12 = hr_api.g_varchar2) then
525     p_rec.eiv_attribute12 :=
526     ben_eiv_shd.g_old_rec.eiv_attribute12;
527   End If;
528   If (p_rec.eiv_attribute13 = hr_api.g_varchar2) then
529     p_rec.eiv_attribute13 :=
530     ben_eiv_shd.g_old_rec.eiv_attribute13;
531   End If;
532   If (p_rec.eiv_attribute14 = hr_api.g_varchar2) then
533     p_rec.eiv_attribute14 :=
534     ben_eiv_shd.g_old_rec.eiv_attribute14;
535   End If;
536   If (p_rec.eiv_attribute15 = hr_api.g_varchar2) then
537     p_rec.eiv_attribute15 :=
538     ben_eiv_shd.g_old_rec.eiv_attribute15;
539   End If;
540   If (p_rec.eiv_attribute16 = hr_api.g_varchar2) then
541     p_rec.eiv_attribute16 :=
542     ben_eiv_shd.g_old_rec.eiv_attribute16;
543   End If;
544   If (p_rec.eiv_attribute17 = hr_api.g_varchar2) then
545     p_rec.eiv_attribute17 :=
546     ben_eiv_shd.g_old_rec.eiv_attribute17;
547   End If;
548   If (p_rec.eiv_attribute18 = hr_api.g_varchar2) then
549     p_rec.eiv_attribute18 :=
550     ben_eiv_shd.g_old_rec.eiv_attribute18;
551   End If;
552   If (p_rec.eiv_attribute19 = hr_api.g_varchar2) then
553     p_rec.eiv_attribute19 :=
554     ben_eiv_shd.g_old_rec.eiv_attribute19;
555   End If;
556   If (p_rec.eiv_attribute20 = hr_api.g_varchar2) then
557     p_rec.eiv_attribute20 :=
558     ben_eiv_shd.g_old_rec.eiv_attribute20;
559   End If;
560   If (p_rec.eiv_attribute21 = hr_api.g_varchar2) then
561     p_rec.eiv_attribute21 :=
562     ben_eiv_shd.g_old_rec.eiv_attribute21;
563   End If;
564   If (p_rec.eiv_attribute22 = hr_api.g_varchar2) then
565     p_rec.eiv_attribute22 :=
566     ben_eiv_shd.g_old_rec.eiv_attribute22;
567   End If;
568   If (p_rec.eiv_attribute23 = hr_api.g_varchar2) then
569     p_rec.eiv_attribute23 :=
570     ben_eiv_shd.g_old_rec.eiv_attribute23;
571   End If;
572   If (p_rec.eiv_attribute24 = hr_api.g_varchar2) then
573     p_rec.eiv_attribute24 :=
574     ben_eiv_shd.g_old_rec.eiv_attribute24;
575   End If;
576   If (p_rec.eiv_attribute25 = hr_api.g_varchar2) then
577     p_rec.eiv_attribute25 :=
578     ben_eiv_shd.g_old_rec.eiv_attribute25;
579   End If;
580   If (p_rec.eiv_attribute26 = hr_api.g_varchar2) then
581     p_rec.eiv_attribute26 :=
582     ben_eiv_shd.g_old_rec.eiv_attribute26;
583   End If;
584   If (p_rec.eiv_attribute27 = hr_api.g_varchar2) then
585     p_rec.eiv_attribute27 :=
586     ben_eiv_shd.g_old_rec.eiv_attribute27;
587   End If;
588   If (p_rec.eiv_attribute28 = hr_api.g_varchar2) then
589     p_rec.eiv_attribute28 :=
590     ben_eiv_shd.g_old_rec.eiv_attribute28;
591   End If;
592   If (p_rec.eiv_attribute29 = hr_api.g_varchar2) then
593     p_rec.eiv_attribute29 :=
594     ben_eiv_shd.g_old_rec.eiv_attribute29;
595   End If;
596   If (p_rec.eiv_attribute30 = hr_api.g_varchar2) then
597     p_rec.eiv_attribute30 :=
598     ben_eiv_shd.g_old_rec.eiv_attribute30;
599   End If;
600   --
601 End convert_defs;
602 --
603 -- ----------------------------------------------------------------------------
604 -- |---------------------------------< upd >----------------------------------|
605 -- ----------------------------------------------------------------------------
606 Procedure upd
607   (p_effective_date               in date
608   ,p_rec                          in out nocopy ben_eiv_shd.g_rec_type
609   ) is
610 --
611   l_proc  varchar2(72) := g_package||'upd';
612 --
613 Begin
614   hr_utility.set_location('Entering:'||l_proc, 5);
615   --
616   -- We must lock the row which we need to update.
617   --
618   ben_eiv_shd.lck
619     (p_rec.extra_input_value_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_eiv_bus.update_validate
631      (p_rec
632      ,p_effective_date
633      );
634   --
635   -- Call the supporting pre-update operation
636   --
637   ben_eiv_upd.pre_update(p_effective_date
638                         ,p_rec);
639   --
640   -- Update the row.
641   --
642   ben_eiv_upd.update_dml(p_rec);
643   --
644   -- Call the supporting post-update operation
645   --
646   ben_eiv_upd.post_update
647      (p_effective_date
648      ,p_rec
649      );
650   --
651 End upd;
652 --
653 -- ----------------------------------------------------------------------------
654 -- |---------------------------------< upd >----------------------------------|
655 -- ----------------------------------------------------------------------------
656 Procedure upd
657   (p_effective_date               in     date
658   ,p_extra_input_value_id         in     number
659   ,p_object_version_number        in out nocopy number
660   ,p_acty_base_rt_id              in     number    default hr_api.g_number
661   ,p_input_value_id               in     number    default hr_api.g_number
662   ,p_return_var_name              in     varchar2  default hr_api.g_varchar2
663   ,p_business_group_id            in     number    default hr_api.g_number
664   ,p_input_text                   in     varchar2  default hr_api.g_varchar2
665   ,p_upd_when_ele_ended_cd        in     varchar2  default hr_api.g_varchar2
666   ,p_eiv_attribute_category       in     varchar2  default hr_api.g_varchar2
667   ,p_eiv_attribute1               in     varchar2  default hr_api.g_varchar2
668   ,p_eiv_attribute2               in     varchar2  default hr_api.g_varchar2
669   ,p_eiv_attribute3               in     varchar2  default hr_api.g_varchar2
670   ,p_eiv_attribute4               in     varchar2  default hr_api.g_varchar2
671   ,p_eiv_attribute5               in     varchar2  default hr_api.g_varchar2
672   ,p_eiv_attribute6               in     varchar2  default hr_api.g_varchar2
673   ,p_eiv_attribute7               in     varchar2  default hr_api.g_varchar2
674   ,p_eiv_attribute8               in     varchar2  default hr_api.g_varchar2
675   ,p_eiv_attribute9               in     varchar2  default hr_api.g_varchar2
676   ,p_eiv_attribute10              in     varchar2  default hr_api.g_varchar2
677   ,p_eiv_attribute11              in     varchar2  default hr_api.g_varchar2
678   ,p_eiv_attribute12              in     varchar2  default hr_api.g_varchar2
679   ,p_eiv_attribute13              in     varchar2  default hr_api.g_varchar2
680   ,p_eiv_attribute14              in     varchar2  default hr_api.g_varchar2
681   ,p_eiv_attribute15              in     varchar2  default hr_api.g_varchar2
682   ,p_eiv_attribute16              in     varchar2  default hr_api.g_varchar2
683   ,p_eiv_attribute17              in     varchar2  default hr_api.g_varchar2
684   ,p_eiv_attribute18              in     varchar2  default hr_api.g_varchar2
685   ,p_eiv_attribute19              in     varchar2  default hr_api.g_varchar2
686   ,p_eiv_attribute20              in     varchar2  default hr_api.g_varchar2
687   ,p_eiv_attribute21              in     varchar2  default hr_api.g_varchar2
688   ,p_eiv_attribute22              in     varchar2  default hr_api.g_varchar2
689   ,p_eiv_attribute23              in     varchar2  default hr_api.g_varchar2
690   ,p_eiv_attribute24              in     varchar2  default hr_api.g_varchar2
691   ,p_eiv_attribute25              in     varchar2  default hr_api.g_varchar2
692   ,p_eiv_attribute26              in     varchar2  default hr_api.g_varchar2
693   ,p_eiv_attribute27              in     varchar2  default hr_api.g_varchar2
694   ,p_eiv_attribute28              in     varchar2  default hr_api.g_varchar2
695   ,p_eiv_attribute29              in     varchar2  default hr_api.g_varchar2
696   ,p_eiv_attribute30              in     varchar2  default hr_api.g_varchar2
697   ) is
698 --
699   l_rec   ben_eiv_shd.g_rec_type;
700   l_proc  varchar2(72) := g_package||'upd';
701 --
702 Begin
703   hr_utility.set_location('Entering:'||l_proc, 5);
704   --
705   -- Call conversion function to turn arguments into the
706   -- l_rec structure.
707   --
708   l_rec :=
709   ben_eiv_shd.convert_args
710   (p_extra_input_value_id
711   ,p_acty_base_rt_id
712   ,p_input_value_id
713   ,p_input_text
714   ,p_upd_when_ele_ended_cd
715   ,p_return_var_name
716   ,p_business_group_id
717   ,p_eiv_attribute_category
718   ,p_eiv_attribute1
719   ,p_eiv_attribute2
720   ,p_eiv_attribute3
721   ,p_eiv_attribute4
722   ,p_eiv_attribute5
723   ,p_eiv_attribute6
724   ,p_eiv_attribute7
725   ,p_eiv_attribute8
726   ,p_eiv_attribute9
727   ,p_eiv_attribute10
728   ,p_eiv_attribute11
729   ,p_eiv_attribute12
730   ,p_eiv_attribute13
731   ,p_eiv_attribute14
732   ,p_eiv_attribute15
733   ,p_eiv_attribute16
734   ,p_eiv_attribute17
735   ,p_eiv_attribute18
736   ,p_eiv_attribute19
737   ,p_eiv_attribute20
738   ,p_eiv_attribute21
739   ,p_eiv_attribute22
740   ,p_eiv_attribute23
741   ,p_eiv_attribute24
742   ,p_eiv_attribute25
743   ,p_eiv_attribute26
744   ,p_eiv_attribute27
745   ,p_eiv_attribute28
746   ,p_eiv_attribute29
747   ,p_eiv_attribute30
748   ,p_object_version_number
749   );
750   --
751   -- Having converted the arguments into the
752   -- plsql record structure we call the corresponding record
753   -- business process.
754   --
755   ben_eiv_upd.upd
756      (p_effective_date
757      ,l_rec
758      );
759   p_object_version_number := l_rec.object_version_number;
760   --
761   hr_utility.set_location(' Leaving:'||l_proc, 10);
762 End upd;
763 --
764 end ben_eiv_upd;