[Home] [Help]
PACKAGE BODY: APPS.GHR_REI_UPD
Source
1 Package Body ghr_rei_upd as
2 /* $Header: ghreirhi.pkb 120.2.12010000.2 2008/09/02 07:19:59 vmididho ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ghr_rei_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). Not Required Changed by DARORA
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 -- Pre Conditions:
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 -- If a check, unique or parent integrity constraint violation is raised the
39 -- constraint_error procedure will be called.
40 --
41 -- Developer Implementation Notes:
42 -- The update 'set' attribute list should be modified if any of your
43 -- attributes are not updateable.
44 --
45 -- Access Status:
46 -- Internal Table Handler Use Only.
47 --
48 -- {End Of Comments}
49 -- ----------------------------------------------------------------------------
50 Procedure update_dml(p_rec in out nocopy ghr_rei_shd.g_rec_type) is
51 --
52 l_proc varchar2(72) := g_package||'update_dml';
53 --
54 Begin
55 hr_utility.set_location('Entering:'||l_proc, 5);
56 --
57 -- Increment the object version
58 --
59 p_rec.object_version_number := p_rec.object_version_number + 1;
60 --
61 -- Update the ghr_pa_request_extra_info Row
62 --
63 update ghr_pa_request_extra_info
64 set
65 pa_request_extra_info_id = p_rec.pa_request_extra_info_id,
66 pa_request_id = p_rec.pa_request_id,
67 information_type = p_rec.information_type,
68 rei_attribute_category = p_rec.rei_attribute_category,
69 rei_attribute1 = p_rec.rei_attribute1,
70 rei_attribute2 = p_rec.rei_attribute2,
71 rei_attribute3 = p_rec.rei_attribute3,
72 rei_attribute4 = p_rec.rei_attribute4,
73 rei_attribute5 = p_rec.rei_attribute5,
74 rei_attribute6 = p_rec.rei_attribute6,
75 rei_attribute7 = p_rec.rei_attribute7,
76 rei_attribute8 = p_rec.rei_attribute8,
77 rei_attribute9 = p_rec.rei_attribute9,
78 rei_attribute10 = p_rec.rei_attribute10,
79 rei_attribute11 = p_rec.rei_attribute11,
80 rei_attribute12 = p_rec.rei_attribute12,
81 rei_attribute13 = p_rec.rei_attribute13,
82 rei_attribute14 = p_rec.rei_attribute14,
83 rei_attribute15 = p_rec.rei_attribute15,
84 rei_attribute16 = p_rec.rei_attribute16,
85 rei_attribute17 = p_rec.rei_attribute17,
86 rei_attribute18 = p_rec.rei_attribute18,
87 rei_attribute19 = p_rec.rei_attribute19,
88 rei_attribute20 = p_rec.rei_attribute20,
89 rei_information_category = p_rec.rei_information_category,
90 rei_information1 = p_rec.rei_information1,
91 rei_information2 = p_rec.rei_information2,
92 rei_information3 = p_rec.rei_information3,
93 rei_information4 = p_rec.rei_information4,
94 rei_information5 = p_rec.rei_information5,
95 rei_information6 = p_rec.rei_information6,
96 rei_information7 = p_rec.rei_information7,
97 rei_information8 = p_rec.rei_information8,
98 rei_information9 = p_rec.rei_information9,
99 rei_information10 = p_rec.rei_information10,
100 rei_information11 = p_rec.rei_information11,
101 rei_information12 = p_rec.rei_information12,
102 rei_information13 = p_rec.rei_information13,
103 rei_information14 = p_rec.rei_information14,
104 rei_information15 = p_rec.rei_information15,
105 rei_information16 = p_rec.rei_information16,
106 rei_information17 = p_rec.rei_information17,
107 rei_information18 = p_rec.rei_information18,
108 rei_information19 = p_rec.rei_information19,
109 rei_information20 = p_rec.rei_information20,
110 rei_information21 = p_rec.rei_information21,
111 rei_information22 = p_rec.rei_information22,
112 rei_information28 = p_rec.rei_information28,
113 rei_information29 = p_rec.rei_information29,
114 rei_information23 = p_rec.rei_information23,
115 rei_information24 = p_rec.rei_information24,
116 rei_information25 = p_rec.rei_information25,
117 rei_information26 = p_rec.rei_information26,
118 rei_information27 = p_rec.rei_information27,
119 rei_information30 = p_rec.rei_information30,
120 object_version_number = p_rec.object_version_number,
121 request_id = p_rec.request_id,
122 program_application_id = p_rec.program_application_id,
123 program_id = p_rec.program_id,
124 program_update_date = p_rec.program_update_date
125 where pa_request_extra_info_id = p_rec.pa_request_extra_info_id;
126 --
127 hr_utility.set_location(' Leaving:'||l_proc, 10);
128 --
129 Exception
130 When hr_api.check_integrity_violated Then
131 -- A check constraint has been violated
132 ghr_rei_shd.constraint_error
133 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
134 When hr_api.parent_integrity_violated Then
135 -- Parent integrity has been violated
136 ghr_rei_shd.constraint_error
137 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138 When hr_api.unique_integrity_violated Then
139 -- Unique integrity has been violated
140 ghr_rei_shd.constraint_error
141 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
142 When Others Then
143 Raise;
144 End update_dml;
145 --
146 -- ----------------------------------------------------------------------------
147 -- |------------------------------< pre_update >------------------------------|
148 -- ----------------------------------------------------------------------------
149 -- {Start Of Comments}
150 --
151 -- Description:
152 -- This private procedure contains any processing which is required before
153 -- the update dml.
154 --
155 -- Pre Conditions:
156 -- This is an internal procedure which is called from the upd procedure.
157 --
158 -- In Parameters:
159 -- A Pl/Sql record structre.
160 --
161 -- Post Success:
162 -- Processing continues.
163 --
164 -- Post Failure:
165 -- If an error has occurred, an error message and exception will be raised
166 -- but not handled.
167 --
168 -- Developer Implementation Notes:
169 -- Any pre-processing required before the update dml is issued should be
170 -- coded within this procedure. It is important to note that any 3rd party
171 -- maintenance should be reviewed before placing in this procedure.
172 --
173 -- Access Status:
174 -- Internal Table Handler Use Only.
175 --
176 -- {End Of Comments}
177 -- ----------------------------------------------------------------------------
178 Procedure pre_update(p_rec in ghr_rei_shd.g_rec_type) is
179 --
180 l_proc varchar2(72) := g_package||'pre_update';
181 --
182 Begin
183 hr_utility.set_location('Entering:'||l_proc, 5);
184 --
185 hr_utility.set_location(' Leaving:'||l_proc, 10);
186 End pre_update;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |-----------------------------< post_update >------------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 -- This private procedure contains any processing which is required after the
195 -- update dml.
196 --
197 -- Pre Conditions:
198 -- This is an internal procedure which is called from the upd procedure.
199 --
200 -- In Parameters:
201 -- A Pl/Sql record structre.
202 --
203 -- Post Success:
204 -- Processing continues.
205 --
206 -- Post Failure:
207 -- If an error has occurred, an error message and exception will be raised
208 -- but not handled.
209 --
210 -- Developer Implementation Notes:
211 -- Any post-processing required after the update dml is issued should be
212 -- coded within this procedure. It is important to note that any 3rd party
213 -- maintenance should be reviewed before placing in this procedure.
214 --
215 -- Access Status:
216 -- Internal Table Handler Use Only.
217 --
218 -- {End Of Comments}
219 -- ----------------------------------------------------------------------------
220 Procedure post_update(p_rec in ghr_rei_shd.g_rec_type) is
221 --
222 l_proc varchar2(72) := g_package||'post_update';
223 --
224 Begin
225 hr_utility.set_location('Entering:'||l_proc, 5);
226 --
227 -- This is a hook point and the user hook for post_update is called here.
228 --
229 begin
230 ghr_rei_rku.after_update (
231 p_pa_request_extra_info_id => p_rec.pa_request_extra_info_id,
232 p_pa_request_id => p_rec.pa_request_id ,
233 p_information_type => p_rec.information_type ,
234 p_rei_attribute_category => p_rec.rei_attribute_category ,
235 p_rei_attribute1 => p_rec.rei_attribute1 ,
236 p_rei_attribute2 => p_rec.rei_attribute2 ,
237 p_rei_attribute3 => p_rec.rei_attribute3 ,
238 p_rei_attribute4 => p_rec.rei_attribute4 ,
239 p_rei_attribute5 => p_rec.rei_attribute5 ,
240 p_rei_attribute6 => p_rec.rei_attribute6 ,
241 p_rei_attribute7 => p_rec.rei_attribute7 ,
242 p_rei_attribute8 => p_rec.rei_attribute8 ,
243 p_rei_attribute9 => p_rec.rei_attribute9 ,
244 p_rei_attribute10 => p_rec.rei_attribute10 ,
245 p_rei_attribute11 => p_rec.rei_attribute11 ,
246 p_rei_attribute12 => p_rec.rei_attribute12 ,
247 p_rei_attribute13 => p_rec.rei_attribute13 ,
248 p_rei_attribute14 => p_rec.rei_attribute14 ,
249 p_rei_attribute15 => p_rec.rei_attribute15 ,
250 p_rei_attribute16 => p_rec.rei_attribute16 ,
251 p_rei_attribute17 => p_rec.rei_attribute17 ,
252 p_rei_attribute18 => p_rec.rei_attribute18 ,
253 p_rei_attribute19 => p_rec.rei_attribute19 ,
254 p_rei_attribute20 => p_rec.rei_attribute20 ,
255 p_rei_information_category => p_rec.rei_information_category,
256 p_rei_information1 => p_rec.rei_information1 ,
257 p_rei_information2 => p_rec.rei_information2 ,
258 p_rei_information3 => p_rec.rei_information3 ,
259 p_rei_information4 => p_rec.rei_information4 ,
260 p_rei_information5 => p_rec.rei_information5 ,
261 p_rei_information6 => p_rec.rei_information6 ,
262 p_rei_information7 => p_rec.rei_information7 ,
263 p_rei_information8 => p_rec.rei_information8 ,
264 p_rei_information9 => p_rec.rei_information9 ,
265 p_rei_information10 => p_rec.rei_information10 ,
266 p_rei_information11 => p_rec.rei_information11 ,
267 p_rei_information12 => p_rec.rei_information12 ,
268 p_rei_information13 => p_rec.rei_information13 ,
269 p_rei_information14 => p_rec.rei_information14 ,
270 p_rei_information15 => p_rec.rei_information15 ,
271 p_rei_information16 => p_rec.rei_information16 ,
272 p_rei_information17 => p_rec.rei_information17 ,
273 p_rei_information18 => p_rec.rei_information18 ,
274 p_rei_information19 => p_rec.rei_information19 ,
275 p_rei_information20 => p_rec.rei_information20 ,
276 p_rei_information21 => p_rec.rei_information21 ,
277 p_rei_information22 => p_rec.rei_information22 ,
278 p_rei_information28 => p_rec.rei_information28 ,
279 p_rei_information29 => p_rec.rei_information29 ,
280 p_rei_information23 => p_rec.rei_information23 ,
281 p_rei_information24 => p_rec.rei_information24 ,
282 p_rei_information25 => p_rec.rei_information25 ,
283 p_rei_information26 => p_rec.rei_information26 ,
284 p_rei_information27 => p_rec.rei_information27 ,
285 p_rei_information30 => p_rec.rei_information30 ,
286 p_request_id => p_rec.request_id ,
287 p_program_application_id => p_rec.program_application_id ,
288 p_program_id => p_rec.program_id ,
289 p_program_update_date => p_rec.program_update_date ,
290 p_pa_request_id_o => ghr_rei_shd.g_old_rec.pa_request_id ,
291 p_information_type_o => ghr_rei_shd.g_old_rec.information_type ,
292 p_rei_attribute_category_o => ghr_rei_shd.g_old_rec.rei_attribute_category ,
293 p_rei_attribute1_o => ghr_rei_shd.g_old_rec.rei_attribute1 ,
294 p_rei_attribute2_o => ghr_rei_shd.g_old_rec.rei_attribute2 ,
295 p_rei_attribute3_o => ghr_rei_shd.g_old_rec.rei_attribute3 ,
296 p_rei_attribute4_o => ghr_rei_shd.g_old_rec.rei_attribute4 ,
297 p_rei_attribute5_o => ghr_rei_shd.g_old_rec.rei_attribute5 ,
298 p_rei_attribute6_o => ghr_rei_shd.g_old_rec.rei_attribute6 ,
299 p_rei_attribute7_o => ghr_rei_shd.g_old_rec.rei_attribute7 ,
300 p_rei_attribute8_o => ghr_rei_shd.g_old_rec.rei_attribute8 ,
301 p_rei_attribute9_o => ghr_rei_shd.g_old_rec.rei_attribute9 ,
302 p_rei_attribute10_o => ghr_rei_shd.g_old_rec.rei_attribute10 ,
303 p_rei_attribute11_o => ghr_rei_shd.g_old_rec.rei_attribute11 ,
304 p_rei_attribute12_o => ghr_rei_shd.g_old_rec.rei_attribute12 ,
305 p_rei_attribute13_o => ghr_rei_shd.g_old_rec.rei_attribute13 ,
306 p_rei_attribute14_o => ghr_rei_shd.g_old_rec.rei_attribute14 ,
307 p_rei_attribute15_o => ghr_rei_shd.g_old_rec.rei_attribute15 ,
308 p_rei_attribute16_o => ghr_rei_shd.g_old_rec.rei_attribute16 ,
309 p_rei_attribute17_o => ghr_rei_shd.g_old_rec.rei_attribute17 ,
310 p_rei_attribute18_o => ghr_rei_shd.g_old_rec.rei_attribute18 ,
311 p_rei_attribute19_o => ghr_rei_shd.g_old_rec.rei_attribute19 ,
312 p_rei_attribute20_o => ghr_rei_shd.g_old_rec.rei_attribute20 ,
313 p_rei_information_category_o => ghr_rei_shd.g_old_rec.rei_information_category ,
314 p_rei_information1_o => ghr_rei_shd.g_old_rec.rei_information1 ,
315 p_rei_information2_o => ghr_rei_shd.g_old_rec.rei_information2 ,
316 p_rei_information3_o => ghr_rei_shd.g_old_rec.rei_information3 ,
317 p_rei_information4_o => ghr_rei_shd.g_old_rec.rei_information4 ,
318 p_rei_information5_o => ghr_rei_shd.g_old_rec.rei_information5 ,
319 p_rei_information6_o => ghr_rei_shd.g_old_rec.rei_information6 ,
320 p_rei_information7_o => ghr_rei_shd.g_old_rec.rei_information7 ,
321 p_rei_information8_o => ghr_rei_shd.g_old_rec.rei_information8 ,
322 p_rei_information9_o => ghr_rei_shd.g_old_rec.rei_information9 ,
323 p_rei_information10_o => ghr_rei_shd.g_old_rec.rei_information10 ,
324 p_rei_information11_o => ghr_rei_shd.g_old_rec.rei_information11 ,
325 p_rei_information12_o => ghr_rei_shd.g_old_rec.rei_information12 ,
326 p_rei_information13_o => ghr_rei_shd.g_old_rec.rei_information13 ,
327 p_rei_information14_o => ghr_rei_shd.g_old_rec.rei_information14 ,
328 p_rei_information15_o => ghr_rei_shd.g_old_rec.rei_information15 ,
329 p_rei_information16_o => ghr_rei_shd.g_old_rec.rei_information16 ,
330 p_rei_information17_o => ghr_rei_shd.g_old_rec.rei_information17 ,
331 p_rei_information18_o => ghr_rei_shd.g_old_rec.rei_information18 ,
332 p_rei_information19_o => ghr_rei_shd.g_old_rec.rei_information19 ,
333 p_rei_information20_o => ghr_rei_shd.g_old_rec.rei_information20 ,
334 p_rei_information21_o => ghr_rei_shd.g_old_rec.rei_information21 ,
335 p_rei_information22_o => ghr_rei_shd.g_old_rec.rei_information22 ,
336 p_rei_information28_o => ghr_rei_shd.g_old_rec.rei_information28 ,
337 p_rei_information29_o => ghr_rei_shd.g_old_rec.rei_information29 ,
338 p_rei_information23_o => ghr_rei_shd.g_old_rec.rei_information23 ,
339 p_rei_information24_o => ghr_rei_shd.g_old_rec.rei_information24 ,
340 p_rei_information25_o => ghr_rei_shd.g_old_rec.rei_information25 ,
341 p_rei_information26_o => ghr_rei_shd.g_old_rec.rei_information26 ,
342 p_rei_information27_o => ghr_rei_shd.g_old_rec.rei_information27 ,
343 p_rei_information30_o => ghr_rei_shd.g_old_rec.rei_information30 ,
344 p_request_id_o => ghr_rei_shd.g_old_rec.request_id ,
345 p_program_application_id_o => ghr_rei_shd.g_old_rec.program_application_id ,
346 p_program_id_o => ghr_rei_shd.g_old_rec.program_id ,
347 p_program_update_date_o => ghr_rei_shd.g_old_rec.program_update_date
348 );
349 exception
350 when hr_api.cannot_find_prog_unit then
351 hr_api.cannot_find_prog_unit_error
352 ( p_module_name => 'GHR_PA_REQUEST_EXTRA_INFO'
353 ,p_hook_type => 'AU'
354 );
355 end;
356 -- End of API User Hook for post_update.
357 hr_utility.set_location(' Leaving:'||l_proc, 10);
358 End post_update;
359 --
360 -- ----------------------------------------------------------------------------
361 -- |-----------------------------< convert_defs >-----------------------------|
362 -- ----------------------------------------------------------------------------
363 -- {Start Of Comments}
364 --
365 -- Description:
366 -- The Convert_Defs procedure has one very important function:
367 -- It must return the record structure for the row with all system defaulted
368 -- values converted into its corresponding parameter value for update. When
369 -- we attempt to update a row through the Upd process , certain
370 -- parameters can be defaulted which enables flexibility in the calling of
371 -- the upd process (e.g. only attributes which need to be updated need to be
372 -- specified). For the upd process to determine which attributes
373 -- have NOT been specified we need to check if the parameter has a reserved
374 -- system default value. Therefore, for all parameters which have a
375 -- corresponding reserved system default mechanism specified we need to
376 -- check if a system default is being used. If a system default is being
377 -- used then we convert the defaulted value into its corresponding attribute
378 -- value held in the g_old_rec data structure.
379 --
380 -- Pre Conditions:
381 -- This private function can only be called from the upd process.
382 --
383 -- In Parameters:
384 -- A Pl/Sql record structre.
385 --
386 -- Post Success:
387 -- The record structure will be returned with all system defaulted parameter
388 -- values converted into its current row attribute value.
389 --
390 -- Post Failure:
391 -- No direct error handling is required within this function. Any possible
392 -- errors within this procedure will be a PL/SQL value error due to conversion
393
394 -- of datatypes or data lengths.
395 --
396 -- Developer Implementation Notes:
397 -- None.
398 --
399 -- Access Status:
400 -- Internal Table Handler Use Only.
401 --
402 -- {End Of Comments}
403 -- ----------------------------------------------------------------------------
404 Procedure convert_defs(p_rec in out nocopy ghr_rei_shd.g_rec_type) is
405 --
406 l_proc varchar2(72) := g_package||'convert_defs';
407 --
408 Begin
409 --
410 hr_utility.set_location('Entering:'||l_proc, 5);
411 --
412 -- We must now examine each argument value in the
413 -- p_rec plsql record structure
414 -- to see if a system default is being used. If a system default
415 -- is being used then we must set to the 'current' argument value.
416 --
417 If (p_rec.pa_request_id = hr_api.g_number) then
418 p_rec.pa_request_id :=
419 ghr_rei_shd.g_old_rec.pa_request_id;
420 End If;
421 If (p_rec.information_type = hr_api.g_varchar2) then
422 p_rec.information_type :=
423 ghr_rei_shd.g_old_rec.information_type;
424 End If;
425 If (p_rec.rei_attribute_category = hr_api.g_varchar2) then
426 p_rec.rei_attribute_category :=
427 ghr_rei_shd.g_old_rec.rei_attribute_category;
428 End If;
429 If (p_rec.rei_attribute1 = hr_api.g_varchar2) then
430 p_rec.rei_attribute1 :=
431 ghr_rei_shd.g_old_rec.rei_attribute1;
432 End If;
433 If (p_rec.rei_attribute2 = hr_api.g_varchar2) then
434 p_rec.rei_attribute2 :=
435 ghr_rei_shd.g_old_rec.rei_attribute2;
436 End If;
437 If (p_rec.rei_attribute3 = hr_api.g_varchar2) then
438 p_rec.rei_attribute3 :=
439 ghr_rei_shd.g_old_rec.rei_attribute3;
440 End If;
441 If (p_rec.rei_attribute4 = hr_api.g_varchar2) then
442 p_rec.rei_attribute4 :=
443 ghr_rei_shd.g_old_rec.rei_attribute4;
444 End If;
445 If (p_rec.rei_attribute5 = hr_api.g_varchar2) then
446 p_rec.rei_attribute5 :=
447 ghr_rei_shd.g_old_rec.rei_attribute5;
448 End If;
449 If (p_rec.rei_attribute6 = hr_api.g_varchar2) then
450 p_rec.rei_attribute6 :=
451 ghr_rei_shd.g_old_rec.rei_attribute6;
452 End If;
453 If (p_rec.rei_attribute7 = hr_api.g_varchar2) then
454 p_rec.rei_attribute7 :=
455 ghr_rei_shd.g_old_rec.rei_attribute7;
456 End If;
457 If (p_rec.rei_attribute8 = hr_api.g_varchar2) then
458 p_rec.rei_attribute8 :=
459 ghr_rei_shd.g_old_rec.rei_attribute8;
460 End If;
461 If (p_rec.rei_attribute9 = hr_api.g_varchar2) then
462 p_rec.rei_attribute9 :=
463 ghr_rei_shd.g_old_rec.rei_attribute9;
464 End If;
465 If (p_rec.rei_attribute10 = hr_api.g_varchar2) then
466 p_rec.rei_attribute10 :=
467 ghr_rei_shd.g_old_rec.rei_attribute10;
468 End If;
469 If (p_rec.rei_attribute11 = hr_api.g_varchar2) then
470 p_rec.rei_attribute11 :=
471 ghr_rei_shd.g_old_rec.rei_attribute11;
472 End If;
473 If (p_rec.rei_attribute12 = hr_api.g_varchar2) then
474 p_rec.rei_attribute12 :=
475 ghr_rei_shd.g_old_rec.rei_attribute12;
476 End If;
477 If (p_rec.rei_attribute13 = hr_api.g_varchar2) then
478 p_rec.rei_attribute13 :=
479 ghr_rei_shd.g_old_rec.rei_attribute13;
480 End If;
481 If (p_rec.rei_attribute14 = hr_api.g_varchar2) then
482 p_rec.rei_attribute14 :=
483 ghr_rei_shd.g_old_rec.rei_attribute14;
484 End If;
485 If (p_rec.rei_attribute15 = hr_api.g_varchar2) then
486 p_rec.rei_attribute15 :=
487 ghr_rei_shd.g_old_rec.rei_attribute15;
488 End If;
489 If (p_rec.rei_attribute16 = hr_api.g_varchar2) then
490 p_rec.rei_attribute16 :=
491 ghr_rei_shd.g_old_rec.rei_attribute16;
492 End If;
493 If (p_rec.rei_attribute17 = hr_api.g_varchar2) then
494 p_rec.rei_attribute17 :=
495 ghr_rei_shd.g_old_rec.rei_attribute17;
496 End If;
497 If (p_rec.rei_attribute18 = hr_api.g_varchar2) then
498 p_rec.rei_attribute18 :=
499 ghr_rei_shd.g_old_rec.rei_attribute18;
500 End If;
501 If (p_rec.rei_attribute19 = hr_api.g_varchar2) then
502 p_rec.rei_attribute19 :=
503 ghr_rei_shd.g_old_rec.rei_attribute19;
504 End If;
505 If (p_rec.rei_attribute20 = hr_api.g_varchar2) then
506 p_rec.rei_attribute20 :=
507 ghr_rei_shd.g_old_rec.rei_attribute20;
508 End If;
509 If (p_rec.rei_information_category = hr_api.g_varchar2) then
510 p_rec.rei_information_category :=
511 ghr_rei_shd.g_old_rec.rei_information_category;
512 End If;
513 If (p_rec.rei_information1 = hr_api.g_varchar2) then
514 p_rec.rei_information1 :=
515 ghr_rei_shd.g_old_rec.rei_information1;
516 End If;
517 If (p_rec.rei_information2 = hr_api.g_varchar2) then
518 p_rec.rei_information2 :=
519 ghr_rei_shd.g_old_rec.rei_information2;
520 End If;
521 If (p_rec.rei_information3 = hr_api.g_varchar2) then
522 p_rec.rei_information3 :=
523 ghr_rei_shd.g_old_rec.rei_information3;
524 End If;
525 If (p_rec.rei_information4 = hr_api.g_varchar2) then
526 p_rec.rei_information4 :=
527 ghr_rei_shd.g_old_rec.rei_information4;
528 End If;
529 If (p_rec.rei_information5 = hr_api.g_varchar2) then
530 p_rec.rei_information5 :=
531 ghr_rei_shd.g_old_rec.rei_information5;
532 End If;
533 If (p_rec.rei_information6 = hr_api.g_varchar2) then
534 p_rec.rei_information6 :=
535 ghr_rei_shd.g_old_rec.rei_information6;
536 End If;
537 If (p_rec.rei_information7 = hr_api.g_varchar2) then
538 p_rec.rei_information7 :=
539 ghr_rei_shd.g_old_rec.rei_information7;
540 End If;
541 If (p_rec.rei_information8 = hr_api.g_varchar2) then
542 p_rec.rei_information8 :=
543 ghr_rei_shd.g_old_rec.rei_information8;
544 End If;
545 If (p_rec.rei_information9 = hr_api.g_varchar2) then
546 p_rec.rei_information9 :=
547 ghr_rei_shd.g_old_rec.rei_information9;
548 End If;
549 If (p_rec.rei_information10 = hr_api.g_varchar2) then
550 p_rec.rei_information10 :=
551 ghr_rei_shd.g_old_rec.rei_information10;
552 End If;
553 If (p_rec.rei_information11 = hr_api.g_varchar2) then
554 p_rec.rei_information11 :=
555 ghr_rei_shd.g_old_rec.rei_information11;
556 End If;
557 If (p_rec.rei_information12 = hr_api.g_varchar2) then
558 p_rec.rei_information12 :=
559 ghr_rei_shd.g_old_rec.rei_information12;
560 End If;
561 If (p_rec.rei_information13 = hr_api.g_varchar2) then
562 p_rec.rei_information13 :=
563 ghr_rei_shd.g_old_rec.rei_information13;
564 End If;
565 If (p_rec.rei_information14 = hr_api.g_varchar2) then
566 p_rec.rei_information14 :=
567 ghr_rei_shd.g_old_rec.rei_information14;
568 End If;
569 If (p_rec.rei_information15 = hr_api.g_varchar2) then
570 p_rec.rei_information15 :=
571 ghr_rei_shd.g_old_rec.rei_information15;
572 End If;
573 If (p_rec.rei_information16 = hr_api.g_varchar2) then
574 p_rec.rei_information16 :=
575 ghr_rei_shd.g_old_rec.rei_information16;
576 End If;
577 If (p_rec.rei_information17 = hr_api.g_varchar2) then
578 p_rec.rei_information17 :=
579 ghr_rei_shd.g_old_rec.rei_information17;
580 End If;
581 If (p_rec.rei_information18 = hr_api.g_varchar2) then
582 p_rec.rei_information18 :=
583 ghr_rei_shd.g_old_rec.rei_information18;
584 End If;
585 If (p_rec.rei_information19 = hr_api.g_varchar2) then
586 p_rec.rei_information19 :=
587 ghr_rei_shd.g_old_rec.rei_information19;
588 End If;
589 If (p_rec.rei_information20 = hr_api.g_varchar2) then
590 p_rec.rei_information20 :=
591 ghr_rei_shd.g_old_rec.rei_information20;
592 End If;
593 If (p_rec.rei_information21 = hr_api.g_varchar2) then
594 p_rec.rei_information21 :=
595 ghr_rei_shd.g_old_rec.rei_information21;
596 End If;
597 If (p_rec.rei_information22 = hr_api.g_varchar2) then
598 p_rec.rei_information22 :=
599 ghr_rei_shd.g_old_rec.rei_information22;
600 End If;
601 If (p_rec.rei_information28 = hr_api.g_varchar2) then
602 p_rec.rei_information28 :=
603 ghr_rei_shd.g_old_rec.rei_information28;
604 End If;
605 If (p_rec.rei_information29 = hr_api.g_varchar2) then
606 p_rec.rei_information29 :=
607 ghr_rei_shd.g_old_rec.rei_information29;
608 End If;
609 If (p_rec.rei_information23 = hr_api.g_varchar2) then
610 p_rec.rei_information23 :=
611 ghr_rei_shd.g_old_rec.rei_information23;
612 End If;
613 If (p_rec.rei_information24 = hr_api.g_varchar2) then
614 p_rec.rei_information24 :=
615 ghr_rei_shd.g_old_rec.rei_information24;
616 End If;
617 If (p_rec.rei_information25 = hr_api.g_varchar2) then
618 p_rec.rei_information25 :=
619 ghr_rei_shd.g_old_rec.rei_information25;
620 End If;
621 If (p_rec.rei_information26 = hr_api.g_varchar2) then
622 p_rec.rei_information26 :=
623 ghr_rei_shd.g_old_rec.rei_information26;
624 End If;
625 If (p_rec.rei_information27 = hr_api.g_varchar2) then
626 p_rec.rei_information27 :=
627 ghr_rei_shd.g_old_rec.rei_information27;
628 End If;
629 If (p_rec.rei_information30 = hr_api.g_varchar2) then
630 p_rec.rei_information30 :=
631 ghr_rei_shd.g_old_rec.rei_information30;
632 End If;
633 If (p_rec.request_id = hr_api.g_number) then
634 p_rec.request_id :=
635 ghr_rei_shd.g_old_rec.request_id;
636 End If;
637 If (p_rec.program_application_id = hr_api.g_number) then
638 p_rec.program_application_id :=
639 ghr_rei_shd.g_old_rec.program_application_id;
640 End If;
641 If (p_rec.program_id = hr_api.g_number) then
642 p_rec.program_id :=
643 ghr_rei_shd.g_old_rec.program_id;
644 End If;
645 If (p_rec.program_update_date = hr_api.g_date) then
646 p_rec.program_update_date :=
647 ghr_rei_shd.g_old_rec.program_update_date;
648 End If;
649 --
650 hr_utility.set_location(' Leaving:'||l_proc, 10);
651 --
652 End convert_defs;
653 --
654 -- ----------------------------------------------------------------------------
655 -- |---------------------------------< upd >----------------------------------|
656 -- ----------------------------------------------------------------------------
657 Procedure upd
658 (
659 p_rec in out nocopy ghr_rei_shd.g_rec_type,
660 p_validate in boolean default false
661 ) is
662 --
663 l_proc varchar2(72) := g_package||'upd';
664 --
665 Begin
666 hr_utility.set_location('Entering:'||l_proc, 5);
667 --
668 -- Determine if the business process is to be validated.
669 --
670 If p_validate then
671 --
672 -- Issue the savepoint.
673 --
674 SAVEPOINT upd_ghr_rei;
675 End If;
676 --
677 -- We must lock the row which we need to update.
678 --
679 ghr_rei_shd.lck
680 (
681 p_rec.pa_request_extra_info_id,
682 p_rec.object_version_number
683 );
684 --
685 -- 1. During an update system defaults are used to determine if
686 -- arguments have been defaulted or not. We must therefore
687 -- derive the full record structure values to be updated.
688 --
689 -- 2. Call the supporting update validate operations.
690 --
691 convert_defs(p_rec);
692 ghr_rei_bus.update_validate(p_rec);
693 --
694 -- Call the supporting pre-update operation
695 --
696 pre_update(p_rec);
697 --
698 -- Update the row.
699 --
700 update_dml(p_rec);
701 --
702 -- Call the supporting post-update operation
703 --
704 post_update(p_rec);
705 --
706 -- If we are validating then raise the Validate_Enabled exception
707 --
708 If p_validate then
709 Raise HR_Api.Validate_Enabled;
710 End If;
711 --
712 hr_utility.set_location(' Leaving:'||l_proc, 10);
713 Exception
714 When HR_Api.Validate_Enabled Then
715 --
716 -- As the Validate_Enabled exception has been raised
717 -- we must rollback to the savepoint
718 --
719 ROLLBACK TO upd_ghr_rei;
720 End upd;
721 --
722 -- ----------------------------------------------------------------------------
723 -- |---------------------------------< upd >----------------------------------|
724 -- ----------------------------------------------------------------------------
725 Procedure upd
726 (
727 p_pa_request_extra_info_id in number,
728 p_pa_request_id in number default hr_api.g_number,
729 p_information_type in varchar2 default hr_api.g_varchar2,
730 p_rei_attribute_category in varchar2 default hr_api.g_varchar2,
731 p_rei_attribute1 in varchar2 default hr_api.g_varchar2,
732 p_rei_attribute2 in varchar2 default hr_api.g_varchar2,
733 p_rei_attribute3 in varchar2 default hr_api.g_varchar2,
734 p_rei_attribute4 in varchar2 default hr_api.g_varchar2,
735 p_rei_attribute5 in varchar2 default hr_api.g_varchar2,
736 p_rei_attribute6 in varchar2 default hr_api.g_varchar2,
737 p_rei_attribute7 in varchar2 default hr_api.g_varchar2,
738 p_rei_attribute8 in varchar2 default hr_api.g_varchar2,
739 p_rei_attribute9 in varchar2 default hr_api.g_varchar2,
740 p_rei_attribute10 in varchar2 default hr_api.g_varchar2,
741 p_rei_attribute11 in varchar2 default hr_api.g_varchar2,
742 p_rei_attribute12 in varchar2 default hr_api.g_varchar2,
743 p_rei_attribute13 in varchar2 default hr_api.g_varchar2,
744 p_rei_attribute14 in varchar2 default hr_api.g_varchar2,
745 p_rei_attribute15 in varchar2 default hr_api.g_varchar2,
746 p_rei_attribute16 in varchar2 default hr_api.g_varchar2,
747 p_rei_attribute17 in varchar2 default hr_api.g_varchar2,
748 p_rei_attribute18 in varchar2 default hr_api.g_varchar2,
749 p_rei_attribute19 in varchar2 default hr_api.g_varchar2,
750 p_rei_attribute20 in varchar2 default hr_api.g_varchar2,
751 p_rei_information_category in varchar2 default hr_api.g_varchar2,
752 p_rei_information1 in varchar2 default hr_api.g_varchar2,
753 p_rei_information2 in varchar2 default hr_api.g_varchar2,
754 p_rei_information3 in varchar2 default hr_api.g_varchar2,
755 p_rei_information4 in varchar2 default hr_api.g_varchar2,
756 p_rei_information5 in varchar2 default hr_api.g_varchar2,
757 p_rei_information6 in varchar2 default hr_api.g_varchar2,
758 p_rei_information7 in varchar2 default hr_api.g_varchar2,
759 p_rei_information8 in varchar2 default hr_api.g_varchar2,
760 p_rei_information9 in varchar2 default hr_api.g_varchar2,
761 p_rei_information10 in varchar2 default hr_api.g_varchar2,
762 p_rei_information11 in varchar2 default hr_api.g_varchar2,
763 p_rei_information12 in varchar2 default hr_api.g_varchar2,
764 p_rei_information13 in varchar2 default hr_api.g_varchar2,
765 p_rei_information14 in varchar2 default hr_api.g_varchar2,
766 p_rei_information15 in varchar2 default hr_api.g_varchar2,
767 p_rei_information16 in varchar2 default hr_api.g_varchar2,
768 p_rei_information17 in varchar2 default hr_api.g_varchar2,
769 p_rei_information18 in varchar2 default hr_api.g_varchar2,
770 p_rei_information19 in varchar2 default hr_api.g_varchar2,
771 p_rei_information20 in varchar2 default hr_api.g_varchar2,
772 p_rei_information21 in varchar2 default hr_api.g_varchar2,
773 p_rei_information22 in varchar2 default hr_api.g_varchar2,
774 p_rei_information28 in varchar2 default hr_api.g_varchar2,
775 p_rei_information29 in varchar2 default hr_api.g_varchar2,
776 p_rei_information23 in varchar2 default hr_api.g_varchar2,
777 p_rei_information24 in varchar2 default hr_api.g_varchar2,
778 p_rei_information25 in varchar2 default hr_api.g_varchar2,
779 p_rei_information26 in varchar2 default hr_api.g_varchar2,
780 p_rei_information27 in varchar2 default hr_api.g_varchar2,
781 p_rei_information30 in varchar2 default hr_api.g_varchar2,
782 p_object_version_number in out nocopy number,
783 p_request_id in number default hr_api.g_number,
784 p_program_application_id in number default hr_api.g_number,
785 p_program_id in number default hr_api.g_number,
786 p_program_update_date in date default hr_api.g_date,
787 p_validate in boolean default false
788 ) is
789 --
790 l_rec ghr_rei_shd.g_rec_type;
791 l_proc varchar2(72) := g_package||'upd';
792 --
793 Begin
794 hr_utility.set_location('Entering:'||l_proc, 5);
795 --
796 -- Call conversion function to turn arguments into the
797 -- l_rec structure.
798 --
799 l_rec :=
800 ghr_rei_shd.convert_args
801 (
802 p_pa_request_extra_info_id,
803 p_pa_request_id,
804 p_information_type,
805 p_rei_attribute_category,
806 p_rei_attribute1,
807 p_rei_attribute2,
808 p_rei_attribute3,
809 p_rei_attribute4,
810 p_rei_attribute5,
811 p_rei_attribute6,
812 p_rei_attribute7,
813 p_rei_attribute8,
814 p_rei_attribute9,
815 p_rei_attribute10,
816 p_rei_attribute11,
817 p_rei_attribute12,
818 p_rei_attribute13,
819 p_rei_attribute14,
820 p_rei_attribute15,
821 p_rei_attribute16,
822 p_rei_attribute17,
823 p_rei_attribute18,
824 p_rei_attribute19,
825 p_rei_attribute20,
826 p_rei_information_category,
827 p_rei_information1,
828 p_rei_information2,
829 p_rei_information3,
830 p_rei_information4,
831 p_rei_information5,
832 p_rei_information6,
833 p_rei_information7,
834 p_rei_information8,
835 p_rei_information9,
836 p_rei_information10,
837 p_rei_information11,
838 p_rei_information12,
839 p_rei_information13,
840 p_rei_information14,
841 p_rei_information15,
842 p_rei_information16,
843 p_rei_information17,
844 p_rei_information18,
845 p_rei_information19,
846 p_rei_information20,
847 p_rei_information21,
848 p_rei_information22,
849 p_rei_information28,
850 p_rei_information29,
851 p_rei_information23,
852 p_rei_information24,
853 p_rei_information25,
854 p_rei_information26,
855 p_rei_information27,
856 p_rei_information30,
857 p_object_version_number,
858 p_request_id,
859 p_program_application_id,
860 p_program_id,
861 p_program_update_date
862 );
863 --
864 -- Having converted the arguments into the
865 -- plsql record structure we call the corresponding record
866 -- business process.
867 --
868 upd(l_rec, p_validate);
869 p_object_version_number := l_rec.object_version_number;
870 --
871 hr_utility.set_location(' Leaving:'||l_proc, 10);
872 End upd;
873 --
874 end ghr_rei_upd;