DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PCG_UPD

Source


1 Package Body ben_pcg_upd as
2 /* $Header: bepcgrhi.pkb 115.8 2002/12/16 11:58:08 vsethi ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_pcg_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_pcg_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_pcg_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the ben_prtt_clm_gd_or_svc_typ Row
68   --
69   update ben_prtt_clm_gd_or_svc_typ
70   set
71   prtt_clm_gd_or_svc_typ_id         = p_rec.prtt_clm_gd_or_svc_typ_id,
72   prtt_reimbmt_rqst_id              = p_rec.prtt_reimbmt_rqst_id,
73   gd_or_svc_typ_id                  = p_rec.gd_or_svc_typ_id,
74   business_group_id                 = p_rec.business_group_id,
75   pcg_attribute_category            = p_rec.pcg_attribute_category,
76   pcg_attribute1                    = p_rec.pcg_attribute1,
77   pcg_attribute2                    = p_rec.pcg_attribute2,
78   pcg_attribute3                    = p_rec.pcg_attribute3,
79   pcg_attribute4                    = p_rec.pcg_attribute4,
80   pcg_attribute5                    = p_rec.pcg_attribute5,
81   pcg_attribute6                    = p_rec.pcg_attribute6,
82   pcg_attribute7                    = p_rec.pcg_attribute7,
83   pcg_attribute8                    = p_rec.pcg_attribute8,
84   pcg_attribute9                    = p_rec.pcg_attribute9,
85   pcg_attribute10                   = p_rec.pcg_attribute10,
86   pcg_attribute11                   = p_rec.pcg_attribute11,
87   pcg_attribute12                   = p_rec.pcg_attribute12,
88   pcg_attribute13                   = p_rec.pcg_attribute13,
89   pcg_attribute14                   = p_rec.pcg_attribute14,
90   pcg_attribute15                   = p_rec.pcg_attribute15,
91   pcg_attribute16                   = p_rec.pcg_attribute16,
92   pcg_attribute17                   = p_rec.pcg_attribute17,
93   pcg_attribute18                   = p_rec.pcg_attribute18,
94   pcg_attribute19                   = p_rec.pcg_attribute19,
95   pcg_attribute20                   = p_rec.pcg_attribute20,
96   pcg_attribute21                   = p_rec.pcg_attribute21,
97   pcg_attribute22                   = p_rec.pcg_attribute22,
98   pcg_attribute23                   = p_rec.pcg_attribute23,
99   pcg_attribute24                   = p_rec.pcg_attribute24,
100   pcg_attribute25                   = p_rec.pcg_attribute25,
101   pcg_attribute26                   = p_rec.pcg_attribute26,
102   pcg_attribute27                   = p_rec.pcg_attribute27,
103   pcg_attribute28                   = p_rec.pcg_attribute28,
104   pcg_attribute29                   = p_rec.pcg_attribute29,
105   pcg_attribute30                   = p_rec.pcg_attribute30,
106   object_version_number             = p_rec.object_version_number ,
107   pl_gd_or_svc_id                   = p_rec.pl_gd_or_svc_id
108   where prtt_clm_gd_or_svc_typ_id = p_rec.prtt_clm_gd_or_svc_typ_id;
109   --
110   ben_pcg_shd.g_api_dml := false;   -- Unset the api dml status
111   --
112   hr_utility.set_location(' Leaving:'||l_proc, 10);
113 --
114 Exception
115   When hr_api.check_integrity_violated Then
116     -- A check constraint has been violated
117     ben_pcg_shd.g_api_dml := false;   -- Unset the api dml status
118     ben_pcg_shd.constraint_error
119       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
120   When hr_api.parent_integrity_violated Then
121     -- Parent integrity has been violated
122     ben_pcg_shd.g_api_dml := false;   -- Unset the api dml status
123     ben_pcg_shd.constraint_error
124       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
125   When hr_api.unique_integrity_violated Then
126     -- Unique integrity has been violated
127     ben_pcg_shd.g_api_dml := false;   -- Unset the api dml status
128     ben_pcg_shd.constraint_error
129       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
130   When Others Then
131     ben_pcg_shd.g_api_dml := false;   -- Unset the api dml status
132     Raise;
133 End update_dml;
134 --
135 -- ----------------------------------------------------------------------------
136 -- |------------------------------< pre_update >------------------------------|
137 -- ----------------------------------------------------------------------------
138 -- {Start Of Comments}
139 --
140 -- Description:
141 --   This private procedure contains any processing which is required before
142 --   the update dml.
143 --
144 -- Prerequisites:
145 --   This is an internal procedure which is called from the upd procedure.
146 --
147 -- In Parameters:
148 --   A Pl/Sql record structre.
149 --
150 -- Post Success:
151 --   Processing continues.
152 --
153 -- Post Failure:
154 --   If an error has occurred, an error message and exception will be raised
155 --   but not handled.
156 --
157 -- Developer Implementation Notes:
158 --   Any pre-processing required before the update dml is issued should be
159 --   coded within this procedure. It is important to note that any 3rd party
160 --   maintenance should be reviewed before placing in this procedure.
161 --
162 -- Access Status:
163 --   Internal Row Handler Use Only.
164 --
165 -- {End Of Comments}
166 -- ----------------------------------------------------------------------------
167 Procedure pre_update(p_rec in ben_pcg_shd.g_rec_type) is
168 --
169   l_proc  varchar2(72) := g_package||'pre_update';
170 --
171 Begin
172   hr_utility.set_location('Entering:'||l_proc, 5);
173   --
174   hr_utility.set_location(' Leaving:'||l_proc, 10);
175 End pre_update;
176 --
177 -- ----------------------------------------------------------------------------
178 -- |-----------------------------< post_update >------------------------------|
179 -- ----------------------------------------------------------------------------
180 -- {Start Of Comments}
181 --
182 -- Description:
183 --   This private procedure contains any processing which is required after the
184 --   update dml.
185 --
186 -- Prerequisites:
187 --   This is an internal procedure which is called from the upd procedure.
188 --
189 -- In Parameters:
190 --   A Pl/Sql record structre.
191 --
192 -- Post Success:
193 --   Processing continues.
194 --
195 -- Post Failure:
196 --   If an error has occurred, an error message and exception will be raised
197 --   but not handled.
198 --
199 -- Developer Implementation Notes:
200 --   Any post-processing required after the update dml is issued should be
201 --   coded within this procedure. It is important to note that any 3rd party
202 --   maintenance should be reviewed before placing in this procedure.
203 --
204 -- Access Status:
205 --   Internal Row Handler Use Only.
206 --
207 -- {End Of Comments}
208 -- ----------------------------------------------------------------------------
209 Procedure post_update(p_rec in ben_pcg_shd.g_rec_type) is
210 --
211   l_proc  varchar2(72) := g_package||'post_update';
212 --
213 Begin
214   hr_utility.set_location('Entering:'||l_proc, 5);
215 --
216   --
217   -- Start of API User Hook for post_update.
218   --
219   begin
220     --
221     ben_pcg_rku.after_update
222       (
223   p_prtt_clm_gd_or_svc_typ_id     =>p_rec.prtt_clm_gd_or_svc_typ_id
224  ,p_prtt_reimbmt_rqst_id          =>p_rec.prtt_reimbmt_rqst_id
225  ,p_gd_or_svc_typ_id              =>p_rec.gd_or_svc_typ_id
226  ,p_business_group_id             =>p_rec.business_group_id
227  ,p_pcg_attribute_category        =>p_rec.pcg_attribute_category
228  ,p_pcg_attribute1                =>p_rec.pcg_attribute1
229  ,p_pcg_attribute2                =>p_rec.pcg_attribute2
230  ,p_pcg_attribute3                =>p_rec.pcg_attribute3
231  ,p_pcg_attribute4                =>p_rec.pcg_attribute4
232  ,p_pcg_attribute5                =>p_rec.pcg_attribute5
233  ,p_pcg_attribute6                =>p_rec.pcg_attribute6
234  ,p_pcg_attribute7                =>p_rec.pcg_attribute7
235  ,p_pcg_attribute8                =>p_rec.pcg_attribute8
236  ,p_pcg_attribute9                =>p_rec.pcg_attribute9
237  ,p_pcg_attribute10               =>p_rec.pcg_attribute10
238  ,p_pcg_attribute11               =>p_rec.pcg_attribute11
239  ,p_pcg_attribute12               =>p_rec.pcg_attribute12
240  ,p_pcg_attribute13               =>p_rec.pcg_attribute13
241  ,p_pcg_attribute14               =>p_rec.pcg_attribute14
242  ,p_pcg_attribute15               =>p_rec.pcg_attribute15
243  ,p_pcg_attribute16               =>p_rec.pcg_attribute16
244  ,p_pcg_attribute17               =>p_rec.pcg_attribute17
245  ,p_pcg_attribute18               =>p_rec.pcg_attribute18
246  ,p_pcg_attribute19               =>p_rec.pcg_attribute19
247  ,p_pcg_attribute20               =>p_rec.pcg_attribute20
248  ,p_pcg_attribute21               =>p_rec.pcg_attribute21
249  ,p_pcg_attribute22               =>p_rec.pcg_attribute22
250  ,p_pcg_attribute23               =>p_rec.pcg_attribute23
251  ,p_pcg_attribute24               =>p_rec.pcg_attribute24
252  ,p_pcg_attribute25               =>p_rec.pcg_attribute25
253  ,p_pcg_attribute26               =>p_rec.pcg_attribute26
254  ,p_pcg_attribute27               =>p_rec.pcg_attribute27
255  ,p_pcg_attribute28               =>p_rec.pcg_attribute28
256  ,p_pcg_attribute29               =>p_rec.pcg_attribute29
257  ,p_pcg_attribute30               =>p_rec.pcg_attribute30
258  ,p_object_version_number         =>p_rec.object_version_number
259  ,p_pl_gd_or_svc_id               =>p_rec.pl_gd_or_svc_id
260  ,p_prtt_reimbmt_rqst_id_o        =>ben_pcg_shd.g_old_rec.prtt_reimbmt_rqst_id
261  ,p_gd_or_svc_typ_id_o            =>ben_pcg_shd.g_old_rec.gd_or_svc_typ_id
262  ,p_business_group_id_o           =>ben_pcg_shd.g_old_rec.business_group_id
263  ,p_pcg_attribute_category_o      =>ben_pcg_shd.g_old_rec.pcg_attribute_category
264  ,p_pcg_attribute1_o              =>ben_pcg_shd.g_old_rec.pcg_attribute1
265  ,p_pcg_attribute2_o              =>ben_pcg_shd.g_old_rec.pcg_attribute2
266  ,p_pcg_attribute3_o              =>ben_pcg_shd.g_old_rec.pcg_attribute3
267  ,p_pcg_attribute4_o              =>ben_pcg_shd.g_old_rec.pcg_attribute4
268  ,p_pcg_attribute5_o              =>ben_pcg_shd.g_old_rec.pcg_attribute5
269  ,p_pcg_attribute6_o              =>ben_pcg_shd.g_old_rec.pcg_attribute6
270  ,p_pcg_attribute7_o              =>ben_pcg_shd.g_old_rec.pcg_attribute7
271  ,p_pcg_attribute8_o              =>ben_pcg_shd.g_old_rec.pcg_attribute8
272  ,p_pcg_attribute9_o              =>ben_pcg_shd.g_old_rec.pcg_attribute9
273  ,p_pcg_attribute10_o             =>ben_pcg_shd.g_old_rec.pcg_attribute10
274  ,p_pcg_attribute11_o             =>ben_pcg_shd.g_old_rec.pcg_attribute11
275  ,p_pcg_attribute12_o             =>ben_pcg_shd.g_old_rec.pcg_attribute12
276  ,p_pcg_attribute13_o             =>ben_pcg_shd.g_old_rec.pcg_attribute13
277  ,p_pcg_attribute14_o             =>ben_pcg_shd.g_old_rec.pcg_attribute14
278  ,p_pcg_attribute15_o             =>ben_pcg_shd.g_old_rec.pcg_attribute15
279  ,p_pcg_attribute16_o             =>ben_pcg_shd.g_old_rec.pcg_attribute16
280  ,p_pcg_attribute17_o             =>ben_pcg_shd.g_old_rec.pcg_attribute17
281  ,p_pcg_attribute18_o             =>ben_pcg_shd.g_old_rec.pcg_attribute18
282  ,p_pcg_attribute19_o             =>ben_pcg_shd.g_old_rec.pcg_attribute19
283  ,p_pcg_attribute20_o             =>ben_pcg_shd.g_old_rec.pcg_attribute20
284  ,p_pcg_attribute21_o             =>ben_pcg_shd.g_old_rec.pcg_attribute21
285  ,p_pcg_attribute22_o             =>ben_pcg_shd.g_old_rec.pcg_attribute22
286  ,p_pcg_attribute23_o             =>ben_pcg_shd.g_old_rec.pcg_attribute23
287  ,p_pcg_attribute24_o             =>ben_pcg_shd.g_old_rec.pcg_attribute24
288  ,p_pcg_attribute25_o             =>ben_pcg_shd.g_old_rec.pcg_attribute25
289  ,p_pcg_attribute26_o             =>ben_pcg_shd.g_old_rec.pcg_attribute26
290  ,p_pcg_attribute27_o             =>ben_pcg_shd.g_old_rec.pcg_attribute27
291  ,p_pcg_attribute28_o             =>ben_pcg_shd.g_old_rec.pcg_attribute28
292  ,p_pcg_attribute29_o             =>ben_pcg_shd.g_old_rec.pcg_attribute29
293  ,p_pcg_attribute30_o             =>ben_pcg_shd.g_old_rec.pcg_attribute30
294  ,p_object_version_number_o       =>ben_pcg_shd.g_old_rec.object_version_number
295  ,p_pl_gd_or_svc_id_o             =>ben_pcg_shd.g_old_rec.pl_gd_or_svc_id
296       );
297     --
298   exception
299     --
300     when hr_api.cannot_find_prog_unit then
301       --
302       hr_api.cannot_find_prog_unit_error
303         (p_module_name => 'ben_prtt_clm_gd_or_svc_typ'
304         ,p_hook_type   => 'AU');
305       --
306   end;
307   --
308   -- End of API User Hook for post_update.
309   --
310   --
311   hr_utility.set_location(' Leaving:'||l_proc, 10);
312 End post_update;
313 --
314 -- ----------------------------------------------------------------------------
315 -- |-----------------------------< convert_defs >-----------------------------|
316 -- ----------------------------------------------------------------------------
317 -- {Start Of Comments}
318 --
319 -- Description:
320 --   The Convert_Defs procedure has one very important function:
321 --   It must return the record structure for the row with all system defaulted
322 --   values converted into its corresponding parameter value for update. When
323 --   we attempt to update a row through the Upd process , certain
324 --   parameters can be defaulted which enables flexibility in the calling of
325 --   the upd process (e.g. only attributes which need to be updated need to be
326 --   specified). For the upd process to determine which attributes
327 --   have NOT been specified we need to check if the parameter has a reserved
328 --   system default value. Therefore, for all parameters which have a
329 --   corresponding reserved system default mechanism specified we need to
330 --   check if a system default is being used. If a system default is being
331 --   used then we convert the defaulted value into its corresponding attribute
332 --   value held in the g_old_rec data structure.
333 --
334 -- Prerequisites:
335 --   This private function can only be called from the upd process.
336 --
337 -- In Parameters:
338 --   A Pl/Sql record structre.
339 --
340 -- Post Success:
341 --   The record structure will be returned with all system defaulted parameter
342 --   values converted into its current row attribute value.
343 --
344 -- Post Failure:
345 --   No direct error handling is required within this function. Any possible
346 --   errors within this procedure will be a PL/SQL value error due to conversion
347 --   of datatypes or data lengths.
348 --
349 -- Developer Implementation Notes:
350 --   None.
351 --
352 -- Access Status:
353 --   Internal Row Handler Use Only.
354 --
355 -- {End Of Comments}
356 -- ----------------------------------------------------------------------------
357 Procedure convert_defs(p_rec in out nocopy ben_pcg_shd.g_rec_type) is
358 --
359   l_proc  varchar2(72) := g_package||'convert_defs';
360 --
361 Begin
362   --
363   hr_utility.set_location('Entering:'||l_proc, 5);
364   --
365   -- We must now examine each argument value in the
366   -- p_rec plsql record structure
367   -- to see if a system default is being used. If a system default
368   -- is being used then we must set to the 'current' argument value.
369   --
370   If (p_rec.prtt_reimbmt_rqst_id = hr_api.g_number) then
371     p_rec.prtt_reimbmt_rqst_id :=
372     ben_pcg_shd.g_old_rec.prtt_reimbmt_rqst_id;
373   End If;
374   If (p_rec.gd_or_svc_typ_id = hr_api.g_number) then
375     p_rec.gd_or_svc_typ_id :=
376     ben_pcg_shd.g_old_rec.gd_or_svc_typ_id;
377   End If;
378   If (p_rec.business_group_id = hr_api.g_number) then
379     p_rec.business_group_id :=
380     ben_pcg_shd.g_old_rec.business_group_id;
381   End If;
382   If (p_rec.pcg_attribute_category = hr_api.g_varchar2) then
383     p_rec.pcg_attribute_category :=
384     ben_pcg_shd.g_old_rec.pcg_attribute_category;
385   End If;
386   If (p_rec.pcg_attribute1 = hr_api.g_varchar2) then
387     p_rec.pcg_attribute1 :=
388     ben_pcg_shd.g_old_rec.pcg_attribute1;
389   End If;
390   If (p_rec.pcg_attribute2 = hr_api.g_varchar2) then
391     p_rec.pcg_attribute2 :=
392     ben_pcg_shd.g_old_rec.pcg_attribute2;
393   End If;
394   If (p_rec.pcg_attribute3 = hr_api.g_varchar2) then
395     p_rec.pcg_attribute3 :=
396     ben_pcg_shd.g_old_rec.pcg_attribute3;
397   End If;
398   If (p_rec.pcg_attribute4 = hr_api.g_varchar2) then
399     p_rec.pcg_attribute4 :=
400     ben_pcg_shd.g_old_rec.pcg_attribute4;
401   End If;
402   If (p_rec.pcg_attribute5 = hr_api.g_varchar2) then
403     p_rec.pcg_attribute5 :=
404     ben_pcg_shd.g_old_rec.pcg_attribute5;
405   End If;
406   If (p_rec.pcg_attribute6 = hr_api.g_varchar2) then
407     p_rec.pcg_attribute6 :=
408     ben_pcg_shd.g_old_rec.pcg_attribute6;
409   End If;
410   If (p_rec.pcg_attribute7 = hr_api.g_varchar2) then
411     p_rec.pcg_attribute7 :=
412     ben_pcg_shd.g_old_rec.pcg_attribute7;
413   End If;
414   If (p_rec.pcg_attribute8 = hr_api.g_varchar2) then
415     p_rec.pcg_attribute8 :=
416     ben_pcg_shd.g_old_rec.pcg_attribute8;
417   End If;
418   If (p_rec.pcg_attribute9 = hr_api.g_varchar2) then
419     p_rec.pcg_attribute9 :=
420     ben_pcg_shd.g_old_rec.pcg_attribute9;
421   End If;
422   If (p_rec.pcg_attribute10 = hr_api.g_varchar2) then
423     p_rec.pcg_attribute10 :=
424     ben_pcg_shd.g_old_rec.pcg_attribute10;
425   End If;
426   If (p_rec.pcg_attribute11 = hr_api.g_varchar2) then
427     p_rec.pcg_attribute11 :=
428     ben_pcg_shd.g_old_rec.pcg_attribute11;
429   End If;
430   If (p_rec.pcg_attribute12 = hr_api.g_varchar2) then
431     p_rec.pcg_attribute12 :=
432     ben_pcg_shd.g_old_rec.pcg_attribute12;
433   End If;
434   If (p_rec.pcg_attribute13 = hr_api.g_varchar2) then
435     p_rec.pcg_attribute13 :=
436     ben_pcg_shd.g_old_rec.pcg_attribute13;
437   End If;
438   If (p_rec.pcg_attribute14 = hr_api.g_varchar2) then
439     p_rec.pcg_attribute14 :=
440     ben_pcg_shd.g_old_rec.pcg_attribute14;
441   End If;
442   If (p_rec.pcg_attribute15 = hr_api.g_varchar2) then
443     p_rec.pcg_attribute15 :=
444     ben_pcg_shd.g_old_rec.pcg_attribute15;
445   End If;
446   If (p_rec.pcg_attribute16 = hr_api.g_varchar2) then
447     p_rec.pcg_attribute16 :=
448     ben_pcg_shd.g_old_rec.pcg_attribute16;
449   End If;
450   If (p_rec.pcg_attribute17 = hr_api.g_varchar2) then
451     p_rec.pcg_attribute17 :=
452     ben_pcg_shd.g_old_rec.pcg_attribute17;
453   End If;
454   If (p_rec.pcg_attribute18 = hr_api.g_varchar2) then
455     p_rec.pcg_attribute18 :=
456     ben_pcg_shd.g_old_rec.pcg_attribute18;
457   End If;
458   If (p_rec.pcg_attribute19 = hr_api.g_varchar2) then
459     p_rec.pcg_attribute19 :=
460     ben_pcg_shd.g_old_rec.pcg_attribute19;
461   End If;
462   If (p_rec.pcg_attribute20 = hr_api.g_varchar2) then
463     p_rec.pcg_attribute20 :=
464     ben_pcg_shd.g_old_rec.pcg_attribute20;
465   End If;
466   If (p_rec.pcg_attribute21 = hr_api.g_varchar2) then
467     p_rec.pcg_attribute21 :=
468     ben_pcg_shd.g_old_rec.pcg_attribute21;
469   End If;
470   If (p_rec.pcg_attribute22 = hr_api.g_varchar2) then
471     p_rec.pcg_attribute22 :=
472     ben_pcg_shd.g_old_rec.pcg_attribute22;
473   End If;
474   If (p_rec.pcg_attribute23 = hr_api.g_varchar2) then
475     p_rec.pcg_attribute23 :=
476     ben_pcg_shd.g_old_rec.pcg_attribute23;
477   End If;
478   If (p_rec.pcg_attribute24 = hr_api.g_varchar2) then
479     p_rec.pcg_attribute24 :=
480     ben_pcg_shd.g_old_rec.pcg_attribute24;
481   End If;
482   If (p_rec.pcg_attribute25 = hr_api.g_varchar2) then
483     p_rec.pcg_attribute25 :=
484     ben_pcg_shd.g_old_rec.pcg_attribute25;
485   End If;
486   If (p_rec.pcg_attribute26 = hr_api.g_varchar2) then
487     p_rec.pcg_attribute26 :=
488     ben_pcg_shd.g_old_rec.pcg_attribute26;
489   End If;
490   If (p_rec.pcg_attribute27 = hr_api.g_varchar2) then
491     p_rec.pcg_attribute27 :=
492     ben_pcg_shd.g_old_rec.pcg_attribute27;
493   End If;
494   If (p_rec.pcg_attribute28 = hr_api.g_varchar2) then
495     p_rec.pcg_attribute28 :=
496     ben_pcg_shd.g_old_rec.pcg_attribute28;
497   End If;
498   If (p_rec.pcg_attribute29 = hr_api.g_varchar2) then
499     p_rec.pcg_attribute29 :=
500     ben_pcg_shd.g_old_rec.pcg_attribute29;
501   End If;
502   If (p_rec.pcg_attribute30 = hr_api.g_varchar2) then
503     p_rec.pcg_attribute30 :=
504     ben_pcg_shd.g_old_rec.pcg_attribute30;
505   End If;
506   if (p_rec.pl_gd_or_svc_id = hr_api.g_number) then
507      p_rec.pl_gd_or_svc_id := ben_pcg_shd.g_old_rec.pl_gd_or_svc_id ;
508   end if ;
509   --
510   hr_utility.set_location(' Leaving:'||l_proc, 10);
511 --
512 End convert_defs;
513 --
514 -- ----------------------------------------------------------------------------
515 -- |---------------------------------< upd >----------------------------------|
516 -- ----------------------------------------------------------------------------
517 Procedure upd
518   (
519   p_rec        in out nocopy ben_pcg_shd.g_rec_type
520   ) is
521 --
522   l_proc  varchar2(72) := g_package||'upd';
523 --
524 Begin
525   hr_utility.set_location('Entering:'||l_proc, 5);
526   --
527   -- We must lock the row which we need to update.
528   --
529   ben_pcg_shd.lck
530 	(
531 	p_rec.prtt_clm_gd_or_svc_typ_id,
532 	p_rec.object_version_number
533 	);
534   --
535   -- 1. During an update system defaults are used to determine if
536   --    arguments have been defaulted or not. We must therefore
537   --    derive the full record structure values to be updated.
538   --
539   -- 2. Call the supporting update validate operations.
540   --
541   convert_defs(p_rec);
542   ben_pcg_bus.update_validate(p_rec);
543   --
544   -- Call the supporting pre-update operation
545   --
546   pre_update(p_rec);
547   --
548   -- Update the row.
549   --
550   update_dml(p_rec);
551   --
552   -- Call the supporting post-update operation
553   --
554   post_update(p_rec);
555 End upd;
556 --
557 -- ----------------------------------------------------------------------------
558 -- |---------------------------------< upd >----------------------------------|
559 -- ----------------------------------------------------------------------------
560 Procedure upd
561   (
562   p_prtt_clm_gd_or_svc_typ_id    in number,
563   p_prtt_reimbmt_rqst_id         in number           default hr_api.g_number,
564   p_gd_or_svc_typ_id             in number           default hr_api.g_number,
565   p_business_group_id            in number           default hr_api.g_number,
566   p_pcg_attribute_category       in varchar2         default hr_api.g_varchar2,
567   p_pcg_attribute1               in varchar2         default hr_api.g_varchar2,
568   p_pcg_attribute2               in varchar2         default hr_api.g_varchar2,
569   p_pcg_attribute3               in varchar2         default hr_api.g_varchar2,
570   p_pcg_attribute4               in varchar2         default hr_api.g_varchar2,
571   p_pcg_attribute5               in varchar2         default hr_api.g_varchar2,
572   p_pcg_attribute6               in varchar2         default hr_api.g_varchar2,
573   p_pcg_attribute7               in varchar2         default hr_api.g_varchar2,
574   p_pcg_attribute8               in varchar2         default hr_api.g_varchar2,
575   p_pcg_attribute9               in varchar2         default hr_api.g_varchar2,
576   p_pcg_attribute10              in varchar2         default hr_api.g_varchar2,
577   p_pcg_attribute11              in varchar2         default hr_api.g_varchar2,
578   p_pcg_attribute12              in varchar2         default hr_api.g_varchar2,
579   p_pcg_attribute13              in varchar2         default hr_api.g_varchar2,
580   p_pcg_attribute14              in varchar2         default hr_api.g_varchar2,
581   p_pcg_attribute15              in varchar2         default hr_api.g_varchar2,
582   p_pcg_attribute16              in varchar2         default hr_api.g_varchar2,
583   p_pcg_attribute17              in varchar2         default hr_api.g_varchar2,
584   p_pcg_attribute18              in varchar2         default hr_api.g_varchar2,
585   p_pcg_attribute19              in varchar2         default hr_api.g_varchar2,
586   p_pcg_attribute20              in varchar2         default hr_api.g_varchar2,
587   p_pcg_attribute21              in varchar2         default hr_api.g_varchar2,
588   p_pcg_attribute22              in varchar2         default hr_api.g_varchar2,
589   p_pcg_attribute23              in varchar2         default hr_api.g_varchar2,
590   p_pcg_attribute24              in varchar2         default hr_api.g_varchar2,
591   p_pcg_attribute25              in varchar2         default hr_api.g_varchar2,
592   p_pcg_attribute26              in varchar2         default hr_api.g_varchar2,
593   p_pcg_attribute27              in varchar2         default hr_api.g_varchar2,
594   p_pcg_attribute28              in varchar2         default hr_api.g_varchar2,
595   p_pcg_attribute29              in varchar2         default hr_api.g_varchar2,
596   p_pcg_attribute30              in varchar2         default hr_api.g_varchar2,
597   p_object_version_number        in out nocopy number                                ,
598   p_pl_gd_or_svc_id              in number           default hr_api.g_number
599   ) is
600 --
601   l_rec	  ben_pcg_shd.g_rec_type;
602   l_proc  varchar2(72) := g_package||'upd';
603 --
604 Begin
605   hr_utility.set_location('Entering:'||l_proc, 5);
606   --
607   -- Call conversion function to turn arguments into the
608   -- l_rec structure.
609   --
610   l_rec :=
611   ben_pcg_shd.convert_args
612   (
613   p_prtt_clm_gd_or_svc_typ_id,
614   p_prtt_reimbmt_rqst_id,
615   p_gd_or_svc_typ_id,
616   p_business_group_id,
617   p_pcg_attribute_category,
618   p_pcg_attribute1,
619   p_pcg_attribute2,
620   p_pcg_attribute3,
621   p_pcg_attribute4,
622   p_pcg_attribute5,
623   p_pcg_attribute6,
624   p_pcg_attribute7,
625   p_pcg_attribute8,
626   p_pcg_attribute9,
627   p_pcg_attribute10,
628   p_pcg_attribute11,
629   p_pcg_attribute12,
630   p_pcg_attribute13,
631   p_pcg_attribute14,
632   p_pcg_attribute15,
633   p_pcg_attribute16,
634   p_pcg_attribute17,
635   p_pcg_attribute18,
636   p_pcg_attribute19,
637   p_pcg_attribute20,
638   p_pcg_attribute21,
639   p_pcg_attribute22,
640   p_pcg_attribute23,
641   p_pcg_attribute24,
642   p_pcg_attribute25,
643   p_pcg_attribute26,
644   p_pcg_attribute27,
645   p_pcg_attribute28,
646   p_pcg_attribute29,
647   p_pcg_attribute30,
648   p_object_version_number,
649   p_pl_gd_or_svc_id
650   );
651   --
652   -- Having converted the arguments into the
653   -- plsql record structure we call the corresponding record
654   -- business process.
655   --
656   upd(l_rec);
657   p_object_version_number := l_rec.object_version_number;
658   --
659   hr_utility.set_location(' Leaving:'||l_proc, 10);
660 End upd;
661 --
662 end ben_pcg_upd;