1 Package Body ben_drr_upd as
2 /* $Header: bedrrrhi.pkb 120.0 2005/05/28 01:40:22 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_drr_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_drr_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_drr_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_dsgn_rqmt_rlshp_typ Row
68 --
69 update ben_dsgn_rqmt_rlshp_typ
70 set
71 dsgn_rqmt_rlshp_typ_id = p_rec.dsgn_rqmt_rlshp_typ_id,
72 rlshp_typ_cd = p_rec.rlshp_typ_cd,
73 dsgn_rqmt_id = p_rec.dsgn_rqmt_id,
74 business_group_id = p_rec.business_group_id,
75 drr_attribute_category = p_rec.drr_attribute_category,
76 drr_attribute1 = p_rec.drr_attribute1,
77 drr_attribute2 = p_rec.drr_attribute2,
78 drr_attribute3 = p_rec.drr_attribute3,
79 drr_attribute4 = p_rec.drr_attribute4,
80 drr_attribute5 = p_rec.drr_attribute5,
81 drr_attribute6 = p_rec.drr_attribute6,
82 drr_attribute7 = p_rec.drr_attribute7,
83 drr_attribute8 = p_rec.drr_attribute8,
84 drr_attribute9 = p_rec.drr_attribute9,
85 drr_attribute10 = p_rec.drr_attribute10,
86 drr_attribute11 = p_rec.drr_attribute11,
87 drr_attribute12 = p_rec.drr_attribute12,
88 drr_attribute13 = p_rec.drr_attribute13,
89 drr_attribute14 = p_rec.drr_attribute14,
90 drr_attribute15 = p_rec.drr_attribute15,
91 drr_attribute16 = p_rec.drr_attribute16,
92 drr_attribute17 = p_rec.drr_attribute17,
93 drr_attribute18 = p_rec.drr_attribute18,
94 drr_attribute19 = p_rec.drr_attribute19,
95 drr_attribute20 = p_rec.drr_attribute20,
96 drr_attribute21 = p_rec.drr_attribute21,
97 drr_attribute22 = p_rec.drr_attribute22,
98 drr_attribute23 = p_rec.drr_attribute23,
99 drr_attribute24 = p_rec.drr_attribute24,
100 drr_attribute25 = p_rec.drr_attribute25,
101 drr_attribute26 = p_rec.drr_attribute26,
102 drr_attribute27 = p_rec.drr_attribute27,
103 drr_attribute28 = p_rec.drr_attribute28,
104 drr_attribute29 = p_rec.drr_attribute29,
105 drr_attribute30 = p_rec.drr_attribute30,
106 object_version_number = p_rec.object_version_number
107 where dsgn_rqmt_rlshp_typ_id = p_rec.dsgn_rqmt_rlshp_typ_id;
108 --
109 ben_drr_shd.g_api_dml := false; -- Unset the api dml status
110 --
111 hr_utility.set_location(' Leaving:'||l_proc, 10);
112 --
113 Exception
114 When hr_api.check_integrity_violated Then
115 -- A check constraint has been violated
116 ben_drr_shd.g_api_dml := false; -- Unset the api dml status
117 ben_drr_shd.constraint_error
118 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
119 When hr_api.parent_integrity_violated Then
120 -- Parent integrity has been violated
121 ben_drr_shd.g_api_dml := false; -- Unset the api dml status
122 ben_drr_shd.constraint_error
123 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
124 When hr_api.unique_integrity_violated Then
125 -- Unique integrity has been violated
126 ben_drr_shd.g_api_dml := false; -- Unset the api dml status
127 ben_drr_shd.constraint_error
128 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
129 When Others Then
130 ben_drr_shd.g_api_dml := false; -- Unset the api dml status
131 Raise;
132 End update_dml;
133 --
134 -- ----------------------------------------------------------------------------
135 -- |------------------------------< pre_update >------------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 -- This private procedure contains any processing which is required before
141 -- the update dml.
142 --
143 -- Prerequisites:
144 -- This is an internal procedure which is called from the upd procedure.
145 --
146 -- In Parameters:
147 -- A Pl/Sql record structre.
148 --
149 -- Post Success:
150 -- Processing continues.
151 --
152 -- Post Failure:
153 -- If an error has occurred, an error message and exception will be raised
154 -- but not handled.
155 --
156 -- Developer Implementation Notes:
157 -- Any pre-processing required before the update dml is issued should be
158 -- coded within this procedure. It is important to note that any 3rd party
159 -- maintenance should be reviewed before placing in this procedure.
160 --
161 -- Access Status:
162 -- Internal Row Handler Use Only.
163 --
164 -- {End Of Comments}
165 -- ----------------------------------------------------------------------------
166 Procedure pre_update(p_rec in ben_drr_shd.g_rec_type) is
167 --
168 l_proc varchar2(72) := g_package||'pre_update';
169 --
170 Begin
171 hr_utility.set_location('Entering:'||l_proc, 5);
172 --
173 hr_utility.set_location(' Leaving:'||l_proc, 10);
174 End pre_update;
175 --
176 -- ----------------------------------------------------------------------------
177 -- |-----------------------------< post_update >------------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start Of Comments}
180 --
181 -- Description:
182 -- This private procedure contains any processing which is required after the
183 -- update dml.
184 --
185 -- Prerequisites:
186 -- This is an internal procedure which is called from the upd procedure.
187 --
188 -- In Parameters:
189 -- A Pl/Sql record structre.
190 --
191 -- Post Success:
192 -- Processing continues.
193 --
194 -- Post Failure:
195 -- If an error has occurred, an error message and exception will be raised
196 -- but not handled.
197 --
198 -- Developer Implementation Notes:
199 -- Any post-processing required after the update dml is issued should be
200 -- coded within this procedure. It is important to note that any 3rd party
201 -- maintenance should be reviewed before placing in this procedure.
202 --
203 -- Access Status:
204 -- Internal Row Handler Use Only.
205 --
206 -- {End Of Comments}
207 -- ----------------------------------------------------------------------------
208 Procedure post_update(
209 p_effective_date in date,p_rec in ben_drr_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_drr_rku.after_update
222 (
223 p_dsgn_rqmt_rlshp_typ_id =>p_rec.dsgn_rqmt_rlshp_typ_id
224 ,p_rlshp_typ_cd =>p_rec.rlshp_typ_cd
225 ,p_dsgn_rqmt_id =>p_rec.dsgn_rqmt_id
226 ,p_business_group_id =>p_rec.business_group_id
227 ,p_drr_attribute_category =>p_rec.drr_attribute_category
228 ,p_drr_attribute1 =>p_rec.drr_attribute1
229 ,p_drr_attribute2 =>p_rec.drr_attribute2
230 ,p_drr_attribute3 =>p_rec.drr_attribute3
231 ,p_drr_attribute4 =>p_rec.drr_attribute4
232 ,p_drr_attribute5 =>p_rec.drr_attribute5
233 ,p_drr_attribute6 =>p_rec.drr_attribute6
234 ,p_drr_attribute7 =>p_rec.drr_attribute7
235 ,p_drr_attribute8 =>p_rec.drr_attribute8
236 ,p_drr_attribute9 =>p_rec.drr_attribute9
237 ,p_drr_attribute10 =>p_rec.drr_attribute10
238 ,p_drr_attribute11 =>p_rec.drr_attribute11
239 ,p_drr_attribute12 =>p_rec.drr_attribute12
240 ,p_drr_attribute13 =>p_rec.drr_attribute13
241 ,p_drr_attribute14 =>p_rec.drr_attribute14
242 ,p_drr_attribute15 =>p_rec.drr_attribute15
243 ,p_drr_attribute16 =>p_rec.drr_attribute16
244 ,p_drr_attribute17 =>p_rec.drr_attribute17
245 ,p_drr_attribute18 =>p_rec.drr_attribute18
246 ,p_drr_attribute19 =>p_rec.drr_attribute19
247 ,p_drr_attribute20 =>p_rec.drr_attribute20
248 ,p_drr_attribute21 =>p_rec.drr_attribute21
249 ,p_drr_attribute22 =>p_rec.drr_attribute22
250 ,p_drr_attribute23 =>p_rec.drr_attribute23
251 ,p_drr_attribute24 =>p_rec.drr_attribute24
252 ,p_drr_attribute25 =>p_rec.drr_attribute25
253 ,p_drr_attribute26 =>p_rec.drr_attribute26
254 ,p_drr_attribute27 =>p_rec.drr_attribute27
255 ,p_drr_attribute28 =>p_rec.drr_attribute28
256 ,p_drr_attribute29 =>p_rec.drr_attribute29
257 ,p_drr_attribute30 =>p_rec.drr_attribute30
258 ,p_object_version_number =>p_rec.object_version_number
259 ,p_effective_date =>p_effective_date
260 ,p_rlshp_typ_cd_o =>ben_drr_shd.g_old_rec.rlshp_typ_cd
261 ,p_dsgn_rqmt_id_o =>ben_drr_shd.g_old_rec.dsgn_rqmt_id
262 ,p_business_group_id_o =>ben_drr_shd.g_old_rec.business_group_id
263 ,p_drr_attribute_category_o =>ben_drr_shd.g_old_rec.drr_attribute_category
264 ,p_drr_attribute1_o =>ben_drr_shd.g_old_rec.drr_attribute1
265 ,p_drr_attribute2_o =>ben_drr_shd.g_old_rec.drr_attribute2
266 ,p_drr_attribute3_o =>ben_drr_shd.g_old_rec.drr_attribute3
267 ,p_drr_attribute4_o =>ben_drr_shd.g_old_rec.drr_attribute4
268 ,p_drr_attribute5_o =>ben_drr_shd.g_old_rec.drr_attribute5
269 ,p_drr_attribute6_o =>ben_drr_shd.g_old_rec.drr_attribute6
270 ,p_drr_attribute7_o =>ben_drr_shd.g_old_rec.drr_attribute7
271 ,p_drr_attribute8_o =>ben_drr_shd.g_old_rec.drr_attribute8
272 ,p_drr_attribute9_o =>ben_drr_shd.g_old_rec.drr_attribute9
273 ,p_drr_attribute10_o =>ben_drr_shd.g_old_rec.drr_attribute10
274 ,p_drr_attribute11_o =>ben_drr_shd.g_old_rec.drr_attribute11
275 ,p_drr_attribute12_o =>ben_drr_shd.g_old_rec.drr_attribute12
276 ,p_drr_attribute13_o =>ben_drr_shd.g_old_rec.drr_attribute13
277 ,p_drr_attribute14_o =>ben_drr_shd.g_old_rec.drr_attribute14
278 ,p_drr_attribute15_o =>ben_drr_shd.g_old_rec.drr_attribute15
279 ,p_drr_attribute16_o =>ben_drr_shd.g_old_rec.drr_attribute16
280 ,p_drr_attribute17_o =>ben_drr_shd.g_old_rec.drr_attribute17
281 ,p_drr_attribute18_o =>ben_drr_shd.g_old_rec.drr_attribute18
282 ,p_drr_attribute19_o =>ben_drr_shd.g_old_rec.drr_attribute19
283 ,p_drr_attribute20_o =>ben_drr_shd.g_old_rec.drr_attribute20
284 ,p_drr_attribute21_o =>ben_drr_shd.g_old_rec.drr_attribute21
285 ,p_drr_attribute22_o =>ben_drr_shd.g_old_rec.drr_attribute22
286 ,p_drr_attribute23_o =>ben_drr_shd.g_old_rec.drr_attribute23
287 ,p_drr_attribute24_o =>ben_drr_shd.g_old_rec.drr_attribute24
288 ,p_drr_attribute25_o =>ben_drr_shd.g_old_rec.drr_attribute25
289 ,p_drr_attribute26_o =>ben_drr_shd.g_old_rec.drr_attribute26
290 ,p_drr_attribute27_o =>ben_drr_shd.g_old_rec.drr_attribute27
291 ,p_drr_attribute28_o =>ben_drr_shd.g_old_rec.drr_attribute28
292 ,p_drr_attribute29_o =>ben_drr_shd.g_old_rec.drr_attribute29
293 ,p_drr_attribute30_o =>ben_drr_shd.g_old_rec.drr_attribute30
294 ,p_object_version_number_o =>ben_drr_shd.g_old_rec.object_version_number
295 );
296 --
297 exception
298 --
299 when hr_api.cannot_find_prog_unit then
300 --
301 hr_api.cannot_find_prog_unit_error
302 (p_module_name => 'ben_dsgn_rqmt_rlshp_typ'
303 ,p_hook_type => 'AU');
304 --
305 end;
306 --
307 -- End of API User Hook for post_update.
308 --
309 --
310 hr_utility.set_location(' Leaving:'||l_proc, 10);
311 End post_update;
312 --
313 -- ----------------------------------------------------------------------------
314 -- |-----------------------------< convert_defs >-----------------------------|
315 -- ----------------------------------------------------------------------------
316 -- {Start Of Comments}
317 --
318 -- Description:
319 -- The Convert_Defs procedure has one very important function:
320 -- It must return the record structure for the row with all system defaulted
321 -- values converted into its corresponding parameter value for update. When
322 -- we attempt to update a row through the Upd process , certain
323 -- parameters can be defaulted which enables flexibility in the calling of
324 -- the upd process (e.g. only attributes which need to be updated need to be
325 -- specified). For the upd process to determine which attributes
326 -- have NOT been specified we need to check if the parameter has a reserved
327 -- system default value. Therefore, for all parameters which have a
328 -- corresponding reserved system default mechanism specified we need to
329 -- check if a system default is being used. If a system default is being
330 -- used then we convert the defaulted value into its corresponding attribute
331 -- value held in the g_old_rec data structure.
332 --
333 -- Prerequisites:
334 -- This private function can only be called from the upd process.
335 --
336 -- In Parameters:
337 -- A Pl/Sql record structre.
338 --
339 -- Post Success:
340 -- The record structure will be returned with all system defaulted parameter
341 -- values converted into its current row attribute value.
342 --
343 -- Post Failure:
344 -- No direct error handling is required within this function. Any possible
345 -- errors within this procedure will be a PL/SQL value error due to conversion
346 -- of datatypes or data lengths.
347 --
348 -- Developer Implementation Notes:
349 -- None.
350 --
351 -- Access Status:
352 -- Internal Row Handler Use Only.
353 --
354 -- {End Of Comments}
355 -- ----------------------------------------------------------------------------
356 Procedure convert_defs(p_rec in out nocopy ben_drr_shd.g_rec_type) is
357 --
358 l_proc varchar2(72) := g_package||'convert_defs';
359 --
360 Begin
361 --
362 hr_utility.set_location('Entering:'||l_proc, 5);
363 --
364 -- We must now examine each argument value in the
365 -- p_rec plsql record structure
366 -- to see if a system default is being used. If a system default
367 -- is being used then we must set to the 'current' argument value.
368 --
369 If (p_rec.rlshp_typ_cd = hr_api.g_varchar2) then
370 p_rec.rlshp_typ_cd :=
371 ben_drr_shd.g_old_rec.rlshp_typ_cd;
372 End If;
373 If (p_rec.dsgn_rqmt_id = hr_api.g_number) then
374 p_rec.dsgn_rqmt_id :=
375 ben_drr_shd.g_old_rec.dsgn_rqmt_id;
376 End If;
377 If (p_rec.business_group_id = hr_api.g_number) then
378 p_rec.business_group_id :=
379 ben_drr_shd.g_old_rec.business_group_id;
380 End If;
381 If (p_rec.drr_attribute_category = hr_api.g_varchar2) then
382 p_rec.drr_attribute_category :=
383 ben_drr_shd.g_old_rec.drr_attribute_category;
384 End If;
385 If (p_rec.drr_attribute1 = hr_api.g_varchar2) then
386 p_rec.drr_attribute1 :=
387 ben_drr_shd.g_old_rec.drr_attribute1;
388 End If;
389 If (p_rec.drr_attribute2 = hr_api.g_varchar2) then
390 p_rec.drr_attribute2 :=
391 ben_drr_shd.g_old_rec.drr_attribute2;
392 End If;
393 If (p_rec.drr_attribute3 = hr_api.g_varchar2) then
394 p_rec.drr_attribute3 :=
395 ben_drr_shd.g_old_rec.drr_attribute3;
396 End If;
397 If (p_rec.drr_attribute4 = hr_api.g_varchar2) then
398 p_rec.drr_attribute4 :=
399 ben_drr_shd.g_old_rec.drr_attribute4;
400 End If;
401 If (p_rec.drr_attribute5 = hr_api.g_varchar2) then
402 p_rec.drr_attribute5 :=
403 ben_drr_shd.g_old_rec.drr_attribute5;
404 End If;
405 If (p_rec.drr_attribute6 = hr_api.g_varchar2) then
406 p_rec.drr_attribute6 :=
407 ben_drr_shd.g_old_rec.drr_attribute6;
408 End If;
409 If (p_rec.drr_attribute7 = hr_api.g_varchar2) then
410 p_rec.drr_attribute7 :=
411 ben_drr_shd.g_old_rec.drr_attribute7;
412 End If;
413 If (p_rec.drr_attribute8 = hr_api.g_varchar2) then
414 p_rec.drr_attribute8 :=
415 ben_drr_shd.g_old_rec.drr_attribute8;
416 End If;
417 If (p_rec.drr_attribute9 = hr_api.g_varchar2) then
418 p_rec.drr_attribute9 :=
419 ben_drr_shd.g_old_rec.drr_attribute9;
420 End If;
421 If (p_rec.drr_attribute10 = hr_api.g_varchar2) then
422 p_rec.drr_attribute10 :=
423 ben_drr_shd.g_old_rec.drr_attribute10;
424 End If;
425 If (p_rec.drr_attribute11 = hr_api.g_varchar2) then
426 p_rec.drr_attribute11 :=
427 ben_drr_shd.g_old_rec.drr_attribute11;
428 End If;
429 If (p_rec.drr_attribute12 = hr_api.g_varchar2) then
430 p_rec.drr_attribute12 :=
431 ben_drr_shd.g_old_rec.drr_attribute12;
432 End If;
433 If (p_rec.drr_attribute13 = hr_api.g_varchar2) then
434 p_rec.drr_attribute13 :=
435 ben_drr_shd.g_old_rec.drr_attribute13;
436 End If;
437 If (p_rec.drr_attribute14 = hr_api.g_varchar2) then
438 p_rec.drr_attribute14 :=
439 ben_drr_shd.g_old_rec.drr_attribute14;
440 End If;
441 If (p_rec.drr_attribute15 = hr_api.g_varchar2) then
442 p_rec.drr_attribute15 :=
443 ben_drr_shd.g_old_rec.drr_attribute15;
444 End If;
445 If (p_rec.drr_attribute16 = hr_api.g_varchar2) then
446 p_rec.drr_attribute16 :=
447 ben_drr_shd.g_old_rec.drr_attribute16;
448 End If;
449 If (p_rec.drr_attribute17 = hr_api.g_varchar2) then
450 p_rec.drr_attribute17 :=
451 ben_drr_shd.g_old_rec.drr_attribute17;
452 End If;
453 If (p_rec.drr_attribute18 = hr_api.g_varchar2) then
454 p_rec.drr_attribute18 :=
455 ben_drr_shd.g_old_rec.drr_attribute18;
456 End If;
457 If (p_rec.drr_attribute19 = hr_api.g_varchar2) then
458 p_rec.drr_attribute19 :=
459 ben_drr_shd.g_old_rec.drr_attribute19;
460 End If;
461 If (p_rec.drr_attribute20 = hr_api.g_varchar2) then
462 p_rec.drr_attribute20 :=
463 ben_drr_shd.g_old_rec.drr_attribute20;
464 End If;
465 If (p_rec.drr_attribute21 = hr_api.g_varchar2) then
466 p_rec.drr_attribute21 :=
467 ben_drr_shd.g_old_rec.drr_attribute21;
468 End If;
469 If (p_rec.drr_attribute22 = hr_api.g_varchar2) then
470 p_rec.drr_attribute22 :=
471 ben_drr_shd.g_old_rec.drr_attribute22;
472 End If;
473 If (p_rec.drr_attribute23 = hr_api.g_varchar2) then
474 p_rec.drr_attribute23 :=
475 ben_drr_shd.g_old_rec.drr_attribute23;
476 End If;
477 If (p_rec.drr_attribute24 = hr_api.g_varchar2) then
478 p_rec.drr_attribute24 :=
479 ben_drr_shd.g_old_rec.drr_attribute24;
480 End If;
481 If (p_rec.drr_attribute25 = hr_api.g_varchar2) then
482 p_rec.drr_attribute25 :=
483 ben_drr_shd.g_old_rec.drr_attribute25;
484 End If;
485 If (p_rec.drr_attribute26 = hr_api.g_varchar2) then
486 p_rec.drr_attribute26 :=
487 ben_drr_shd.g_old_rec.drr_attribute26;
488 End If;
489 If (p_rec.drr_attribute27 = hr_api.g_varchar2) then
490 p_rec.drr_attribute27 :=
491 ben_drr_shd.g_old_rec.drr_attribute27;
492 End If;
493 If (p_rec.drr_attribute28 = hr_api.g_varchar2) then
494 p_rec.drr_attribute28 :=
495 ben_drr_shd.g_old_rec.drr_attribute28;
496 End If;
497 If (p_rec.drr_attribute29 = hr_api.g_varchar2) then
498 p_rec.drr_attribute29 :=
499 ben_drr_shd.g_old_rec.drr_attribute29;
500 End If;
501 If (p_rec.drr_attribute30 = hr_api.g_varchar2) then
502 p_rec.drr_attribute30 :=
503 ben_drr_shd.g_old_rec.drr_attribute30;
504 End If;
505
506 --
507 hr_utility.set_location(' Leaving:'||l_proc, 10);
508 --
509 End convert_defs;
510 --
511 -- ----------------------------------------------------------------------------
512 -- |---------------------------------< upd >----------------------------------|
513 -- ----------------------------------------------------------------------------
514 Procedure upd
515 (
516 p_effective_date in date,
517 p_rec in out nocopy ben_drr_shd.g_rec_type
518 ) is
519 --
520 l_proc varchar2(72) := g_package||'upd';
521 --
522 Begin
523 hr_utility.set_location('Entering:'||l_proc, 5);
524 --
525 -- We must lock the row which we need to update.
526 --
527 ben_drr_shd.lck
528 (
529 p_rec.dsgn_rqmt_rlshp_typ_id,
530 p_rec.object_version_number
531 );
532 --
533 -- 1. During an update system defaults are used to determine if
534 -- arguments have been defaulted or not. We must therefore
535 -- derive the full record structure values to be updated.
536 --
537 -- 2. Call the supporting update validate operations.
538 --
539 convert_defs(p_rec);
540 ben_drr_bus.update_validate(p_rec
541 ,p_effective_date);
542 --
543 -- Call the supporting pre-update operation
544 --
545 pre_update(p_rec);
546 --
547 -- Update the row.
548 --
549 update_dml(p_rec);
550 --
551 -- Call the supporting post-update operation
552 --
553 post_update(
554 p_effective_date,p_rec);
555 End upd;
556 --
557 -- ----------------------------------------------------------------------------
558 -- |---------------------------------< upd >----------------------------------|
559 -- ----------------------------------------------------------------------------
560 Procedure upd
561 (
562 p_effective_date in date,
563 p_dsgn_rqmt_rlshp_typ_id in number,
564 p_rlshp_typ_cd in varchar2 default hr_api.g_varchar2,
565 p_dsgn_rqmt_id in number default hr_api.g_number,
566 p_business_group_id in number default hr_api.g_number,
567 p_drr_attribute_category in varchar2 default hr_api.g_varchar2,
568 p_drr_attribute1 in varchar2 default hr_api.g_varchar2,
569 p_drr_attribute2 in varchar2 default hr_api.g_varchar2,
570 p_drr_attribute3 in varchar2 default hr_api.g_varchar2,
571 p_drr_attribute4 in varchar2 default hr_api.g_varchar2,
572 p_drr_attribute5 in varchar2 default hr_api.g_varchar2,
573 p_drr_attribute6 in varchar2 default hr_api.g_varchar2,
574 p_drr_attribute7 in varchar2 default hr_api.g_varchar2,
575 p_drr_attribute8 in varchar2 default hr_api.g_varchar2,
576 p_drr_attribute9 in varchar2 default hr_api.g_varchar2,
577 p_drr_attribute10 in varchar2 default hr_api.g_varchar2,
578 p_drr_attribute11 in varchar2 default hr_api.g_varchar2,
579 p_drr_attribute12 in varchar2 default hr_api.g_varchar2,
580 p_drr_attribute13 in varchar2 default hr_api.g_varchar2,
581 p_drr_attribute14 in varchar2 default hr_api.g_varchar2,
582 p_drr_attribute15 in varchar2 default hr_api.g_varchar2,
583 p_drr_attribute16 in varchar2 default hr_api.g_varchar2,
584 p_drr_attribute17 in varchar2 default hr_api.g_varchar2,
585 p_drr_attribute18 in varchar2 default hr_api.g_varchar2,
586 p_drr_attribute19 in varchar2 default hr_api.g_varchar2,
587 p_drr_attribute20 in varchar2 default hr_api.g_varchar2,
588 p_drr_attribute21 in varchar2 default hr_api.g_varchar2,
589 p_drr_attribute22 in varchar2 default hr_api.g_varchar2,
590 p_drr_attribute23 in varchar2 default hr_api.g_varchar2,
591 p_drr_attribute24 in varchar2 default hr_api.g_varchar2,
592 p_drr_attribute25 in varchar2 default hr_api.g_varchar2,
593 p_drr_attribute26 in varchar2 default hr_api.g_varchar2,
594 p_drr_attribute27 in varchar2 default hr_api.g_varchar2,
595 p_drr_attribute28 in varchar2 default hr_api.g_varchar2,
596 p_drr_attribute29 in varchar2 default hr_api.g_varchar2,
597 p_drr_attribute30 in varchar2 default hr_api.g_varchar2,
598 p_object_version_number in out nocopy number
599 ) is
600 --
601 l_rec ben_drr_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_drr_shd.convert_args
612 (
613 p_dsgn_rqmt_rlshp_typ_id,
614 p_rlshp_typ_cd,
615 p_dsgn_rqmt_id,
616 p_business_group_id,
617 p_drr_attribute_category,
618 p_drr_attribute1,
619 p_drr_attribute2,
620 p_drr_attribute3,
621 p_drr_attribute4,
622 p_drr_attribute5,
623 p_drr_attribute6,
624 p_drr_attribute7,
625 p_drr_attribute8,
626 p_drr_attribute9,
627 p_drr_attribute10,
628 p_drr_attribute11,
629 p_drr_attribute12,
630 p_drr_attribute13,
631 p_drr_attribute14,
632 p_drr_attribute15,
633 p_drr_attribute16,
634 p_drr_attribute17,
635 p_drr_attribute18,
636 p_drr_attribute19,
637 p_drr_attribute20,
638 p_drr_attribute21,
639 p_drr_attribute22,
640 p_drr_attribute23,
641 p_drr_attribute24,
642 p_drr_attribute25,
643 p_drr_attribute26,
644 p_drr_attribute27,
645 p_drr_attribute28,
646 p_drr_attribute29,
647 p_drr_attribute30,
648 p_object_version_number
649 );
650 --
651 -- Having converted the arguments into the
652 -- plsql record structure we call the corresponding record
653 -- business process.
654 --
655 upd(
656 p_effective_date,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_drr_upd;