[Home] [Help]
PACKAGE BODY: APPS.PER_APR_UPD
Source
1 Package Body per_apr_upd as
2 /* $Header: peaprrhi.pkb 120.29.12020000.2 2012/07/05 00:47:21 amnaraya ship $ */
3
4 -- ---------------------------------------------------------------------------+
5 -- | Private Global Definitions |
6 -- ---------------------------------------------------------------------------+
7
8 g_package varchar2(33) := ' per_apr_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 update the specified row in the schema using the primary key in
21 -- the predicates.
22 -- 3) To trap any constraint violations that may have occurred.
23 -- 4) To raise any other errors.
24
25 -- Pre Conditions:
26 -- This is an internal private procedure which must be called from the upd
27 -- procedure.
28
29 -- In Parameters:
30 -- A Pl/Sql record structre.
31
32 -- Post Success:
33 -- The specified row will be updated in the schema.
34
35 -- Post Failure:
36 -- If a check, unique or parent integrity constraint violation is raised the
37 -- constraint_error procedure will be called.
38
39 -- Developer Implementation Notes:
40 -- The update 'set' attribute list should be modified if any of your
41 -- attributes are not updateable.
42
43 -- Access Status:
44 -- Internal Table Handler Use Only.
45
46 -- {End Of Comments}
47 -- ---------------------------------------------------------------------------+
48 Procedure update_dml(p_rec in out nocopy per_apr_shd.g_rec_type) is
49
50 l_proc varchar2(72) := g_package||'update_dml';
51
52 Begin
53 hr_utility.set_location('Entering:'||l_proc, 5);
54
55 -- Increment the object version
56
57 p_rec.object_version_number := p_rec.object_version_number + 1;
58
59
60 -- Update the per_appraisals Row
61
62 update per_appraisals
63 set
64 appraisal_id = p_rec.appraisal_id,
65 object_version_number = p_rec.object_version_number,
66 appraisal_period_end_date = p_rec.appraisal_period_end_date,
67 appraisal_period_start_date = p_rec.appraisal_period_start_date,
68 appraiser_person_id = p_rec.appraiser_person_id,
69 appraisal_date = p_rec.appraisal_date,
70 type = p_rec.type,
71 next_appraisal_date = p_rec.next_appraisal_date,
72 status = p_rec.status,
73 comments = p_rec.comments,
74 overall_performance_level_id = p_rec.overall_performance_level_id,
75 open = p_rec.open,
76 attribute_category = p_rec.attribute_category,
77 attribute1 = p_rec.attribute1,
78 attribute2 = p_rec.attribute2,
79 attribute3 = p_rec.attribute3,
80 attribute4 = p_rec.attribute4,
81 attribute5 = p_rec.attribute5,
82 attribute6 = p_rec.attribute6,
83 attribute7 = p_rec.attribute7,
84 attribute8 = p_rec.attribute8,
85 attribute9 = p_rec.attribute9,
86 attribute10 = p_rec.attribute10,
87 attribute11 = p_rec.attribute11,
88 attribute12 = p_rec.attribute12,
89 attribute13 = p_rec.attribute13,
90 attribute14 = p_rec.attribute14,
91 attribute15 = p_rec.attribute15,
92 attribute16 = p_rec.attribute16,
93 attribute17 = p_rec.attribute17,
94 attribute18 = p_rec.attribute18,
95 attribute19 = p_rec.attribute19,
96 attribute20 = p_rec.attribute20,
97 system_type = p_rec.system_type,
98 system_params = p_rec.system_params,
99 appraisee_access = p_rec.appraisee_access,
100 main_appraiser_id = p_rec.main_appraiser_id,
101 assignment_id = p_rec.assignment_id,
102 assignment_start_date = p_rec.assignment_start_date,
103 assignment_business_group_id = p_rec.assignment_business_group_id,
104 assignment_organization_id = p_rec.assignment_organization_id,
105 assignment_job_id = p_rec.assignment_job_id,
106 assignment_position_id = p_rec.assignment_position_id,
107 assignment_grade_id = p_rec.assignment_grade_id,
108 appraisal_system_status = p_rec.appraisal_system_status,
109 potential_readiness_level = p_rec.potential_readiness_level,
110 potential_short_term_workopp = p_rec.potential_short_term_workopp,
111 potential_long_term_workopp = p_rec.potential_long_term_workopp,
112 potential_details = p_rec.potential_details,
113 event_id = p_rec.event_id,
114 show_competency_ratings = p_rec.show_competency_ratings,
115 show_objective_ratings = p_rec.show_objective_ratings,
116 show_questionnaire_info = p_rec.show_questionnaire_info,
117 show_participant_details = p_rec.show_participant_details,
118 show_participant_ratings = p_rec.show_participant_ratings,
119 show_participant_names = p_rec.show_participant_names,
120 show_overall_ratings = p_rec.show_overall_ratings,
121 show_overall_comments = p_rec.show_overall_comments,
122 update_appraisal = p_rec.update_appraisal,
123 provide_overall_feedback = p_rec.provide_overall_feedback,
124 appraisee_comments = p_rec.appraisee_comments,
125 plan_id = p_rec.plan_id,
126 offline_status = p_rec.offline_status,
127 retention_potential = p_rec.retention_potential,
128 show_participant_comments = p_rec.show_participant_comments -- 8651478 bug fix
129 where appraisal_id = p_rec.appraisal_id;
130
131 hr_utility.set_location(' Leaving:'||l_proc, 10);
132
133 Exception
134 When hr_api.check_integrity_violated Then
135 -- A check constraint has been violated
136 per_apr_shd.constraint_error
137 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138 When hr_api.parent_integrity_violated Then
139 -- Parent integrity has been violated
140 per_apr_shd.constraint_error
141 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
142 When hr_api.unique_integrity_violated Then
143 -- Unique integrity has been violated
144 per_apr_shd.constraint_error
145 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
146 When Others Then
147 Raise;
148 End update_dml;
149
150 -- ---------------------------------------------------------------------------+
151 -- |------------------------------< pre_update >------------------------------|
152 -- ---------------------------------------------------------------------------+
153 -- {Start Of Comments}
154
155 -- Description:
156 -- This private procedure contains any processing which is required before
157 -- the update dml.
158
159 -- Pre Conditions:
160 -- This is an internal procedure which is called from the upd procedure.
161
162 -- In Parameters:
163 -- A Pl/Sql record structre.
164
165 -- Post Success:
166 -- Processing continues.
167
168 -- Post Failure:
169 -- If an error has occurred, an error message and exception will be raised
170 -- but not handled.
171
172 -- Developer Implementation Notes:
173 -- Any pre-processing required before the update dml is issued should be
174 -- coded within this procedure. It is important to note that any 3rd party
175 -- maintenance should be reviewed before placing in this procedure.
176
177 -- Access Status:
178 -- Internal Table Handler Use Only.
179
180 -- {End Of Comments}
181 -- ---------------------------------------------------------------------------+
182 Procedure pre_update(p_rec in per_apr_shd.g_rec_type) is
183
184 l_proc varchar2(72) := g_package||'pre_update';
185
186 Begin
187 hr_utility.set_location('Entering:'||l_proc, 5);
188
189 hr_utility.set_location(' Leaving:'||l_proc, 10);
190 End pre_update;
191
192 -- ---------------------------------------------------------------------------+
193 -- |-----------------------------< post_update >------------------------------|
194 -- ---------------------------------------------------------------------------+
195 -- {Start Of Comments}
196
197 -- Description:
198 -- This private procedure contains any processing which is required after the
199 -- update dml.
200
201 -- Pre Conditions:
202 -- This is an internal procedure which is called from the upd procedure.
203
204 -- In Parameters:
205 -- A Pl/Sql record structre.
206
207 -- Post Success:
208 -- Processing continues.
209
210 -- Post Failure:
211 -- If an error has occurred, an error message and exception will be raised
212 -- but not handled.
213
214 -- Developer Implementation Notes:
215 -- Any post-processing required after the update dml is issued should be
216 -- coded within this procedure. It is important to note that any 3rd party
217 -- maintenance should be reviewed before placing in this procedure.
218
219 -- Access Status:
220 -- Internal Table Handler Use Only.
221
222 -- {End Of Comments}
223 -- ---------------------------------------------------------------------------+
224 Procedure post_update(p_rec in per_apr_shd.g_rec_type) is
225
226 l_proc varchar2(72) := g_package||'post_update';
227
228 Begin
229 hr_utility.set_location('Entering:'||l_proc, 5);
230
231 -- This is a hook point and the user hook for post_update is called here.
232
233 begin
234 per_apr_rku.after_update (
235 p_appraisal_id => p_rec.appraisal_id ,
236 p_business_group_id => p_rec.business_group_id ,
237 p_appraisal_template_id => p_rec.appraisal_template_id ,
238 p_appraisee_person_id => p_rec.appraisee_person_id ,
239 p_appraiser_person_id => p_rec.appraiser_person_id ,
240 p_appraisal_date => p_rec.appraisal_date ,
241 p_group_date => p_rec.group_date ,
242 p_group_initiator_id => p_rec.group_initiator_id ,
243 p_appraisal_period_end_date => p_rec.appraisal_period_end_date ,
244 p_appraisal_period_start_date => p_rec.appraisal_period_start_date ,
245 p_type => p_rec.type ,
246 p_next_appraisal_date => p_rec.next_appraisal_date ,
247 p_status => p_rec.status ,
248 p_comments => p_rec.comments ,
249 p_overall_performance_level_id => p_rec.overall_performance_level_id ,
250 p_open => p_rec.open ,
251 p_attribute_category => p_rec.attribute_category ,
252 p_attribute1 => p_rec.attribute1 ,
253 p_attribute2 => p_rec.attribute2 ,
254 p_attribute3 => p_rec.attribute3 ,
255 p_attribute4 => p_rec.attribute4 ,
256 p_attribute5 => p_rec.attribute5 ,
257 p_attribute6 => p_rec.attribute6 ,
258 p_attribute7 => p_rec.attribute7 ,
259 p_attribute8 => p_rec.attribute8 ,
260 p_attribute9 => p_rec.attribute9 ,
261 p_attribute10 => p_rec.attribute10 ,
262 p_attribute11 => p_rec.attribute11 ,
263 p_attribute12 => p_rec.attribute12 ,
264 p_attribute13 => p_rec.attribute13 ,
265 p_attribute14 => p_rec.attribute14 ,
266 p_attribute15 => p_rec.attribute15 ,
267 p_attribute16 => p_rec.attribute16 ,
268 p_attribute17 => p_rec.attribute17 ,
269 p_attribute18 => p_rec.attribute18 ,
270 p_attribute19 => p_rec.attribute19 ,
271 p_attribute20 => p_rec.attribute20 ,
272 p_object_version_number => p_rec.object_version_number ,
273 p_system_type => p_rec.system_type ,
274 p_system_params => p_rec.system_params,
275 p_appraisee_access => p_rec.appraisee_access ,
276 p_main_appraiser_id => p_rec.main_appraiser_id ,
277 p_assignment_id => p_rec.assignment_id ,
278 p_assignment_start_date => p_rec.assignment_start_date ,
279 p_asg_business_group_id => p_rec.assignment_business_group_id ,
280 p_assignment_organization_id => p_rec.assignment_organization_id ,
281 p_assignment_job_id => p_rec.assignment_job_id ,
282 p_assignment_position_id => p_rec.assignment_position_id ,
283 p_assignment_grade_id => p_rec.assignment_grade_id ,
284 p_appraisal_system_status => p_rec.appraisal_system_status,
285 p_potential_readiness_level => p_rec.potential_readiness_level,
286 p_potential_short_term_workopp => p_rec.potential_short_term_workopp,
287 p_potential_long_term_workopp => p_rec.potential_long_term_workopp,
288 p_potential_details => p_rec.potential_details,
289 p_event_id => p_rec.event_id,
290 p_offline_status => p_rec.offline_status,
291 p_retention_potential => p_rec.retention_potential,
292 p_business_group_id_o => per_apr_shd.g_old_rec.business_group_id ,
293 p_appraisal_template_id_o => per_apr_shd.g_old_rec.appraisal_template_id ,
294 p_appraisee_person_id_o => per_apr_shd.g_old_rec.appraisee_person_id ,
295 p_appraiser_person_id_o => per_apr_shd.g_old_rec.appraiser_person_id ,
296 p_appraisal_date_o => per_apr_shd.g_old_rec.appraisal_date ,
297 p_group_date_o => per_apr_shd.g_old_rec.group_date ,
298 p_group_initiator_id_o => per_apr_shd.g_old_rec.group_initiator_id ,
299 p_appraisal_period_end_date_o => per_apr_shd.g_old_rec.appraisal_period_end_date ,
300 p_appraisal_period_start_dat_o => per_apr_shd.g_old_rec.appraisal_period_start_date,
301 p_type_o => per_apr_shd.g_old_rec.type ,
302 p_next_appraisal_date_o => per_apr_shd.g_old_rec.next_appraisal_date ,
303 p_status_o => per_apr_shd.g_old_rec.status ,
304 p_comments_o => per_apr_shd.g_old_rec.comments ,
305 p_overall_performance_level_o => per_apr_shd.g_old_rec.overall_performance_level_id,
306 p_open_o => per_apr_shd.g_old_rec.open ,
307 p_attribute_category_o => per_apr_shd.g_old_rec.attribute_category ,
308 p_attribute1_o => per_apr_shd.g_old_rec.attribute1 ,
309 p_attribute2_o => per_apr_shd.g_old_rec.attribute2 ,
310 p_attribute3_o => per_apr_shd.g_old_rec.attribute3 ,
311 p_attribute4_o => per_apr_shd.g_old_rec.attribute4 ,
312 p_attribute5_o => per_apr_shd.g_old_rec.attribute5 ,
313 p_attribute6_o => per_apr_shd.g_old_rec.attribute6 ,
314 p_attribute7_o => per_apr_shd.g_old_rec.attribute7 ,
315 p_attribute8_o => per_apr_shd.g_old_rec.attribute8 ,
316 p_attribute9_o => per_apr_shd.g_old_rec.attribute9 ,
317 p_attribute10_o => per_apr_shd.g_old_rec.attribute10 ,
318 p_attribute11_o => per_apr_shd.g_old_rec.attribute11 ,
319 p_attribute12_o => per_apr_shd.g_old_rec.attribute12 ,
320 p_attribute13_o => per_apr_shd.g_old_rec.attribute13 ,
321 p_attribute14_o => per_apr_shd.g_old_rec.attribute14 ,
322 p_attribute15_o => per_apr_shd.g_old_rec.attribute15 ,
323 p_attribute16_o => per_apr_shd.g_old_rec.attribute16 ,
324 p_attribute17_o => per_apr_shd.g_old_rec.attribute17 ,
325 p_attribute18_o => per_apr_shd.g_old_rec.attribute18 ,
326 p_attribute19_o => per_apr_shd.g_old_rec.attribute19 ,
327 p_attribute20_o => per_apr_shd.g_old_rec.attribute20 ,
328 p_object_version_number_o => per_apr_shd.g_old_rec.object_version_number,
329 p_system_type_o => per_apr_shd.g_old_rec.system_type ,
330 p_system_params_o => per_apr_shd.g_old_rec.system_params,
331 p_appraisee_access_o => per_apr_shd.g_old_rec.appraisee_access ,
332 p_main_appraiser_id_o => per_apr_shd.g_old_rec.main_appraiser_id ,
333 p_assignment_id_o => per_apr_shd.g_old_rec.assignment_id ,
334 p_assignment_start_date_o => per_apr_shd.g_old_rec.assignment_start_date,
335 p_asg_business_group_id_o => per_apr_shd.g_old_rec.assignment_business_group_id,
336 p_assignment_organization_id_o => per_apr_shd.g_old_rec.assignment_organization_id,
337 p_assignment_job_id_o => per_apr_shd.g_old_rec.assignment_job_id ,
338 p_assignment_position_id_o => per_apr_shd.g_old_rec.assignment_position_id,
339 p_assignment_grade_id_o => per_apr_shd.g_old_rec.assignment_grade_id ,
340 p_appraisal_system_status_o => per_apr_shd.g_old_rec.appraisal_system_status,
341 p_potential_readiness_level_o => per_apr_shd.g_old_rec.potential_readiness_level,
342 p_potnl_short_term_workopp_o => per_apr_shd.g_old_rec.potential_short_term_workopp,
343 p_potnl_long_term_workopp_o => per_apr_shd.g_old_rec.potential_long_term_workopp,
344 p_potential_details_o => per_apr_shd.g_old_rec.potential_details,
345 p_event_id_o => per_apr_shd.g_old_rec.event_id,
346 p_show_competency_ratings_o => per_apr_shd.g_old_rec.show_competency_ratings,
347 p_show_objective_ratings_o => per_apr_shd.g_old_rec.show_objective_ratings,
348 p_show_questionnaire_info_o => per_apr_shd.g_old_rec.show_questionnaire_info,
349 p_show_participant_details_o => per_apr_shd.g_old_rec.show_participant_details,
350 p_show_participant_ratings_o => per_apr_shd.g_old_rec.show_participant_ratings,
351 p_show_participant_names_o => per_apr_shd.g_old_rec.show_participant_names,
352 p_show_overall_ratings_o => per_apr_shd.g_old_rec.show_overall_ratings,
353 p_show_overall_comments_o => per_apr_shd.g_old_rec.show_overall_comments,
354 p_update_appraisal_o => per_apr_shd.g_old_rec.update_appraisal,
355 p_provide_overall_feedback_o => per_apr_shd.g_old_rec.provide_overall_feedback,
356 p_appraisee_comments_o => per_apr_shd.g_old_rec.appraisee_comments,
357 p_plan_id_o => per_apr_shd.g_old_rec.plan_id,
358 p_offline_status_o => per_apr_shd.g_old_rec.offline_status,
359 p_retention_potential_o => per_apr_shd.g_old_rec.retention_potential,
360 p_show_participant_comments_o => per_apr_shd.g_old_rec.show_participant_comments -- 8651478 bug fix
361 );
362 exception
363 when hr_api.cannot_find_prog_unit then
364 hr_api.cannot_find_prog_unit_error
365 ( p_module_name => 'PER_APPRAISALS'
366 ,p_hook_type => 'AU'
367 );
368 end;
369 -- End of API User Hook for post_update
370
371 hr_utility.set_location(' Leaving:'||l_proc, 10);
372 End post_update;
373
374 -- ---------------------------------------------------------------------------+
375 -- |-----------------------------< convert_defs >-----------------------------|
376 -- ---------------------------------------------------------------------------+
377 -- {Start Of Comments}
378
379 -- Description:
380 -- The Convert_Defs procedure has one very important function:
381 -- It must return the record structure for the row with all system defaulted
382 -- values converted into its corresponding parameter value for update. When
383 -- we attempt to update a row through the Upd process , certain
384 -- parameters can be defaulted which enables flexibility in the calling of
385 -- the upd process (e.g. only attributes which need to be updated need to be
386 -- specified). For the upd process to determine which attributes
387 -- have NOT been specified we need to check if the parameter has a reserved
388 -- system default value. Therefore, for all parameters which have a
389 -- corresponding reserved system default mechanism specified we need to
390 -- check if a system default is being used. If a system default is being
391 -- used then we convert the defaulted value into its corresponding attribute
392 -- value held in the g_old_rec data structure.
393
394 -- Pre Conditions:
395 -- This private function can only be called from the upd process.
396
397 -- In Parameters:
398 -- A Pl/Sql record structre.
399
400 -- Post Success:
401 -- The record structure will be returned with all system defaulted parameter
402 -- values converted into its current row attribute value.
403
404 -- Post Failure:
405 -- No direct error handling is required within this function. Any possible
406 -- errors within this procedure will be a PL/SQL value error due to conversion
407
408 -- of datatypes or data lengths.
409
410 -- Developer Implementation Notes:
411 -- None.
412
413 -- Access Status:
414 -- Internal Table Handler Use Only.
415
416 -- {End Of Comments}
417 -- ---------------------------------------------------------------------------+
418 Procedure convert_defs(p_rec in out nocopy per_apr_shd.g_rec_type) is
419
420 l_proc varchar2(72) := g_package||'convert_defs';
421
422 Begin
423
424 hr_utility.set_location('Entering:'||l_proc, 5);
425
426 -- We must now examine each argument value in the
427 -- p_rec plsql record structure
428 -- to see if a system default is being used. If a system default
429 -- is being used then we must set to the 'current' argument value.
430
431 If (p_rec.business_group_id = hr_api.g_number) then
432 p_rec.business_group_id :=
433 per_apr_shd.g_old_rec.business_group_id;
434 End If;
435 If (p_rec.appraisal_template_id = hr_api.g_number) then
436 p_rec.appraisal_template_id :=
437 per_apr_shd.g_old_rec.appraisal_template_id;
438 End If;
439 If (p_rec.appraisee_person_id = hr_api.g_number) then
440 p_rec.appraisee_person_id :=
441 per_apr_shd.g_old_rec.appraisee_person_id;
442 End If;
443 If (p_rec.appraiser_person_id = hr_api.g_number) then
444 p_rec.appraiser_person_id :=
445 per_apr_shd.g_old_rec.appraiser_person_id;
446 End If;
447 If (p_rec.appraisal_date = hr_api.g_date) then
448 p_rec.appraisal_date :=
449 per_apr_shd.g_old_rec.appraisal_date;
450 End If;
451 If (p_rec.appraisal_period_end_date = hr_api.g_date) then
452 p_rec.appraisal_period_end_date :=
453 per_apr_shd.g_old_rec.appraisal_period_end_date;
454 End If;
455 If (p_rec.appraisal_period_start_date = hr_api.g_date) then
456 p_rec.appraisal_period_start_date :=
457 per_apr_shd.g_old_rec.appraisal_period_start_date;
458 End If;
459 If (p_rec.type = hr_api.g_varchar2) then
460 p_rec.type :=
461 per_apr_shd.g_old_rec.type;
462 End If;
463 If (p_rec.next_appraisal_date = hr_api.g_date) then
464 p_rec.next_appraisal_date :=
465 per_apr_shd.g_old_rec.next_appraisal_date;
466 End If;
467 If (p_rec.status = hr_api.g_varchar2) then
468 p_rec.status :=
469 per_apr_shd.g_old_rec.status;
470 End If;
471 If (p_rec.comments = hr_api.g_varchar2) then
472 p_rec.comments :=
473 per_apr_shd.g_old_rec.comments;
474 End If;
475 If (p_rec.overall_performance_level_id = hr_api.g_number) then
476 p_rec.overall_performance_level_id :=
477 per_apr_shd.g_old_rec.overall_performance_level_id;
478 End If;
479 If (p_rec.open = hr_api.g_varchar2) then
480 p_rec.open := per_apr_shd.g_old_rec.open;
481 End If;
482 If (p_rec.attribute_category = hr_api.g_varchar2) then
483 p_rec.attribute_category :=
484 per_apr_shd.g_old_rec.attribute_category;
485 End If;
486 If (p_rec.attribute1 = hr_api.g_varchar2) then
487 p_rec.attribute1 :=
488 per_apr_shd.g_old_rec.attribute1;
489 End If;
490 If (p_rec.attribute2 = hr_api.g_varchar2) then
491 p_rec.attribute2 :=
492 per_apr_shd.g_old_rec.attribute2;
493 End If;
494 If (p_rec.attribute3 = hr_api.g_varchar2) then
495 p_rec.attribute3 :=
496 per_apr_shd.g_old_rec.attribute3;
497 End If;
498 If (p_rec.attribute4 = hr_api.g_varchar2) then
499 p_rec.attribute4 :=
500 per_apr_shd.g_old_rec.attribute4;
501 End If;
502 If (p_rec.attribute5 = hr_api.g_varchar2) then
503 p_rec.attribute5 :=
504 per_apr_shd.g_old_rec.attribute5;
505 End If;
506 If (p_rec.attribute6 = hr_api.g_varchar2) then
507 p_rec.attribute6 :=
508 per_apr_shd.g_old_rec.attribute6;
509 End If;
510 If (p_rec.attribute7 = hr_api.g_varchar2) then
511 p_rec.attribute7 :=
512 per_apr_shd.g_old_rec.attribute7;
513 End If;
514 If (p_rec.attribute8 = hr_api.g_varchar2) then
515 p_rec.attribute8 :=
516 per_apr_shd.g_old_rec.attribute8;
517 End If;
518 If (p_rec.attribute9 = hr_api.g_varchar2) then
519 p_rec.attribute9 :=
520 per_apr_shd.g_old_rec.attribute9;
521 End If;
522 If (p_rec.attribute10 = hr_api.g_varchar2) then
523 p_rec.attribute10 :=
524 per_apr_shd.g_old_rec.attribute10;
525 End If;
526 If (p_rec.attribute11 = hr_api.g_varchar2) then
527 p_rec.attribute11 :=
528 per_apr_shd.g_old_rec.attribute11;
529 End If;
530 If (p_rec.attribute12 = hr_api.g_varchar2) then
531 p_rec.attribute12 :=
532 per_apr_shd.g_old_rec.attribute12;
533 End If;
534 If (p_rec.attribute13 = hr_api.g_varchar2) then
535 p_rec.attribute13 :=
536 per_apr_shd.g_old_rec.attribute13;
537 End If;
538 If (p_rec.attribute14 = hr_api.g_varchar2) then
539 p_rec.attribute14 :=
540 per_apr_shd.g_old_rec.attribute14;
541 End If;
542 If (p_rec.attribute15 = hr_api.g_varchar2) then
543 p_rec.attribute15 :=
544 per_apr_shd.g_old_rec.attribute15;
545 End If;
546 If (p_rec.attribute16 = hr_api.g_varchar2) then
547 p_rec.attribute16 :=
548 per_apr_shd.g_old_rec.attribute16;
549 End If;
550 If (p_rec.attribute17 = hr_api.g_varchar2) then
551 p_rec.attribute17 :=
552 per_apr_shd.g_old_rec.attribute17;
553 End If;
554 If (p_rec.attribute18 = hr_api.g_varchar2) then
555 p_rec.attribute18 :=
556 per_apr_shd.g_old_rec.attribute18;
557 End If;
558 If (p_rec.attribute19 = hr_api.g_varchar2) then
559 p_rec.attribute19 :=
560 per_apr_shd.g_old_rec.attribute19;
561 End If;
562 If (p_rec.attribute20 = hr_api.g_varchar2) then
563 p_rec.attribute20 :=
564 per_apr_shd.g_old_rec.attribute20;
565 End If;
566
567 If (p_rec.system_type = hr_api.g_varchar2) then
568 p_rec.system_type :=
569 per_apr_shd.g_old_rec.system_type;
570 End If;
571 If (p_rec.system_params = hr_api.g_varchar2) then
572 p_rec.system_params :=
573 per_apr_shd.g_old_rec.system_params;
574 End If;
575
576 If (p_rec.appraisee_access = hr_api.g_varchar2) then
577 p_rec.appraisee_access :=
578 per_apr_shd.g_old_rec.appraisee_access;
579 End If;
580 If (p_rec.main_appraiser_id = hr_api.g_number) then
581 p_rec.main_appraiser_id :=
582 per_apr_shd.g_old_rec.main_appraiser_id;
583 End If;
584 If (p_rec.assignment_id = hr_api.g_number) then
585 p_rec.assignment_id :=
586 per_apr_shd.g_old_rec.assignment_id;
587 End If;
588 If (p_rec.assignment_start_date = hr_api.g_date) then
589 p_rec.assignment_start_date :=
590 per_apr_shd.g_old_rec.assignment_start_date;
591 End If;
592
593 If (p_rec.assignment_business_group_id = hr_api.g_number) then
594 p_rec.assignment_business_group_id :=
595 per_apr_shd.g_old_rec.assignment_business_group_id;
596 End If;
597 If (p_rec.assignment_organization_id = hr_api.g_number) then
598 p_rec.assignment_organization_id :=
599 per_apr_shd.g_old_rec.assignment_organization_id;
600 End If;
601 If (p_rec.assignment_job_id = hr_api.g_number) then
602 p_rec.assignment_job_id :=
603 per_apr_shd.g_old_rec.assignment_job_id;
604 End If;
605 If (p_rec.assignment_position_id = hr_api.g_number) then
606 p_rec.assignment_position_id :=
607 per_apr_shd.g_old_rec.assignment_position_id;
608 End If;
609 If (p_rec.assignment_grade_id = hr_api.g_number) then
610 p_rec.assignment_grade_id :=
611 per_apr_shd.g_old_rec.assignment_grade_id;
612 End If;
613
614 If (p_rec.potential_readiness_level = hr_api.g_varchar2) then
615 p_rec.potential_readiness_level :=
616 per_apr_shd.g_old_rec.potential_readiness_level;
617 End If;
618 If (p_rec.potential_short_term_workopp = hr_api.g_varchar2) then
619 p_rec.potential_short_term_workopp :=
620 per_apr_shd.g_old_rec.potential_short_term_workopp;
621 End If;
622 If (p_rec.potential_long_term_workopp = hr_api.g_varchar2) then
623 p_rec.potential_long_term_workopp :=
624 per_apr_shd.g_old_rec.potential_long_term_workopp;
625 End If;
626 If (p_rec.potential_details = hr_api.g_varchar2) then
627 p_rec.potential_details :=
628 per_apr_shd.g_old_rec.potential_details;
629 End If;
630 If (p_rec.event_id = hr_api.g_number) then
631 p_rec.event_id :=
632 per_apr_shd.g_old_rec.event_id;
633 End If;
634
635 If (p_rec.appraisal_system_status = hr_api.g_varchar2) then
636 p_rec.appraisal_system_status :=
637 per_apr_shd.g_old_rec.appraisal_system_status;
638 End If;
639
640 If (p_rec.show_competency_ratings = hr_api.g_varchar2) then
641 p_rec.show_competency_ratings :=
642 per_apr_shd.g_old_rec.show_competency_ratings;
643 End If;
644
645 If (p_rec.show_objective_ratings = hr_api.g_varchar2) then
646 p_rec.show_objective_ratings :=
647 per_apr_shd.g_old_rec.show_objective_ratings;
648 End If;
649
650 If (p_rec.show_questionnaire_info = hr_api.g_varchar2) then
651 p_rec.show_questionnaire_info :=
652 per_apr_shd.g_old_rec.show_questionnaire_info;
653 End If;
654
655 If (p_rec.show_participant_details = hr_api.g_varchar2) then
656 p_rec.show_participant_details :=
657 per_apr_shd.g_old_rec.show_participant_details;
658 End If;
659
660 If (p_rec.show_participant_ratings = hr_api.g_varchar2) then
661 p_rec.show_participant_ratings :=
662 per_apr_shd.g_old_rec.show_participant_ratings;
663 End If;
664
665 If (p_rec.show_participant_names = hr_api.g_varchar2) then
666 p_rec.show_participant_names :=
667 per_apr_shd.g_old_rec.show_participant_names;
668 End If;
669
670 If (p_rec.show_overall_ratings = hr_api.g_varchar2) then
671 p_rec.show_overall_ratings :=
672 per_apr_shd.g_old_rec.show_overall_ratings;
673 End If;
674
675 If (p_rec.show_overall_comments = hr_api.g_varchar2) then
676 p_rec.show_overall_comments :=
677 per_apr_shd.g_old_rec.show_overall_comments;
678 End If;
679
680 If (p_rec.update_appraisal = hr_api.g_varchar2) then
681 p_rec.update_appraisal :=
682 per_apr_shd.g_old_rec.update_appraisal;
683 End If;
684
685 If (p_rec.provide_overall_feedback = hr_api.g_varchar2) then
686 p_rec.provide_overall_feedback :=
687 per_apr_shd.g_old_rec.provide_overall_feedback;
688 End If;
689
690 If (p_rec.appraisee_comments = hr_api.g_varchar2) then
691 p_rec.appraisee_comments :=
692 per_apr_shd.g_old_rec.appraisee_comments;
693 End If;
694
695 If (p_rec.plan_id = hr_api.g_number) then
696 p_rec.plan_id :=
697 per_apr_shd.g_old_rec.plan_id;
698 End If;
699
700 If (p_rec.offline_status = hr_api.g_varchar2) then
701 p_rec.offline_status :=
702 per_apr_shd.g_old_rec.offline_status;
703 End If;
704
705 If (p_rec.retention_potential = hr_api.g_varchar2) then
706 p_rec.retention_potential :=
707 per_apr_shd.g_old_rec.retention_potential;
708 End If;
709
710 -- 8651478 bug fix
711 If (p_rec.show_participant_comments = hr_api.g_varchar2) then
712 p_rec.show_participant_comments :=
713 per_apr_shd.g_old_rec.show_participant_comments;
714 End If;
715
716 hr_utility.set_location(' Leaving:'||l_proc, 10);
717
718 End convert_defs;
719
720 -- ---------------------------------------------------------------------------+
721 -- |---------------------------------< upd >----------------------------------|
722 -- ---------------------------------------------------------------------------+
723 Procedure upd
724 (
725 p_rec in out nocopy per_apr_shd.g_rec_type,
726 p_effective_date in date,
727 p_validate in boolean default false
728 ) is
729
730 l_proc varchar2(72) := g_package||'upd';
731
732 Begin
733 hr_utility.set_location('Entering:'||l_proc, 5);
734
735 -- Determine if the business process is to be validated.
736
737 If p_validate then
738
739 -- Issue the savepoint.
740
741 SAVEPOINT upd_per_apr;
742 End If;
743
744 -- We must lock the row which we need to update.
745
746 per_apr_shd.lck
747 (
748 p_rec.appraisal_id,
749 p_rec.object_version_number
750 );
751
752 -- 1. During an update system defaults are used to determine if
753 -- arguments have been defaulted or not. We must therefore
754 -- derive the full record structure values to be updated.
755
756 -- 2. Call the supporting update validate operations.
757
758 convert_defs(p_rec);
759 per_apr_bus.update_validate(p_rec,p_effective_date);
760 -- raise any errors
761 hr_multi_message.end_validation_set;
762 -- Call the supporting pre-update operation
763
764 pre_update(p_rec);
765
766 -- Update the row.
767
768 update_dml(p_rec);
769
770 -- Call the supporting post-update operation
771
772 post_update(p_rec);
773 -- raise any errors
774 hr_multi_message.end_validation_set;
775
776 -- If we are validating then raise the Validate_Enabled exception
777
778 If p_validate then
779 Raise HR_Api.Validate_Enabled;
780 End If;
781
782 hr_utility.set_location(' Leaving:'||l_proc, 10);
783 Exception
784 When HR_Api.Validate_Enabled Then
785
786 -- As the Validate_Enabled exception has been raised
787 -- we must rollback to the savepoint
788
789 ROLLBACK TO upd_per_apr;
790 End upd;
791
792 -- ---------------------------------------------------------------------------+
793 -- |---------------------------------< upd >----------------------------------|
794 -- ---------------------------------------------------------------------------+
795 Procedure upd
796 (
797 p_appraisal_id in number,
798 p_object_version_number in out nocopy number,
799 p_appraiser_person_id in number,
800 p_appraisal_date in date default hr_api.g_date,
801 p_appraisal_period_end_date in date default hr_api.g_date,
802 p_appraisal_period_start_date in date default hr_api.g_date,
803 p_type in varchar2 default hr_api.g_varchar2,
804 p_next_appraisal_date in date default hr_api.g_date,
805 p_status in varchar2 default hr_api.g_varchar2,
806 p_comments in varchar2 default hr_api.g_varchar2,
807 p_overall_performance_level_id in number default hr_api.g_number,
808 p_open in varchar2 default hr_api.g_varchar2,
809 p_attribute_category in varchar2 default hr_api.g_varchar2,
810 p_attribute1 in varchar2 default hr_api.g_varchar2,
811 p_attribute2 in varchar2 default hr_api.g_varchar2,
812 p_attribute3 in varchar2 default hr_api.g_varchar2,
813 p_attribute4 in varchar2 default hr_api.g_varchar2,
814 p_attribute5 in varchar2 default hr_api.g_varchar2,
815 p_attribute6 in varchar2 default hr_api.g_varchar2,
816 p_attribute7 in varchar2 default hr_api.g_varchar2,
817 p_attribute8 in varchar2 default hr_api.g_varchar2,
818 p_attribute9 in varchar2 default hr_api.g_varchar2,
819 p_attribute10 in varchar2 default hr_api.g_varchar2,
820 p_attribute11 in varchar2 default hr_api.g_varchar2,
821 p_attribute12 in varchar2 default hr_api.g_varchar2,
822 p_attribute13 in varchar2 default hr_api.g_varchar2,
823 p_attribute14 in varchar2 default hr_api.g_varchar2,
824 p_attribute15 in varchar2 default hr_api.g_varchar2,
825 p_attribute16 in varchar2 default hr_api.g_varchar2,
826 p_attribute17 in varchar2 default hr_api.g_varchar2,
827 p_attribute18 in varchar2 default hr_api.g_varchar2,
828 p_attribute19 in varchar2 default hr_api.g_varchar2,
829 p_attribute20 in varchar2 default hr_api.g_varchar2,
830 p_effective_date in date,
831 p_system_type in varchar2 default hr_api.g_varchar2,
832 p_system_params in varchar2 default hr_api.g_varchar2,
833 p_appraisee_access in varchar2 default hr_api.g_varchar2,
834 p_main_appraiser_id in number default hr_api.g_number,
835 p_assignment_id in number default hr_api.g_number,
836 p_assignment_start_date in date default hr_api.g_date,
837 p_asg_business_group_id in number default hr_api.g_number,
838 p_assignment_organization_id in number default hr_api.g_number,
839 p_assignment_job_id in number default hr_api.g_number,
840 p_assignment_position_id in number default hr_api.g_number,
841 p_assignment_grade_id in number default hr_api.g_number,
842 p_appraisal_system_status in varchar2 default hr_api.g_varchar2,
843 p_potential_readiness_level in varchar2 default hr_api.g_varchar2,
844 p_potential_short_term_workopp in varchar2 default hr_api.g_varchar2,
845 p_potential_long_term_workopp in varchar2 default hr_api.g_varchar2,
846 p_potential_details in varchar2 default hr_api.g_varchar2,
847 p_event_id in number default hr_api.g_number,
848 p_show_competency_ratings in varchar2 default hr_api.g_varchar2,
849 p_show_objective_ratings in varchar2 default hr_api.g_varchar2,
850 p_show_questionnaire_info in varchar2 default hr_api.g_varchar2,
851 p_show_participant_details in varchar2 default hr_api.g_varchar2,
852 p_show_participant_ratings in varchar2 default hr_api.g_varchar2,
853 p_show_participant_names in varchar2 default hr_api.g_varchar2,
854 p_show_overall_ratings in varchar2 default hr_api.g_varchar2,
855 p_show_overall_comments in varchar2 default hr_api.g_varchar2,
856 p_update_appraisal in varchar2 default hr_api.g_varchar2,
857 p_provide_overall_feedback in varchar2 default hr_api.g_varchar2,
858 p_appraisee_comments in varchar2 default hr_api.g_varchar2,
859 p_plan_id in number default hr_api.g_number,
860 p_offline_status in varchar2 default hr_api.g_varchar2,
861 p_retention_potential in varchar2 default hr_api.g_varchar2,
862 p_validate in boolean default false,
863 p_show_participant_comments in varchar2 default hr_api.g_varchar2 -- 8651478 bug fix
864 ) is
865
866 l_rec per_apr_shd.g_rec_type;
867 l_proc varchar2(72) := g_package||'upd';
868
869 Begin
870 hr_utility.set_location('Entering:'||l_proc, 5);
871
872 -- Call conversion function to turn arguments into the
873 -- l_rec structure.
874
875 l_rec :=
876 per_apr_shd.convert_args
877 (
878 p_appraisal_id,
879 hr_api.g_number,
880 p_object_version_number,
881 hr_api.g_number,
882 hr_api.g_number,
883 p_appraiser_person_id,
884 p_appraisal_date,
885 p_appraisal_period_end_date,
886 p_appraisal_period_start_date,
887 p_type,
888 p_next_appraisal_date,
889 p_status,
890 hr_api.g_date,
891 hr_api.g_number,
892 p_comments,
893 p_overall_performance_level_id,
894 p_open,
895 p_attribute_category,
896 p_attribute1,
897 p_attribute2,
898 p_attribute3,
899 p_attribute4,
900 p_attribute5,
901 p_attribute6,
902 p_attribute7,
903 p_attribute8,
904 p_attribute9,
905 p_attribute10,
906 p_attribute11,
907 p_attribute12,
908 p_attribute13,
909 p_attribute14,
910 p_attribute15,
911 p_attribute16,
912 p_attribute17,
913 p_attribute18,
914 p_attribute19,
915 p_attribute20,
916 p_system_type,
917 p_system_params,
918 p_appraisee_access,
919 p_main_appraiser_id,
920 p_assignment_id,
921 p_assignment_start_date,
922 p_asg_business_group_id,
923 p_assignment_organization_id ,
924 p_assignment_job_id ,
925 p_assignment_position_id ,
926 p_assignment_grade_id,
927 p_appraisal_system_status,
928 p_potential_readiness_level,
929 p_potential_short_term_workopp,
930 p_potential_long_term_workopp,
931 p_potential_details,
932 p_event_id,
933 p_show_competency_ratings,
934 p_show_objective_ratings,
935 p_show_questionnaire_info,
936 p_show_participant_details,
937 p_show_participant_ratings,
938 p_show_participant_names,
939 p_show_overall_ratings,
940 p_show_overall_comments,
941 p_update_appraisal,
942 p_provide_overall_feedback,
943 p_appraisee_comments,
944 p_plan_id,
945 p_offline_status,
946 p_retention_potential,
947 p_show_participant_comments -- 8651478 bug fix
948 );
949
950 -- Having converted the arguments into the
951 -- plsql record structure we call the corresponding record
952 -- business process.
953
954 upd(l_rec, p_effective_date,p_validate);
955 p_object_version_number := l_rec.object_version_number;
956
957 hr_utility.set_location(' Leaving:'||l_proc, 10);
958 End upd;
959
960 end per_apr_upd;