1 Package Body pay_set_upd as
2 /* $Header: pysetrhi.pkb 120.0 2005/05/29 08:39:23 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_set_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 -- perform dml).
21 -- 3) To update the specified row in the schema using the primary key in
22 -- the predicates.
23 -- 4) To trap any constraint violations that may have occurred.
24 -- 5) To raise any other errors.
25 --
26 -- Prerequisites:
27 -- This is an internal private procedure which must be called from the upd
28 -- procedure.
29 --
30 -- In Parameters:
31 -- A Pl/Sql record structre.
32 --
33 -- Post Success:
34 -- The specified row will be updated in the schema.
35 --
36 -- Post Failure:
37 -- On the update dml failure it is important to note that we always reset the
38 -- If a check, unique or parent integrity constraint violation is raised the
39 -- constraint_error procedure will be called.
40 -- If any other error is reported, the error will be raised after the
41 --
42 -- Developer Implementation Notes:
43 -- The update 'set' attribute list should be modified if any of your
44 -- attributes are not updateable.
45 --
46 -- Access Status:
47 -- Internal Row Handler Use Only.
48 --
49 -- {End Of Comments}
50 -- ----------------------------------------------------------------------------
51 Procedure update_dml(p_rec in out nocopy pay_set_shd.g_rec_type) is
52 --
53 l_proc varchar2(72) := g_package||'update_dml';
54 --
55 Begin
56 hr_utility.set_location('Entering:'||l_proc, 5);
57 --
58 -- Increment the object version
59 --
60 p_rec.object_version_number := p_rec.object_version_number + 1;
61 --
62 --
63 -- Update the pay_shadow_element_types Row
64 --
65 update pay_shadow_element_types
66 set
67 classification_name = p_rec.classification_name,
68 additional_entry_allowed_flag = p_rec.additional_entry_allowed_flag,
69 adjustment_only_flag = p_rec.adjustment_only_flag,
70 closed_for_entry_flag = p_rec.closed_for_entry_flag,
71 element_name = p_rec.element_name,
72 indirect_only_flag = p_rec.indirect_only_flag,
73 multiple_entries_allowed_flag = p_rec.multiple_entries_allowed_flag,
74 multiply_value_flag = p_rec.multiply_value_flag,
75 post_termination_rule = p_rec.post_termination_rule,
76 process_in_run_flag = p_rec.process_in_run_flag,
77 relative_processing_priority = p_rec.relative_processing_priority,
78 processing_type = p_rec.processing_type,
79 standard_link_flag = p_rec.standard_link_flag,
80 input_currency_code = p_rec.input_currency_code,
81 output_currency_code = p_rec.output_currency_code,
82 benefit_classification_name = p_rec.benefit_classification_name,
83 description = p_rec.description,
84 qualifying_age = p_rec.qualifying_age,
85 qualifying_length_of_service = p_rec.qualifying_length_of_service,
86 qualifying_units = p_rec.qualifying_units,
87 reporting_name = p_rec.reporting_name,
88 attribute_category = p_rec.attribute_category,
89 attribute1 = p_rec.attribute1,
90 attribute2 = p_rec.attribute2,
91 attribute3 = p_rec.attribute3,
92 attribute4 = p_rec.attribute4,
93 attribute5 = p_rec.attribute5,
94 attribute6 = p_rec.attribute6,
95 attribute7 = p_rec.attribute7,
96 attribute8 = p_rec.attribute8,
97 attribute9 = p_rec.attribute9,
98 attribute10 = p_rec.attribute10,
99 attribute11 = p_rec.attribute11,
100 attribute12 = p_rec.attribute12,
101 attribute13 = p_rec.attribute13,
102 attribute14 = p_rec.attribute14,
103 attribute15 = p_rec.attribute15,
104 attribute16 = p_rec.attribute16,
105 attribute17 = p_rec.attribute17,
106 attribute18 = p_rec.attribute18,
107 attribute19 = p_rec.attribute19,
108 attribute20 = p_rec.attribute20,
109 element_information_category = p_rec.element_information_category,
110 element_information1 = p_rec.element_information1,
111 element_information2 = p_rec.element_information2,
112 element_information3 = p_rec.element_information3,
113 element_information4 = p_rec.element_information4,
114 element_information5 = p_rec.element_information5,
115 element_information6 = p_rec.element_information6,
116 element_information7 = p_rec.element_information7,
117 element_information8 = p_rec.element_information8,
118 element_information9 = p_rec.element_information9,
119 element_information10 = p_rec.element_information10,
120 element_information11 = p_rec.element_information11,
121 element_information12 = p_rec.element_information12,
122 element_information13 = p_rec.element_information13,
123 element_information14 = p_rec.element_information14,
124 element_information15 = p_rec.element_information15,
125 element_information16 = p_rec.element_information16,
126 element_information17 = p_rec.element_information17,
127 element_information18 = p_rec.element_information18,
128 element_information19 = p_rec.element_information19,
129 element_information20 = p_rec.element_information20,
130 third_party_pay_only_flag = p_rec.third_party_pay_only_flag,
131 skip_formula = p_rec.skip_formula,
132 payroll_formula_id = p_rec.payroll_formula_id,
133 exclusion_rule_id = p_rec.exclusion_rule_id,
134 iterative_flag = p_rec.iterative_flag,
135 iterative_priority = p_rec.iterative_priority,
136 iterative_formula_name = p_rec.iterative_formula_name,
137 process_mode = p_rec.process_mode,
138 grossup_flag = p_rec.grossup_flag,
139 advance_indicator = p_rec.advance_indicator,
140 advance_payable = p_rec.advance_payable,
141 advance_deduction = p_rec.advance_deduction,
142 process_advance_entry = p_rec.process_advance_entry,
143 proration_group = p_rec.proration_group,
144 proration_formula = p_rec.proration_formula,
145 recalc_event_group = p_rec.recalc_event_group,
146 once_each_period_flag = p_rec.once_each_period_flag,
147 object_version_number = p_rec.object_version_number
148 where element_type_id = p_rec.element_type_id;
149 --
150 --
151 hr_utility.set_location(' Leaving:'||l_proc, 10);
152 --
153 Exception
154 When hr_api.check_integrity_violated Then
155 -- A check constraint has been violated
156 pay_set_shd.constraint_error
157 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
158 When hr_api.parent_integrity_violated Then
159 -- Parent integrity has been violated
160 pay_set_shd.constraint_error
161 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
162 When hr_api.unique_integrity_violated Then
163 -- Unique integrity has been violated
164 pay_set_shd.constraint_error
165 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
166 When Others Then
167 Raise;
168 End update_dml;
169 --
170 -- ----------------------------------------------------------------------------
171 -- |------------------------------< pre_update >------------------------------|
172 -- ----------------------------------------------------------------------------
173 -- {Start Of Comments}
174 --
175 -- Description:
176 -- This private procedure contains any processing which is required before
177 -- the 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 pre-processing required before 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 pre_update(p_rec in pay_set_shd.g_rec_type) is
203 --
204 l_proc varchar2(72) := g_package||'pre_update';
205 --
206 Begin
207 hr_utility.set_location('Entering:'||l_proc, 5);
208 hr_utility.set_location(' Leaving:'||l_proc, 10);
209 End pre_update;
210 --
211 -- ----------------------------------------------------------------------------
212 -- |-----------------------------< post_update >------------------------------|
213 -- ----------------------------------------------------------------------------
214 -- {Start Of Comments}
215 --
216 -- Description:
217 -- This private procedure contains any processing which is required after the
218 -- update dml.
219 --
220 -- Prerequisites:
221 -- This is an internal procedure which is called from the upd procedure.
222 --
223 -- In Parameters:
224 -- A Pl/Sql record structre.
225 --
226 -- Post Success:
227 -- Processing continues.
228 --
229 -- Post Failure:
230 -- If an error has occurred, an error message and exception will be raised
231 -- but not handled.
232 --
233 -- Developer Implementation Notes:
234 -- Any post-processing required after the update dml is issued should be
235 -- coded within this procedure. It is important to note that any 3rd party
236 -- maintenance should be reviewed before placing in this procedure.
237 --
238 -- Access Status:
239 -- Internal Row Handler Use Only.
240 --
241 -- {End Of Comments}
242 -- ----------------------------------------------------------------------------
243 Procedure post_update(p_rec in pay_set_shd.g_rec_type) is
244 --
245 l_proc varchar2(72) := g_package||'post_update';
246 --
247 Begin
248 hr_utility.set_location('Entering:'||l_proc, 5);
249 --
250 hr_utility.set_location(' Leaving:'||l_proc, 10);
251 End post_update;
252 --
253 -- ----------------------------------------------------------------------------
254 -- |-----------------------------< convert_defs >-----------------------------|
255 -- ----------------------------------------------------------------------------
256 -- {Start Of Comments}
257 --
258 -- Description:
259 -- The Convert_Defs procedure has one very important function:
260 -- It must return the record structure for the row with all system defaulted
261 -- values converted into its corresponding parameter value for update. When
262 -- we attempt to update a row through the Upd process , certain
263 -- parameters can be defaulted which enables flexibility in the calling of
264 -- the upd process (e.g. only attributes which need to be updated need to be
265 -- specified). For the upd process to determine which attributes
266 -- have NOT been specified we need to check if the parameter has a reserved
267 -- system default value. Therefore, for all parameters which have a
268 -- corresponding reserved system default mechanism specified we need to
269 -- check if a system default is being used. If a system default is being
270 -- used then we convert the defaulted value into its corresponding attribute
271 -- value held in the g_old_rec data structure.
272 --
273 -- Prerequisites:
274 -- This private function can only be called from the upd process.
275 --
276 -- In Parameters:
277 -- A Pl/Sql record structre.
278 --
279 -- Post Success:
280 -- The record structure will be returned with all system defaulted parameter
281 -- values converted into its current row attribute value.
282 --
283 -- Post Failure:
284 -- No direct error handling is required within this function. Any possible
285 -- errors within this procedure will be a PL/SQL value error due to conversion
286
287 -- of datatypes or data lengths.
288 --
289 -- Developer Implementation Notes:
290 -- None.
291 --
292 -- Access Status:
293 -- Internal Row Handler Use Only.
294 --
295 -- {End Of Comments}
296 -- ----------------------------------------------------------------------------
297 Procedure convert_defs(p_rec in out nocopy pay_set_shd.g_rec_type) is
298 --
299 l_proc varchar2(72) := g_package||'convert_defs';
300 --
301 Begin
302 --
303 hr_utility.set_location('Entering:'||l_proc, 5);
304 --
305 -- We must now examine each argument value in the
306 -- p_rec plsql record structure
307 -- to see if a system default is being used. If a system default
308 -- is being used then we must set to the 'current' argument value.
309 --
310 If (p_rec.template_id = hr_api.g_number) then
311 p_rec.template_id :=
312 pay_set_shd.g_old_rec.template_id;
313 End If;
314 If (p_rec.classification_name = hr_api.g_varchar2) then
315 p_rec.classification_name :=
316 pay_set_shd.g_old_rec.classification_name;
317 End If;
318 If (p_rec.additional_entry_allowed_flag = hr_api.g_varchar2) then
319 p_rec.additional_entry_allowed_flag :=
320 pay_set_shd.g_old_rec.additional_entry_allowed_flag;
321 End If;
322 If (p_rec.adjustment_only_flag = hr_api.g_varchar2) then
323 p_rec.adjustment_only_flag :=
324 pay_set_shd.g_old_rec.adjustment_only_flag;
325 End If;
326 If (p_rec.closed_for_entry_flag = hr_api.g_varchar2) then
327 p_rec.closed_for_entry_flag :=
328 pay_set_shd.g_old_rec.closed_for_entry_flag;
329 End If;
330 If (p_rec.element_name = hr_api.g_varchar2) then
331 p_rec.element_name :=
332 pay_set_shd.g_old_rec.element_name;
333 End If;
334 If (p_rec.indirect_only_flag = hr_api.g_varchar2) then
335 p_rec.indirect_only_flag :=
336 pay_set_shd.g_old_rec.indirect_only_flag;
337 End If;
338 If (p_rec.multiple_entries_allowed_flag = hr_api.g_varchar2) then
339 p_rec.multiple_entries_allowed_flag :=
340 pay_set_shd.g_old_rec.multiple_entries_allowed_flag;
341 End If;
342 If (p_rec.multiply_value_flag = hr_api.g_varchar2) then
343 p_rec.multiply_value_flag :=
344 pay_set_shd.g_old_rec.multiply_value_flag;
345 End If;
346 If (p_rec.post_termination_rule = hr_api.g_varchar2) then
347 p_rec.post_termination_rule :=
348 pay_set_shd.g_old_rec.post_termination_rule;
349 End If;
350 If (p_rec.process_in_run_flag = hr_api.g_varchar2) then
351 p_rec.process_in_run_flag :=
352 pay_set_shd.g_old_rec.process_in_run_flag;
353 End If;
354 If (p_rec.relative_processing_priority = hr_api.g_number) then
355 p_rec.relative_processing_priority :=
356 pay_set_shd.g_old_rec.relative_processing_priority;
357 End If;
361 End If;
358 If (p_rec.processing_type = hr_api.g_varchar2) then
359 p_rec.processing_type :=
360 pay_set_shd.g_old_rec.processing_type;
362 If (p_rec.standard_link_flag = hr_api.g_varchar2) then
363 p_rec.standard_link_flag :=
364 pay_set_shd.g_old_rec.standard_link_flag;
365 End If;
366 If (p_rec.input_currency_code = hr_api.g_varchar2) then
367 p_rec.input_currency_code :=
368 pay_set_shd.g_old_rec.input_currency_code;
369 End If;
370 If (p_rec.output_currency_code = hr_api.g_varchar2) then
371 p_rec.output_currency_code :=
372 pay_set_shd.g_old_rec.output_currency_code;
373 End If;
374 If (p_rec.benefit_classification_name = hr_api.g_varchar2) then
375 p_rec.benefit_classification_name :=
376 pay_set_shd.g_old_rec.benefit_classification_name;
377 End If;
378 If (p_rec.description = hr_api.g_varchar2) then
379 p_rec.description :=
380 pay_set_shd.g_old_rec.description;
381 End If;
382 If (p_rec.qualifying_age = hr_api.g_number) then
383 p_rec.qualifying_age :=
384 pay_set_shd.g_old_rec.qualifying_age;
385 End If;
386 If (p_rec.qualifying_length_of_service = hr_api.g_number) then
387 p_rec.qualifying_length_of_service :=
388 pay_set_shd.g_old_rec.qualifying_length_of_service;
389 End If;
390 If (p_rec.qualifying_units = hr_api.g_varchar2) then
391 p_rec.qualifying_units :=
392 pay_set_shd.g_old_rec.qualifying_units;
393 End If;
394 If (p_rec.reporting_name = hr_api.g_varchar2) then
395 p_rec.reporting_name :=
396 pay_set_shd.g_old_rec.reporting_name;
397 End If;
398 If (p_rec.attribute_category = hr_api.g_varchar2) then
399 p_rec.attribute_category :=
400 pay_set_shd.g_old_rec.attribute_category;
401 End If;
402 If (p_rec.attribute1 = hr_api.g_varchar2) then
403 p_rec.attribute1 :=
404 pay_set_shd.g_old_rec.attribute1;
405 End If;
406 If (p_rec.attribute2 = hr_api.g_varchar2) then
407 p_rec.attribute2 :=
408 pay_set_shd.g_old_rec.attribute2;
409 End If;
410 If (p_rec.attribute3 = hr_api.g_varchar2) then
411 p_rec.attribute3 :=
412 pay_set_shd.g_old_rec.attribute3;
413 End If;
414 If (p_rec.attribute4 = hr_api.g_varchar2) then
415 p_rec.attribute4 :=
416 pay_set_shd.g_old_rec.attribute4;
417 End If;
418 If (p_rec.attribute5 = hr_api.g_varchar2) then
419 p_rec.attribute5 :=
420 pay_set_shd.g_old_rec.attribute5;
421 End If;
422 If (p_rec.attribute6 = hr_api.g_varchar2) then
423 p_rec.attribute6 :=
424 pay_set_shd.g_old_rec.attribute6;
425 End If;
426 If (p_rec.attribute7 = hr_api.g_varchar2) then
427 p_rec.attribute7 :=
428 pay_set_shd.g_old_rec.attribute7;
429 End If;
430 If (p_rec.attribute8 = hr_api.g_varchar2) then
431 p_rec.attribute8 :=
432 pay_set_shd.g_old_rec.attribute8;
433 End If;
434 If (p_rec.attribute9 = hr_api.g_varchar2) then
435 p_rec.attribute9 :=
436 pay_set_shd.g_old_rec.attribute9;
437 End If;
438 If (p_rec.attribute10 = hr_api.g_varchar2) then
439 p_rec.attribute10 :=
440 pay_set_shd.g_old_rec.attribute10;
441 End If;
442 If (p_rec.attribute11 = hr_api.g_varchar2) then
443 p_rec.attribute11 :=
444 pay_set_shd.g_old_rec.attribute11;
445 End If;
446 If (p_rec.attribute12 = hr_api.g_varchar2) then
447 p_rec.attribute12 :=
448 pay_set_shd.g_old_rec.attribute12;
449 End If;
450 If (p_rec.attribute13 = hr_api.g_varchar2) then
451 p_rec.attribute13 :=
452 pay_set_shd.g_old_rec.attribute13;
453 End If;
454 If (p_rec.attribute14 = hr_api.g_varchar2) then
455 p_rec.attribute14 :=
456 pay_set_shd.g_old_rec.attribute14;
457 End If;
458 If (p_rec.attribute15 = hr_api.g_varchar2) then
459 p_rec.attribute15 :=
460 pay_set_shd.g_old_rec.attribute15;
461 End If;
462 If (p_rec.attribute16 = hr_api.g_varchar2) then
463 p_rec.attribute16 :=
464 pay_set_shd.g_old_rec.attribute16;
465 End If;
466 If (p_rec.attribute17 = hr_api.g_varchar2) then
467 p_rec.attribute17 :=
468 pay_set_shd.g_old_rec.attribute17;
469 End If;
470 If (p_rec.attribute18 = hr_api.g_varchar2) then
471 p_rec.attribute18 :=
472 pay_set_shd.g_old_rec.attribute18;
473 End If;
474 If (p_rec.attribute19 = hr_api.g_varchar2) then
475 p_rec.attribute19 :=
476 pay_set_shd.g_old_rec.attribute19;
477 End If;
478 If (p_rec.attribute20 = hr_api.g_varchar2) then
479 p_rec.attribute20 :=
480 pay_set_shd.g_old_rec.attribute20;
481 End If;
482 If (p_rec.element_information_category = hr_api.g_varchar2) then
483 p_rec.element_information_category :=
484 pay_set_shd.g_old_rec.element_information_category;
485 End If;
486 If (p_rec.element_information1 = hr_api.g_varchar2) then
487 p_rec.element_information1 :=
488 pay_set_shd.g_old_rec.element_information1;
489 End If;
490 If (p_rec.element_information2 = hr_api.g_varchar2) then
491 p_rec.element_information2 :=
492 pay_set_shd.g_old_rec.element_information2;
493 End If;
494 If (p_rec.element_information3 = hr_api.g_varchar2) then
495 p_rec.element_information3 :=
496 pay_set_shd.g_old_rec.element_information3;
497 End If;
501 End If;
498 If (p_rec.element_information4 = hr_api.g_varchar2) then
499 p_rec.element_information4 :=
500 pay_set_shd.g_old_rec.element_information4;
502 If (p_rec.element_information5 = hr_api.g_varchar2) then
503 p_rec.element_information5 :=
504 pay_set_shd.g_old_rec.element_information5;
505 End If;
506 If (p_rec.element_information6 = hr_api.g_varchar2) then
507 p_rec.element_information6 :=
508 pay_set_shd.g_old_rec.element_information6;
509 End If;
510 If (p_rec.element_information7 = hr_api.g_varchar2) then
511 p_rec.element_information7 :=
512 pay_set_shd.g_old_rec.element_information7;
513 End If;
514 If (p_rec.element_information8 = hr_api.g_varchar2) then
515 p_rec.element_information8 :=
516 pay_set_shd.g_old_rec.element_information8;
517 End If;
518 If (p_rec.element_information9 = hr_api.g_varchar2) then
519 p_rec.element_information9 :=
520 pay_set_shd.g_old_rec.element_information9;
521 End If;
522 If (p_rec.element_information10 = hr_api.g_varchar2) then
523 p_rec.element_information10 :=
524 pay_set_shd.g_old_rec.element_information10;
525 End If;
526 If (p_rec.element_information11 = hr_api.g_varchar2) then
527 p_rec.element_information11 :=
528 pay_set_shd.g_old_rec.element_information11;
529 End If;
530 If (p_rec.element_information12 = hr_api.g_varchar2) then
531 p_rec.element_information12 :=
532 pay_set_shd.g_old_rec.element_information12;
533 End If;
534 If (p_rec.element_information13 = hr_api.g_varchar2) then
535 p_rec.element_information13 :=
536 pay_set_shd.g_old_rec.element_information13;
537 End If;
538 If (p_rec.element_information14 = hr_api.g_varchar2) then
539 p_rec.element_information14 :=
540 pay_set_shd.g_old_rec.element_information14;
541 End If;
542 If (p_rec.element_information15 = hr_api.g_varchar2) then
543 p_rec.element_information15 :=
544 pay_set_shd.g_old_rec.element_information15;
545 End If;
546 If (p_rec.element_information16 = hr_api.g_varchar2) then
547 p_rec.element_information16 :=
548 pay_set_shd.g_old_rec.element_information16;
549 End If;
550 If (p_rec.element_information17 = hr_api.g_varchar2) then
551 p_rec.element_information17 :=
552 pay_set_shd.g_old_rec.element_information17;
553 End If;
554 If (p_rec.element_information18 = hr_api.g_varchar2) then
555 p_rec.element_information18 :=
556 pay_set_shd.g_old_rec.element_information18;
557 End If;
558 If (p_rec.element_information19 = hr_api.g_varchar2) then
559 p_rec.element_information19 :=
560 pay_set_shd.g_old_rec.element_information19;
561 End If;
562 If (p_rec.element_information20 = hr_api.g_varchar2) then
563 p_rec.element_information20 :=
564 pay_set_shd.g_old_rec.element_information20;
565 End If;
566 If (p_rec.third_party_pay_only_flag = hr_api.g_varchar2) then
567 p_rec.third_party_pay_only_flag :=
568 pay_set_shd.g_old_rec.third_party_pay_only_flag;
569 End If;
570 If (p_rec.skip_formula = hr_api.g_varchar2) then
571 p_rec.skip_formula :=
572 pay_set_shd.g_old_rec.skip_formula;
573 End If;
574 If (p_rec.payroll_formula_id = hr_api.g_number) then
575 p_rec.payroll_formula_id :=
576 pay_set_shd.g_old_rec.payroll_formula_id;
577 End If;
578 If (p_rec.exclusion_rule_id = hr_api.g_number) then
579 p_rec.exclusion_rule_id :=
580 pay_set_shd.g_old_rec.exclusion_rule_id;
581 End If;
582 If (p_rec.iterative_flag = hr_api.g_varchar2) then
583 p_rec.iterative_flag :=
584 pay_set_shd.g_old_rec.iterative_flag;
585 End If;
586 If (p_rec.iterative_priority = hr_api.g_number) then
587 p_rec.iterative_priority :=
588 pay_set_shd.g_old_rec.iterative_priority;
589 End If;
590 If (p_rec.iterative_formula_name = hr_api.g_varchar2) then
591 p_rec.iterative_formula_name :=
592 pay_set_shd.g_old_rec.iterative_formula_name;
593 End If;
594 If (p_rec.process_mode = hr_api.g_varchar2) then
595 p_rec.process_mode :=
596 pay_set_shd.g_old_rec.process_mode;
597 End If;
598 If (p_rec.grossup_flag = hr_api.g_varchar2) then
599 p_rec.grossup_flag :=
600 pay_set_shd.g_old_rec.grossup_flag;
601 End If;
602 If (p_rec.advance_indicator = hr_api.g_varchar2) then
603 p_rec.advance_indicator :=
604 pay_set_shd.g_old_rec.advance_indicator;
605 End If;
606 If (p_rec.advance_payable = hr_api.g_varchar2) then
607 p_rec.advance_payable :=
608 pay_set_shd.g_old_rec.advance_payable;
609 End If;
610 If (p_rec.advance_deduction = hr_api.g_varchar2) then
611 p_rec.advance_deduction :=
612 pay_set_shd.g_old_rec.advance_deduction;
613 End If;
614 If (p_rec.process_advance_entry = hr_api.g_varchar2) then
615 p_rec.process_advance_entry :=
616 pay_set_shd.g_old_rec.process_advance_entry;
617 End If;
618 If (p_rec.proration_group = hr_api.g_varchar2) then
619 p_rec.proration_group :=
620 pay_set_shd.g_old_rec.proration_group;
621 End If;
622 If (p_rec.proration_formula = hr_api.g_varchar2) then
623 p_rec.proration_formula :=
624 pay_set_shd.g_old_rec.proration_formula;
625 End If;
626 If (p_rec.recalc_event_group = hr_api.g_varchar2) then
627 p_rec.recalc_event_group :=
631 p_rec.once_each_period_flag :=
628 pay_set_shd.g_old_rec.recalc_event_group;
629 End If;
630 If (p_rec.once_each_period_flag = hr_api.g_varchar2) then
632 pay_set_shd.g_old_rec.once_each_period_flag;
633 End If;
634 --
635 hr_utility.set_location(' Leaving:'||l_proc, 10);
636 --
637 End convert_defs;
638 --
639 -- ----------------------------------------------------------------------------
640 -- |---------------------------------< upd >----------------------------------|
641 -- ----------------------------------------------------------------------------
642 Procedure upd
643 (p_effective_date in date
644 ,p_rec in out nocopy pay_set_shd.g_rec_type
645 ) is
646 --
647 l_proc varchar2(72) := g_package||'upd';
648 --
649 Begin
650 hr_utility.set_location('Entering:'||l_proc, 5);
651 --
652 -- We must lock the row which we need to update.
653 --
654 pay_set_shd.lck
655 (
656 p_rec.element_type_id,
657 p_rec.object_version_number
658 );
659 --
660 -- 1. During an update system defaults are used to determine if
661 -- arguments have been defaulted or not. We must therefore
662 -- derive the full record structure values to be updated.
663 --
664 -- 2. Call the supporting update validate operations.
665 --
666 convert_defs(p_rec);
667 pay_set_bus.update_validate(p_effective_date, p_rec);
668 --
669 -- Call the supporting pre-update operation
670 --
671 pre_update(p_rec);
672 --
673 -- Update the row.
674 --
675 update_dml(p_rec);
676 --
677 -- Call the supporting post-update operation
678 --
679 post_update(p_rec);
680 End upd;
681 --
682 -- ----------------------------------------------------------------------------
683 -- |---------------------------------< upd >----------------------------------|
684 -- ----------------------------------------------------------------------------
685 Procedure upd
686 (
687 p_effective_date in date,
688 p_element_type_id in number,
689 p_classification_name in varchar2 default hr_api.g_varchar2,
690 p_additional_entry_allowed_fla in varchar2 default hr_api.g_varchar2,
691 p_adjustment_only_flag in varchar2 default hr_api.g_varchar2,
692 p_closed_for_entry_flag in varchar2 default hr_api.g_varchar2,
693 p_element_name in varchar2 default hr_api.g_varchar2,
694 p_indirect_only_flag in varchar2 default hr_api.g_varchar2,
695 p_multiple_entries_allowed_fla in varchar2 default hr_api.g_varchar2,
696 p_multiply_value_flag in varchar2 default hr_api.g_varchar2,
697 p_post_termination_rule in varchar2 default hr_api.g_varchar2,
698 p_process_in_run_flag in varchar2 default hr_api.g_varchar2,
699 p_relative_processing_priority in number default hr_api.g_number,
700 p_processing_type in varchar2 default hr_api.g_varchar2,
701 p_standard_link_flag in varchar2 default hr_api.g_varchar2,
702 p_input_currency_code in varchar2 default hr_api.g_varchar2,
703 p_output_currency_code in varchar2 default hr_api.g_varchar2,
704 p_benefit_classification_name in varchar2 default hr_api.g_varchar2,
705 p_description in varchar2 default hr_api.g_varchar2,
706 p_qualifying_age in number default hr_api.g_number,
707 p_qualifying_length_of_service in number default hr_api.g_number,
708 p_qualifying_units in varchar2 default hr_api.g_varchar2,
709 p_reporting_name in varchar2 default hr_api.g_varchar2,
710 p_attribute_category in varchar2 default hr_api.g_varchar2,
711 p_attribute1 in varchar2 default hr_api.g_varchar2,
712 p_attribute2 in varchar2 default hr_api.g_varchar2,
713 p_attribute3 in varchar2 default hr_api.g_varchar2,
714 p_attribute4 in varchar2 default hr_api.g_varchar2,
715 p_attribute5 in varchar2 default hr_api.g_varchar2,
716 p_attribute6 in varchar2 default hr_api.g_varchar2,
717 p_attribute7 in varchar2 default hr_api.g_varchar2,
718 p_attribute8 in varchar2 default hr_api.g_varchar2,
719 p_attribute9 in varchar2 default hr_api.g_varchar2,
720 p_attribute10 in varchar2 default hr_api.g_varchar2,
721 p_attribute11 in varchar2 default hr_api.g_varchar2,
722 p_attribute12 in varchar2 default hr_api.g_varchar2,
723 p_attribute13 in varchar2 default hr_api.g_varchar2,
724 p_attribute14 in varchar2 default hr_api.g_varchar2,
725 p_attribute15 in varchar2 default hr_api.g_varchar2,
726 p_attribute16 in varchar2 default hr_api.g_varchar2,
727 p_attribute17 in varchar2 default hr_api.g_varchar2,
728 p_attribute18 in varchar2 default hr_api.g_varchar2,
729 p_attribute19 in varchar2 default hr_api.g_varchar2,
730 p_attribute20 in varchar2 default hr_api.g_varchar2,
731 p_element_information_category in varchar2 default hr_api.g_varchar2,
732 p_element_information1 in varchar2 default hr_api.g_varchar2,
733 p_element_information2 in varchar2 default hr_api.g_varchar2,
734 p_element_information3 in varchar2 default hr_api.g_varchar2,
735 p_element_information4 in varchar2 default hr_api.g_varchar2,
736 p_element_information5 in varchar2 default hr_api.g_varchar2,
737 p_element_information6 in varchar2 default hr_api.g_varchar2,
738 p_element_information7 in varchar2 default hr_api.g_varchar2,
739 p_element_information8 in varchar2 default hr_api.g_varchar2,
740 p_element_information9 in varchar2 default hr_api.g_varchar2,
741 p_element_information10 in varchar2 default hr_api.g_varchar2,
742 p_element_information11 in varchar2 default hr_api.g_varchar2,
743 p_element_information12 in varchar2 default hr_api.g_varchar2,
744 p_element_information13 in varchar2 default hr_api.g_varchar2,
745 p_element_information14 in varchar2 default hr_api.g_varchar2,
746 p_element_information15 in varchar2 default hr_api.g_varchar2,
747 p_element_information16 in varchar2 default hr_api.g_varchar2,
748 p_element_information17 in varchar2 default hr_api.g_varchar2,
749 p_element_information18 in varchar2 default hr_api.g_varchar2,
750 p_element_information19 in varchar2 default hr_api.g_varchar2,
751 p_element_information20 in varchar2 default hr_api.g_varchar2,
752 p_third_party_pay_only_flag in varchar2 default hr_api.g_varchar2,
753 p_skip_formula in varchar2 default hr_api.g_varchar2,
754 p_payroll_formula_id in number default hr_api.g_number,
755 p_exclusion_rule_id in number default hr_api.g_number,
756 p_iterative_flag in varchar2 default hr_api.g_varchar2,
757 p_iterative_priority in number default hr_api.g_number,
758 p_iterative_formula_name in varchar2 default hr_api.g_varchar2,
759 p_process_mode in varchar2 default hr_api.g_varchar2,
760 p_grossup_flag in varchar2 default hr_api.g_varchar2,
761 p_advance_indicator in varchar2 default hr_api.g_varchar2,
762 p_advance_payable in varchar2 default hr_api.g_varchar2,
763 p_advance_deduction in varchar2 default hr_api.g_varchar2,
764 p_process_advance_entry in varchar2 default hr_api.g_varchar2,
765 p_proration_group in varchar2 default hr_api.g_varchar2,
766 p_proration_formula in varchar2 default hr_api.g_varchar2,
767 p_recalc_event_group in varchar2 default hr_api.g_varchar2,
768 p_once_each_period_flag in varchar2 default hr_api.g_varchar2,
769 p_object_version_number in out nocopy number
770 ) is
771 --
772 l_rec pay_set_shd.g_rec_type;
773 l_proc varchar2(72) := g_package||'upd';
774 --
775 Begin
776 hr_utility.set_location('Entering:'||l_proc, 5);
777 --
778 -- Call conversion function to turn arguments into the
779 -- l_rec structure.
780 --
781 l_rec :=
782 pay_set_shd.convert_args
783 (
784 p_element_type_id,
785 hr_api.g_number,
786 p_classification_name,
787 p_additional_entry_allowed_fla,
788 p_adjustment_only_flag,
789 p_closed_for_entry_flag,
790 p_element_name,
791 p_indirect_only_flag,
792 p_multiple_entries_allowed_fla,
793 p_multiply_value_flag,
794 p_post_termination_rule,
795 p_process_in_run_flag,
796 p_relative_processing_priority,
797 p_processing_type,
798 p_standard_link_flag,
799 p_input_currency_code,
800 p_output_currency_code,
801 p_benefit_classification_name,
802 p_description,
803 p_qualifying_age,
804 p_qualifying_length_of_service,
805 p_qualifying_units,
806 p_reporting_name,
807 p_attribute_category,
808 p_attribute1,
809 p_attribute2,
810 p_attribute3,
811 p_attribute4,
812 p_attribute5,
813 p_attribute6,
814 p_attribute7,
815 p_attribute8,
816 p_attribute9,
817 p_attribute10,
818 p_attribute11,
819 p_attribute12,
820 p_attribute13,
821 p_attribute14,
822 p_attribute15,
823 p_attribute16,
824 p_attribute17,
825 p_attribute18,
826 p_attribute19,
827 p_attribute20,
828 p_element_information_category,
829 p_element_information1,
830 p_element_information2,
831 p_element_information3,
832 p_element_information4,
833 p_element_information5,
834 p_element_information6,
835 p_element_information7,
836 p_element_information8,
837 p_element_information9,
838 p_element_information10,
839 p_element_information11,
840 p_element_information12,
841 p_element_information13,
842 p_element_information14,
843 p_element_information15,
844 p_element_information16,
845 p_element_information17,
846 p_element_information18,
847 p_element_information19,
848 p_element_information20,
849 p_third_party_pay_only_flag,
850 p_skip_formula,
851 p_payroll_formula_id,
852 p_exclusion_rule_id,
853 p_iterative_flag,
854 p_iterative_priority,
855 p_iterative_formula_name,
856 p_process_mode,
857 p_grossup_flag,
858 p_advance_indicator,
859 p_advance_payable,
860 p_advance_deduction,
861 p_process_advance_entry,
862 p_proration_group,
863 p_proration_formula,
864 p_recalc_event_group,
865 p_once_each_period_flag,
866 p_object_version_number
867 );
868 --
869 -- Having converted the arguments into the
870 -- plsql record structure we call the corresponding record
871 -- business process.
872 --
873 upd(p_effective_date, l_rec);
874 p_object_version_number := l_rec.object_version_number;
875 --
876 hr_utility.set_location(' Leaving:'||l_proc, 10);
877 End upd;
878 --
879 end pay_set_upd;