1 Package Body pay_con_upd as
2 /* $Header: pyconrhi.pkb 115.3 1999/12/03 16:45:29 pkm ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_con_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 pay_con_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_con_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the pay_us_contribution_history Row
68 --
69 update pay_us_contribution_history
70 set
71 contr_history_id = p_rec.contr_history_id,
72 person_id = p_rec.person_id,
73 date_from = p_rec.date_from,
74 date_to = p_rec.date_to,
75 contr_type = p_rec.contr_type,
76 business_group_id = p_rec.business_group_id,
77 legislation_code = p_rec.legislation_code,
78 amt_contr = p_rec.amt_contr,
79 max_contr_allowed = p_rec.max_contr_allowed,
80 includable_comp = p_rec.includable_comp,
81 tax_unit_id = p_rec.tax_unit_id,
82 source_system = p_rec.source_system,
83 contr_information_category = p_rec.contr_information_category,
84 contr_information1 = p_rec.contr_information1,
85 contr_information2 = p_rec.contr_information2,
86 contr_information3 = p_rec.contr_information3,
87 contr_information4 = p_rec.contr_information4,
88 contr_information5 = p_rec.contr_information5,
89 contr_information6 = p_rec.contr_information6,
90 contr_information7 = p_rec.contr_information7,
91 contr_information8 = p_rec.contr_information8,
92 contr_information9 = p_rec.contr_information9,
93 contr_information10 = p_rec.contr_information10,
94 contr_information11 = p_rec.contr_information11,
95 contr_information12 = p_rec.contr_information12,
96 contr_information13 = p_rec.contr_information13,
97 contr_information14 = p_rec.contr_information14,
98 contr_information15 = p_rec.contr_information15,
99 contr_information16 = p_rec.contr_information16,
100 contr_information17 = p_rec.contr_information17,
101 contr_information18 = p_rec.contr_information18,
102 contr_information19 = p_rec.contr_information19,
103 contr_information20 = p_rec.contr_information20,
104 contr_information21 = p_rec.contr_information21,
105 contr_information22 = p_rec.contr_information22,
106 contr_information23 = p_rec.contr_information23,
107 contr_information24 = p_rec.contr_information24,
108 contr_information25 = p_rec.contr_information25,
109 contr_information26 = p_rec.contr_information26,
110 contr_information27 = p_rec.contr_information27,
111 contr_information28 = p_rec.contr_information28,
112 contr_information29 = p_rec.contr_information29,
113 contr_information30 = p_rec.contr_information30,
114 object_version_number = p_rec.object_version_number
115 where contr_history_id = p_rec.contr_history_id;
116 --
117 pay_con_shd.g_api_dml := false; -- Unset the api dml status
118 --
119 hr_utility.set_location(' Leaving:'||l_proc, 10);
120 --
121 Exception
122 When hr_api.check_integrity_violated Then
123 -- A check constraint has been violated
124 pay_con_shd.g_api_dml := false; -- Unset the api dml status
125 pay_con_shd.constraint_error
126 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127 When hr_api.parent_integrity_violated Then
128 -- Parent integrity has been violated
129 pay_con_shd.g_api_dml := false; -- Unset the api dml status
130 pay_con_shd.constraint_error
131 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
132 When hr_api.unique_integrity_violated Then
133 -- Unique integrity has been violated
134 pay_con_shd.g_api_dml := false; -- Unset the api dml status
135 pay_con_shd.constraint_error
136 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
137 When Others Then
138 pay_con_shd.g_api_dml := false; -- Unset the api dml status
139 Raise;
140 End update_dml;
141 --
142 -- ----------------------------------------------------------------------------
143 -- |------------------------------< pre_update >------------------------------|
144 -- ----------------------------------------------------------------------------
145 -- {Start Of Comments}
146 --
147 -- Description:
148 -- This private procedure contains any processing which is required before
149 -- the update dml.
150 --
151 -- Prerequisites:
152 -- This is an internal procedure which is called from the upd procedure.
153 --
154 -- In Parameters:
155 -- A Pl/Sql record structre.
156 --
157 -- Post Success:
158 -- Processing continues.
159 --
160 -- Post Failure:
161 -- If an error has occurred, an error message and exception will be raised
162 -- but not handled.
163 --
164 -- Developer Implementation Notes:
165 -- Any pre-processing required before the update dml is issued should be
166 -- coded within this procedure. It is important to note that any 3rd party
167 -- maintenance should be reviewed before placing in this procedure.
168 --
169 -- Access Status:
170 -- Internal Row Handler Use Only.
171 --
172 -- {End Of Comments}
173 -- ----------------------------------------------------------------------------
174 Procedure pre_update(p_rec in pay_con_shd.g_rec_type) is
175 --
176 l_proc varchar2(72) := g_package||'pre_update';
177 --
178 Begin
179 hr_utility.set_location('Entering:'||l_proc, 5);
180 --
181 hr_utility.set_location(' Leaving:'||l_proc, 10);
182 End pre_update;
183 --
184 -- ----------------------------------------------------------------------------
185 -- |-----------------------------< post_update >------------------------------|
186 -- ----------------------------------------------------------------------------
187 -- {Start Of Comments}
188 --
189 -- Description:
190 -- This private procedure contains any processing which is required after the
191 -- update dml.
192 --
193 -- Prerequisites:
194 -- This is an internal procedure which is called from the upd procedure.
195 --
196 -- In Parameters:
197 -- A Pl/Sql record structre.
198 --
199 -- Post Success:
200 -- Processing continues.
201 --
202 -- Post Failure:
203 -- If an error has occurred, an error message and exception will be raised
204 -- but not handled.
205 --
206 -- Developer Implementation Notes:
207 -- Any post-processing required after the update dml is issued should be
208 -- coded within this procedure. It is important to note that any 3rd party
209 -- maintenance should be reviewed before placing in this procedure.
210 --
211 -- Access Status:
212 -- Internal Row Handler Use Only.
213 --
214 -- {End Of Comments}
215 -- ----------------------------------------------------------------------------
216 Procedure post_update(p_rec in pay_con_shd.g_rec_type) is
217 --
218 l_proc varchar2(72) := g_package||'post_update';
219 --
220 Begin
221 hr_utility.set_location('Entering:'||l_proc, 5);
222 --
223 --
224 -- Start of API User Hook for post_update.
225 --
226 begin
227 --
228 pay_con_rku.after_update
229 (
230 p_contr_history_id =>p_rec.contr_history_id
231 ,p_person_id =>p_rec.person_id
232 ,p_date_from =>p_rec.date_from
233 ,p_date_to =>p_rec.date_to
234 ,p_contr_type =>p_rec.contr_type
235 ,p_business_group_id =>p_rec.business_group_id
236 ,p_legislation_code =>p_rec.legislation_code
237 ,p_amt_contr =>p_rec.amt_contr
238 ,p_max_contr_allowed =>p_rec.max_contr_allowed
239 ,p_includable_comp =>p_rec.includable_comp
240 ,p_tax_unit_id =>p_rec.tax_unit_id
241 ,p_source_system =>p_rec.source_system
242 ,p_contr_information_category =>p_rec.contr_information_category
243 ,p_contr_information1 =>p_rec.contr_information1
244 ,p_contr_information2 =>p_rec.contr_information2
245 ,p_contr_information3 =>p_rec.contr_information3
246 ,p_contr_information4 =>p_rec.contr_information4
247 ,p_contr_information5 =>p_rec.contr_information5
248 ,p_contr_information6 =>p_rec.contr_information6
249 ,p_contr_information7 =>p_rec.contr_information7
250 ,p_contr_information8 =>p_rec.contr_information8
251 ,p_contr_information9 =>p_rec.contr_information9
252 ,p_contr_information10 =>p_rec.contr_information10
253 ,p_contr_information11 =>p_rec.contr_information11
254 ,p_contr_information12 =>p_rec.contr_information12
255 ,p_contr_information13 =>p_rec.contr_information13
256 ,p_contr_information14 =>p_rec.contr_information14
257 ,p_contr_information15 =>p_rec.contr_information15
258 ,p_contr_information16 =>p_rec.contr_information16
259 ,p_contr_information17 =>p_rec.contr_information17
260 ,p_contr_information18 =>p_rec.contr_information18
261 ,p_contr_information19 =>p_rec.contr_information19
262 ,p_contr_information20 =>p_rec.contr_information20
263 ,p_contr_information21 =>p_rec.contr_information21
264 ,p_contr_information22 =>p_rec.contr_information22
265 ,p_contr_information23 =>p_rec.contr_information23
266 ,p_contr_information24 =>p_rec.contr_information24
267 ,p_contr_information25 =>p_rec.contr_information25
268 ,p_contr_information26 =>p_rec.contr_information26
269 ,p_contr_information27 =>p_rec.contr_information27
270 ,p_contr_information28 =>p_rec.contr_information28
271 ,p_contr_information29 =>p_rec.contr_information29
272 ,p_contr_information30 =>p_rec.contr_information30
273 ,p_object_version_number =>p_rec.object_version_number
274 ,p_person_id_o =>pay_con_shd.g_old_rec.person_id
275 ,p_date_from_o =>pay_con_shd.g_old_rec.date_from
276 ,p_date_to_o =>pay_con_shd.g_old_rec.date_to
277 ,p_contr_type_o =>pay_con_shd.g_old_rec.contr_type
278 ,p_business_group_id_o =>pay_con_shd.g_old_rec.business_group_id
279 ,p_legislation_code_o =>pay_con_shd.g_old_rec.legislation_code
280 ,p_amt_contr_o =>pay_con_shd.g_old_rec.amt_contr
281 ,p_max_contr_allowed_o =>pay_con_shd.g_old_rec.max_contr_allowed
282 ,p_includable_comp_o =>pay_con_shd.g_old_rec.includable_comp
283 ,p_tax_unit_id_o =>pay_con_shd.g_old_rec.tax_unit_id
284 ,p_source_system_o =>pay_con_shd.g_old_rec.source_system
285 ,p_contr_information_category_o =>pay_con_shd.g_old_rec.contr_information_category
286 ,p_contr_information1_o =>pay_con_shd.g_old_rec.contr_information1
287 ,p_contr_information2_o =>pay_con_shd.g_old_rec.contr_information2
288 ,p_contr_information3_o =>pay_con_shd.g_old_rec.contr_information3
289 ,p_contr_information4_o =>pay_con_shd.g_old_rec.contr_information4
290 ,p_contr_information5_o =>pay_con_shd.g_old_rec.contr_information5
291 ,p_contr_information6_o =>pay_con_shd.g_old_rec.contr_information6
292 ,p_contr_information7_o =>pay_con_shd.g_old_rec.contr_information7
293 ,p_contr_information8_o =>pay_con_shd.g_old_rec.contr_information8
294 ,p_contr_information9_o =>pay_con_shd.g_old_rec.contr_information9
295 ,p_contr_information10_o =>pay_con_shd.g_old_rec.contr_information10
296 ,p_contr_information11_o =>pay_con_shd.g_old_rec.contr_information11
297 ,p_contr_information12_o =>pay_con_shd.g_old_rec.contr_information12
298 ,p_contr_information13_o =>pay_con_shd.g_old_rec.contr_information13
299 ,p_contr_information14_o =>pay_con_shd.g_old_rec.contr_information14
300 ,p_contr_information15_o =>pay_con_shd.g_old_rec.contr_information15
301 ,p_contr_information16_o =>pay_con_shd.g_old_rec.contr_information16
302 ,p_contr_information17_o =>pay_con_shd.g_old_rec.contr_information17
303 ,p_contr_information18_o =>pay_con_shd.g_old_rec.contr_information18
304 ,p_contr_information19_o =>pay_con_shd.g_old_rec.contr_information19
305 ,p_contr_information20_o =>pay_con_shd.g_old_rec.contr_information20
306 ,p_contr_information21_o =>pay_con_shd.g_old_rec.contr_information21
307 ,p_contr_information22_o =>pay_con_shd.g_old_rec.contr_information22
308 ,p_contr_information23_o =>pay_con_shd.g_old_rec.contr_information23
309 ,p_contr_information24_o =>pay_con_shd.g_old_rec.contr_information24
310 ,p_contr_information25_o =>pay_con_shd.g_old_rec.contr_information25
311 ,p_contr_information26_o =>pay_con_shd.g_old_rec.contr_information26
312 ,p_contr_information27_o =>pay_con_shd.g_old_rec.contr_information27
313 ,p_contr_information28_o =>pay_con_shd.g_old_rec.contr_information28
314 ,p_contr_information29_o =>pay_con_shd.g_old_rec.contr_information29
315 ,p_contr_information30_o =>pay_con_shd.g_old_rec.contr_information30
316 ,p_object_version_number_o =>pay_con_shd.g_old_rec.object_version_number
317 );
318 --
319 exception
320 --
321 when hr_api.cannot_find_prog_unit then
322 --
323 hr_api.cannot_find_prog_unit_error
324 (p_module_name => 'pay_contribution_history'
325 ,p_hook_type => 'AU');
326 --
327 end;
328 --
329 -- End of API User Hook for post_update.
330 --
331 --
332 hr_utility.set_location(' Leaving:'||l_proc, 10);
333 End post_update;
334 --
335 -- ----------------------------------------------------------------------------
336 -- |-----------------------------< convert_defs >-----------------------------|
337 -- ----------------------------------------------------------------------------
338 -- {Start Of Comments}
339 --
340 -- Description:
341 -- The Convert_Defs procedure has one very important function:
342 -- It must return the record structure for the row with all system defaulted
343 -- values converted into its corresponding parameter value for update. When
344 -- we attempt to update a row through the Upd process , certain
345 -- parameters can be defaulted which enables flexibility in the calling of
346 -- the upd process (e.g. only attributes which need to be updated need to be
347 -- specified). For the upd process to determine which attributes
348 -- have NOT been specified we need to check if the parameter has a reserved
349 -- system default value. Therefore, for all parameters which have a
350 -- corresponding reserved system default mechanism specified we need to
351 -- check if a system default is being used. If a system default is being
352 -- used then we convert the defaulted value into its corresponding attribute
353 -- value held in the g_old_rec data structure.
354 --
355 -- Prerequisites:
356 -- This private function can only be called from the upd process.
357 --
358 -- In Parameters:
359 -- A Pl/Sql record structre.
360 --
361 -- Post Success:
362 -- The record structure will be returned with all system defaulted parameter
363 -- values converted into its current row attribute value.
364 --
365 -- Post Failure:
366 -- No direct error handling is required within this function. Any possible
367 -- errors within this procedure will be a PL/SQL value error due to conversion
368 -- of datatypes or data lengths.
369 --
370 -- Developer Implementation Notes:
371 -- None.
372 --
373 -- Access Status:
374 -- Internal Row Handler Use Only.
375 --
376 -- {End Of Comments}
377 -- ----------------------------------------------------------------------------
378 Procedure convert_defs(p_rec in out pay_con_shd.g_rec_type) is
379 --
380 l_proc varchar2(72) := g_package||'convert_defs';
381 --
382 Begin
383 --
384 hr_utility.set_location('Entering:'||l_proc, 5);
385 --
386 -- We must now examine each argument value in the
387 -- p_rec plsql record structure
388 -- to see if a system default is being used. If a system default
389 -- is being used then we must set to the 'current' argument value.
390 --
391 If (p_rec.person_id = hr_api.g_number) then
392 p_rec.person_id :=
393 pay_con_shd.g_old_rec.person_id;
394 End If;
395 If (p_rec.date_from = hr_api.g_date) then
396 p_rec.date_from :=
397 pay_con_shd.g_old_rec.date_from;
398 End If;
399 If (p_rec.date_to = hr_api.g_date) then
400 p_rec.date_to :=
401 pay_con_shd.g_old_rec.date_to;
402 End If;
403 If (p_rec.contr_type = hr_api.g_varchar2) then
404 p_rec.contr_type :=
405 pay_con_shd.g_old_rec.contr_type;
406 End If;
407 If (p_rec.business_group_id = hr_api.g_number) then
408 p_rec.business_group_id :=
409 pay_con_shd.g_old_rec.business_group_id;
410 End If;
411 If (p_rec.legislation_code = hr_api.g_varchar2) then
412 p_rec.legislation_code :=
413 pay_con_shd.g_old_rec.legislation_code;
414 End If;
415 If (p_rec.amt_contr = hr_api.g_number) then
416 p_rec.amt_contr :=
417 pay_con_shd.g_old_rec.amt_contr;
418 End If;
419 If (p_rec.max_contr_allowed = hr_api.g_number) then
420 p_rec.max_contr_allowed :=
421 pay_con_shd.g_old_rec.max_contr_allowed;
422 End If;
423 If (p_rec.includable_comp = hr_api.g_number) then
424 p_rec.includable_comp :=
425 pay_con_shd.g_old_rec.includable_comp;
426 End If;
427 If (p_rec.tax_unit_id = hr_api.g_number) then
428 p_rec.tax_unit_id :=
429 pay_con_shd.g_old_rec.tax_unit_id;
430 End If;
431 If (p_rec.source_system = hr_api.g_varchar2) then
432 p_rec.source_system :=
433 pay_con_shd.g_old_rec.source_system;
434 End If;
435 If (p_rec.contr_information_category = hr_api.g_varchar2) then
436 p_rec.contr_information_category :=
437 pay_con_shd.g_old_rec.contr_information_category;
438 End If;
439 If (p_rec.contr_information1 = hr_api.g_varchar2) then
440 p_rec.contr_information1 :=
441 pay_con_shd.g_old_rec.contr_information1;
442 End If;
443 If (p_rec.contr_information2 = hr_api.g_varchar2) then
444 p_rec.contr_information2 :=
445 pay_con_shd.g_old_rec.contr_information2;
446 End If;
447 If (p_rec.contr_information3 = hr_api.g_varchar2) then
448 p_rec.contr_information3 :=
449 pay_con_shd.g_old_rec.contr_information3;
450 End If;
451 If (p_rec.contr_information4 = hr_api.g_varchar2) then
452 p_rec.contr_information4 :=
453 pay_con_shd.g_old_rec.contr_information4;
454 End If;
455 If (p_rec.contr_information5 = hr_api.g_varchar2) then
456 p_rec.contr_information5 :=
457 pay_con_shd.g_old_rec.contr_information5;
458 End If;
459 If (p_rec.contr_information6 = hr_api.g_varchar2) then
460 p_rec.contr_information6 :=
461 pay_con_shd.g_old_rec.contr_information6;
462 End If;
463 If (p_rec.contr_information7 = hr_api.g_varchar2) then
464 p_rec.contr_information7 :=
465 pay_con_shd.g_old_rec.contr_information7;
466 End If;
467 If (p_rec.contr_information8 = hr_api.g_varchar2) then
468 p_rec.contr_information8 :=
469 pay_con_shd.g_old_rec.contr_information8;
470 End If;
471 If (p_rec.contr_information9 = hr_api.g_varchar2) then
472 p_rec.contr_information9 :=
473 pay_con_shd.g_old_rec.contr_information9;
474 End If;
475 If (p_rec.contr_information10 = hr_api.g_varchar2) then
476 p_rec.contr_information10 :=
477 pay_con_shd.g_old_rec.contr_information10;
478 End If;
479 If (p_rec.contr_information11 = hr_api.g_varchar2) then
480 p_rec.contr_information11 :=
481 pay_con_shd.g_old_rec.contr_information11;
482 End If;
483 If (p_rec.contr_information12 = hr_api.g_varchar2) then
484 p_rec.contr_information12 :=
485 pay_con_shd.g_old_rec.contr_information12;
486 End If;
487 If (p_rec.contr_information13 = hr_api.g_varchar2) then
488 p_rec.contr_information13 :=
489 pay_con_shd.g_old_rec.contr_information13;
490 End If;
491 If (p_rec.contr_information14 = hr_api.g_varchar2) then
492 p_rec.contr_information14 :=
493 pay_con_shd.g_old_rec.contr_information14;
494 End If;
495 If (p_rec.contr_information15 = hr_api.g_varchar2) then
496 p_rec.contr_information15 :=
497 pay_con_shd.g_old_rec.contr_information15;
498 End If;
499 If (p_rec.contr_information16 = hr_api.g_varchar2) then
500 p_rec.contr_information16 :=
501 pay_con_shd.g_old_rec.contr_information16;
502 End If;
503 If (p_rec.contr_information17 = hr_api.g_varchar2) then
504 p_rec.contr_information17 :=
505 pay_con_shd.g_old_rec.contr_information17;
506 End If;
507 If (p_rec.contr_information18 = hr_api.g_varchar2) then
508 p_rec.contr_information18 :=
509 pay_con_shd.g_old_rec.contr_information18;
510 End If;
511 If (p_rec.contr_information19 = hr_api.g_varchar2) then
512 p_rec.contr_information19 :=
513 pay_con_shd.g_old_rec.contr_information19;
514 End If;
515 If (p_rec.contr_information20 = hr_api.g_varchar2) then
516 p_rec.contr_information20 :=
517 pay_con_shd.g_old_rec.contr_information20;
518 End If;
519 If (p_rec.contr_information21 = hr_api.g_varchar2) then
520 p_rec.contr_information21 :=
521 pay_con_shd.g_old_rec.contr_information21;
522 End If;
523 If (p_rec.contr_information22 = hr_api.g_varchar2) then
524 p_rec.contr_information22 :=
525 pay_con_shd.g_old_rec.contr_information22;
526 End If;
527 If (p_rec.contr_information23 = hr_api.g_varchar2) then
528 p_rec.contr_information23 :=
529 pay_con_shd.g_old_rec.contr_information23;
530 End If;
531 If (p_rec.contr_information24 = hr_api.g_varchar2) then
532 p_rec.contr_information24 :=
533 pay_con_shd.g_old_rec.contr_information24;
534 End If;
535 If (p_rec.contr_information25 = hr_api.g_varchar2) then
536 p_rec.contr_information25 :=
537 pay_con_shd.g_old_rec.contr_information25;
538 End If;
539 If (p_rec.contr_information26 = hr_api.g_varchar2) then
540 p_rec.contr_information26 :=
541 pay_con_shd.g_old_rec.contr_information26;
542 End If;
543 If (p_rec.contr_information27 = hr_api.g_varchar2) then
544 p_rec.contr_information27 :=
545 pay_con_shd.g_old_rec.contr_information27;
546 End If;
547 If (p_rec.contr_information28 = hr_api.g_varchar2) then
548 p_rec.contr_information28 :=
549 pay_con_shd.g_old_rec.contr_information28;
550 End If;
551 If (p_rec.contr_information29 = hr_api.g_varchar2) then
552 p_rec.contr_information29 :=
553 pay_con_shd.g_old_rec.contr_information29;
554 End If;
555 If (p_rec.contr_information30 = hr_api.g_varchar2) then
556 p_rec.contr_information30 :=
557 pay_con_shd.g_old_rec.contr_information30;
558 End If;
559
560 --
561 hr_utility.set_location(' Leaving:'||l_proc, 10);
562 --
563 End convert_defs;
564 --
565 -- ----------------------------------------------------------------------------
566 -- |---------------------------------< upd >----------------------------------|
567 -- ----------------------------------------------------------------------------
568 Procedure upd
569 (
570 p_rec in out pay_con_shd.g_rec_type
571 ) is
572 --
573 l_proc varchar2(72) := g_package||'upd';
574 --
575 Begin
576 hr_utility.set_location('Entering:'||l_proc, 5);
577 --
578 -- We must lock the row which we need to update.
579 --
580 pay_con_shd.lck
581 (
582 p_rec.contr_history_id,
583 p_rec.object_version_number
584 );
585 --
586 -- 1. During an update system defaults are used to determine if
587 -- arguments have been defaulted or not. We must therefore
588 -- derive the full record structure values to be updated.
589 --
590 -- 2. Call the supporting update validate operations.
591 --
592 convert_defs(p_rec);
593 pay_con_bus.update_validate(p_rec);
594 --
595 -- Call the supporting pre-update operation
596 --
597 pre_update(p_rec);
598 --
599 -- Update the row.
600 --
601 update_dml(p_rec);
602 --
603 -- Call the supporting post-update operation
604 --
605 post_update(p_rec);
606 End upd;
607 --
608 -- ----------------------------------------------------------------------------
609 -- |---------------------------------< upd >----------------------------------|
610 -- ----------------------------------------------------------------------------
611 Procedure upd
612 (
613 p_contr_history_id in number,
614 p_person_id in number default hr_api.g_number,
615 p_date_from in date default hr_api.g_date,
616 p_date_to in date default hr_api.g_date,
617 p_contr_type in varchar2 default hr_api.g_varchar2,
618 p_business_group_id in number default hr_api.g_number,
619 p_legislation_code in varchar2 default hr_api.g_varchar2,
620 p_amt_contr in number default hr_api.g_number,
621 p_max_contr_allowed in number default hr_api.g_number,
622 p_includable_comp in number default hr_api.g_number,
623 p_tax_unit_id in number default hr_api.g_number,
624 p_source_system in varchar2 default hr_api.g_varchar2,
625 p_contr_information_category in varchar2 default hr_api.g_varchar2,
626 p_contr_information1 in varchar2 default hr_api.g_varchar2,
627 p_contr_information2 in varchar2 default hr_api.g_varchar2,
628 p_contr_information3 in varchar2 default hr_api.g_varchar2,
629 p_contr_information4 in varchar2 default hr_api.g_varchar2,
630 p_contr_information5 in varchar2 default hr_api.g_varchar2,
631 p_contr_information6 in varchar2 default hr_api.g_varchar2,
632 p_contr_information7 in varchar2 default hr_api.g_varchar2,
633 p_contr_information8 in varchar2 default hr_api.g_varchar2,
634 p_contr_information9 in varchar2 default hr_api.g_varchar2,
635 p_contr_information10 in varchar2 default hr_api.g_varchar2,
636 p_contr_information11 in varchar2 default hr_api.g_varchar2,
637 p_contr_information12 in varchar2 default hr_api.g_varchar2,
638 p_contr_information13 in varchar2 default hr_api.g_varchar2,
639 p_contr_information14 in varchar2 default hr_api.g_varchar2,
640 p_contr_information15 in varchar2 default hr_api.g_varchar2,
641 p_contr_information16 in varchar2 default hr_api.g_varchar2,
642 p_contr_information17 in varchar2 default hr_api.g_varchar2,
643 p_contr_information18 in varchar2 default hr_api.g_varchar2,
644 p_contr_information19 in varchar2 default hr_api.g_varchar2,
645 p_contr_information20 in varchar2 default hr_api.g_varchar2,
646 p_contr_information21 in varchar2 default hr_api.g_varchar2,
647 p_contr_information22 in varchar2 default hr_api.g_varchar2,
648 p_contr_information23 in varchar2 default hr_api.g_varchar2,
649 p_contr_information24 in varchar2 default hr_api.g_varchar2,
650 p_contr_information25 in varchar2 default hr_api.g_varchar2,
651 p_contr_information26 in varchar2 default hr_api.g_varchar2,
652 p_contr_information27 in varchar2 default hr_api.g_varchar2,
653 p_contr_information28 in varchar2 default hr_api.g_varchar2,
654 p_contr_information29 in varchar2 default hr_api.g_varchar2,
655 p_contr_information30 in varchar2 default hr_api.g_varchar2,
656 p_object_version_number in out number
657 ) is
658 --
659 l_rec pay_con_shd.g_rec_type;
660 l_proc varchar2(72) := g_package||'upd';
661 --
662 Begin
663 hr_utility.set_location('Entering:'||l_proc, 5);
664 --
665 -- Call conversion function to turn arguments into the
666 -- l_rec structure.
667 --
668 l_rec :=
669 pay_con_shd.convert_args
670 (
671 p_contr_history_id,
672 p_person_id,
673 p_date_from,
674 p_date_to,
675 p_contr_type,
676 p_business_group_id,
677 p_legislation_code,
678 p_amt_contr,
679 p_max_contr_allowed,
680 p_includable_comp,
681 p_tax_unit_id,
682 p_source_system,
683 p_contr_information_category,
684 p_contr_information1,
685 p_contr_information2,
686 p_contr_information3,
687 p_contr_information4,
688 p_contr_information5,
689 p_contr_information6,
690 p_contr_information7,
691 p_contr_information8,
692 p_contr_information9,
693 p_contr_information10,
694 p_contr_information11,
695 p_contr_information12,
696 p_contr_information13,
697 p_contr_information14,
698 p_contr_information15,
699 p_contr_information16,
700 p_contr_information17,
701 p_contr_information18,
702 p_contr_information19,
703 p_contr_information20,
704 p_contr_information21,
705 p_contr_information22,
706 p_contr_information23,
707 p_contr_information24,
708 p_contr_information25,
709 p_contr_information26,
710 p_contr_information27,
711 p_contr_information28,
712 p_contr_information29,
713 p_contr_information30,
714 p_object_version_number
715 );
716 --
717 -- Having converted the arguments into the
718 -- plsql record structure we call the corresponding record
719 -- business process.
720 --
721 upd(l_rec);
722 p_object_version_number := l_rec.object_version_number;
723 --
724 hr_utility.set_location(' Leaving:'||l_proc, 10);
725 End upd;
726 --
727 end pay_con_upd;