DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EAT_UPD

Source


1 Package Body ben_eat_upd as
2 /* $Header: beeatrhi.pkb 115.11 2002/12/16 11:53:54 vsethi ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_eat_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_eat_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_eat_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_actn_typ Row
68   --
69   update ben_actn_typ
70   set
71   actn_typ_id                       = p_rec.actn_typ_id,
72   business_group_id                 = p_rec.business_group_id,
73   type_cd                           = p_rec.type_cd,
74   name                              = p_rec.name,
75   description                       = p_rec.description,
76   eat_attribute_category            = p_rec.eat_attribute_category,
77   eat_attribute1                    = p_rec.eat_attribute1,
78   eat_attribute2                    = p_rec.eat_attribute2,
79   eat_attribute3                    = p_rec.eat_attribute3,
80   eat_attribute4                    = p_rec.eat_attribute4,
81   eat_attribute5                    = p_rec.eat_attribute5,
82   eat_attribute6                    = p_rec.eat_attribute6,
83   eat_attribute7                    = p_rec.eat_attribute7,
84   eat_attribute8                    = p_rec.eat_attribute8,
85   eat_attribute9                    = p_rec.eat_attribute9,
86   eat_attribute10                   = p_rec.eat_attribute10,
87   eat_attribute11                   = p_rec.eat_attribute11,
88   eat_attribute12                   = p_rec.eat_attribute12,
89   eat_attribute13                   = p_rec.eat_attribute13,
90   eat_attribute14                   = p_rec.eat_attribute14,
91   eat_attribute15                   = p_rec.eat_attribute15,
92   eat_attribute16                   = p_rec.eat_attribute16,
93   eat_attribute17                   = p_rec.eat_attribute17,
94   eat_attribute18                   = p_rec.eat_attribute18,
95   eat_attribute19                   = p_rec.eat_attribute19,
96   eat_attribute20                   = p_rec.eat_attribute20,
97   eat_attribute21                   = p_rec.eat_attribute21,
98   eat_attribute22                   = p_rec.eat_attribute22,
99   eat_attribute23                   = p_rec.eat_attribute23,
100   eat_attribute24                   = p_rec.eat_attribute24,
101   eat_attribute25                   = p_rec.eat_attribute25,
102   eat_attribute26                   = p_rec.eat_attribute26,
103   eat_attribute27                   = p_rec.eat_attribute27,
104   eat_attribute28                   = p_rec.eat_attribute28,
105   eat_attribute29                   = p_rec.eat_attribute29,
106   eat_attribute30                   = p_rec.eat_attribute30,
107   object_version_number             = p_rec.object_version_number
108   where actn_typ_id = p_rec.actn_typ_id;
109   --
110   --  Update MLS table.
111   --
112   update ben_actn_typ_tl
113   set name = p_rec.name,
114       description = p_rec.description,
115       last_update_date  = sysdate,
116       last_updated_by   = fnd_global.user_id,
117       last_update_login = fnd_global.login_id,
118       source_lang = userenv('LANG')
119   where actn_typ_id = p_rec.actn_typ_id
120   and   userenv('LANG') in (language, source_lang);
121 
122   ben_eat_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_eat_shd.g_api_dml := false;   -- Unset the api dml status
130     ben_eat_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_eat_shd.g_api_dml := false;   -- Unset the api dml status
135     ben_eat_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_eat_shd.g_api_dml := false;   -- Unset the api dml status
140     ben_eat_shd.constraint_error
141       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
142   When Others Then
143     ben_eat_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_eat_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_eat_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_eat_rku.after_update
235       (
236   p_actn_typ_id                   =>p_rec.actn_typ_id
237  ,p_business_group_id             =>p_rec.business_group_id
238  ,p_type_cd                       =>p_rec.type_cd
239  ,p_name                          =>p_rec.name
240  ,p_description                   =>p_rec.description
241  ,p_eat_attribute_category        =>p_rec.eat_attribute_category
242  ,p_eat_attribute1                =>p_rec.eat_attribute1
243  ,p_eat_attribute2                =>p_rec.eat_attribute2
244  ,p_eat_attribute3                =>p_rec.eat_attribute3
245  ,p_eat_attribute4                =>p_rec.eat_attribute4
246  ,p_eat_attribute5                =>p_rec.eat_attribute5
247  ,p_eat_attribute6                =>p_rec.eat_attribute6
248  ,p_eat_attribute7                =>p_rec.eat_attribute7
249  ,p_eat_attribute8                =>p_rec.eat_attribute8
250  ,p_eat_attribute9                =>p_rec.eat_attribute9
251  ,p_eat_attribute10               =>p_rec.eat_attribute10
252  ,p_eat_attribute11               =>p_rec.eat_attribute11
253  ,p_eat_attribute12               =>p_rec.eat_attribute12
254  ,p_eat_attribute13               =>p_rec.eat_attribute13
255  ,p_eat_attribute14               =>p_rec.eat_attribute14
256  ,p_eat_attribute15               =>p_rec.eat_attribute15
257  ,p_eat_attribute16               =>p_rec.eat_attribute16
258  ,p_eat_attribute17               =>p_rec.eat_attribute17
259  ,p_eat_attribute18               =>p_rec.eat_attribute18
260  ,p_eat_attribute19               =>p_rec.eat_attribute19
261  ,p_eat_attribute20               =>p_rec.eat_attribute20
262  ,p_eat_attribute21               =>p_rec.eat_attribute21
263  ,p_eat_attribute22               =>p_rec.eat_attribute22
264  ,p_eat_attribute23               =>p_rec.eat_attribute23
265  ,p_eat_attribute24               =>p_rec.eat_attribute24
266  ,p_eat_attribute25               =>p_rec.eat_attribute25
267  ,p_eat_attribute26               =>p_rec.eat_attribute26
268  ,p_eat_attribute27               =>p_rec.eat_attribute27
269  ,p_eat_attribute28               =>p_rec.eat_attribute28
270  ,p_eat_attribute29               =>p_rec.eat_attribute29
271  ,p_eat_attribute30               =>p_rec.eat_attribute30
272  ,p_object_version_number         =>p_rec.object_version_number
273  ,p_effective_date                =>p_effective_date
274  ,p_business_group_id_o           =>ben_eat_shd.g_old_rec.business_group_id
275  ,p_type_cd_o                     =>ben_eat_shd.g_old_rec.type_cd
276  ,p_name_o                        =>ben_eat_shd.g_old_rec.name
277  ,p_description_o                 =>ben_eat_shd.g_old_rec.description
278  ,p_eat_attribute_category_o      =>ben_eat_shd.g_old_rec.eat_attribute_category
279  ,p_eat_attribute1_o              =>ben_eat_shd.g_old_rec.eat_attribute1
280  ,p_eat_attribute2_o              =>ben_eat_shd.g_old_rec.eat_attribute2
281  ,p_eat_attribute3_o              =>ben_eat_shd.g_old_rec.eat_attribute3
282  ,p_eat_attribute4_o              =>ben_eat_shd.g_old_rec.eat_attribute4
283  ,p_eat_attribute5_o              =>ben_eat_shd.g_old_rec.eat_attribute5
284  ,p_eat_attribute6_o              =>ben_eat_shd.g_old_rec.eat_attribute6
285  ,p_eat_attribute7_o              =>ben_eat_shd.g_old_rec.eat_attribute7
286  ,p_eat_attribute8_o              =>ben_eat_shd.g_old_rec.eat_attribute8
287  ,p_eat_attribute9_o              =>ben_eat_shd.g_old_rec.eat_attribute9
288  ,p_eat_attribute10_o             =>ben_eat_shd.g_old_rec.eat_attribute10
289  ,p_eat_attribute11_o             =>ben_eat_shd.g_old_rec.eat_attribute11
290  ,p_eat_attribute12_o             =>ben_eat_shd.g_old_rec.eat_attribute12
291  ,p_eat_attribute13_o             =>ben_eat_shd.g_old_rec.eat_attribute13
292  ,p_eat_attribute14_o             =>ben_eat_shd.g_old_rec.eat_attribute14
293  ,p_eat_attribute15_o             =>ben_eat_shd.g_old_rec.eat_attribute15
294  ,p_eat_attribute16_o             =>ben_eat_shd.g_old_rec.eat_attribute16
295  ,p_eat_attribute17_o             =>ben_eat_shd.g_old_rec.eat_attribute17
296  ,p_eat_attribute18_o             =>ben_eat_shd.g_old_rec.eat_attribute18
297  ,p_eat_attribute19_o             =>ben_eat_shd.g_old_rec.eat_attribute19
298  ,p_eat_attribute20_o             =>ben_eat_shd.g_old_rec.eat_attribute20
299  ,p_eat_attribute21_o             =>ben_eat_shd.g_old_rec.eat_attribute21
300  ,p_eat_attribute22_o             =>ben_eat_shd.g_old_rec.eat_attribute22
301  ,p_eat_attribute23_o             =>ben_eat_shd.g_old_rec.eat_attribute23
302  ,p_eat_attribute24_o             =>ben_eat_shd.g_old_rec.eat_attribute24
303  ,p_eat_attribute25_o             =>ben_eat_shd.g_old_rec.eat_attribute25
304  ,p_eat_attribute26_o             =>ben_eat_shd.g_old_rec.eat_attribute26
305  ,p_eat_attribute27_o             =>ben_eat_shd.g_old_rec.eat_attribute27
306  ,p_eat_attribute28_o             =>ben_eat_shd.g_old_rec.eat_attribute28
307  ,p_eat_attribute29_o             =>ben_eat_shd.g_old_rec.eat_attribute29
308  ,p_eat_attribute30_o             =>ben_eat_shd.g_old_rec.eat_attribute30
309  ,p_object_version_number_o       =>ben_eat_shd.g_old_rec.object_version_number
310       );
311     --
312   exception
313     --
314     when hr_api.cannot_find_prog_unit then
315       --
316       hr_api.cannot_find_prog_unit_error
317         (p_module_name => 'ben_actn_typ'
318         ,p_hook_type   => 'AU');
319       --
320   end;
321   --
322   -- End of API User Hook for post_update.
323   --
324   --
325   hr_utility.set_location(' Leaving:'||l_proc, 10);
326 End post_update;
327 --
328 -- ----------------------------------------------------------------------------
329 -- |-----------------------------< convert_defs >-----------------------------|
330 -- ----------------------------------------------------------------------------
331 -- {Start Of Comments}
332 --
333 -- Description:
334 --   The Convert_Defs procedure has one very important function:
335 --   It must return the record structure for the row with all system defaulted
336 --   values converted into its corresponding parameter value for update. When
337 --   we attempt to update a row through the Upd process , certain
338 --   parameters can be defaulted which enables flexibility in the calling of
339 --   the upd process (e.g. only attributes which need to be updated need to be
340 --   specified). For the upd process to determine which attributes
341 --   have NOT been specified we need to check if the parameter has a reserved
342 --   system default value. Therefore, for all parameters which have a
343 --   corresponding reserved system default mechanism specified we need to
344 --   check if a system default is being used. If a system default is being
345 --   used then we convert the defaulted value into its corresponding attribute
346 --   value held in the g_old_rec data structure.
347 --
348 -- Prerequisites:
349 --   This private function can only be called from the upd process.
350 --
351 -- In Parameters:
352 --   A Pl/Sql record structre.
353 --
354 -- Post Success:
355 --   The record structure will be returned with all system defaulted parameter
356 --   values converted into its current row attribute value.
357 --
358 -- Post Failure:
359 --   No direct error handling is required within this function. Any possible
360 --   errors within this procedure will be a PL/SQL value error due to conversion
361 --   of datatypes or data lengths.
362 --
363 -- Developer Implementation Notes:
364 --   None.
365 --
366 -- Access Status:
367 --   Internal Row Handler Use Only.
368 --
369 -- {End Of Comments}
370 -- ----------------------------------------------------------------------------
371 Procedure convert_defs(p_rec in out nocopy ben_eat_shd.g_rec_type) is
372 --
373   l_proc  varchar2(72) := g_package||'convert_defs';
374 --
375 Begin
376   --
377   hr_utility.set_location('Entering:'||l_proc, 5);
378   --
379   -- We must now examine each argument value in the
380   -- p_rec plsql record structure
381   -- to see if a system default is being used. If a system default
382   -- is being used then we must set to the 'current' argument value.
383   --
384   If (p_rec.business_group_id = hr_api.g_number) then
385     p_rec.business_group_id :=
386     ben_eat_shd.g_old_rec.business_group_id;
387   End If;
388   If (p_rec.type_cd = hr_api.g_varchar2) then
389     p_rec.type_cd :=
390     ben_eat_shd.g_old_rec.type_cd;
391   End If;
392   If (p_rec.name = hr_api.g_varchar2) then
393     p_rec.name :=
394     ben_eat_shd.g_old_rec.name;
395   End If;
396   If (p_rec.description = hr_api.g_varchar2) then
397     p_rec.description :=
398     ben_eat_shd.g_old_rec.description;
399   End If;
400   If (p_rec.eat_attribute_category = hr_api.g_varchar2) then
401     p_rec.eat_attribute_category :=
402     ben_eat_shd.g_old_rec.eat_attribute_category;
403   End If;
404   If (p_rec.eat_attribute1 = hr_api.g_varchar2) then
405     p_rec.eat_attribute1 :=
406     ben_eat_shd.g_old_rec.eat_attribute1;
407   End If;
408   If (p_rec.eat_attribute2 = hr_api.g_varchar2) then
409     p_rec.eat_attribute2 :=
410     ben_eat_shd.g_old_rec.eat_attribute2;
411   End If;
412   If (p_rec.eat_attribute3 = hr_api.g_varchar2) then
413     p_rec.eat_attribute3 :=
414     ben_eat_shd.g_old_rec.eat_attribute3;
415   End If;
416   If (p_rec.eat_attribute4 = hr_api.g_varchar2) then
417     p_rec.eat_attribute4 :=
418     ben_eat_shd.g_old_rec.eat_attribute4;
419   End If;
420   If (p_rec.eat_attribute5 = hr_api.g_varchar2) then
421     p_rec.eat_attribute5 :=
422     ben_eat_shd.g_old_rec.eat_attribute5;
423   End If;
424   If (p_rec.eat_attribute6 = hr_api.g_varchar2) then
425     p_rec.eat_attribute6 :=
426     ben_eat_shd.g_old_rec.eat_attribute6;
427   End If;
428   If (p_rec.eat_attribute7 = hr_api.g_varchar2) then
429     p_rec.eat_attribute7 :=
430     ben_eat_shd.g_old_rec.eat_attribute7;
431   End If;
432   If (p_rec.eat_attribute8 = hr_api.g_varchar2) then
433     p_rec.eat_attribute8 :=
434     ben_eat_shd.g_old_rec.eat_attribute8;
435   End If;
436   If (p_rec.eat_attribute9 = hr_api.g_varchar2) then
437     p_rec.eat_attribute9 :=
438     ben_eat_shd.g_old_rec.eat_attribute9;
439   End If;
440   If (p_rec.eat_attribute10 = hr_api.g_varchar2) then
441     p_rec.eat_attribute10 :=
442     ben_eat_shd.g_old_rec.eat_attribute10;
443   End If;
444   If (p_rec.eat_attribute11 = hr_api.g_varchar2) then
445     p_rec.eat_attribute11 :=
446     ben_eat_shd.g_old_rec.eat_attribute11;
447   End If;
448   If (p_rec.eat_attribute12 = hr_api.g_varchar2) then
449     p_rec.eat_attribute12 :=
450     ben_eat_shd.g_old_rec.eat_attribute12;
451   End If;
452   If (p_rec.eat_attribute13 = hr_api.g_varchar2) then
453     p_rec.eat_attribute13 :=
454     ben_eat_shd.g_old_rec.eat_attribute13;
455   End If;
456   If (p_rec.eat_attribute14 = hr_api.g_varchar2) then
457     p_rec.eat_attribute14 :=
458     ben_eat_shd.g_old_rec.eat_attribute14;
459   End If;
460   If (p_rec.eat_attribute15 = hr_api.g_varchar2) then
461     p_rec.eat_attribute15 :=
462     ben_eat_shd.g_old_rec.eat_attribute15;
463   End If;
464   If (p_rec.eat_attribute16 = hr_api.g_varchar2) then
465     p_rec.eat_attribute16 :=
466     ben_eat_shd.g_old_rec.eat_attribute16;
467   End If;
468   If (p_rec.eat_attribute17 = hr_api.g_varchar2) then
469     p_rec.eat_attribute17 :=
470     ben_eat_shd.g_old_rec.eat_attribute17;
471   End If;
472   If (p_rec.eat_attribute18 = hr_api.g_varchar2) then
473     p_rec.eat_attribute18 :=
474     ben_eat_shd.g_old_rec.eat_attribute18;
475   End If;
476   If (p_rec.eat_attribute19 = hr_api.g_varchar2) then
477     p_rec.eat_attribute19 :=
478     ben_eat_shd.g_old_rec.eat_attribute19;
479   End If;
480   If (p_rec.eat_attribute20 = hr_api.g_varchar2) then
481     p_rec.eat_attribute20 :=
482     ben_eat_shd.g_old_rec.eat_attribute20;
483   End If;
484   If (p_rec.eat_attribute21 = hr_api.g_varchar2) then
485     p_rec.eat_attribute21 :=
486     ben_eat_shd.g_old_rec.eat_attribute21;
487   End If;
488   If (p_rec.eat_attribute22 = hr_api.g_varchar2) then
489     p_rec.eat_attribute22 :=
490     ben_eat_shd.g_old_rec.eat_attribute22;
491   End If;
492   If (p_rec.eat_attribute23 = hr_api.g_varchar2) then
493     p_rec.eat_attribute23 :=
494     ben_eat_shd.g_old_rec.eat_attribute23;
495   End If;
496   If (p_rec.eat_attribute24 = hr_api.g_varchar2) then
497     p_rec.eat_attribute24 :=
498     ben_eat_shd.g_old_rec.eat_attribute24;
499   End If;
500   If (p_rec.eat_attribute25 = hr_api.g_varchar2) then
501     p_rec.eat_attribute25 :=
502     ben_eat_shd.g_old_rec.eat_attribute25;
503   End If;
504   If (p_rec.eat_attribute26 = hr_api.g_varchar2) then
505     p_rec.eat_attribute26 :=
506     ben_eat_shd.g_old_rec.eat_attribute26;
507   End If;
508   If (p_rec.eat_attribute27 = hr_api.g_varchar2) then
509     p_rec.eat_attribute27 :=
510     ben_eat_shd.g_old_rec.eat_attribute27;
511   End If;
512   If (p_rec.eat_attribute28 = hr_api.g_varchar2) then
513     p_rec.eat_attribute28 :=
514     ben_eat_shd.g_old_rec.eat_attribute28;
515   End If;
516   If (p_rec.eat_attribute29 = hr_api.g_varchar2) then
517     p_rec.eat_attribute29 :=
518     ben_eat_shd.g_old_rec.eat_attribute29;
519   End If;
520   If (p_rec.eat_attribute30 = hr_api.g_varchar2) then
521     p_rec.eat_attribute30 :=
522     ben_eat_shd.g_old_rec.eat_attribute30;
523   End If;
524 
525   --
526   hr_utility.set_location(' Leaving:'||l_proc, 10);
527 --
528 End convert_defs;
529 --
530 -- ----------------------------------------------------------------------------
531 -- |---------------------------------< upd >----------------------------------|
532 -- ----------------------------------------------------------------------------
533 Procedure upd
534   (
535   p_effective_date in date,
536   p_rec        in out nocopy ben_eat_shd.g_rec_type
537   ) is
538 --
539   l_proc  varchar2(72) := g_package||'upd';
540 --
541 Begin
542   hr_utility.set_location('Entering:'||l_proc, 5);
543   --
544   -- We must lock the row which we need to update.
545   --
546   ben_eat_shd.lck
547 	(
548 	p_rec.actn_typ_id,
549 	p_rec.object_version_number
550 	);
551   --
552   -- 1. During an update system defaults are used to determine if
553   --    arguments have been defaulted or not. We must therefore
554   --    derive the full record structure values to be updated.
555   --
556   -- 2. Call the supporting update validate operations.
557   --
558   convert_defs(p_rec);
559   ben_eat_bus.update_validate(p_rec
560   ,p_effective_date);
561   --
562   -- Call the supporting pre-update operation
563   --
564   pre_update(p_rec);
565   --
566   -- Update the row.
567   --
568   update_dml(p_rec);
569   --
570   -- Call the supporting post-update operation
571   --
572   post_update(
573 p_effective_date,p_rec);
574 End upd;
575 --
576 -- ----------------------------------------------------------------------------
577 -- |---------------------------------< upd >----------------------------------|
578 -- ----------------------------------------------------------------------------
579 Procedure upd
580   (
581   p_effective_date in date,
582   p_actn_typ_id                  in number,
583   p_business_group_id            in number           default hr_api.g_number,
584   p_type_cd                      in varchar2         default hr_api.g_varchar2,
585   p_name                         in varchar2         default hr_api.g_varchar2,
586   p_description                  in varchar2         default hr_api.g_varchar2,
587   p_eat_attribute_category       in varchar2         default hr_api.g_varchar2,
588   p_eat_attribute1               in varchar2         default hr_api.g_varchar2,
589   p_eat_attribute2               in varchar2         default hr_api.g_varchar2,
590   p_eat_attribute3               in varchar2         default hr_api.g_varchar2,
591   p_eat_attribute4               in varchar2         default hr_api.g_varchar2,
592   p_eat_attribute5               in varchar2         default hr_api.g_varchar2,
593   p_eat_attribute6               in varchar2         default hr_api.g_varchar2,
594   p_eat_attribute7               in varchar2         default hr_api.g_varchar2,
595   p_eat_attribute8               in varchar2         default hr_api.g_varchar2,
596   p_eat_attribute9               in varchar2         default hr_api.g_varchar2,
597   p_eat_attribute10              in varchar2         default hr_api.g_varchar2,
598   p_eat_attribute11              in varchar2         default hr_api.g_varchar2,
599   p_eat_attribute12              in varchar2         default hr_api.g_varchar2,
600   p_eat_attribute13              in varchar2         default hr_api.g_varchar2,
601   p_eat_attribute14              in varchar2         default hr_api.g_varchar2,
602   p_eat_attribute15              in varchar2         default hr_api.g_varchar2,
603   p_eat_attribute16              in varchar2         default hr_api.g_varchar2,
604   p_eat_attribute17              in varchar2         default hr_api.g_varchar2,
605   p_eat_attribute18              in varchar2         default hr_api.g_varchar2,
606   p_eat_attribute19              in varchar2         default hr_api.g_varchar2,
607   p_eat_attribute20              in varchar2         default hr_api.g_varchar2,
608   p_eat_attribute21              in varchar2         default hr_api.g_varchar2,
609   p_eat_attribute22              in varchar2         default hr_api.g_varchar2,
610   p_eat_attribute23              in varchar2         default hr_api.g_varchar2,
611   p_eat_attribute24              in varchar2         default hr_api.g_varchar2,
612   p_eat_attribute25              in varchar2         default hr_api.g_varchar2,
613   p_eat_attribute26              in varchar2         default hr_api.g_varchar2,
614   p_eat_attribute27              in varchar2         default hr_api.g_varchar2,
615   p_eat_attribute28              in varchar2         default hr_api.g_varchar2,
616   p_eat_attribute29              in varchar2         default hr_api.g_varchar2,
617   p_eat_attribute30              in varchar2         default hr_api.g_varchar2,
618   p_object_version_number        in out nocopy number
619   ) is
620 --
621   l_rec	  ben_eat_shd.g_rec_type;
622   l_proc  varchar2(72) := g_package||'upd';
623 --
624 Begin
625   hr_utility.set_location('Entering:'||l_proc, 5);
626   --
627   -- Call conversion function to turn arguments into the
628   -- l_rec structure.
629   --
630   l_rec :=
631   ben_eat_shd.convert_args
632   (
633   p_actn_typ_id,
634   p_business_group_id,
635   p_type_cd,
636   p_name,
637   p_description,
638   p_eat_attribute_category,
639   p_eat_attribute1,
640   p_eat_attribute2,
641   p_eat_attribute3,
642   p_eat_attribute4,
643   p_eat_attribute5,
644   p_eat_attribute6,
645   p_eat_attribute7,
646   p_eat_attribute8,
647   p_eat_attribute9,
648   p_eat_attribute10,
649   p_eat_attribute11,
650   p_eat_attribute12,
651   p_eat_attribute13,
652   p_eat_attribute14,
653   p_eat_attribute15,
654   p_eat_attribute16,
655   p_eat_attribute17,
656   p_eat_attribute18,
657   p_eat_attribute19,
658   p_eat_attribute20,
659   p_eat_attribute21,
660   p_eat_attribute22,
661   p_eat_attribute23,
662   p_eat_attribute24,
663   p_eat_attribute25,
664   p_eat_attribute26,
665   p_eat_attribute27,
666   p_eat_attribute28,
667   p_eat_attribute29,
668   p_eat_attribute30,
669   p_object_version_number
670   );
671   --
672   -- Having converted the arguments into the
673   -- plsql record structure we call the corresponding record
674   -- business process.
675   --
676   upd(
677     p_effective_date,l_rec);
678   p_object_version_number := l_rec.object_version_number;
679   --
680   hr_utility.set_location(' Leaving:'||l_proc, 10);
681 End upd;
682 --
683 end ben_eat_upd;