[Home] [Help]
PACKAGE BODY: APPS.PQH_CRD_UPD
Source
1 Package Body pqh_crd_upd as
2 /* $Header: pqcrdrhi.pkb 120.0 2005/05/29 01:45 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_crd_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55 (p_rec in out nocopy pqh_crd_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc, 5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 --
67 --
68 -- Update the pqh_criteria_rate_defn Row
69 --
70 update pqh_criteria_rate_defn
71 set
72 criteria_rate_defn_id = p_rec.criteria_rate_defn_id
73 ,short_name = p_rec.short_name
74 ,uom = p_rec.uom
75 ,currency_code = p_rec.currency_code
76 ,reference_period_cd = p_rec.reference_period_cd
77 ,define_max_rate_flag = p_rec.define_max_rate_flag
78 ,define_min_rate_flag = p_rec.define_min_rate_flag
79 ,define_mid_rate_flag = p_rec.define_mid_rate_flag
80 ,define_std_rate_flag = p_rec.define_std_rate_flag
81 ,rate_calc_cd = p_rec.rate_calc_cd
82 ,rate_calc_rule = p_rec.rate_calc_rule
83 ,preferential_rate_cd = p_rec.preferential_rate_cd
84 ,preferential_rate_rule = p_rec.preferential_rate_rule
85 ,rounding_cd = p_rec.rounding_cd
86 ,rounding_rule = p_rec.rounding_rule
87 ,business_group_id = p_rec.business_group_id
88 ,legislation_code = p_rec.legislation_code
89 ,attribute_category = p_rec.attribute_category
90 ,attribute1 = p_rec.attribute1
91 ,attribute2 = p_rec.attribute2
92 ,attribute3 = p_rec.attribute3
93 ,attribute4 = p_rec.attribute4
94 ,attribute5 = p_rec.attribute5
95 ,attribute6 = p_rec.attribute6
96 ,attribute7 = p_rec.attribute7
97 ,attribute8 = p_rec.attribute8
98 ,attribute9 = p_rec.attribute9
99 ,attribute10 = p_rec.attribute10
100 ,attribute11 = p_rec.attribute11
101 ,attribute12 = p_rec.attribute12
102 ,attribute13 = p_rec.attribute13
103 ,attribute14 = p_rec.attribute14
104 ,attribute15 = p_rec.attribute15
105 ,attribute16 = p_rec.attribute16
106 ,attribute17 = p_rec.attribute17
107 ,attribute18 = p_rec.attribute18
108 ,attribute19 = p_rec.attribute19
109 ,attribute20 = p_rec.attribute20
110 ,attribute21 = p_rec.attribute21
111 ,attribute22 = p_rec.attribute22
112 ,attribute23 = p_rec.attribute23
113 ,attribute24 = p_rec.attribute24
114 ,attribute25 = p_rec.attribute25
115 ,attribute26 = p_rec.attribute26
116 ,attribute27 = p_rec.attribute27
117 ,attribute28 = p_rec.attribute28
118 ,attribute29 = p_rec.attribute29
119 ,attribute30 = p_rec.attribute30
120 ,object_version_number = p_rec.object_version_number
121 where criteria_rate_defn_id = p_rec.criteria_rate_defn_id;
122 --
123 --
124 --
125 hr_utility.set_location(' Leaving:'||l_proc, 10);
126 --
127 Exception
128 When hr_api.check_integrity_violated Then
129 -- A check constraint has been violated
130 --
131 pqh_crd_shd.constraint_error
132 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133 When hr_api.parent_integrity_violated Then
134 -- Parent integrity has been violated
135 --
136 pqh_crd_shd.constraint_error
137 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138 When hr_api.unique_integrity_violated Then
139 -- Unique integrity has been violated
140 --
141 pqh_crd_shd.constraint_error
142 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
143 When Others Then
144 --
145 Raise;
146 End update_dml;
147 --
148 -- ----------------------------------------------------------------------------
149 -- |------------------------------< pre_update >------------------------------|
150 -- ----------------------------------------------------------------------------
151 -- {Start Of Comments}
152 --
153 -- Description:
154 -- This private procedure contains any processing which is required before
155 -- the update dml.
156 --
157 -- Prerequisites:
158 -- This is an internal procedure which is called from the upd procedure.
159 --
160 -- In Parameters:
161 -- A Pl/Sql record structure.
162 --
163 -- Post Success:
164 -- Processing continues.
165 --
166 -- Post Failure:
167 -- If an error has occurred, an error message and exception wil be raised
168 -- but not handled.
169 --
170 -- Developer Implementation Notes:
171 -- Any pre-processing required before the update dml is issued should be
172 -- coded within this procedure. It is important to note that any 3rd party
173 -- maintenance should be reviewed before placing in this procedure.
174 --
175 -- Access Status:
176 -- Internal Row Handler Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Procedure pre_update
181 (p_rec in pqh_crd_shd.g_rec_type
182 ) is
183 --
184 l_proc varchar2(72) := g_package||'pre_update';
185 --
186 Begin
187 hr_utility.set_location('Entering:'||l_proc, 5);
188 --
189 hr_utility.set_location(' Leaving:'||l_proc, 10);
190 End pre_update;
191 --
192 -- ----------------------------------------------------------------------------
193 -- |-----------------------------< post_update >------------------------------|
194 -- ----------------------------------------------------------------------------
195 -- {Start Of Comments}
196 --
197 -- Description:
198 -- This private procedure contains any processing which is required after
199 -- the update dml.
200 --
201 -- Prerequisites:
202 -- This is an internal procedure which is called from the upd procedure.
203 --
204 -- In Parameters:
205 -- A Pl/Sql record structure.
206 --
207 -- Post Success:
208 -- Processing continues.
209 --
210 -- Post Failure:
211 -- If an error has occurred, an error message and exception will be raised
212 -- but not handled.
213 --
214 -- Developer Implementation Notes:
215 -- Any post-processing required after the update dml is issued should be
216 -- coded within this procedure. It is important to note that any 3rd party
217 -- maintenance should be reviewed before placing in this procedure.
218 --
219 -- Access Status:
220 -- Internal Row Handler Use Only.
221 --
222 -- {End Of Comments}
223 -- ----------------------------------------------------------------------------
224 Procedure post_update
225 (p_effective_date in date
226 ,p_rec in pqh_crd_shd.g_rec_type
227 ) is
228 --
229 l_proc varchar2(72) := g_package||'post_update';
230 --
231 Begin
232 hr_utility.set_location('Entering:'||l_proc, 5);
233 begin
234 --
235 pqh_crd_rku.after_update
236 (p_effective_date => p_effective_date
237 ,p_criteria_rate_defn_id
238 => p_rec.criteria_rate_defn_id
239 ,p_short_name
240 => p_rec.short_name
241 ,p_uom
242 => p_rec.uom
243 ,p_currency_code
244 => p_rec.currency_code
245 ,p_reference_period_cd
246 => p_rec.reference_period_cd
247 ,p_define_max_rate_flag
248 => p_rec.define_max_rate_flag
249 ,p_define_min_rate_flag
250 => p_rec.define_min_rate_flag
251 ,p_define_mid_rate_flag
252 => p_rec.define_mid_rate_flag
253 ,p_define_std_rate_flag
254 => p_rec.define_std_rate_flag
255 ,p_rate_calc_cd
256 => p_rec.rate_calc_cd
257 ,p_rate_calc_rule
258 => p_rec.rate_calc_rule
259 ,p_preferential_rate_cd
260 => p_rec.preferential_rate_cd
261 ,p_preferential_rate_rule
262 => p_rec.preferential_rate_rule
263 ,p_rounding_cd
264 => p_rec.rounding_cd
265 ,p_rounding_rule
266 => p_rec.rounding_rule
267 ,p_business_group_id
268 => p_rec.business_group_id
269 ,p_legislation_code
270 => p_rec.legislation_code
271 ,p_attribute_category
272 => p_rec.attribute_category
273 ,p_attribute1
274 => p_rec.attribute1
275 ,p_attribute2
276 => p_rec.attribute2
277 ,p_attribute3
278 => p_rec.attribute3
279 ,p_attribute4
280 => p_rec.attribute4
281 ,p_attribute5
282 => p_rec.attribute5
283 ,p_attribute6
284 => p_rec.attribute6
285 ,p_attribute7
286 => p_rec.attribute7
287 ,p_attribute8
288 => p_rec.attribute8
289 ,p_attribute9
290 => p_rec.attribute9
291 ,p_attribute10
292 => p_rec.attribute10
293 ,p_attribute11
294 => p_rec.attribute11
295 ,p_attribute12
296 => p_rec.attribute12
297 ,p_attribute13
298 => p_rec.attribute13
299 ,p_attribute14
300 => p_rec.attribute14
301 ,p_attribute15
302 => p_rec.attribute15
303 ,p_attribute16
304 => p_rec.attribute16
305 ,p_attribute17
306 => p_rec.attribute17
307 ,p_attribute18
308 => p_rec.attribute18
309 ,p_attribute19
310 => p_rec.attribute19
311 ,p_attribute20
312 => p_rec.attribute20
313 ,p_attribute21
314 => p_rec.attribute21
315 ,p_attribute22
316 => p_rec.attribute22
317 ,p_attribute23
318 => p_rec.attribute23
319 ,p_attribute24
320 => p_rec.attribute24
321 ,p_attribute25
322 => p_rec.attribute25
323 ,p_attribute26
324 => p_rec.attribute26
325 ,p_attribute27
326 => p_rec.attribute27
327 ,p_attribute28
328 => p_rec.attribute28
329 ,p_attribute29
330 => p_rec.attribute29
331 ,p_attribute30
332 => p_rec.attribute30
333 ,p_object_version_number
334 => p_rec.object_version_number
335 ,p_short_name_o
336 => pqh_crd_shd.g_old_rec.short_name
337 ,p_uom_o
338 => pqh_crd_shd.g_old_rec.uom
339 ,p_currency_code_o
340 => pqh_crd_shd.g_old_rec.currency_code
341 ,p_reference_period_cd_o
342 => pqh_crd_shd.g_old_rec.reference_period_cd
343 ,p_define_max_rate_flag_o
344 => pqh_crd_shd.g_old_rec.define_max_rate_flag
345 ,p_define_min_rate_flag_o
346 => pqh_crd_shd.g_old_rec.define_min_rate_flag
347 ,p_define_mid_rate_flag_o
348 => pqh_crd_shd.g_old_rec.define_mid_rate_flag
349 ,p_define_std_rate_flag_o
350 => pqh_crd_shd.g_old_rec.define_std_rate_flag
351 ,p_rate_calc_cd_o
352 => pqh_crd_shd.g_old_rec.rate_calc_cd
353 ,p_rate_calc_rule_o
354 => pqh_crd_shd.g_old_rec.rate_calc_rule
355 ,p_preferential_rate_cd_o
356 => pqh_crd_shd.g_old_rec.preferential_rate_cd
357 ,p_preferential_rate_rule_o
358 => pqh_crd_shd.g_old_rec.preferential_rate_rule
359 ,p_rounding_cd_o
360 => pqh_crd_shd.g_old_rec.rounding_cd
361 ,p_rounding_rule_o
362 => pqh_crd_shd.g_old_rec.rounding_rule
363 ,p_business_group_id_o
364 => pqh_crd_shd.g_old_rec.business_group_id
365 ,p_legislation_code_o
366 => pqh_crd_shd.g_old_rec.legislation_code
367 ,p_attribute_category_o
368 => pqh_crd_shd.g_old_rec.attribute_category
369 ,p_attribute1_o
370 => pqh_crd_shd.g_old_rec.attribute1
371 ,p_attribute2_o
372 => pqh_crd_shd.g_old_rec.attribute2
373 ,p_attribute3_o
374 => pqh_crd_shd.g_old_rec.attribute3
375 ,p_attribute4_o
376 => pqh_crd_shd.g_old_rec.attribute4
377 ,p_attribute5_o
378 => pqh_crd_shd.g_old_rec.attribute5
379 ,p_attribute6_o
380 => pqh_crd_shd.g_old_rec.attribute6
381 ,p_attribute7_o
382 => pqh_crd_shd.g_old_rec.attribute7
383 ,p_attribute8_o
384 => pqh_crd_shd.g_old_rec.attribute8
385 ,p_attribute9_o
386 => pqh_crd_shd.g_old_rec.attribute9
387 ,p_attribute10_o
388 => pqh_crd_shd.g_old_rec.attribute10
389 ,p_attribute11_o
390 => pqh_crd_shd.g_old_rec.attribute11
391 ,p_attribute12_o
392 => pqh_crd_shd.g_old_rec.attribute12
393 ,p_attribute13_o
394 => pqh_crd_shd.g_old_rec.attribute13
395 ,p_attribute14_o
396 => pqh_crd_shd.g_old_rec.attribute14
397 ,p_attribute15_o
398 => pqh_crd_shd.g_old_rec.attribute15
399 ,p_attribute16_o
400 => pqh_crd_shd.g_old_rec.attribute16
401 ,p_attribute17_o
402 => pqh_crd_shd.g_old_rec.attribute17
403 ,p_attribute18_o
404 => pqh_crd_shd.g_old_rec.attribute18
405 ,p_attribute19_o
406 => pqh_crd_shd.g_old_rec.attribute19
407 ,p_attribute20_o
408 => pqh_crd_shd.g_old_rec.attribute20
409 ,p_attribute21_o
410 => pqh_crd_shd.g_old_rec.attribute21
411 ,p_attribute22_o
412 => pqh_crd_shd.g_old_rec.attribute22
413 ,p_attribute23_o
414 => pqh_crd_shd.g_old_rec.attribute23
415 ,p_attribute24_o
416 => pqh_crd_shd.g_old_rec.attribute24
417 ,p_attribute25_o
418 => pqh_crd_shd.g_old_rec.attribute25
419 ,p_attribute26_o
420 => pqh_crd_shd.g_old_rec.attribute26
421 ,p_attribute27_o
422 => pqh_crd_shd.g_old_rec.attribute27
423 ,p_attribute28_o
424 => pqh_crd_shd.g_old_rec.attribute28
425 ,p_attribute29_o
426 => pqh_crd_shd.g_old_rec.attribute29
427 ,p_attribute30_o
428 => pqh_crd_shd.g_old_rec.attribute30
429 ,p_object_version_number_o
430 => pqh_crd_shd.g_old_rec.object_version_number
431 );
432 --
433 exception
434 --
435 when hr_api.cannot_find_prog_unit then
436 --
437 hr_api.cannot_find_prog_unit_error
438 (p_module_name => 'PQH_CRITERIA_RATE_DEFN'
439 ,p_hook_type => 'AU');
440 --
441 end;
442 --
443 hr_utility.set_location(' Leaving:'||l_proc, 10);
444 End post_update;
445 --
446 -- ----------------------------------------------------------------------------
447 -- |-----------------------------< convert_defs >-----------------------------|
448 -- ----------------------------------------------------------------------------
449 -- {Start Of Comments}
450 --
451 -- Description:
452 -- The Convert_Defs procedure has one very important function:
453 -- It must return the record structure for the row with all system defaulted
454 -- values converted into its corresponding parameter value for update. When
455 -- we attempt to update a row through the Upd process , certain
456 -- parameters can be defaulted which enables flexibility in the calling of
457 -- the upd process (e.g. only attributes which need to be updated need to be
458 -- specified). For the upd process to determine which attributes
459 -- have NOT been specified we need to check if the parameter has a reserved
460 -- system default value. Therefore, for all parameters which have a
461 -- corresponding reserved system default mechanism specified we need to
462 -- check if a system default is being used. If a system default is being
463 -- used then we convert the defaulted value into its corresponding attribute
464 -- value held in the g_old_rec data structure.
465 --
466 -- Prerequisites:
467 -- This private function can only be called from the upd process.
468 --
469 -- In Parameters:
470 -- A Pl/Sql record structure.
471 --
472 -- Post Success:
473 -- The record structure will be returned with all system defaulted parameter
474 -- values converted into its current row attribute value.
475 --
476 -- Post Failure:
477 -- No direct error handling is required within this function. Any possible
478 -- errors within this procedure will be a PL/SQL value error due to
479 -- conversion of datatypes or data lengths.
480 --
481 -- Developer Implementation Notes:
482 -- None.
483 --
484 -- Access Status:
485 -- Internal Row Handler Use Only.
486 --
487 -- {End Of Comments}
488 -- ----------------------------------------------------------------------------
489 Procedure convert_defs
490 (p_rec in out nocopy pqh_crd_shd.g_rec_type
491 ) is
492 --
493 Begin
494 --
495 -- We must now examine each argument value in the
496 -- p_rec plsql record structure
497 -- to see if a system default is being used. If a system default
498 -- is being used then we must set to the 'current' argument value.
499 --
500 If (p_rec.short_name = hr_api.g_varchar2) then
501 p_rec.short_name :=
502 pqh_crd_shd.g_old_rec.short_name;
503 End If;
504 If (p_rec.uom = hr_api.g_varchar2) then
505 p_rec.uom :=
506 pqh_crd_shd.g_old_rec.uom;
507 End If;
508 If (p_rec.currency_code = hr_api.g_varchar2) then
509 p_rec.currency_code :=
510 pqh_crd_shd.g_old_rec.currency_code;
511 End If;
512 If (p_rec.reference_period_cd = hr_api.g_varchar2) then
513 p_rec.reference_period_cd :=
514 pqh_crd_shd.g_old_rec.reference_period_cd;
515 End If;
516 If (p_rec.define_max_rate_flag = hr_api.g_varchar2) then
517 p_rec.define_max_rate_flag :=
518 pqh_crd_shd.g_old_rec.define_max_rate_flag;
519 End If;
520 If (p_rec.define_min_rate_flag = hr_api.g_varchar2) then
521 p_rec.define_min_rate_flag :=
522 pqh_crd_shd.g_old_rec.define_min_rate_flag;
523 End If;
524 If (p_rec.define_mid_rate_flag = hr_api.g_varchar2) then
525 p_rec.define_mid_rate_flag :=
526 pqh_crd_shd.g_old_rec.define_mid_rate_flag;
527 End If;
528 If (p_rec.define_std_rate_flag = hr_api.g_varchar2) then
529 p_rec.define_std_rate_flag :=
530 pqh_crd_shd.g_old_rec.define_std_rate_flag;
531 End If;
532 If (p_rec.rate_calc_cd = hr_api.g_varchar2) then
533 p_rec.rate_calc_cd :=
534 pqh_crd_shd.g_old_rec.rate_calc_cd;
535 End If;
536 If (p_rec.rate_calc_rule = hr_api.g_number) then
537 p_rec.rate_calc_rule :=
538 pqh_crd_shd.g_old_rec.rate_calc_rule;
539 End If;
540 If (p_rec.preferential_rate_cd = hr_api.g_varchar2) then
541 p_rec.preferential_rate_cd :=
542 pqh_crd_shd.g_old_rec.preferential_rate_cd;
543 End If;
544 If (p_rec.preferential_rate_rule = hr_api.g_number) then
545 p_rec.preferential_rate_rule :=
546 pqh_crd_shd.g_old_rec.preferential_rate_rule;
547 End If;
548 If (p_rec.rounding_cd = hr_api.g_varchar2) then
549 p_rec.rounding_cd :=
550 pqh_crd_shd.g_old_rec.rounding_cd;
551 End If;
552 If (p_rec.rounding_rule = hr_api.g_number) then
553 p_rec.rounding_rule :=
554 pqh_crd_shd.g_old_rec.rounding_rule;
555 End If;
556 If (p_rec.business_group_id = hr_api.g_number) then
557 p_rec.business_group_id :=
558 pqh_crd_shd.g_old_rec.business_group_id;
559 End If;
560 If (p_rec.legislation_code = hr_api.g_varchar2) then
561 p_rec.legislation_code :=
562 pqh_crd_shd.g_old_rec.legislation_code;
563 End If;
564 If (p_rec.attribute_category = hr_api.g_varchar2) then
565 p_rec.attribute_category :=
566 pqh_crd_shd.g_old_rec.attribute_category;
567 End If;
568 If (p_rec.attribute1 = hr_api.g_varchar2) then
569 p_rec.attribute1 :=
570 pqh_crd_shd.g_old_rec.attribute1;
571 End If;
572 If (p_rec.attribute2 = hr_api.g_varchar2) then
573 p_rec.attribute2 :=
574 pqh_crd_shd.g_old_rec.attribute2;
575 End If;
576 If (p_rec.attribute3 = hr_api.g_varchar2) then
577 p_rec.attribute3 :=
578 pqh_crd_shd.g_old_rec.attribute3;
579 End If;
580 If (p_rec.attribute4 = hr_api.g_varchar2) then
581 p_rec.attribute4 :=
582 pqh_crd_shd.g_old_rec.attribute4;
583 End If;
584 If (p_rec.attribute5 = hr_api.g_varchar2) then
585 p_rec.attribute5 :=
586 pqh_crd_shd.g_old_rec.attribute5;
587 End If;
588 If (p_rec.attribute6 = hr_api.g_varchar2) then
589 p_rec.attribute6 :=
590 pqh_crd_shd.g_old_rec.attribute6;
591 End If;
592 If (p_rec.attribute7 = hr_api.g_varchar2) then
593 p_rec.attribute7 :=
594 pqh_crd_shd.g_old_rec.attribute7;
595 End If;
596 If (p_rec.attribute8 = hr_api.g_varchar2) then
597 p_rec.attribute8 :=
598 pqh_crd_shd.g_old_rec.attribute8;
599 End If;
600 If (p_rec.attribute9 = hr_api.g_varchar2) then
601 p_rec.attribute9 :=
602 pqh_crd_shd.g_old_rec.attribute9;
603 End If;
604 If (p_rec.attribute10 = hr_api.g_varchar2) then
605 p_rec.attribute10 :=
606 pqh_crd_shd.g_old_rec.attribute10;
607 End If;
608 If (p_rec.attribute11 = hr_api.g_varchar2) then
609 p_rec.attribute11 :=
610 pqh_crd_shd.g_old_rec.attribute11;
611 End If;
612 If (p_rec.attribute12 = hr_api.g_varchar2) then
613 p_rec.attribute12 :=
614 pqh_crd_shd.g_old_rec.attribute12;
615 End If;
616 If (p_rec.attribute13 = hr_api.g_varchar2) then
617 p_rec.attribute13 :=
618 pqh_crd_shd.g_old_rec.attribute13;
619 End If;
620 If (p_rec.attribute14 = hr_api.g_varchar2) then
621 p_rec.attribute14 :=
622 pqh_crd_shd.g_old_rec.attribute14;
623 End If;
624 If (p_rec.attribute15 = hr_api.g_varchar2) then
625 p_rec.attribute15 :=
626 pqh_crd_shd.g_old_rec.attribute15;
627 End If;
628 If (p_rec.attribute16 = hr_api.g_varchar2) then
629 p_rec.attribute16 :=
630 pqh_crd_shd.g_old_rec.attribute16;
631 End If;
632 If (p_rec.attribute17 = hr_api.g_varchar2) then
633 p_rec.attribute17 :=
634 pqh_crd_shd.g_old_rec.attribute17;
635 End If;
636 If (p_rec.attribute18 = hr_api.g_varchar2) then
637 p_rec.attribute18 :=
638 pqh_crd_shd.g_old_rec.attribute18;
639 End If;
640 If (p_rec.attribute19 = hr_api.g_varchar2) then
641 p_rec.attribute19 :=
642 pqh_crd_shd.g_old_rec.attribute19;
643 End If;
644 If (p_rec.attribute20 = hr_api.g_varchar2) then
645 p_rec.attribute20 :=
646 pqh_crd_shd.g_old_rec.attribute20;
647 End If;
648 If (p_rec.attribute21 = hr_api.g_varchar2) then
649 p_rec.attribute21 :=
650 pqh_crd_shd.g_old_rec.attribute21;
651 End If;
652 If (p_rec.attribute22 = hr_api.g_varchar2) then
653 p_rec.attribute22 :=
654 pqh_crd_shd.g_old_rec.attribute22;
655 End If;
656 If (p_rec.attribute23 = hr_api.g_varchar2) then
657 p_rec.attribute23 :=
658 pqh_crd_shd.g_old_rec.attribute23;
659 End If;
660 If (p_rec.attribute24 = hr_api.g_varchar2) then
661 p_rec.attribute24 :=
662 pqh_crd_shd.g_old_rec.attribute24;
663 End If;
664 If (p_rec.attribute25 = hr_api.g_varchar2) then
665 p_rec.attribute25 :=
666 pqh_crd_shd.g_old_rec.attribute25;
667 End If;
668 If (p_rec.attribute26 = hr_api.g_varchar2) then
669 p_rec.attribute26 :=
670 pqh_crd_shd.g_old_rec.attribute26;
671 End If;
672 If (p_rec.attribute27 = hr_api.g_varchar2) then
673 p_rec.attribute27 :=
674 pqh_crd_shd.g_old_rec.attribute27;
675 End If;
676 If (p_rec.attribute28 = hr_api.g_varchar2) then
677 p_rec.attribute28 :=
678 pqh_crd_shd.g_old_rec.attribute28;
679 End If;
680 If (p_rec.attribute29 = hr_api.g_varchar2) then
681 p_rec.attribute29 :=
682 pqh_crd_shd.g_old_rec.attribute29;
683 End If;
684 If (p_rec.attribute30 = hr_api.g_varchar2) then
685 p_rec.attribute30 :=
686 pqh_crd_shd.g_old_rec.attribute30;
687 End If;
688 --
689 End convert_defs;
690 --
691 -- ----------------------------------------------------------------------------
692 -- |---------------------------------< upd >----------------------------------|
693 -- ----------------------------------------------------------------------------
694 Procedure upd
695 (p_effective_date in date
696 ,p_rec in out nocopy pqh_crd_shd.g_rec_type
697 ) is
698 --
699 l_proc varchar2(72) := g_package||'upd';
700 --
701 Begin
702 hr_utility.set_location('Entering:'||l_proc, 5);
703 --
704 -- We must lock the row which we need to update.
705 --
706 pqh_crd_shd.lck
707 (p_rec.criteria_rate_defn_id
708 ,p_rec.object_version_number
709 );
710 --
711 -- 1. During an update system defaults are used to determine if
712 -- arguments have been defaulted or not. We must therefore
713 -- derive the full record structure values to be updated.
714 --
715 -- 2. Call the supporting update validate operations.
716 --
717 convert_defs(p_rec);
718 pqh_crd_bus.update_validate
719 (p_effective_date
720 ,p_rec
721 );
722 --
723 -- Call to raise any errors on multi-message list
724 hr_multi_message.end_validation_set;
725 --
726 -- Call the supporting pre-update operation
727 --
728 pqh_crd_upd.pre_update(p_rec);
729 --
730 -- Update the row.
731 --
732 pqh_crd_upd.update_dml(p_rec);
733 --
734 -- Call the supporting post-update operation
735 --
736 pqh_crd_upd.post_update
737 (p_effective_date
738 ,p_rec
739 );
740 --
741 -- Call to raise any errors on multi-message list
742 hr_multi_message.end_validation_set;
743 End upd;
744 --
745 -- ----------------------------------------------------------------------------
746 -- |---------------------------------< upd >----------------------------------|
747 -- ----------------------------------------------------------------------------
748 Procedure upd
749 (p_effective_date in date
750 ,p_criteria_rate_defn_id in number
751 ,p_object_version_number in out nocopy number
752 ,p_uom in varchar2 default hr_api.g_varchar2
753 ,p_rate_calc_cd in varchar2 default hr_api.g_varchar2
754 ,p_preferential_rate_cd in varchar2 default hr_api.g_varchar2
755 ,p_rounding_cd in varchar2 default hr_api.g_varchar2
756 ,p_short_name in varchar2 default hr_api.g_varchar2
757 ,p_currency_code in varchar2 default hr_api.g_varchar2
758 ,p_reference_period_cd in varchar2 default hr_api.g_varchar2
759 ,p_define_max_rate_flag in varchar2 default hr_api.g_varchar2
760 ,p_define_min_rate_flag in varchar2 default hr_api.g_varchar2
761 ,p_define_mid_rate_flag in varchar2 default hr_api.g_varchar2
762 ,p_define_std_rate_flag in varchar2 default hr_api.g_varchar2
763 ,p_rate_calc_rule in number default hr_api.g_number
764 ,p_preferential_rate_rule in number default hr_api.g_number
765 ,p_rounding_rule in number default hr_api.g_number
766 ,p_business_group_id in number default hr_api.g_number
767 ,p_legislation_code in varchar2 default hr_api.g_varchar2
768 ,p_attribute_category in varchar2 default hr_api.g_varchar2
769 ,p_attribute1 in varchar2 default hr_api.g_varchar2
770 ,p_attribute2 in varchar2 default hr_api.g_varchar2
771 ,p_attribute3 in varchar2 default hr_api.g_varchar2
772 ,p_attribute4 in varchar2 default hr_api.g_varchar2
773 ,p_attribute5 in varchar2 default hr_api.g_varchar2
774 ,p_attribute6 in varchar2 default hr_api.g_varchar2
775 ,p_attribute7 in varchar2 default hr_api.g_varchar2
776 ,p_attribute8 in varchar2 default hr_api.g_varchar2
777 ,p_attribute9 in varchar2 default hr_api.g_varchar2
778 ,p_attribute10 in varchar2 default hr_api.g_varchar2
779 ,p_attribute11 in varchar2 default hr_api.g_varchar2
780 ,p_attribute12 in varchar2 default hr_api.g_varchar2
781 ,p_attribute13 in varchar2 default hr_api.g_varchar2
782 ,p_attribute14 in varchar2 default hr_api.g_varchar2
783 ,p_attribute15 in varchar2 default hr_api.g_varchar2
784 ,p_attribute16 in varchar2 default hr_api.g_varchar2
785 ,p_attribute17 in varchar2 default hr_api.g_varchar2
786 ,p_attribute18 in varchar2 default hr_api.g_varchar2
787 ,p_attribute19 in varchar2 default hr_api.g_varchar2
788 ,p_attribute20 in varchar2 default hr_api.g_varchar2
789 ,p_attribute21 in varchar2 default hr_api.g_varchar2
790 ,p_attribute22 in varchar2 default hr_api.g_varchar2
791 ,p_attribute23 in varchar2 default hr_api.g_varchar2
792 ,p_attribute24 in varchar2 default hr_api.g_varchar2
793 ,p_attribute25 in varchar2 default hr_api.g_varchar2
794 ,p_attribute26 in varchar2 default hr_api.g_varchar2
795 ,p_attribute27 in varchar2 default hr_api.g_varchar2
796 ,p_attribute28 in varchar2 default hr_api.g_varchar2
797 ,p_attribute29 in varchar2 default hr_api.g_varchar2
798 ,p_attribute30 in varchar2 default hr_api.g_varchar2
799 ) is
800 --
801 l_rec pqh_crd_shd.g_rec_type;
802 l_proc varchar2(72) := g_package||'upd';
803 --
804 Begin
805 hr_utility.set_location('Entering:'||l_proc, 5);
806 --
807 -- Call conversion function to turn arguments into the
808 -- l_rec structure.
809 --
810 l_rec :=
811 pqh_crd_shd.convert_args
812 (p_criteria_rate_defn_id
813 ,p_short_name
814 ,p_uom
815 ,p_currency_code
816 ,p_reference_period_cd
817 ,p_define_max_rate_flag
818 ,p_define_min_rate_flag
819 ,p_define_mid_rate_flag
820 ,p_define_std_rate_flag
821 ,p_rate_calc_cd
822 ,p_rate_calc_rule
823 ,p_preferential_rate_cd
824 ,p_preferential_rate_rule
825 ,p_rounding_cd
826 ,p_rounding_rule
827 ,p_business_group_id
828 ,p_legislation_code
829 ,p_attribute_category
830 ,p_attribute1
831 ,p_attribute2
832 ,p_attribute3
833 ,p_attribute4
834 ,p_attribute5
835 ,p_attribute6
836 ,p_attribute7
837 ,p_attribute8
838 ,p_attribute9
839 ,p_attribute10
840 ,p_attribute11
841 ,p_attribute12
842 ,p_attribute13
843 ,p_attribute14
844 ,p_attribute15
845 ,p_attribute16
846 ,p_attribute17
847 ,p_attribute18
848 ,p_attribute19
849 ,p_attribute20
850 ,p_attribute21
851 ,p_attribute22
852 ,p_attribute23
853 ,p_attribute24
854 ,p_attribute25
855 ,p_attribute26
856 ,p_attribute27
857 ,p_attribute28
858 ,p_attribute29
859 ,p_attribute30
860 ,p_object_version_number
861 );
862 --
863 -- Having converted the arguments into the
864 -- plsql record structure we call the corresponding record
865 -- business process.
866 --
867 pqh_crd_upd.upd
868 (p_effective_date
869 ,l_rec
870 );
871 p_object_version_number := l_rec.object_version_number;
872 --
873 hr_utility.set_location(' Leaving:'||l_proc, 10);
874 End upd;
875 --
876 end pqh_crd_upd;