1 Package Body per_bpd_upd as
2 /* $Header: pebpdrhi.pkb 115.6 2002/12/02 13:52:43 apholt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_bpd_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 per_bpd_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 p_rec.object_version_number := p_rec.object_version_number + 1;
63 --
64 --
65 -- Update the per_bf_payment_details Row
66 --
67 update per_bf_payment_details
68 set
69 payment_detail_id = p_rec.payment_detail_id,
70 check_number = p_rec.check_number,
71 payment_date = p_rec.payment_date,
72 amount = p_rec.amount,
73 check_type = p_rec.check_type,
74 object_version_number = p_rec.object_version_number,
75 bpd_attribute_category = p_rec.bpd_attribute_category,
76 bpd_attribute1 = p_rec.bpd_attribute1,
77 bpd_attribute2 = p_rec.bpd_attribute2,
78 bpd_attribute3 = p_rec.bpd_attribute3,
79 bpd_attribute4 = p_rec.bpd_attribute4,
80 bpd_attribute5 = p_rec.bpd_attribute5,
81 bpd_attribute6 = p_rec.bpd_attribute6,
82 bpd_attribute7 = p_rec.bpd_attribute7,
83 bpd_attribute8 = p_rec.bpd_attribute8,
84 bpd_attribute9 = p_rec.bpd_attribute9,
85 bpd_attribute10 = p_rec.bpd_attribute10,
86 bpd_attribute11 = p_rec.bpd_attribute11,
87 bpd_attribute12 = p_rec.bpd_attribute12,
88 bpd_attribute13 = p_rec.bpd_attribute13,
89 bpd_attribute14 = p_rec.bpd_attribute14,
90 bpd_attribute15 = p_rec.bpd_attribute15,
91 bpd_attribute16 = p_rec.bpd_attribute16,
92 bpd_attribute17 = p_rec.bpd_attribute17,
93 bpd_attribute18 = p_rec.bpd_attribute18,
94 bpd_attribute19 = p_rec.bpd_attribute19,
95 bpd_attribute20 = p_rec.bpd_attribute20,
96 bpd_attribute21 = p_rec.bpd_attribute21,
97 bpd_attribute22 = p_rec.bpd_attribute22,
98 bpd_attribute23 = p_rec.bpd_attribute23,
99 bpd_attribute24 = p_rec.bpd_attribute24,
100 bpd_attribute25 = p_rec.bpd_attribute25,
101 bpd_attribute26 = p_rec.bpd_attribute26,
102 bpd_attribute27 = p_rec.bpd_attribute27,
103 bpd_attribute28 = p_rec.bpd_attribute28,
104 bpd_attribute29 = p_rec.bpd_attribute29,
105 bpd_attribute30 = p_rec.bpd_attribute30
106 where payment_detail_id = p_rec.payment_detail_id;
107 --
108 --
109 hr_utility.set_location(' Leaving:'||l_proc, 10);
110 --
111 Exception
112 When hr_api.check_integrity_violated Then
113 -- A check constraint has been violated
114 per_bpd_shd.constraint_error
115 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116 When hr_api.parent_integrity_violated Then
117 -- Parent integrity has been violated
118 per_bpd_shd.constraint_error
119 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
120 When hr_api.unique_integrity_violated Then
121 -- Unique integrity has been violated
122 per_bpd_shd.constraint_error
123 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
124 When Others Then
125 Raise;
126 End update_dml;
127 --
128 -- ----------------------------------------------------------------------------
129 -- |------------------------------< pre_update >------------------------------|
130 -- ----------------------------------------------------------------------------
131 -- {Start Of Comments}
132 --
133 -- Description:
134 -- This private procedure contains any processing which is required before
135 -- the update dml.
136 --
137 -- Prerequisites:
138 -- This is an internal procedure which is called from the upd procedure.
139 --
140 -- In Parameters:
141 -- A Pl/Sql record structure.
142 --
143 -- Post Success:
144 -- Processing continues.
145 --
146 -- Post Failure:
147 -- If an error has occurred, an error message and exception wil be raised
148 -- but not handled.
149 --
150 -- Developer Implementation Notes:
151 -- Any pre-processing required before the update dml is issued should be
152 -- coded within this procedure. It is important to note that any 3rd party
153 -- maintenance should be reviewed before placing in this procedure.
154 --
155 -- Access Status:
156 -- Internal Row Handler Use Only.
157 --
158 -- {End Of Comments}
159 -- ----------------------------------------------------------------------------
160 Procedure pre_update(p_rec in per_bpd_shd.g_rec_type) is
161 --
162 l_proc varchar2(72) := g_package||'pre_update';
163 --
164 Begin
165 hr_utility.set_location('Entering:'||l_proc, 5);
166 --
167 hr_utility.set_location(' Leaving:'||l_proc, 10);
168 End pre_update;
169 --
170 -- ----------------------------------------------------------------------------
171 -- |-----------------------------< post_update >------------------------------|
172 -- ----------------------------------------------------------------------------
173 -- {Start Of Comments}
174 --
175 -- Description:
176 -- This private procedure contains any processing which is required after the
177 -- update dml.
178 --
179 -- Prerequisites:
180 -- This is an internal procedure which is called from the upd procedure.
181 --
182 -- In Parameters:
183 -- A Pl/Sql record structre.
184 --
185 -- Post Success:
186 -- Processing continues.
187 --
188 -- Post Failure:
189 -- If an error has occurred, an error message and exception will be raised
190 -- but not handled.
191 --
192 -- Developer Implementation Notes:
193 -- Any post-processing required after the update dml is issued should be
194 -- coded within this procedure. It is important to note that any 3rd party
195 -- maintenance should be reviewed before placing in this procedure.
196 --
197 -- Access Status:
198 -- Internal Row Handler Use Only.
199 --
200 -- {End Of Comments}
201 -- ----------------------------------------------------------------------------
202 Procedure post_update(p_effective_date in date,
203 p_rec in per_bpd_shd.g_rec_type) is
204 --
205 l_proc varchar2(72) := g_package||'post_update';
206 --
207 Begin
208 hr_utility.set_location('Entering:'||l_proc, 5);
209 begin
210 --
211 per_bpd_rku.after_update
212 (p_effective_date => p_effective_date,
213 p_payment_detail_id => p_rec.payment_detail_id,
214 p_check_number => p_rec.check_number,
215 p_payment_date => p_rec.payment_date,
216 p_amount => p_rec.amount,
217 p_check_type => p_rec.check_type,
218 p_object_version_number => p_rec.object_version_number,
219 p_bpd_attribute_category => p_rec.bpd_attribute_category,
220 p_bpd_attribute1 => p_rec.bpd_attribute1,
221 p_bpd_attribute2 => p_rec.bpd_attribute2,
222 p_bpd_attribute3 => p_rec.bpd_attribute3,
223 p_bpd_attribute4 => p_rec.bpd_attribute4,
224 p_bpd_attribute5 => p_rec.bpd_attribute5,
225 p_bpd_attribute6 => p_rec.bpd_attribute6,
226 p_bpd_attribute7 => p_rec.bpd_attribute7,
227 p_bpd_attribute8 => p_rec.bpd_attribute8,
228 p_bpd_attribute9 => p_rec.bpd_attribute9,
229 p_bpd_attribute10 => p_rec.bpd_attribute10,
230 p_bpd_attribute11 => p_rec.bpd_attribute11,
231 p_bpd_attribute12 => p_rec.bpd_attribute12,
232 p_bpd_attribute13 => p_rec.bpd_attribute13,
233 p_bpd_attribute14 => p_rec.bpd_attribute14,
234 p_bpd_attribute15 => p_rec.bpd_attribute15,
235 p_bpd_attribute16 => p_rec.bpd_attribute16,
236 p_bpd_attribute17 => p_rec.bpd_attribute17,
237 p_bpd_attribute18 => p_rec.bpd_attribute18,
238 p_bpd_attribute19 => p_rec.bpd_attribute19,
239 p_bpd_attribute20 => p_rec.bpd_attribute20,
240 p_bpd_attribute21 => p_rec.bpd_attribute21,
241 p_bpd_attribute22 => p_rec.bpd_attribute22,
242 p_bpd_attribute23 => p_rec.bpd_attribute23,
243 p_bpd_attribute24 => p_rec.bpd_attribute24,
244 p_bpd_attribute25 => p_rec.bpd_attribute25,
245 p_bpd_attribute26 => p_rec.bpd_attribute26,
246 p_bpd_attribute27 => p_rec.bpd_attribute27,
247 p_bpd_attribute28 => p_rec.bpd_attribute28,
248 p_bpd_attribute29 => p_rec.bpd_attribute29,
249 p_bpd_attribute30 => p_rec.bpd_attribute30,
250
251 p_processed_assignment_id_o
252 => per_bpd_shd.g_old_rec.processed_assignment_id,
253 p_personal_payment_method_id_o
254 => per_bpd_shd.g_old_rec.personal_payment_method_id,
255 p_business_group_id_o
256 => per_bpd_shd.g_old_rec.business_group_id,
257 p_check_number_o
258 => per_bpd_shd.g_old_rec.check_number,
259 p_payment_date_o
260 => per_bpd_shd.g_old_rec.payment_date,
261 p_amount_o
262 => per_bpd_shd.g_old_rec.amount,
263 p_check_type_o
264 => per_bpd_shd.g_old_rec.check_type,
265 p_object_version_number_o
266 => per_bpd_shd.g_old_rec.object_version_number,
267 p_bpd_attribute_category_o
268 => per_bpd_shd.g_old_rec.bpd_attribute_category,
269 p_bpd_attribute1_o
270 => per_bpd_shd.g_old_rec.bpd_attribute1,
271 p_bpd_attribute2_o
272 => per_bpd_shd.g_old_rec.bpd_attribute2,
273 p_bpd_attribute3_o
274 => per_bpd_shd.g_old_rec.bpd_attribute3,
275 p_bpd_attribute4_o
276 => per_bpd_shd.g_old_rec.bpd_attribute4,
277 p_bpd_attribute5_o
278 => per_bpd_shd.g_old_rec.bpd_attribute5,
279 p_bpd_attribute6_o
280 => per_bpd_shd.g_old_rec.bpd_attribute6,
281 p_bpd_attribute7_o
282 => per_bpd_shd.g_old_rec.bpd_attribute7,
283 p_bpd_attribute8_o
284 => per_bpd_shd.g_old_rec.bpd_attribute8,
285 p_bpd_attribute9_o
286 => per_bpd_shd.g_old_rec.bpd_attribute9,
287 p_bpd_attribute10_o
288 => per_bpd_shd.g_old_rec.bpd_attribute10,
289 p_bpd_attribute11_o
290 => per_bpd_shd.g_old_rec.bpd_attribute11,
291 p_bpd_attribute12_o
292 => per_bpd_shd.g_old_rec.bpd_attribute12,
293 p_bpd_attribute13_o
294 => per_bpd_shd.g_old_rec.bpd_attribute13,
295 p_bpd_attribute14_o
296 => per_bpd_shd.g_old_rec.bpd_attribute14,
297 p_bpd_attribute15_o
298 => per_bpd_shd.g_old_rec.bpd_attribute15,
299 p_bpd_attribute16_o
300 => per_bpd_shd.g_old_rec.bpd_attribute16,
301 p_bpd_attribute17_o
302 => per_bpd_shd.g_old_rec.bpd_attribute17,
303 p_bpd_attribute18_o
304 => per_bpd_shd.g_old_rec.bpd_attribute18,
305 p_bpd_attribute19_o
306 => per_bpd_shd.g_old_rec.bpd_attribute19,
307 p_bpd_attribute20_o
308 => per_bpd_shd.g_old_rec.bpd_attribute20,
309 p_bpd_attribute21_o
310 => per_bpd_shd.g_old_rec.bpd_attribute21,
311 p_bpd_attribute22_o
312 => per_bpd_shd.g_old_rec.bpd_attribute22,
313 p_bpd_attribute23_o
314 => per_bpd_shd.g_old_rec.bpd_attribute23,
315 p_bpd_attribute24_o
316 => per_bpd_shd.g_old_rec.bpd_attribute24,
317 p_bpd_attribute25_o
318 => per_bpd_shd.g_old_rec.bpd_attribute25,
319 p_bpd_attribute26_o
320 => per_bpd_shd.g_old_rec.bpd_attribute26,
321 p_bpd_attribute27_o
322 => per_bpd_shd.g_old_rec.bpd_attribute27,
323 p_bpd_attribute28_o
324 => per_bpd_shd.g_old_rec.bpd_attribute28,
325 p_bpd_attribute29_o
326 => per_bpd_shd.g_old_rec.bpd_attribute29,
327 p_bpd_attribute30_o
328 => per_bpd_shd.g_old_rec.bpd_attribute30
329 );
330 --
331 exception
332 --
333 when hr_api.cannot_find_prog_unit then
334 --
335 hr_api.cannot_find_prog_unit_error
336 (p_module_name => 'PER_BF_PAYMENT_DETAILS'
337 ,p_hook_type => 'AU');
338 --
339 end;
340 --
341 hr_utility.set_location(' Leaving:'||l_proc, 10);
342 End post_update;
343 --
344 -- ----------------------------------------------------------------------------
345 -- |-----------------------------< convert_defs >-----------------------------|
346 -- ----------------------------------------------------------------------------
347 -- {Start Of Comments}
348 --
349 -- Description:
350 -- The Convert_Defs procedure has one very important function:
351 -- It must return the record structure for the row with all system defaulted
352 -- values converted into its corresponding parameter value for update. When
353 -- we attempt to update a row through the Upd process , certain
354 -- parameters can be defaulted which enables flexibility in the calling of
355 -- the upd process (e.g. only attributes which need to be updated need to be
356 -- specified). For the upd process to determine which attributes
357 -- have NOT been specified we need to check if the parameter has a reserved
358 -- system default value. Therefore, for all parameters which have a
359 -- corresponding reserved system default mechanism specified we need to
360 -- check if a system default is being used. If a system default is being
361 -- used then we convert the defaulted value into its corresponding attribute
362 -- value held in the g_old_rec data structure.
363 --
364 -- Prerequisites:
365 -- This private function can only be called from the upd process.
366 --
367 -- In Parameters:
368 -- A Pl/Sql record structre.
369 --
370 -- Post Success:
371 -- The record structure will be returned with all system defaulted parameter
372 -- values converted into its current row attribute value.
373 --
374 -- Post Failure:
375 -- No direct error handling is required within this function. Any possible
376 -- errors within this procedure will be a PL/SQL value error due to
377 -- conversion of datatypes or data lengths.
378 --
379 -- Developer Implementation Notes:
380 -- None.
381 --
382 -- Access Status:
383 -- Internal Row Handler Use Only.
384 --
385 -- {End Of Comments}
386 -- ----------------------------------------------------------------------------
387 Procedure convert_defs(p_rec in out nocopy per_bpd_shd.g_rec_type) is
388 --
389 l_proc varchar2(72) := g_package||'convert_defs';
390 --
391 Begin
392 --
393 hr_utility.set_location('Entering:'||l_proc, 5);
394 --
395 -- We must now examine each argument value in the
396 -- p_rec plsql record structure
397 -- to see if a system default is being used. If a system default
398 -- is being used then we must set to the 'current' argument value.
399 --
400 If (p_rec.processed_assignment_id = hr_api.g_number) then
401 p_rec.processed_assignment_id :=
402 per_bpd_shd.g_old_rec.processed_assignment_id;
403 End If;
404 If (p_rec.personal_payment_method_id = hr_api.g_number) then
405 p_rec.personal_payment_method_id :=
406 per_bpd_shd.g_old_rec.personal_payment_method_id;
407 End If;
408 If (p_rec.business_group_id = hr_api.g_number) then
409 p_rec.business_group_id :=
410 per_bpd_shd.g_old_rec.business_group_id;
411 End If;
412 If (p_rec.check_number = hr_api.g_number) then
413 p_rec.check_number :=
414 per_bpd_shd.g_old_rec.check_number;
415 End If;
416 If (p_rec.payment_date = hr_api.g_date) then
417 p_rec.payment_date :=
418 per_bpd_shd.g_old_rec.payment_date;
419 End If;
420 If (p_rec.amount = hr_api.g_number) then
421 p_rec.amount :=
422 per_bpd_shd.g_old_rec.amount;
423 End If;
424 If (p_rec.check_type = hr_api.g_varchar2) then
425 p_rec.check_type :=
426 per_bpd_shd.g_old_rec.check_type;
427 End If;
428 If (p_rec.bpd_attribute_category = hr_api.g_varchar2) then
429 p_rec.bpd_attribute_category :=
430 per_bpd_shd.g_old_rec.bpd_attribute_category;
431 End If;
432 If (p_rec.bpd_attribute1 = hr_api.g_varchar2) then
433 p_rec.bpd_attribute1:=
434 per_bpd_shd.g_old_rec.bpd_attribute1;
435 End If;
436 If (p_rec.bpd_attribute2 = hr_api.g_varchar2) then
437 p_rec.bpd_attribute2:=
438 per_bpd_shd.g_old_rec.bpd_attribute2;
439 End If;
440 If (p_rec.bpd_attribute3 = hr_api.g_varchar2) then
441 p_rec.bpd_attribute3:=
442 per_bpd_shd.g_old_rec.bpd_attribute3;
443 End If;
444 If (p_rec.bpd_attribute4 = hr_api.g_varchar2) then
445 p_rec.bpd_attribute4:=
446 per_bpd_shd.g_old_rec.bpd_attribute4;
447 End If;
448 If (p_rec.bpd_attribute5 = hr_api.g_varchar2) then
449 p_rec.bpd_attribute5:=
450 per_bpd_shd.g_old_rec.bpd_attribute5;
451 End If;
452 If (p_rec.bpd_attribute6 = hr_api.g_varchar2) then
453 p_rec.bpd_attribute6:=
454 per_bpd_shd.g_old_rec.bpd_attribute6;
455 End If;
456 If (p_rec.bpd_attribute7 = hr_api.g_varchar2) then
457 p_rec.bpd_attribute7:=
458 per_bpd_shd.g_old_rec.bpd_attribute7;
459 End If;
460 If (p_rec.bpd_attribute8 = hr_api.g_varchar2) then
461 p_rec.bpd_attribute8:=
462 per_bpd_shd.g_old_rec.bpd_attribute8;
463 End If;
464 If (p_rec.bpd_attribute9 = hr_api.g_varchar2) then
465 p_rec.bpd_attribute9:=
466 per_bpd_shd.g_old_rec.bpd_attribute9;
467 End If;
468 If (p_rec.bpd_attribute10 = hr_api.g_varchar2) then
469 p_rec.bpd_attribute10:=
470 per_bpd_shd.g_old_rec.bpd_attribute10;
471 End If;
472 If (p_rec.bpd_attribute11 = hr_api.g_varchar2) then
473 p_rec.bpd_attribute11:=
474 per_bpd_shd.g_old_rec.bpd_attribute11;
475 End If;
476 If (p_rec.bpd_attribute12 = hr_api.g_varchar2) then
477 p_rec.bpd_attribute12:=
478 per_bpd_shd.g_old_rec.bpd_attribute12;
479 End If;
480 If (p_rec.bpd_attribute13 = hr_api.g_varchar2) then
481 p_rec.bpd_attribute13:=
482 per_bpd_shd.g_old_rec.bpd_attribute13;
483 End If;
484 If (p_rec.bpd_attribute14 = hr_api.g_varchar2) then
485 p_rec.bpd_attribute14:=
486 per_bpd_shd.g_old_rec.bpd_attribute14;
487 End If;
488 If (p_rec.bpd_attribute15 = hr_api.g_varchar2) then
489 p_rec.bpd_attribute15:=
490 per_bpd_shd.g_old_rec.bpd_attribute15;
491 End If;
492 If (p_rec.bpd_attribute16 = hr_api.g_varchar2) then
493 p_rec.bpd_attribute16:=
494 per_bpd_shd.g_old_rec.bpd_attribute16;
495 End If;
496 If (p_rec.bpd_attribute17 = hr_api.g_varchar2) then
497 p_rec.bpd_attribute17:=
498 per_bpd_shd.g_old_rec.bpd_attribute17;
499 End If;
500 If (p_rec.bpd_attribute18 = hr_api.g_varchar2) then
501 p_rec.bpd_attribute18:=
502 per_bpd_shd.g_old_rec.bpd_attribute18;
503 End If;
504 If (p_rec.bpd_attribute19 = hr_api.g_varchar2) then
505 p_rec.bpd_attribute19:=
506 per_bpd_shd.g_old_rec.bpd_attribute19;
507 End If;
508 If (p_rec.bpd_attribute20 = hr_api.g_varchar2) then
509 p_rec.bpd_attribute20:=
510 per_bpd_shd.g_old_rec.bpd_attribute20;
511 End If;
512 If (p_rec.bpd_attribute21 = hr_api.g_varchar2) then
513 p_rec.bpd_attribute21:=
514 per_bpd_shd.g_old_rec.bpd_attribute21;
515 End If;
516 If (p_rec.bpd_attribute22 = hr_api.g_varchar2) then
517 p_rec.bpd_attribute22:=
518 per_bpd_shd.g_old_rec.bpd_attribute22;
519 End If;
520 If (p_rec.bpd_attribute23 = hr_api.g_varchar2) then
521 p_rec.bpd_attribute23:=
522 per_bpd_shd.g_old_rec.bpd_attribute23;
523 End If;
524 If (p_rec.bpd_attribute24 = hr_api.g_varchar2) then
525 p_rec.bpd_attribute24:=
526 per_bpd_shd.g_old_rec.bpd_attribute24;
527 End If;
528 If (p_rec.bpd_attribute25 = hr_api.g_varchar2) then
529 p_rec.bpd_attribute25:=
530 per_bpd_shd.g_old_rec.bpd_attribute25;
531 End If;
532 If (p_rec.bpd_attribute26 = hr_api.g_varchar2) then
533 p_rec.bpd_attribute26:=
534 per_bpd_shd.g_old_rec.bpd_attribute26;
535 End If;
536 If (p_rec.bpd_attribute27 = hr_api.g_varchar2) then
537 p_rec.bpd_attribute27:=
538 per_bpd_shd.g_old_rec.bpd_attribute27;
539 End If;
540 If (p_rec.bpd_attribute28 = hr_api.g_varchar2) then
541 p_rec.bpd_attribute28:=
542 per_bpd_shd.g_old_rec.bpd_attribute28;
543 End If;
544 If (p_rec.bpd_attribute29 = hr_api.g_varchar2) then
545 p_rec.bpd_attribute29:=
546 per_bpd_shd.g_old_rec.bpd_attribute29;
547 End If;
548 If (p_rec.bpd_attribute30 = hr_api.g_varchar2) then
549 p_rec.bpd_attribute30:=
550 per_bpd_shd.g_old_rec.bpd_attribute30;
551 End If;
552
553 --
554 hr_utility.set_location(' Leaving:'||l_proc, 10);
555 --
556 End convert_defs;
557 --
558 -- ----------------------------------------------------------------------------
559 -- |---------------------------------< upd >----------------------------------|
560 -- ----------------------------------------------------------------------------
561 Procedure upd
562 (
563 p_effective_date in date,
564 p_rec in out nocopy per_bpd_shd.g_rec_type
565 ) is
566 --
567 l_proc varchar2(72) := g_package||'upd';
568 --
569 Begin
570 hr_utility.set_location('Entering:'||l_proc, 5);
571 --
572 -- We must lock the row which we need to update.
573 --
574 per_bpd_shd.lck
575 (
576 p_rec.payment_detail_id,
577 p_rec.object_version_number
578 );
579 --
580 -- 1. During an update system defaults are used to determine if
581 -- arguments have been defaulted or not. We must therefore
582 -- derive the full record structure values to be updated.
583 --
584 -- 2. Call the supporting update validate operations.
585 --
586 convert_defs(p_rec);
587 per_bpd_bus.update_validate(p_effective_date,
588 p_rec
589 );
590 --
591 -- Call the supporting pre-update operation
592 --
593 pre_update(p_rec);
594 --
595 -- Update the row.
596 --
597 update_dml(p_rec);
598 --
599 -- Call the supporting post-update operation
600 --
601 post_update(p_effective_date,
602 p_rec);
603 End upd;
604 --
605 -- ----------------------------------------------------------------------------
606 -- |---------------------------------< upd >----------------------------------|
607 -- ----------------------------------------------------------------------------
608 Procedure upd
609 (
610 p_effective_date in date,
611 p_payment_detail_id in number,
612 p_check_number in number default hr_api.g_number,
613 p_payment_date in date default hr_api.g_date,
614 p_amount in number default hr_api.g_number,
615 p_check_type in varchar2 default hr_api.g_varchar2,
616 p_object_version_number in out nocopy number,
617 p_bpd_attribute_category in varchar2 default hr_api.g_varchar2,
618 p_bpd_attribute1 in varchar2 default hr_api.g_varchar2,
619 p_bpd_attribute2 in varchar2 default hr_api.g_varchar2,
620 p_bpd_attribute3 in varchar2 default hr_api.g_varchar2,
621 p_bpd_attribute4 in varchar2 default hr_api.g_varchar2,
622 p_bpd_attribute5 in varchar2 default hr_api.g_varchar2,
623 p_bpd_attribute6 in varchar2 default hr_api.g_varchar2,
624 p_bpd_attribute7 in varchar2 default hr_api.g_varchar2,
625 p_bpd_attribute8 in varchar2 default hr_api.g_varchar2,
626 p_bpd_attribute9 in varchar2 default hr_api.g_varchar2,
627 p_bpd_attribute10 in varchar2 default hr_api.g_varchar2,
628 p_bpd_attribute11 in varchar2 default hr_api.g_varchar2,
629 p_bpd_attribute12 in varchar2 default hr_api.g_varchar2,
630 p_bpd_attribute13 in varchar2 default hr_api.g_varchar2,
631 p_bpd_attribute14 in varchar2 default hr_api.g_varchar2,
632 p_bpd_attribute15 in varchar2 default hr_api.g_varchar2,
633 p_bpd_attribute16 in varchar2 default hr_api.g_varchar2,
634 p_bpd_attribute17 in varchar2 default hr_api.g_varchar2,
635 p_bpd_attribute18 in varchar2 default hr_api.g_varchar2,
636 p_bpd_attribute19 in varchar2 default hr_api.g_varchar2,
637 p_bpd_attribute20 in varchar2 default hr_api.g_varchar2,
638 p_bpd_attribute21 in varchar2 default hr_api.g_varchar2,
639 p_bpd_attribute22 in varchar2 default hr_api.g_varchar2,
640 p_bpd_attribute23 in varchar2 default hr_api.g_varchar2,
641 p_bpd_attribute24 in varchar2 default hr_api.g_varchar2,
642 p_bpd_attribute25 in varchar2 default hr_api.g_varchar2,
643 p_bpd_attribute26 in varchar2 default hr_api.g_varchar2,
644 p_bpd_attribute27 in varchar2 default hr_api.g_varchar2,
645 p_bpd_attribute28 in varchar2 default hr_api.g_varchar2,
646 p_bpd_attribute29 in varchar2 default hr_api.g_varchar2,
647 p_bpd_attribute30 in varchar2 default hr_api.g_varchar2
648 ) is
649 --
650 l_rec per_bpd_shd.g_rec_type;
651 l_proc varchar2(72) := g_package||'upd';
652 --
653 Begin
654 hr_utility.set_location('Entering:'||l_proc, 5);
655 --
656 -- Call conversion function to turn arguments into the
657 -- l_rec structure.
658 --
659 l_rec :=
660 per_bpd_shd.convert_args
661 (
662 p_payment_detail_id,
663 hr_api.g_number,
664 hr_api.g_number,
665 hr_api.g_number,
666 p_check_number,
667 p_payment_date,
668 p_amount,
669 p_check_type,
670 p_object_version_number,
671 p_bpd_attribute_category,
672 p_bpd_attribute1,
673 p_bpd_attribute2,
674 p_bpd_attribute3,
675 p_bpd_attribute4,
676 p_bpd_attribute5,
677 p_bpd_attribute6,
678 p_bpd_attribute7,
679 p_bpd_attribute8,
680 p_bpd_attribute9,
681 p_bpd_attribute10,
682 p_bpd_attribute11,
683 p_bpd_attribute12,
684 p_bpd_attribute13,
685 p_bpd_attribute14,
686 p_bpd_attribute15,
687 p_bpd_attribute16,
688 p_bpd_attribute17,
689 p_bpd_attribute18,
690 p_bpd_attribute19,
691 p_bpd_attribute20,
692 p_bpd_attribute21,
693 p_bpd_attribute22,
694 p_bpd_attribute23,
695 p_bpd_attribute24,
696 p_bpd_attribute25,
697 p_bpd_attribute26,
698 p_bpd_attribute27,
699 p_bpd_attribute28,
700 p_bpd_attribute29,
701 p_bpd_attribute30
702
703 );
704 --
705 -- Having converted the arguments into the
706 -- plsql record structure we call the corresponding record
707 -- business process.
708 --
709 upd(p_effective_date,
710 l_rec
711 );
712 p_object_version_number := l_rec.object_version_number;
713 --
714 hr_utility.set_location(' Leaving:'||l_proc, 10);
715 End upd;
716 --
717 end per_bpd_upd;