1 Package Body per_apl_upd as
2 /* $Header: peaplrhi.pkb 120.1 2005/10/25 00:31:11 risgupta noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_apl_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 -- 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 -- 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 Table Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy per_apl_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 per_apl_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the per_applications Row
68 --
69 update per_applications
70 set
71 application_id = p_rec.application_id,
72 date_received = p_rec.date_received,
73 comments = p_rec.comments,
74 current_employer = p_rec.current_employer,
75 date_end = p_rec.date_end,
76 projected_hire_date = p_rec.projected_hire_date,
77 successful_flag = p_rec.successful_flag,
78 termination_reason = p_rec.termination_reason,
79 request_id = p_rec.request_id,
80 program_application_id = p_rec.program_application_id,
81 program_id = p_rec.program_id,
82 program_update_date = p_rec.program_update_date,
83 appl_attribute_category = p_rec.appl_attribute_category,
84 appl_attribute1 = p_rec.appl_attribute1,
85 appl_attribute2 = p_rec.appl_attribute2,
86 appl_attribute3 = p_rec.appl_attribute3,
87 appl_attribute4 = p_rec.appl_attribute4,
88 appl_attribute5 = p_rec.appl_attribute5,
89 appl_attribute6 = p_rec.appl_attribute6,
90 appl_attribute7 = p_rec.appl_attribute7,
91 appl_attribute8 = p_rec.appl_attribute8,
92 appl_attribute9 = p_rec.appl_attribute9,
93 appl_attribute10 = p_rec.appl_attribute10,
94 appl_attribute11 = p_rec.appl_attribute11,
95 appl_attribute12 = p_rec.appl_attribute12,
96 appl_attribute13 = p_rec.appl_attribute13,
97 appl_attribute14 = p_rec.appl_attribute14,
98 appl_attribute15 = p_rec.appl_attribute15,
99 appl_attribute16 = p_rec.appl_attribute16,
100 appl_attribute17 = p_rec.appl_attribute17,
101 appl_attribute18 = p_rec.appl_attribute18,
102 appl_attribute19 = p_rec.appl_attribute19,
103 appl_attribute20 = p_rec.appl_attribute20,
104 object_version_number = p_rec.object_version_number
105 where application_id = p_rec.application_id;
106 --
107 per_apl_shd.g_api_dml := false; -- Unset the api dml status
108 --
109 hr_utility.set_location(' Leaving:'||l_proc, 10);
110 --
111 Exception
112 When hr_api.check_integrity_violated Then
113 -- A check constraint has been violated
114 per_apl_shd.g_api_dml := false; -- Unset the api dml status
115 per_apl_shd.constraint_error
116 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117 When hr_api.parent_integrity_violated Then
118 -- Parent integrity has been violated
119 per_apl_shd.g_api_dml := false; -- Unset the api dml status
120 per_apl_shd.constraint_error
121 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122 When hr_api.unique_integrity_violated Then
123 -- Unique integrity has been violated
124 per_apl_shd.g_api_dml := false; -- Unset the api dml status
125 per_apl_shd.constraint_error
126 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127 When Others Then
128 per_apl_shd.g_api_dml := false; -- Unset the api dml status
129 Raise;
130 End update_dml;
131 --
132 -- ----------------------------------------------------------------------------
133 -- |------------------------------< pre_update >------------------------------|
134 -- ----------------------------------------------------------------------------
135 -- {Start Of Comments}
136 --
137 -- Description:
138 -- This private procedure contains any processing which is required before
139 -- the update dml.
140 --
141 -- Pre Conditions:
142 -- This is an internal procedure which is called from the upd procedure.
143 --
144 -- In Parameters:
145 -- A Pl/Sql record structre.
146 --
147 -- Post Success:
148 -- Processing continues.
149 --
150 -- Post Failure:
151 -- If an error has occurred, an error message and exception will be raised
152 -- but not handled.
153 --
154 -- Developer Implementation Notes:
155 -- Any pre-processing required before the update dml is issued should be
156 -- coded within this procedure. It is important to note that any 3rd party
157 -- maintenance should be reviewed before placing in this procedure.
158 --
159 -- Access Status:
160 -- Internal Table Handler Use Only.
161 --
162 -- {End Of Comments}
163 -- ----------------------------------------------------------------------------
164 Procedure pre_update(p_rec in per_apl_shd.g_rec_type) is
165 --
166 l_proc varchar2(72) := g_package||'pre_update';
167 --
168 Begin
169 hr_utility.set_location('Entering:'||l_proc, 5);
170 --
171 hr_utility.set_location(' Leaving:'||l_proc, 10);
172 End pre_update;
173 --
174 -- ----------------------------------------------------------------------------
175 -- |-----------------------------< post_update >------------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start Of Comments}
178 --
179 -- Description:
180 -- This private procedure contains any processing which is required after the
181 -- update dml.
182 --
183 -- Pre Conditions:
184 -- This is an internal procedure which is called from the upd procedure.
185 --
186 -- In Parameters:
187 -- A Pl/Sql record structre.
188 --
189 -- Post Success:
190 -- Processing continues.
191 --
192 -- Post Failure:
193 -- If an error has occurred, an error message and exception will be raised
194 -- but not handled.
195 --
196 -- Developer Implementation Notes:
197 -- Any post-processing required after the update dml is issued should be
198 -- coded within this procedure. It is important to note that any 3rd party
199 -- maintenance should be reviewed before placing in this procedure.
200 --
201 -- Access Status:
202 -- Internal Table Handler Use Only.
203 --
204 -- {End Of Comments}
205 -- ----------------------------------------------------------------------------
206 Procedure post_update(p_rec in per_apl_shd.g_rec_type
207 ,p_effective_date in date) is
208 --
209 l_proc varchar2(72) := g_package||'post_update';
210 --
211 Begin
212 hr_utility.set_location('Entering:'||l_proc, 5);
213 --
214 -- Start of API User Hook for post_update.
215 begin
216 per_apl_rku.after_update
217 (p_application_id => p_rec.application_id
218 ,p_date_received => p_rec.date_received
219 ,p_comments => p_rec.comments
220 ,p_current_employer => p_rec.current_employer
221 ,p_projected_hire_date => p_rec.projected_hire_date
222 ,p_successful_flag => p_rec.successful_flag
223 ,p_termination_reason => p_rec.termination_reason
224 ,p_request_id => p_rec.request_id
225 ,p_program_application_id => p_rec.program_application_id
226 ,p_program_id => p_rec.program_id
227 ,p_program_update_date => p_rec.program_update_date
228 ,p_appl_attribute_category => p_rec.appl_attribute_category
229 ,p_appl_attribute1 => p_rec.appl_attribute1
230 ,p_appl_attribute2 => p_rec.appl_attribute2
231 ,p_appl_attribute3 => p_rec.appl_attribute3
232 ,p_appl_attribute4 => p_rec.appl_attribute4
233 ,p_appl_attribute5 => p_rec.appl_attribute5
234 ,p_appl_attribute6 => p_rec.appl_attribute6
235 ,p_appl_attribute7 => p_rec.appl_attribute7
236 ,p_appl_attribute8 => p_rec.appl_attribute8
237 ,p_appl_attribute9 => p_rec.appl_attribute9
238 ,p_appl_attribute10 => p_rec.appl_attribute10
239 ,p_appl_attribute11 => p_rec.appl_attribute11
240 ,p_appl_attribute12 => p_rec.appl_attribute12
241 ,p_appl_attribute13 => p_rec.appl_attribute13
242 ,p_appl_attribute14 => p_rec.appl_attribute14
243 ,p_appl_attribute15 => p_rec.appl_attribute15
244 ,p_appl_attribute16 => p_rec.appl_attribute16
245 ,p_appl_attribute17 => p_rec.appl_attribute17
246 ,p_appl_attribute18 => p_rec.appl_attribute18
247 ,p_appl_attribute19 => p_rec.appl_attribute19
248 ,p_appl_attribute20 => p_rec.appl_attribute20
249 ,p_object_version_number => p_rec.object_version_number
250 ,p_effective_date => p_effective_date
251 ,p_business_group_id_o
252 => per_apl_shd.g_old_rec.business_group_id
253 ,p_person_id_o
254 => per_apl_shd.g_old_rec.person_id
255 ,p_date_received_o
256 => per_apl_shd.g_old_rec.date_received
257 ,p_comments_o
258 => per_apl_shd.g_old_rec.comments
259 ,p_current_employer_o
260 => per_apl_shd.g_old_rec.current_employer
261 ,p_projected_hire_date_o
262 => per_apl_shd.g_old_rec.projected_hire_date
263 ,p_successful_flag_o
264 => per_apl_shd.g_old_rec.successful_flag
265 ,p_termination_reason_o
266 => per_apl_shd.g_old_rec.termination_reason
267 ,p_request_id_o
268 => per_apl_shd.g_old_rec.request_id
269 ,p_program_application_id_o
270 => per_apl_shd.g_old_rec.program_application_id
271 ,p_program_id_o
272 => per_apl_shd.g_old_rec.program_id
273 ,p_program_update_date_o
274 => per_apl_shd.g_old_rec.program_update_date
275 ,p_appl_attribute_category_o
276 => per_apl_shd.g_old_rec.appl_attribute_category
277 ,p_appl_attribute1_o
278 => per_apl_shd.g_old_rec.appl_attribute1
279 ,p_appl_attribute2_o
280 => per_apl_shd.g_old_rec.appl_attribute2
281 ,p_appl_attribute3_o
282 => per_apl_shd.g_old_rec.appl_attribute3
283 ,p_appl_attribute4_o
284 => per_apl_shd.g_old_rec.appl_attribute4
285 ,p_appl_attribute5_o
286 => per_apl_shd.g_old_rec.appl_attribute5
287 ,p_appl_attribute6_o
288 => per_apl_shd.g_old_rec.appl_attribute6
289 ,p_appl_attribute7_o
290 => per_apl_shd.g_old_rec.appl_attribute7
291 ,p_appl_attribute8_o
292 => per_apl_shd.g_old_rec.appl_attribute8
293 ,p_appl_attribute9_o
294 => per_apl_shd.g_old_rec.appl_attribute9
295 ,p_appl_attribute10_o
296 => per_apl_shd.g_old_rec.appl_attribute10
297 ,p_appl_attribute11_o
298 => per_apl_shd.g_old_rec.appl_attribute11
299 ,p_appl_attribute12_o
300 => per_apl_shd.g_old_rec.appl_attribute12
301 ,p_appl_attribute13_o
302 => per_apl_shd.g_old_rec.appl_attribute13
303 ,p_appl_attribute14_o
304 => per_apl_shd.g_old_rec.appl_attribute14
305 ,p_appl_attribute15_o
306 => per_apl_shd.g_old_rec.appl_attribute15
307 ,p_appl_attribute16_o
308 => per_apl_shd.g_old_rec.appl_attribute16
309 ,p_appl_attribute17_o
310 => per_apl_shd.g_old_rec.appl_attribute17
311 ,p_appl_attribute18_o
312 => per_apl_shd.g_old_rec.appl_attribute18
313 ,p_appl_attribute19_o
314 => per_apl_shd.g_old_rec.appl_attribute19
315 ,p_appl_attribute20_o
316 => per_apl_shd.g_old_rec.appl_attribute20
317 ,p_object_version_number_o
318 => per_apl_shd.g_old_rec.object_version_number
319 );
320 exception
321 when hr_api.cannot_find_prog_unit then
322 hr_api.cannot_find_prog_unit_error
323 (p_module_name => 'PER_APPLICATIONS'
324 ,p_hook_type => 'AU'
325 );
326 end;
327 -- End of API User Hook for post_update.
328 --
329 hr_utility.set_location(' Leaving:'||l_proc, 10);
330 End post_update;
331 --
332 -- ----------------------------------------------------------------------------
333 -- |-----------------------------< convert_defs >-----------------------------|
334 -- ----------------------------------------------------------------------------
335 -- {Start Of Comments}
336 --
337 -- Description:
338 -- The Convert_Defs procedure has one very important function:
339 -- It must return the record structure for the row with all system defaulted
340 -- values converted into its corresponding parameter value for update. When
341 -- we attempt to update a row through the Upd process , certain
342 -- parameters can be defaulted which enables flexibility in the calling of
343 -- the upd process (e.g. only attributes which need to be updated need to be
344 -- specified). For the upd process to determine which attributes
345 -- have NOT been specified we need to check if the parameter has a reserved
346 -- system default value. Therefore, for all parameters which have a
347 -- corresponding reserved system default mechanism specified we need to
348 -- check if a system default is being used. If a system default is being
349 -- used then we convert the defaulted value into its corresponding attribute
350 -- value held in the g_old_rec data structure.
351 --
352 -- Pre Conditions:
353 -- This private function can only be called from the upd process.
354 --
358 -- Post Success:
355 -- In Parameters:
356 -- A Pl/Sql record structre.
357 --
359 -- The record structure will be returned with all system defaulted parameter
360 -- values converted into its current row attribute value.
361 --
362 -- Post Failure:
363 -- No direct error handling is required within this function. Any possible
364 -- errors within this procedure will be a PL/SQL value error due to conversion
365
366 -- of datatypes or data lengths.
367 --
368 -- Developer Implementation Notes:
369 -- None.
370 --
371 -- Access Status:
372 -- Internal Table Handler Use Only.
373 --
374 -- {End Of Comments}
375 -- ----------------------------------------------------------------------------
376 Procedure convert_defs(p_rec in out nocopy per_apl_shd.g_rec_type) is
377 --
378 l_proc varchar2(72) := g_package||'convert_defs';
379 --
380 Begin
381 --
382 hr_utility.set_location('Entering:'||l_proc, 5);
383 --
384 -- We must now examine each argument value in the
385 -- p_rec plsql record structure
386 -- to see if a system default is being used. If a system default
387 -- is being used then we must set to the 'current' argument value.
388 --
389 If (p_rec.business_group_id = hr_api.g_number) then
390 p_rec.business_group_id :=
391 per_apl_shd.g_old_rec.business_group_id;
392 End If;
393 If (p_rec.person_id = hr_api.g_number) then
394 p_rec.person_id :=
395 per_apl_shd.g_old_rec.person_id;
396 End If;
397 If (p_rec.date_received = hr_api.g_date) then
398 hr_utility.set_location(l_proc,6);
399 p_rec.date_received :=
400 per_apl_shd.g_old_rec.date_received;
401 End If;
402 If (p_rec.comments = hr_api.g_varchar2) then
403 p_rec.comments :=
404 per_apl_shd.g_old_rec.comments;
405 End If;
406 If (p_rec.current_employer = hr_api.g_varchar2) then
407 p_rec.current_employer :=
408 per_apl_shd.g_old_rec.current_employer;
409 End If;
410 If (p_rec.date_end = hr_api.g_date) then
411 p_rec.date_end :=
412 per_apl_shd.g_old_rec.date_end;
413 End If;
414 If (p_rec.projected_hire_date = hr_api.g_date) then
415 p_rec.projected_hire_date :=
416 per_apl_shd.g_old_rec.projected_hire_date;
417 End If;
418 If (p_rec.successful_flag = hr_api.g_varchar2) then
419 p_rec.successful_flag :=
420 per_apl_shd.g_old_rec.successful_flag;
421 End If;
422 If (p_rec.termination_reason = hr_api.g_varchar2) then
423 p_rec.termination_reason :=
424 per_apl_shd.g_old_rec.termination_reason;
425 End If;
426 If (p_rec.request_id = hr_api.g_number) then
427 p_rec.request_id :=
428 per_apl_shd.g_old_rec.request_id;
429 End If;
430 If (p_rec.program_application_id = hr_api.g_number) then
431 p_rec.program_application_id :=
432 per_apl_shd.g_old_rec.program_application_id;
433 End If;
434 If (p_rec.program_id = hr_api.g_number) then
435 p_rec.program_id :=
436 per_apl_shd.g_old_rec.program_id;
437 End If;
438 If (p_rec.program_update_date = hr_api.g_date) then
439 p_rec.program_update_date :=
440 per_apl_shd.g_old_rec.program_update_date;
441 End If;
442 If (p_rec.appl_attribute_category = hr_api.g_varchar2) then
443 p_rec.appl_attribute_category :=
444 per_apl_shd.g_old_rec.appl_attribute_category;
445 End If;
446 If (p_rec.appl_attribute1 = hr_api.g_varchar2) then
447 p_rec.appl_attribute1 :=
448 per_apl_shd.g_old_rec.appl_attribute1;
449 End If;
450 If (p_rec.appl_attribute2 = hr_api.g_varchar2) then
451 p_rec.appl_attribute2 :=
452 per_apl_shd.g_old_rec.appl_attribute2;
453 End If;
454 If (p_rec.appl_attribute3 = hr_api.g_varchar2) then
455 p_rec.appl_attribute3 :=
456 per_apl_shd.g_old_rec.appl_attribute3;
457 End If;
458 If (p_rec.appl_attribute4 = hr_api.g_varchar2) then
459 p_rec.appl_attribute4 :=
460 per_apl_shd.g_old_rec.appl_attribute4;
461 End If;
462 If (p_rec.appl_attribute5 = hr_api.g_varchar2) then
463 p_rec.appl_attribute5 :=
464 per_apl_shd.g_old_rec.appl_attribute5;
465 End If;
466 If (p_rec.appl_attribute6 = hr_api.g_varchar2) then
467 p_rec.appl_attribute6 :=
468 per_apl_shd.g_old_rec.appl_attribute6;
469 End If;
470 If (p_rec.appl_attribute7 = hr_api.g_varchar2) then
471 p_rec.appl_attribute7 :=
472 per_apl_shd.g_old_rec.appl_attribute7;
473 End If;
474 If (p_rec.appl_attribute8 = hr_api.g_varchar2) then
475 p_rec.appl_attribute8 :=
476 per_apl_shd.g_old_rec.appl_attribute8;
477 End If;
478 If (p_rec.appl_attribute9 = hr_api.g_varchar2) then
479 p_rec.appl_attribute9 :=
480 per_apl_shd.g_old_rec.appl_attribute9;
481 End If;
482 If (p_rec.appl_attribute10 = hr_api.g_varchar2) then
483 p_rec.appl_attribute10 :=
484 per_apl_shd.g_old_rec.appl_attribute10;
485 End If;
486 If (p_rec.appl_attribute11 = hr_api.g_varchar2) then
487 p_rec.appl_attribute11 :=
488 per_apl_shd.g_old_rec.appl_attribute11;
489 End If;
490 If (p_rec.appl_attribute12 = hr_api.g_varchar2) then
491 p_rec.appl_attribute12 :=
492 per_apl_shd.g_old_rec.appl_attribute12;
493 End If;
494 If (p_rec.appl_attribute13 = hr_api.g_varchar2) then
495 p_rec.appl_attribute13 :=
499 p_rec.appl_attribute14 :=
496 per_apl_shd.g_old_rec.appl_attribute13;
497 End If;
498 If (p_rec.appl_attribute14 = hr_api.g_varchar2) then
500 per_apl_shd.g_old_rec.appl_attribute14;
501 End If;
502 If (p_rec.appl_attribute15 = hr_api.g_varchar2) then
503 p_rec.appl_attribute15 :=
504 per_apl_shd.g_old_rec.appl_attribute15;
505 End If;
506 If (p_rec.appl_attribute16 = hr_api.g_varchar2) then
507 p_rec.appl_attribute16 :=
508 per_apl_shd.g_old_rec.appl_attribute16;
509 End If;
510 If (p_rec.appl_attribute17 = hr_api.g_varchar2) then
511 p_rec.appl_attribute17 :=
512 per_apl_shd.g_old_rec.appl_attribute17;
513 End If;
514 If (p_rec.appl_attribute18 = hr_api.g_varchar2) then
515 p_rec.appl_attribute18 :=
516 per_apl_shd.g_old_rec.appl_attribute18;
517 End If;
518 If (p_rec.appl_attribute19 = hr_api.g_varchar2) then
519 p_rec.appl_attribute19 :=
520 per_apl_shd.g_old_rec.appl_attribute19;
521 End If;
522 If (p_rec.appl_attribute20 = hr_api.g_varchar2) then
523 p_rec.appl_attribute20 :=
524 per_apl_shd.g_old_rec.appl_attribute20;
525 End If;
526
527 --
528 hr_utility.set_location(' Leaving:'||l_proc, 10);
529 --
530 End convert_defs;
531 --
532 -- ----------------------------------------------------------------------------
533 -- |---------------------------------< upd >----------------------------------|
534 -- ----------------------------------------------------------------------------
535 Procedure upd
536 (
537 p_rec in out nocopy per_apl_shd.g_rec_type,
538 p_effective_date in date,
539 p_validate in boolean default false
540 ) is
541 --
542 l_proc varchar2(72) := g_package||'upd';
543 --
544 Begin
545 hr_utility.set_location('Entering:'||l_proc, 5);
546 --
547 -- Determine if the business process is to be validated.
548 --
549 If p_validate then
550 --
551 -- Issue the savepoint.
552 --
553 SAVEPOINT upd_per_apl;
554 End If;
555 --
556 -- We must lock the row which we need to update.
557 --
558 per_apl_shd.lck
559 (
560 p_rec.application_id,
561 p_rec.object_version_number
562 );
563 --
564 -- 1. During an update system defaults are used to determine if
565 -- arguments have been defaulted or not. We must therefore
566 -- derive the full record structure values to be updated.
567 --
568 -- 2. Call the supporting update validate operations.
569 --
570 convert_defs(p_rec);
571 per_apl_bus.update_validate(p_rec
572 ,p_effective_date);
573 --
574 -- Call to raise any errors on multi-message list
575 --
576 hr_multi_message.end_validation_set;
577 --
578 -- Call the supporting pre-update operation
579 --
580 pre_update(p_rec);
581 --
582 -- Update the row.
583 --
584 update_dml(p_rec);
585 --
586 -- Call the supporting post-update operation
587 --
588 post_update(p_rec
589 ,p_effective_date);
590 --
591 -- Call to raise any errors on multi-message list
592 --
593 hr_multi_message.end_validation_set;
594 --
595 -- If we are validating then raise the Validate_Enabled exception
596 --
597 If p_validate then
598 Raise HR_Api.Validate_Enabled;
599 End If;
600 --
601 hr_utility.set_location(' Leaving:'||l_proc, 10);
602 Exception
603 When HR_Api.Validate_Enabled Then
604 --
605 -- As the Validate_Enabled exception has been raised
606 -- we must rollback to the savepoint
607 --
608 ROLLBACK TO upd_per_apl;
609 End upd;
610 --
611 -- ----------------------------------------------------------------------------
612 -- |---------------------------------< upd >----------------------------------|
613 -- ----------------------------------------------------------------------------
614 Procedure upd
615 (
616 p_application_id in number,
617 p_date_received in date default hr_api.g_date,
618 p_comments in varchar2 default hr_api.g_varchar2,
619 p_current_employer in varchar2 default hr_api.g_varchar2,
620 p_date_end in date default hr_api.g_date,
621 p_projected_hire_date in date default hr_api.g_date,
622 p_successful_flag in varchar2 default hr_api.g_varchar2,
623 p_termination_reason in varchar2 default hr_api.g_varchar2,
624 p_request_id in number default hr_api.g_number,
625 p_program_application_id in number default hr_api.g_number,
626 p_program_id in number default hr_api.g_number,
627 p_program_update_date in date default hr_api.g_date,
628 p_appl_attribute_category in varchar2 default hr_api.g_varchar2,
629 p_appl_attribute1 in varchar2 default hr_api.g_varchar2,
630 p_appl_attribute2 in varchar2 default hr_api.g_varchar2,
631 p_appl_attribute3 in varchar2 default hr_api.g_varchar2,
632 p_appl_attribute4 in varchar2 default hr_api.g_varchar2,
633 p_appl_attribute5 in varchar2 default hr_api.g_varchar2,
637 p_appl_attribute9 in varchar2 default hr_api.g_varchar2,
634 p_appl_attribute6 in varchar2 default hr_api.g_varchar2,
635 p_appl_attribute7 in varchar2 default hr_api.g_varchar2,
636 p_appl_attribute8 in varchar2 default hr_api.g_varchar2,
638 p_appl_attribute10 in varchar2 default hr_api.g_varchar2,
639 p_appl_attribute11 in varchar2 default hr_api.g_varchar2,
640 p_appl_attribute12 in varchar2 default hr_api.g_varchar2,
644 p_appl_attribute16 in varchar2 default hr_api.g_varchar2,
641 p_appl_attribute13 in varchar2 default hr_api.g_varchar2,
642 p_appl_attribute14 in varchar2 default hr_api.g_varchar2,
643 p_appl_attribute15 in varchar2 default hr_api.g_varchar2,
645 p_appl_attribute17 in varchar2 default hr_api.g_varchar2,
646 p_appl_attribute18 in varchar2 default hr_api.g_varchar2,
647 p_appl_attribute19 in varchar2 default hr_api.g_varchar2,
648 p_appl_attribute20 in varchar2 default hr_api.g_varchar2,
649 p_object_version_number in out nocopy number,
650 p_effective_date in date,
651 p_validate in boolean default false
652 ) is
653 --
654 l_rec per_apl_shd.g_rec_type;
655 l_proc varchar2(72) := g_package||'upd';
656 --
657 Begin
658 hr_utility.set_location('Entering:'||l_proc, 5);
659 --
660 -- Call conversion function to turn arguments into the
661 -- l_rec structure.
662 --
663 l_rec :=
664 per_apl_shd.convert_args
665 (
666 p_application_id,
667 hr_api.g_number,
668 hr_api.g_number,
669 p_date_received,
670 p_comments,
671 p_current_employer,
672 p_date_end,
673 p_projected_hire_date,
674 p_successful_flag,
675 p_termination_reason,
676 p_request_id,
677 p_program_application_id,
678 p_program_id,
679 p_program_update_date,
680 p_appl_attribute_category,
681 p_appl_attribute1,
682 p_appl_attribute2,
683 p_appl_attribute3,
684 p_appl_attribute4,
685 p_appl_attribute5,
686 p_appl_attribute6,
687 p_appl_attribute7,
688 p_appl_attribute8,
689 p_appl_attribute9,
690 p_appl_attribute10,
691 p_appl_attribute11,
692 p_appl_attribute12,
693 p_appl_attribute13,
694 p_appl_attribute14,
695 p_appl_attribute15,
696 p_appl_attribute16,
697 p_appl_attribute17,
698 p_appl_attribute18,
699 p_appl_attribute19,
700 p_appl_attribute20,
701 p_object_version_number
702 );
703 --
704 -- Having converted the arguments into the
705 -- plsql record structure we call the corresponding record
706 -- business process.
707 --
708 upd(l_rec, p_effective_date, p_validate);
709 p_object_version_number := l_rec.object_version_number;
710 --
711 hr_utility.set_location(' Leaving:'||l_proc, 10);
712 End upd;
713 --
714 end per_apl_upd;