1 Package Body pay_pap_upd as
2 /* $Header: pypaprhi.pkb 120.0 2005/05/29 07:14:24 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_pap_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 pay_pap_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 pay_pap_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the pay_accrual_plans Row
68 --
69 update pay_accrual_plans
70 set
71 accrual_plan_id = p_rec.accrual_plan_id,
72 pto_input_value_id = p_rec.pto_input_value_id,
73 accrual_category = p_rec.accrual_category,
74 accrual_start = p_rec.accrual_start,
75 ineligible_period_length = p_rec.ineligible_period_length,
76 ineligible_period_type = p_rec.ineligible_period_type,
77 accrual_formula_id = p_rec.accrual_formula_id,
78 co_formula_id = p_rec.co_formula_id,
79 description = p_rec.description,
80 ineligibility_formula_id = p_rec.ineligibility_formula_id,
81 payroll_formula_id = p_rec.payroll_formula_id,
82 defined_balance_id = p_rec.defined_balance_id,
83 tagging_element_type_id = p_rec.tagging_element_type_id,
84 balance_element_type_id = p_rec.balance_element_type_id,
85 object_version_number = p_rec.object_version_number,
86 information_category = p_rec.information_category,
87 information1 = p_rec.information1,
88 information2 = p_rec.information2,
89 information3 = p_rec.information3,
90 information4 = p_rec.information4,
91 information5 = p_rec.information5,
92 information6 = p_rec.information6,
93 information7 = p_rec.information7,
94 information8 = p_rec.information8,
95 information9 = p_rec.information9,
96 information10 = p_rec.information10,
97 information11 = p_rec.information11,
98 information12 = p_rec.information12,
99 information13 = p_rec.information13,
100 information14 = p_rec.information14,
101 information15 = p_rec.information15,
102 information16 = p_rec.information16,
103 information17 = p_rec.information17,
104 information18 = p_rec.information18,
105 information19 = p_rec.information19,
106 information20 = p_rec.information20,
107 information21 = p_rec.information21,
108 information22 = p_rec.information22,
109 information23 = p_rec.information23,
110 information24 = p_rec.information24,
111 information25 = p_rec.information25,
112 information26 = p_rec.information26,
113 information27 = p_rec.information27,
114 information28 = p_rec.information28,
115 information29 = p_rec.information29,
116 information30 = p_rec.information30
117
118 where accrual_plan_id = p_rec.accrual_plan_id;
119 --
120 pay_pap_shd.g_api_dml := false; -- Unset the api dml status
121 --
122 hr_utility.set_location(' Leaving:'||l_proc, 10);
123 --
124 Exception
125 When hr_api.check_integrity_violated Then
126 -- A check constraint has been violated
127 pay_pap_shd.g_api_dml := false; -- Unset the api dml status
128 pay_pap_shd.constraint_error
129 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
130 When hr_api.parent_integrity_violated Then
131 -- Parent integrity has been violated
132 pay_pap_shd.g_api_dml := false; -- Unset the api dml status
133 pay_pap_shd.constraint_error
134 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
135 When hr_api.unique_integrity_violated Then
136 -- Unique integrity has been violated
137 pay_pap_shd.g_api_dml := false; -- Unset the api dml status
138 pay_pap_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
140 When Others Then
141 pay_pap_shd.g_api_dml := false; -- Unset the api dml status
142 Raise;
143 End update_dml;
144 --
145 -- ----------------------------------------------------------------------------
146 -- |------------------------------< pre_update >------------------------------|
147 -- ----------------------------------------------------------------------------
148 -- {Start Of Comments}
149 --
150 -- Description:
151 -- This private procedure contains any processing which is required before
152 -- the update dml.
153 --
154 -- Prerequisites:
155 -- This is an internal procedure which is called from the upd procedure.
156 --
157 -- In Parameters:
158 -- A Pl/Sql record structre.
159 --
160 -- Post Success:
161 -- Processing continues.
162 --
163 -- Post Failure:
164 -- If an error has occurred, an error message and exception will be raised
165 -- but not handled.
166 --
167 -- Developer Implementation Notes:
168 -- Any pre-processing required before the update dml is issued should be
169 -- coded within this procedure. It is important to note that any 3rd party
170 -- maintenance should be reviewed before placing in this procedure.
171 --
172 -- Access Status:
173 -- Internal Row Handler Use Only.
174 --
175 -- {End Of Comments}
176 -- ----------------------------------------------------------------------------
177 Procedure pre_update(p_rec in pay_pap_shd.g_rec_type) is
178 --
179 l_proc varchar2(72) := g_package||'pre_update';
180 --
181 Begin
182 hr_utility.set_location('Entering:'||l_proc, 5);
183 --
184 hr_utility.set_location(' Leaving:'||l_proc, 10);
185 End pre_update;
186 --
187 -- ----------------------------------------------------------------------------
188 -- |-----------------------------< post_update >------------------------------|
189 -- ----------------------------------------------------------------------------
190 -- {Start Of Comments}
191 --
192 -- Description:
193 -- This private procedure contains any processing which is required after the
194 -- update dml.
195 --
196 -- Prerequisites:
197 -- This is an internal procedure which is called from the upd procedure.
198 --
199 -- In Parameters:
200 -- A Pl/Sql record structre.
201 --
202 -- Post Success:
203 -- Processing continues.
204 --
205 -- Post Failure:
206 -- If an error has occurred, an error message and exception will be raised
207 -- but not handled.
208 --
209 -- Developer Implementation Notes:
210 -- Any post-processing required after the update dml is issued should be
211 -- coded within this procedure. It is important to note that any 3rd party
212 -- maintenance should be reviewed before placing in this procedure.
213 --
214 -- Access Status:
215 -- Internal Row Handler Use Only.
216 --
217 -- {End Of Comments}
218 -- ----------------------------------------------------------------------------
219 Procedure post_update(p_rec in pay_pap_shd.g_rec_type) is
220 --
221 l_proc varchar2(72) := g_package||'post_update';
222 --
223 Begin
224 hr_utility.set_location('Entering:'||l_proc, 5);
225
226 --
227 -- Start of API User Hook for post_update.
228 --
229 begin
230 --
231 pay_pap_rku.after_update
232 (
233 p_accrual_plan_id =>p_rec.accrual_plan_id
234 ,p_accrual_plan_element_type_id =>p_rec.accrual_plan_element_type_id
235 ,p_pto_input_value_id =>p_rec.pto_input_value_id
236 ,p_co_input_value_id =>p_rec.co_input_value_id
237 ,p_residual_input_value_id =>p_rec.residual_input_value_id
238 ,p_accrual_category =>p_rec.accrual_category
239 ,p_accrual_plan_name =>p_rec.accrual_plan_name
240 ,p_accrual_start =>p_rec.accrual_start
241 ,p_accrual_units_of_measure =>p_rec.accrual_units_of_measure
242 ,p_ineligible_period_length =>p_rec.ineligible_period_length
243 ,p_ineligible_period_type =>p_rec.ineligible_period_type
244 ,p_accrual_formula_id =>p_rec.accrual_formula_id
245 ,p_co_formula_id =>p_rec.co_formula_id
246 ,p_co_date_input_value_id =>p_rec.co_date_input_value_id
247 ,p_co_exp_date_input_value_id =>p_rec.co_exp_date_input_value_id
248 ,p_residual_date_input_value_id =>p_rec.residual_date_input_value_id
249 ,p_description =>p_rec.description
250 ,p_ineligibility_formula_id =>p_rec.ineligibility_formula_id
251 ,p_payroll_formula_id =>p_rec.payroll_formula_id
252 ,p_defined_balance_id =>p_rec.defined_balance_id
253 ,p_tagging_element_type_id =>p_rec.tagging_element_type_id
254 ,p_balance_element_type_id =>p_rec.balance_element_type_id
255 ,p_object_version_number =>p_rec.object_version_number
256 ,p_information_category =>p_rec.information_category
257 ,p_information1 =>p_rec.information1
258 ,p_information2 =>p_rec.information2
259 ,p_information3 =>p_rec.information3
260 ,p_information4 =>p_rec.information4
261 ,p_information5 =>p_rec.information5
262 ,p_information6 =>p_rec.information6
263 ,p_information7 =>p_rec.information7
264 ,p_information8 =>p_rec.information8
265 ,p_information9 =>p_rec.information9
266 ,p_information10 =>p_rec.information10
267 ,p_information11 =>p_rec.information11
268 ,p_information12 =>p_rec.information12
269 ,p_information13 =>p_rec.information13
270 ,p_information14 =>p_rec.information14
271 ,p_information15 =>p_rec.information15
272 ,p_information16 =>p_rec.information16
273 ,p_information17 =>p_rec.information17
274 ,p_information18 =>p_rec.information18
275 ,p_information19 =>p_rec.information19
276 ,p_information20 =>p_rec.information20
277 ,p_information21 =>p_rec.information21
278 ,p_information22 =>p_rec.information22
279 ,p_information23 =>p_rec.information23
280 ,p_information24 =>p_rec.information24
281 ,p_information25 =>p_rec.information25
282 ,p_information26 =>p_rec.information26
283 ,p_information27 =>p_rec.information27
284 ,p_information28 =>p_rec.information28
285 ,p_information29 =>p_rec.information29
286 ,p_information30 =>p_rec.information30
287 ,p_business_group_id_o =>pay_pap_shd.g_old_rec.business_group_id
288 ,p_accrual_plan_element_type__o=>pay_pap_shd.g_old_rec.accrual_plan_element_type_id
289 ,p_pto_input_value_id_o =>pay_pap_shd.g_old_rec.pto_input_value_id
290 ,p_co_input_value_id_o =>pay_pap_shd.g_old_rec.co_input_value_id
291 ,p_residual_input_value_id_o =>pay_pap_shd.g_old_rec.residual_input_value_id
292 ,p_accrual_category_o =>pay_pap_shd.g_old_rec.accrual_category
293 ,p_accrual_plan_name_o =>pay_pap_shd.g_old_rec.accrual_plan_name
294 ,p_accrual_start_o =>pay_pap_shd.g_old_rec.accrual_start
295 ,p_accrual_units_of_measure_o =>pay_pap_shd.g_old_rec.accrual_units_of_measure
296 ,p_ineligible_period_length_o =>pay_pap_shd.g_old_rec.ineligible_period_length
297 ,p_ineligible_period_type_o =>pay_pap_shd.g_old_rec.ineligible_period_type
298 ,p_accrual_formula_id_o =>pay_pap_shd.g_old_rec.accrual_formula_id
299 ,p_co_formula_id_o =>pay_pap_shd.g_old_rec.co_formula_id
300 ,p_co_date_input_value_id_o =>pay_pap_shd.g_old_rec.co_date_input_value_id
301 ,p_co_exp_date_input_value_id_o =>pay_pap_shd.g_old_rec.co_exp_date_input_value_id
302 ,p_residual_date_input_value__o=>pay_pap_shd.g_old_rec.residual_date_input_value_id
303 ,p_description_o =>pay_pap_shd.g_old_rec.description
304 ,p_ineligibility_formula_id_o =>pay_pap_shd.g_old_rec.ineligibility_formula_id
305 ,p_payroll_formula_id_o =>pay_pap_shd.g_old_rec.payroll_formula_id
306 ,p_defined_balance_id_o =>pay_pap_shd.g_old_rec.defined_balance_id
307 ,p_tagging_element_type_id_o =>pay_pap_shd.g_old_rec.tagging_element_type_id
308 ,p_balance_element_type_id_o =>pay_pap_shd.g_old_rec.balance_element_type_id
309 ,p_object_version_number_o =>pay_pap_shd.g_old_rec.object_version_number
310 ,p_information_category_o =>pay_pap_shd.g_old_rec.information_category
311 ,p_information1_o =>pay_pap_shd.g_old_rec.information1
312 ,p_information2_o =>pay_pap_shd.g_old_rec.information2
313 ,p_information3_o =>pay_pap_shd.g_old_rec.information3
314 ,p_information4_o =>pay_pap_shd.g_old_rec.information4
315 ,p_information5_o =>pay_pap_shd.g_old_rec.information5
316 ,p_information6_o =>pay_pap_shd.g_old_rec.information6
317 ,p_information7_o =>pay_pap_shd.g_old_rec.information7
318 ,p_information8_o =>pay_pap_shd.g_old_rec.information8
319 ,p_information9_o =>pay_pap_shd.g_old_rec.information9
320 ,p_information10_o =>pay_pap_shd.g_old_rec.information10
321 ,p_information11_o =>pay_pap_shd.g_old_rec.information11
322 ,p_information12_o =>pay_pap_shd.g_old_rec.information12
323 ,p_information13_o =>pay_pap_shd.g_old_rec.information13
324 ,p_information14_o =>pay_pap_shd.g_old_rec.information14
325 ,p_information15_o =>pay_pap_shd.g_old_rec.information15
326 ,p_information16_o =>pay_pap_shd.g_old_rec.information16
327 ,p_information17_o =>pay_pap_shd.g_old_rec.information17
328 ,p_information18_o =>pay_pap_shd.g_old_rec.information18
329 ,p_information19_o =>pay_pap_shd.g_old_rec.information19
330 ,p_information20_o =>pay_pap_shd.g_old_rec.information20
331 ,p_information21_o =>pay_pap_shd.g_old_rec.information21
332 ,p_information22_o =>pay_pap_shd.g_old_rec.information22
333 ,p_information23_o =>pay_pap_shd.g_old_rec.information23
334 ,p_information24_o =>pay_pap_shd.g_old_rec.information24
335 ,p_information25_o =>pay_pap_shd.g_old_rec.information25
336 ,p_information26_o =>pay_pap_shd.g_old_rec.information26
337 ,p_information27_o =>pay_pap_shd.g_old_rec.information27
338 ,p_information28_o =>pay_pap_shd.g_old_rec.information28
339 ,p_information29_o =>pay_pap_shd.g_old_rec.information29
340 ,p_information30_o =>pay_pap_shd.g_old_rec.information30
341 );
342 --
343 exception
344 --
345 when hr_api.cannot_find_prog_unit then
346 --
347 hr_api.cannot_find_prog_unit_error
348 (p_module_name => 'pay_accrual_plans'
349 ,p_hook_type => 'AU');
350 --
351 end;
352 --
353 -- End of API User Hook for post_update.
354 --
355 --
356 hr_utility.set_location(' Leaving:'||l_proc, 10);
357 End post_update;
358 --
359 -- ----------------------------------------------------------------------------
360 -- |-----------------------------< convert_defs >-----------------------------|
361 -- ----------------------------------------------------------------------------
362 -- {Start Of Comments}
363 --
364 -- Description:
365 -- The Convert_Defs procedure has one very important function:
366 -- It must return the record structure for the row with all system defaulted
367 -- values converted into its corresponding parameter value for update. When
368 -- we attempt to update a row through the Upd process , certain
369 -- parameters can be defaulted which enables flexibility in the calling of
370 -- the upd process (e.g. only attributes which need to be updated need to be
371 -- specified). For the upd process to determine which attributes
372 -- have NOT been specified we need to check if the parameter has a reserved
373 -- system default value. Therefore, for all parameters which have a
374 -- corresponding reserved system default mechanism specified we need to
375 -- check if a system default is being used. If a system default is being
376 -- used then we convert the defaulted value into its corresponding attribute
377 -- value held in the g_old_rec data structure.
378 --
379 -- Prerequisites:
380 -- This private function can only be called from the upd process.
381 --
382 -- In Parameters:
383 -- A Pl/Sql record structre.
384 --
385 -- Post Success:
386 -- The record structure will be returned with all system defaulted parameter
387 -- values converted into its current row attribute value.
388 --
389 -- Post Failure:
390 -- No direct error handling is required within this function. Any possible
391 -- errors within this procedure will be a PL/SQL value error due to conversion
392 -- of datatypes or data lengths.
393 --
394 -- Developer Implementation Notes:
395 -- None.
396 --
397 -- Access Status:
398 -- Internal Row Handler Use Only.
399 --
400 -- {End Of Comments}
401 -- ----------------------------------------------------------------------------
402 Procedure convert_defs(p_rec in out nocopy pay_pap_shd.g_rec_type) is
403 --
404 l_proc varchar2(72) := g_package||'convert_defs';
405 --
406 Begin
407 --
408 hr_utility.set_location('Entering:'||l_proc, 5);
409 --
410 -- We must now examine each argument value in the
411 -- p_rec plsql record structure
412 -- to see if a system default is being used. If a system default
413 -- is being used then we must set to the 'current' argument value.
414 --
415 If (p_rec.business_group_id = hr_api.g_number) then
416 p_rec.business_group_id :=
417 pay_pap_shd.g_old_rec.business_group_id;
418 End If;
419 If (p_rec.accrual_plan_element_type_id = hr_api.g_number) then
420 p_rec.accrual_plan_element_type_id :=
421 pay_pap_shd.g_old_rec.accrual_plan_element_type_id;
422 End If;
423 If (p_rec.pto_input_value_id = hr_api.g_number) then
424 p_rec.pto_input_value_id :=
425 pay_pap_shd.g_old_rec.pto_input_value_id;
426 End If;
427 If (p_rec.co_input_value_id = hr_api.g_number) then
428 p_rec.co_input_value_id :=
429 pay_pap_shd.g_old_rec.co_input_value_id;
430 End If;
431 If (p_rec.residual_input_value_id = hr_api.g_number) then
432 p_rec.residual_input_value_id :=
433 pay_pap_shd.g_old_rec.residual_input_value_id;
434 End If;
435 If (p_rec.accrual_category = hr_api.g_varchar2) then
436 p_rec.accrual_category :=
437 pay_pap_shd.g_old_rec.accrual_category;
438 End If;
439 If (p_rec.accrual_plan_name = hr_api.g_varchar2) then
440 p_rec.accrual_plan_name :=
441 pay_pap_shd.g_old_rec.accrual_plan_name;
442 End If;
443 If (p_rec.accrual_start = hr_api.g_varchar2) then
444 p_rec.accrual_start :=
445 pay_pap_shd.g_old_rec.accrual_start;
446 End If;
447 If (p_rec.accrual_units_of_measure = hr_api.g_varchar2) then
448 p_rec.accrual_units_of_measure :=
449 pay_pap_shd.g_old_rec.accrual_units_of_measure;
450 End If;
451 If (p_rec.ineligible_period_length = hr_api.g_number) then
452 p_rec.ineligible_period_length :=
453 pay_pap_shd.g_old_rec.ineligible_period_length;
454 End If;
455 If (p_rec.ineligible_period_type = hr_api.g_varchar2) then
456 p_rec.ineligible_period_type :=
457 pay_pap_shd.g_old_rec.ineligible_period_type;
458 End If;
459 If (p_rec.accrual_formula_id = hr_api.g_number) then
460 p_rec.accrual_formula_id :=
461 pay_pap_shd.g_old_rec.accrual_formula_id;
462 End If;
463 If (p_rec.co_formula_id = hr_api.g_number) then
464 p_rec.co_formula_id :=
465 pay_pap_shd.g_old_rec.co_formula_id;
466 End If;
467 If (p_rec.co_date_input_value_id = hr_api.g_number) then
468 p_rec.co_date_input_value_id :=
469 pay_pap_shd.g_old_rec.co_date_input_value_id;
470 End If;
471 If (p_rec.co_exp_date_input_value_id = hr_api.g_number) then
472 p_rec.co_exp_date_input_value_id :=
473 pay_pap_shd.g_old_rec.co_exp_date_input_value_id;
474 End If;
475 If (p_rec.residual_date_input_value_id = hr_api.g_number) then
476 p_rec.residual_date_input_value_id :=
477 pay_pap_shd.g_old_rec.residual_date_input_value_id;
478 End If;
479 If (p_rec.description = hr_api.g_varchar2) then
480 p_rec.description :=
481 pay_pap_shd.g_old_rec.description;
482 End If;
483 If (p_rec.ineligibility_formula_id = hr_api.g_number) then
484 p_rec.ineligibility_formula_id :=
485 pay_pap_shd.g_old_rec.ineligibility_formula_id;
486 End If;
487 If (p_rec.payroll_formula_id = hr_api.g_number) then
488 p_rec.payroll_formula_id :=
489 pay_pap_shd.g_old_rec.payroll_formula_id;
490 End If;
491 If (p_rec.defined_balance_id = hr_api.g_number) then
492 p_rec.defined_balance_id :=
493 pay_pap_shd.g_old_rec.defined_balance_id;
494 End If;
495 If (p_rec.tagging_element_type_id = hr_api.g_number) then
496 p_rec.tagging_element_type_id :=
497 pay_pap_shd.g_old_rec.tagging_element_type_id;
498 End If;
499 If (p_rec.balance_element_type_id = hr_api.g_number) then
500 p_rec.balance_element_type_id :=
501 pay_pap_shd.g_old_rec.balance_element_type_id;
502 End If;
503 If (p_rec.information_category = hr_api.g_varchar2) then
504 p_rec.information_category :=
505 pay_pap_shd.g_old_rec.information_category;
506 End If;
507 If (p_rec.information1 = hr_api.g_varchar2) then
508 p_rec.information1 :=
509 pay_pap_shd.g_old_rec.information1;
510 End If;
511 If (p_rec.information2 = hr_api.g_varchar2) then
512 p_rec.information2 :=
513 pay_pap_shd.g_old_rec.information2;
514 End If;
515 If (p_rec.information3 = hr_api.g_varchar2) then
516 p_rec.information3 :=
517 pay_pap_shd.g_old_rec.information3;
518 End If;
519 If (p_rec.information4 = hr_api.g_varchar2) then
520 p_rec.information4 :=
521 pay_pap_shd.g_old_rec.information4;
522 End If;
523 If (p_rec.information5 = hr_api.g_varchar2) then
524 p_rec.information5 :=
525 pay_pap_shd.g_old_rec.information5;
526 End If;
527 If (p_rec.information6 = hr_api.g_varchar2) then
528 p_rec.information6 :=
529 pay_pap_shd.g_old_rec.information6;
530 End If;
531 If (p_rec.information7 = hr_api.g_varchar2) then
532 p_rec.information7 :=
533 pay_pap_shd.g_old_rec.information7;
534 End If;
535 If (p_rec.information8 = hr_api.g_varchar2) then
536 p_rec.information8 :=
537 pay_pap_shd.g_old_rec.information8;
538 End If;
539 If (p_rec.information9 = hr_api.g_varchar2) then
540 p_rec.information9 :=
541 pay_pap_shd.g_old_rec.information9;
542 End If;
543 If (p_rec.information10 = hr_api.g_varchar2) then
544 p_rec.information10 :=
545 pay_pap_shd.g_old_rec.information10;
546 End If;
547 If (p_rec.information11 = hr_api.g_varchar2) then
548 p_rec.information11 :=
549 pay_pap_shd.g_old_rec.information11;
550 End If;
551 If (p_rec.information12 = hr_api.g_varchar2) then
552 p_rec.information12 :=
553 pay_pap_shd.g_old_rec.information12;
554 End If;
555 If (p_rec.information13 = hr_api.g_varchar2) then
556 p_rec.information13 :=
557 pay_pap_shd.g_old_rec.information13;
558 End If;
559 If (p_rec.information14 = hr_api.g_varchar2) then
560 p_rec.information14 :=
561 pay_pap_shd.g_old_rec.information14;
562 End If;
563 If (p_rec.information15 = hr_api.g_varchar2) then
564 p_rec.information15 :=
565 pay_pap_shd.g_old_rec.information15;
566 End If;
567 If (p_rec.information16 = hr_api.g_varchar2) then
568 p_rec.information16 :=
569 pay_pap_shd.g_old_rec.information16;
570 End If;
571 If (p_rec.information17 = hr_api.g_varchar2) then
572 p_rec.information17 :=
573 pay_pap_shd.g_old_rec.information17;
574 End If;
575 If (p_rec.information18 = hr_api.g_varchar2) then
576 p_rec.information18 :=
577 pay_pap_shd.g_old_rec.information18;
578 End If;
579 If (p_rec.information19 = hr_api.g_varchar2) then
580 p_rec.information19 :=
581 pay_pap_shd.g_old_rec.information19;
582 End If;
583 If (p_rec.information20 = hr_api.g_varchar2) then
584 p_rec.information20 :=
585 pay_pap_shd.g_old_rec.information20;
586 End If;
587 If (p_rec.information21 = hr_api.g_varchar2) then
588 p_rec.information21 :=
589 pay_pap_shd.g_old_rec.information21;
590 End If;
591 If (p_rec.information22 = hr_api.g_varchar2) then
592 p_rec.information22 :=
593 pay_pap_shd.g_old_rec.information22;
594 End If;
595 If (p_rec.information23 = hr_api.g_varchar2) then
596 p_rec.information23 :=
597 pay_pap_shd.g_old_rec.information23;
598 End If;
599 If (p_rec.information24 = hr_api.g_varchar2) then
600 p_rec.information24 :=
601 pay_pap_shd.g_old_rec.information24;
602 End If;
603 If (p_rec.information25 = hr_api.g_varchar2) then
604 p_rec.information25 :=
605 pay_pap_shd.g_old_rec.information25;
606 End If;
607 If (p_rec.information26 = hr_api.g_varchar2) then
608 p_rec.information26 :=
609 pay_pap_shd.g_old_rec.information26;
610 End If;
611 If (p_rec.information27 = hr_api.g_varchar2) then
612 p_rec.information27 :=
613 pay_pap_shd.g_old_rec.information27;
614 End If;
615 If (p_rec.information28 = hr_api.g_varchar2) then
616 p_rec.information28 :=
617 pay_pap_shd.g_old_rec.information28;
618 End If;
619 If (p_rec.information29 = hr_api.g_varchar2) then
620 p_rec.information29 :=
621 pay_pap_shd.g_old_rec.information29;
622 End If;
623 If (p_rec.information30 = hr_api.g_varchar2) then
624 p_rec.information30 :=
625 pay_pap_shd.g_old_rec.information30;
626 End If;
627
628 --
629 hr_utility.set_location(' Leaving:'||l_proc, 10);
630 --
631 End convert_defs;
632 --
633 -- ----------------------------------------------------------------------------
634 -- |---------------------------------< upd >----------------------------------|
635 -- ----------------------------------------------------------------------------
636 PROCEDURE upd
637 (p_effective_date IN DATE
638 ,p_rec IN OUT NOCOPY pay_pap_shd.g_rec_type
639 ,p_check_accrual_ff OUT NOCOPY BOOLEAN)
640 IS
641
642 l_proc varchar2(72) := g_package||'upd';
643
644 BEGIN
645
646 hr_utility.set_location('Entering:'||l_proc, 10);
647
648 --
649 -- We must lock the row which we need to update.
650 --
651 pay_pap_shd.lck
652 (
653 p_rec.accrual_plan_id,
654 p_rec.object_version_number
655 );
656 --
657 -- 1. During an update system defaults are used to determine if
658 -- arguments have been defaulted or not. We must therefore
659 -- derive the full record structure values to be updated.
660 --
661 -- 2. Call the supporting update validate operations.
662 --
663 convert_defs(p_rec);
664
665 hr_utility.set_location(l_proc, 20);
666
667 pay_pap_bus.update_validate
668 (p_effective_date => p_effective_date
669 ,p_rec => p_rec
670 ,p_check_accrual_ff => p_check_accrual_ff);
671
672 hr_utility.set_location(l_proc, 30);
673
674 --
675 -- Call the supporting pre-update operation
676 --
677 pre_update(p_rec);
678
679 hr_utility.set_location(l_proc, 40);
680
681 --
682 -- Update the row.
683 --
684 update_dml(p_rec);
685
686 hr_utility.set_location(l_proc, 50);
687
688 --
689 -- Call the supporting post-update operation
690 --
691 post_update(p_rec);
692
693 hr_utility.set_location('Leaving: '||l_proc, 60);
694
695 END upd;
696 --
697 -- ----------------------------------------------------------------------------
698 -- |---------------------------------< upd >----------------------------------|
699 -- ----------------------------------------------------------------------------
700 PROCEDURE upd
701 (p_effective_date IN DATE
702 ,p_accrual_plan_id IN NUMBER
703 ,p_pto_input_value_id IN NUMBER DEFAULT HR_API.G_NUMBER
704 ,p_accrual_category IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
705 ,p_accrual_start IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
706 ,p_ineligible_period_length IN NUMBER DEFAULT HR_API.G_NUMBER
707 ,p_ineligible_period_type IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
708 ,p_accrual_formula_id IN NUMBER DEFAULT HR_API.G_NUMBER
709 ,p_co_formula_id IN NUMBER DEFAULT HR_API.G_NUMBER
710 ,p_description IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
711 ,p_ineligibility_formula_id IN NUMBER DEFAULT HR_API.G_NUMBER
712 ,p_payroll_formula_id IN NUMBER DEFAULT HR_API.G_NUMBER
713 ,p_defined_balance_id IN NUMBER DEFAULT HR_API.G_NUMBER
714 ,p_tagging_element_type_id IN NUMBER DEFAULT HR_API.G_NUMBER
715 ,p_balance_element_type_id IN NUMBER DEFAULT HR_API.G_NUMBER
716 ,p_information_category IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
717 ,p_information1 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
718 ,p_information2 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
719 ,p_information3 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
720 ,p_information4 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
721 ,p_information5 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
722 ,p_information6 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
723 ,p_information7 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
724 ,p_information8 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
725 ,p_information9 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
726 ,p_information10 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
727 ,p_information11 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
728 ,p_information12 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
729 ,p_information13 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
730 ,p_information14 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
731 ,p_information15 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
732 ,p_information16 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
733 ,p_information17 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
734 ,p_information18 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
735 ,p_information19 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
736 ,p_information20 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
737 ,p_information21 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
738 ,p_information22 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
739 ,p_information23 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
740 ,p_information24 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
741 ,p_information25 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
742 ,p_information26 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
743 ,p_information27 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
744 ,p_information28 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
745 ,p_information29 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
746 ,p_information30 IN VARCHAR2 DEFAULT HR_API.G_VARCHAR2
747 ,p_object_version_number IN OUT NOCOPY NUMBER
748 ,p_check_accrual_ff OUT NOCOPY BOOLEAN)
749 IS
750
751 l_rec pay_pap_shd.g_rec_type;
752 l_proc varchar2(72) := g_package||'upd';
753
754 BEGIN
755
756 hr_utility.set_location('Entering:'||l_proc, 10);
757
758 --
759 -- Call conversion function to turn arguments into the
760 -- l_rec structure.
761 --
762 l_rec :=
763 pay_pap_shd.convert_args
764 (
765 p_accrual_plan_id,
766 hr_api.g_number,
767 hr_api.g_number,
768 p_pto_input_value_id,
769 hr_api.g_number,
770 hr_api.g_number,
771 p_accrual_category,
772 hr_api.g_varchar2,
773 p_accrual_start,
774 hr_api.g_varchar2,
775 p_ineligible_period_length,
776 p_ineligible_period_type,
777 p_accrual_formula_id,
778 p_co_formula_id,
779 hr_api.g_number,
780 hr_api.g_number,
781 hr_api.g_number,
782 p_description,
783 p_ineligibility_formula_id,
784 p_payroll_formula_id,
785 p_defined_balance_id,
786 p_tagging_element_type_id,
787 p_balance_element_type_id,
788 p_object_version_number,
789 p_information_category,
790 p_information1,
791 p_information2,
792 p_information3,
793 p_information4,
794 p_information5,
795 p_information6,
796 p_information7,
797 p_information8,
798 p_information9,
799 p_information10,
800 p_information11,
801 p_information12,
802 p_information13,
803 p_information14,
804 p_information15,
805 p_information16,
806 p_information17,
807 p_information18,
808 p_information19,
809 p_information20,
810 p_information21,
811 p_information22,
812 p_information23,
813 p_information24,
814 p_information25,
815 p_information26,
816 p_information27,
817 p_information28,
818 p_information29,
819 p_information30
820 );
821 --
822 -- Having converted the arguments into the
823 -- plsql record structure we call the corresponding record
824 -- business process.
825 --
826 upd
827 (p_effective_date => p_effective_date
828 ,p_rec => l_rec
829 ,p_check_accrual_ff => p_check_accrual_ff);
830
831 p_object_version_number := l_rec.object_version_number;
832 --
833 hr_utility.set_location(' Leaving:'||l_proc, 10);
834
835 END upd;
836 --
837 END pay_pap_upd;