1 Package Body ghr_pdi_upd as
2 /* $Header: ghpdirhi.pkb 120.1 2005/06/13 12:28:25 vravikan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ghr_pdi_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy ghr_pdi_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 --ghr_pdi_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ghr_position_descriptions Row
68 --
69 update ghr_position_descriptions
70 set
71 routing_group_id = p_rec.routing_group_id,
72 date_from = p_rec.date_from,
73 date_to = p_rec.date_to,
74 opm_cert_num = p_rec.opm_cert_num,
75 flsa = p_rec.flsa,
76 financial_statement = p_rec.financial_statement,
77 subject_to_ia_action = p_rec.subject_to_ia_action,
78 position_status = p_rec.position_status,
79 position_is = p_rec.position_is,
80 position_sensitivity = p_rec.position_sensitivity,
81 competitive_level = p_rec.competitive_level,
82 pd_remarks = p_rec.pd_remarks,
83 position_class_std = p_rec.position_class_std,
84 category = p_rec.category,
85 career_ladder = p_rec.career_ladder,
86 supervisor_name = p_rec.supervisor_name,
87 supervisor_title = p_rec.supervisor_title,
88 supervisor_date = p_rec.supervisor_date,
89 manager_name = p_rec.manager_name,
90 manager_title = p_rec.manager_title,
91 manager_date = p_rec.manager_date,
92 classifier_name = p_rec.classifier_name,
93 classifier_title = p_rec.classifier_title,
94 classifier_date = p_rec.classifier_date,
95 attribute_category = p_rec.attribute_category,
96 attribute1 = p_rec.attribute1,
97 attribute2 = p_rec.attribute2,
98 attribute3 = p_rec.attribute3,
99 attribute4 = p_rec.attribute4,
100 attribute5 = p_rec.attribute5,
101 attribute6 = p_rec.attribute6,
102 attribute7 = p_rec.attribute7,
103 attribute8 = p_rec.attribute8,
104 attribute9 = p_rec.attribute9,
105 attribute10 = p_rec.attribute10,
106 attribute11 = p_rec.attribute11,
107 attribute12 = p_rec.attribute12,
108 attribute13 = p_rec.attribute13,
109 attribute14 = p_rec.attribute14,
110 attribute15 = p_rec.attribute15,
111 attribute16 = p_rec.attribute16,
112 attribute17 = p_rec.attribute17,
113 attribute18 = p_rec.attribute18,
114 attribute19 = p_rec.attribute19,
115 attribute20 = p_rec.attribute20,
116 business_group_id = p_rec.business_group_id,
117 object_version_number = p_rec.object_version_number
118 where position_description_id = p_rec.position_description_id;
119 --
120 --ghr_pdi_shd.g_api_dml := false; -- Unset the api dml status
121 --
122 hr_utility.set_location(' Leaving:'||l_proc, 10);
123 --
124 Exception
125 When hr_api.check_integrity_violated Then
126 -- A check constraint has been violated
127 --ghr_pdi_shd.g_api_dml := false; -- Unset the api dml status
128 ghr_pdi_shd.constraint_error
129 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
130 When hr_api.parent_integrity_violated Then
131 -- Parent integrity has been violated
132 --ghr_pdi_shd.g_api_dml := false; -- Unset the api dml status
133 ghr_pdi_shd.constraint_error
134 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
135 When hr_api.unique_integrity_violated Then
136 -- Unique integrity has been violated
137 --ghr_pdi_shd.g_api_dml := false; -- Unset the api dml status
138 ghr_pdi_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
140 When Others Then
141 --ghr_pdi_shd.g_api_dml := false; -- Unset the api dml status
142 Raise;
143 End update_dml;
144 --
145 -- ----------------------------------------------------------------------------
146 -- |------------------------------< pre_update >------------------------------|
147 -- ----------------------------------------------------------------------------
148 -- {Start Of Comments}
149 --
150 -- Description:
151 -- This private procedure contains any processing which is required before
152 -- the update dml.
153 --
154 -- Prerequisites:
155 -- This is an internal procedure which is called from the upd procedure.
156 --
157 -- In Parameters:
158 -- A Pl/Sql record structre.
159 --
160 -- Post Success:
161 -- Processing continues.
162 --
163 -- Post Failure:
164 -- If an error has occurred, an error message and exception will be raised
165 -- but not handled.
166 --
167 -- Developer Implementation Notes:
168 -- Any pre-processing required before the update dml is issued should be
169 -- coded within this procedure. It is important to note that any 3rd party
170 -- maintenance should be reviewed before placing in this procedure.
171 --
172 -- Access Status:
173 -- Internal Row Handler Use Only.
174 --
175 -- {End Of Comments}
176 -- ----------------------------------------------------------------------------
177 Procedure pre_update(p_rec in ghr_pdi_shd.g_rec_type) is
178 --
179 l_proc varchar2(72) := g_package||'pre_update';
180 --
181 Begin
182 hr_utility.set_location('Entering:'||l_proc, 5);
183 --
184 hr_utility.set_location(' Leaving:'||l_proc, 10);
185 End pre_update;
186 --
187 -- ----------------------------------------------------------------------------
188 -- |-----------------------------< post_update >------------------------------|
189 -- ----------------------------------------------------------------------------
190 -- {Start Of Comments}
191 --
192 -- Description:
193 -- This private procedure contains any processing which is required after the
194 -- update dml.
195 --
196 -- Prerequisites:
197 -- This is an internal procedure which is called from the upd procedure.
198 --
199 -- In Parameters:
200 -- A Pl/Sql record structre.
201 --
202 -- Post Success:
203 -- Processing continues.
204 --
205 -- Post Failure:
206 -- If an error has occurred, an error message and exception will be raised
207 -- but not handled.
208 --
209 -- Developer Implementation Notes:
210 -- Any post-processing required after the update dml is issued should be
211 -- coded within this procedure. It is important to note that any 3rd party
212 -- maintenance should be reviewed before placing in this procedure.
213 --
214 -- Access Status:
215 -- Internal Row Handler Use Only.
216 --
217 -- {End Of Comments}
218 -- ----------------------------------------------------------------------------
219 Procedure post_update(p_rec in ghr_pdi_shd.g_rec_type) is
220 --
221 l_proc varchar2(72) := g_package||'post_update';
222 --
223 Begin
224 hr_utility.set_location('Entering:'||l_proc, 5);
225 --
226 --
227 -- This is a hook point and the user hook for post_update is called here.
228 --
229 begin
230 ghr_pdi_rku.after_update (
231 p_position_description_id => p_rec.position_description_id,
232 p_classifier_date => p_rec.classifier_date,
233 -- p_pa_request_id => p_rec.pa_request_id,
234 p_attribute_category => p_rec.attribute_category,
235 p_routing_group_id => p_rec.routing_group_id,
236 p_date_from => p_rec.date_from,
237 p_date_to => p_rec.date_to,
238 p_opm_cert_num => p_rec.opm_cert_num,
239 p_flsa => p_rec.flsa,
240 p_financial_statement => p_rec.financial_statement,
241 p_subject_to_ia_action => p_rec.subject_to_ia_action,
242 p_position_status => p_rec.position_status,
243 p_position_is => p_rec.position_is,
244 p_position_sensitivity => p_rec.position_sensitivity,
245 p_competitive_level => p_rec.competitive_level,
246 p_pd_remarks => p_rec.pd_remarks,
247 p_position_class_std => p_rec.position_class_std,
248 p_category => p_rec.category,
249 p_career_ladder => p_rec.career_ladder,
250 p_supervisor_name => p_rec.supervisor_name,
251 p_supervisor_title => p_rec.supervisor_title,
252 p_supervisor_date => p_rec.supervisor_date,
253 p_manager_name => p_rec.manager_name,
254 p_manager_title => p_rec.manager_title,
255 p_manager_date => p_rec.manager_date,
256 p_classifier_name => p_rec.classifier_name,
257 p_classifier_title => p_rec.classifier_title,
258 p_attribute1 => p_rec.attribute1,
259 p_attribute2 => p_rec.attribute2,
260 p_attribute3 => p_rec.attribute3,
261 p_attribute4 => p_rec.attribute4,
262 p_attribute5 => p_rec.attribute5,
263 p_attribute6 => p_rec.attribute6,
264 p_attribute7 => p_rec.attribute7,
265 p_attribute8 => p_rec.attribute8,
266 p_attribute9 => p_rec.attribute9,
267 p_attribute10 => p_rec.attribute10,
268 p_attribute11 => p_rec.attribute11,
269 p_attribute12 => p_rec.attribute12,
270 p_attribute13 => p_rec.attribute13,
271 p_attribute14 => p_rec.attribute14,
272 p_attribute15 => p_rec.attribute15,
273 p_attribute16 => p_rec.attribute16,
274 p_attribute17 => p_rec.attribute17,
275 p_attribute18 => p_rec.attribute18,
276 p_attribute19 => p_rec.attribute19,
277 p_attribute20 => p_rec.attribute20,
278 p_business_group_id => p_rec.business_group_id,
279 p_object_version_number => p_rec.object_version_number,
280 p_classifier_date_o => ghr_pdi_shd.g_old_rec.classifier_date,
281 -- p_pa_request_id_o => ghr_pdi_shd.g_old_rec.pa_request_id,
282 p_attribute_category_o => ghr_pdi_shd.g_old_rec.attribute_category,
283 p_routing_group_id_o => ghr_pdi_shd.g_old_rec.routing_group_id,
284 p_date_from_o => ghr_pdi_shd.g_old_rec.date_from,
285 p_date_to_o => ghr_pdi_shd.g_old_rec.date_to,
286 p_opm_cert_num_o => ghr_pdi_shd.g_old_rec.opm_cert_num,
287 p_flsa_o => ghr_pdi_shd.g_old_rec.flsa,
288 p_financial_statement_o => ghr_pdi_shd.g_old_rec.financial_statement,
289 p_subject_to_ia_action_o => ghr_pdi_shd.g_old_rec.subject_to_ia_action,
290 p_position_status_o => ghr_pdi_shd.g_old_rec.position_status,
291 p_position_is_o => ghr_pdi_shd.g_old_rec.position_is,
292 p_position_sensitivity_o => ghr_pdi_shd.g_old_rec.position_sensitivity,
293 p_competitive_level_o => ghr_pdi_shd.g_old_rec.competitive_level,
294 p_pd_remarks_o => ghr_pdi_shd.g_old_rec.pd_remarks,
295 p_position_class_std_o => ghr_pdi_shd.g_old_rec.position_class_std,
296 p_category_o => ghr_pdi_shd.g_old_rec.category,
297 p_career_ladder_o => ghr_pdi_shd.g_old_rec.career_ladder,
298 p_supervisor_name_o => ghr_pdi_shd.g_old_rec.supervisor_name,
299 p_supervisor_title_o => ghr_pdi_shd.g_old_rec.supervisor_title,
300 p_supervisor_date_o => ghr_pdi_shd.g_old_rec.supervisor_date,
301 p_manager_name_o => ghr_pdi_shd.g_old_rec.manager_name,
302 p_manager_title_o => ghr_pdi_shd.g_old_rec.manager_title,
303 p_manager_date_o => ghr_pdi_shd.g_old_rec.manager_date,
304 p_classifier_name_o => ghr_pdi_shd.g_old_rec.classifier_name,
305 p_classifier_title_o => ghr_pdi_shd.g_old_rec.classifier_title,
306 p_attribute1_o => ghr_pdi_shd.g_old_rec.attribute1,
307 p_attribute2_o => ghr_pdi_shd.g_old_rec.attribute2,
308 p_attribute3_o => ghr_pdi_shd.g_old_rec.attribute3,
309 p_attribute4_o => ghr_pdi_shd.g_old_rec.attribute4,
310 p_attribute5_o => ghr_pdi_shd.g_old_rec.attribute5,
311 p_attribute6_o => ghr_pdi_shd.g_old_rec.attribute6,
312 p_attribute7_o => ghr_pdi_shd.g_old_rec.attribute7,
313 p_attribute8_o => ghr_pdi_shd.g_old_rec.attribute8,
314 p_attribute9_o => ghr_pdi_shd.g_old_rec.attribute9,
315 p_attribute10_o => ghr_pdi_shd.g_old_rec.attribute10,
316 p_attribute11_o => ghr_pdi_shd.g_old_rec.attribute11,
317 p_attribute12_o => ghr_pdi_shd.g_old_rec.attribute12,
318 p_attribute13_o => ghr_pdi_shd.g_old_rec.attribute13,
319 p_attribute14_o => ghr_pdi_shd.g_old_rec.attribute14,
320 p_attribute15_o => ghr_pdi_shd.g_old_rec.attribute15,
321 p_attribute16_o => ghr_pdi_shd.g_old_rec.attribute16,
322 p_attribute17_o => ghr_pdi_shd.g_old_rec.attribute17,
323 p_attribute18_o => ghr_pdi_shd.g_old_rec.attribute18,
324 p_attribute19_o => ghr_pdi_shd.g_old_rec.attribute19,
325 p_attribute20_o => ghr_pdi_shd.g_old_rec.attribute20,
326 p_business_group_id_o => ghr_pdi_shd.g_old_rec.business_group_id,
327 p_object_version_number_o => ghr_pdi_shd.g_old_rec.object_version_number
328 );
329
330 exception
331 when hr_api.cannot_find_prog_unit then
332 hr_api.cannot_find_prog_unit_error
333 ( p_module_name => 'GHR_POSITION_DESCRIPTIONS'
334 ,p_hook_type => 'AU'
335 );
336 end;
337 -- End of API User Hook for post_update.
338 --
339 --
340 hr_utility.set_location(' Leaving:'||l_proc, 10);
341 End post_update;
342 --
343 -- ----------------------------------------------------------------------------
344 -- |-----------------------------< convert_defs >-----------------------------|
345 -- ----------------------------------------------------------------------------
346 -- {Start Of Comments}
347 --
348 -- Description:
349 -- The Convert_Defs procedure has one very important function:
350 -- It must return the record structure for the row with all system defaulted
351 -- values converted into its corresponding parameter value for update. When
352 -- we attempt to update a row through the Upd process , certain
353 -- parameters can be defaulted which enables flexibility in the calling of
354 -- the upd process (e.g. only attributes which need to be updated need to be
355 -- specified). For the upd process to determine which attributes
356 -- have NOT been specified we need to check if the parameter has a reserved
357 -- system default value. Therefore, for all parameters which have a
358 -- corresponding reserved system default mechanism specified we need to
359 -- check if a system default is being used. If a system default is being
360 -- used then we convert the defaulted value into its corresponding attribute
361 -- value held in the g_old_rec data structure.
362 --
363 -- Prerequisites:
364 -- This private function can only be called from the upd process.
365 --
366 -- In Parameters:
367 -- A Pl/Sql record structre.
368 --
369 -- Post Success:
370 -- The record structure will be returned with all system defaulted parameter
371 -- values converted into its current row attribute value.
372 --
373 -- Post Failure:
374 -- No direct error handling is required within this function. Any possible
375 -- errors within this procedure will be a PL/SQL value error due to conversion
376
377 -- of datatypes or data lengths.
378 --
379 -- Developer Implementation Notes:
380 -- None.
381 --
382 -- Access Status:
383 -- Internal Row Handler Use Only.
384 --
385 -- {End Of Comments}
386 -- ----------------------------------------------------------------------------
387 Procedure convert_defs(p_rec in out nocopy ghr_pdi_shd.g_rec_type) is
388 --
389 l_proc varchar2(72) := g_package||'convert_defs';
390 --
391 Begin
392 --
393 hr_utility.set_location('Entering:'||l_proc, 5);
394 --
395 -- We must now examine each argument value in the
396 -- p_rec plsql record structure
397 -- to see if a system default is being used. If a system default
398 -- is being used then we must set to the 'current' argument value.
399 --
400 If (p_rec.routing_group_id = hr_api.g_number) then
401 p_rec.routing_group_id :=
402 ghr_pdi_shd.g_old_rec.routing_group_id;
403 End If;
404 If (p_rec.date_from = hr_api.g_date) then
405 p_rec.date_from :=
406 ghr_pdi_shd.g_old_rec.date_from;
407 End If;
408 If (p_rec.date_to = hr_api.g_date) then
409 p_rec.date_to :=
410 ghr_pdi_shd.g_old_rec.date_to;
411 End If;
412 If (p_rec.opm_cert_num = hr_api.g_varchar2) then
413 p_rec.opm_cert_num :=
414 ghr_pdi_shd.g_old_rec.opm_cert_num;
415 End If;
416 If (p_rec.flsa = hr_api.g_varchar2) then
417 p_rec.flsa :=
418 ghr_pdi_shd.g_old_rec.flsa;
419 End If;
420 If (p_rec.financial_statement = hr_api.g_varchar2) then
421 p_rec.financial_statement :=
422 ghr_pdi_shd.g_old_rec.financial_statement;
423 End If;
424 If (p_rec.subject_to_ia_action = hr_api.g_varchar2) then
425 p_rec.subject_to_ia_action :=
426 ghr_pdi_shd.g_old_rec.subject_to_ia_action;
427 End If;
428 If (p_rec.position_status = hr_api.g_number) then
429 p_rec.position_status :=
430 ghr_pdi_shd.g_old_rec.position_status;
431 End If;
432 If (p_rec.position_is = hr_api.g_varchar2) then
433 p_rec.position_is :=
434 ghr_pdi_shd.g_old_rec.position_is;
435 End If;
436 If (p_rec.position_sensitivity = hr_api.g_varchar2) then
437 p_rec.position_sensitivity :=
438 ghr_pdi_shd.g_old_rec.position_sensitivity;
439 End If;
440 If (p_rec.competitive_level = hr_api.g_varchar2) then
441 p_rec.competitive_level :=
442 ghr_pdi_shd.g_old_rec.competitive_level;
443 End If;
444 If (p_rec.pd_remarks = hr_api.g_varchar2) then
445 p_rec.pd_remarks :=
446 ghr_pdi_shd.g_old_rec.pd_remarks;
447 End If;
448 If (p_rec.position_class_std = hr_api.g_varchar2) then
449 p_rec.position_class_std :=
450 ghr_pdi_shd.g_old_rec.position_class_std;
451 End If;
452 If (p_rec.category = hr_api.g_varchar2) then
453 p_rec.category :=
454 ghr_pdi_shd.g_old_rec.category;
455 End If;
456 If (p_rec.career_ladder = hr_api.g_varchar2) then
457 p_rec.career_ladder :=
458 ghr_pdi_shd.g_old_rec.career_ladder;
459 End If;
460
461 /* Added by Dinkar. Karumuri for PD Phase II */
462
463 If (p_rec.supervisor_name = hr_api.g_varchar2) then
464 p_rec.supervisor_name :=
465 ghr_pdi_shd.g_old_rec.supervisor_name;
466 End If;
467 If (p_rec.supervisor_title = hr_api.g_varchar2) then
468 p_rec.supervisor_title :=
469 ghr_pdi_shd.g_old_rec.supervisor_title;
470 End If;
471 If (p_rec.supervisor_date = hr_api.g_date) then
472 p_rec.supervisor_date :=
473 ghr_pdi_shd.g_old_rec.supervisor_date;
474 End If;
475
476 If (p_rec.manager_name = hr_api.g_varchar2) then
477 p_rec.manager_name :=
478 ghr_pdi_shd.g_old_rec.manager_name;
479 End If;
480 If (p_rec.manager_title = hr_api.g_varchar2) then
481 p_rec.manager_title :=
482 ghr_pdi_shd.g_old_rec.manager_title;
483 End If;
484 If (p_rec.manager_date = hr_api.g_date) then
485 p_rec.manager_date :=
486 ghr_pdi_shd.g_old_rec.manager_date;
487 End If;
488
489 If (p_rec.classifier_name = hr_api.g_varchar2) then
490 p_rec.classifier_name :=
491 ghr_pdi_shd.g_old_rec.classifier_name;
492 End If;
493 If (p_rec.classifier_title = hr_api.g_varchar2) then
494 p_rec.classifier_title :=
495 ghr_pdi_shd.g_old_rec.classifier_title;
496 End If;
497 If (p_rec.classifier_date = hr_api.g_date) then
498 p_rec.classifier_date :=
499 ghr_pdi_shd.g_old_rec.classifier_date;
500 End If;
501
502 ---------------------------------------------------------------------------
503
504 If (p_rec.attribute_category = hr_api.g_varchar2) then
505 p_rec.attribute_category :=
506 ghr_pdi_shd.g_old_rec.attribute_category;
507 End If;
508 If (p_rec.attribute1 = hr_api.g_varchar2) then
509 p_rec.attribute1 :=
510 ghr_pdi_shd.g_old_rec.attribute1;
511 End If;
512 If (p_rec.attribute2 = hr_api.g_varchar2) then
513 p_rec.attribute2 :=
514 ghr_pdi_shd.g_old_rec.attribute2;
515 End If;
516 If (p_rec.attribute3 = hr_api.g_varchar2) then
517 p_rec.attribute3 :=
518 ghr_pdi_shd.g_old_rec.attribute3;
519 End If;
520 If (p_rec.attribute4 = hr_api.g_varchar2) then
521 p_rec.attribute4 :=
522 ghr_pdi_shd.g_old_rec.attribute4;
523 End If;
524 If (p_rec.attribute5 = hr_api.g_varchar2) then
525 p_rec.attribute5 :=
526 ghr_pdi_shd.g_old_rec.attribute5;
527 End If;
528 If (p_rec.attribute6 = hr_api.g_varchar2) then
529 p_rec.attribute6 :=
530 ghr_pdi_shd.g_old_rec.attribute6;
531 End If;
532 If (p_rec.attribute7 = hr_api.g_varchar2) then
533 p_rec.attribute7 :=
534 ghr_pdi_shd.g_old_rec.attribute7;
535 End If;
536 If (p_rec.attribute8 = hr_api.g_varchar2) then
537 p_rec.attribute8 :=
538 ghr_pdi_shd.g_old_rec.attribute8;
539 End If;
540 If (p_rec.attribute9 = hr_api.g_varchar2) then
541 p_rec.attribute9 :=
542 ghr_pdi_shd.g_old_rec.attribute9;
543 End If;
544 If (p_rec.attribute10 = hr_api.g_varchar2) then
545 p_rec.attribute10 :=
546 ghr_pdi_shd.g_old_rec.attribute10;
547 End If;
548 If (p_rec.attribute11 = hr_api.g_varchar2) then
549 p_rec.attribute11 :=
550 ghr_pdi_shd.g_old_rec.attribute11;
551 End If;
552 If (p_rec.attribute12 = hr_api.g_varchar2) then
553 p_rec.attribute12 :=
554 ghr_pdi_shd.g_old_rec.attribute12;
555 End If;
556 If (p_rec.attribute13 = hr_api.g_varchar2) then
557 p_rec.attribute13 :=
558 ghr_pdi_shd.g_old_rec.attribute13;
559 End If;
560 If (p_rec.attribute14 = hr_api.g_varchar2) then
561 p_rec.attribute14 :=
562 ghr_pdi_shd.g_old_rec.attribute14;
563 End If;
564 If (p_rec.attribute15 = hr_api.g_varchar2) then
565 p_rec.attribute15 :=
566 ghr_pdi_shd.g_old_rec.attribute15;
567 End If;
568 If (p_rec.attribute16 = hr_api.g_varchar2) then
569 p_rec.attribute16 :=
570 ghr_pdi_shd.g_old_rec.attribute16;
571 End If;
572 If (p_rec.attribute17 = hr_api.g_varchar2) then
573 p_rec.attribute17 :=
574 ghr_pdi_shd.g_old_rec.attribute17;
575 End If;
576 If (p_rec.attribute18 = hr_api.g_varchar2) then
577 p_rec.attribute18 :=
578 ghr_pdi_shd.g_old_rec.attribute18;
579 End If;
580 If (p_rec.attribute19 = hr_api.g_varchar2) then
581 p_rec.attribute19 :=
582 ghr_pdi_shd.g_old_rec.attribute19;
583 End If;
584 If (p_rec.attribute20 = hr_api.g_varchar2) then
585 p_rec.attribute20 :=
586 ghr_pdi_shd.g_old_rec.attribute20;
587 End If;
588 If (p_rec.business_group_id = hr_api.g_number) then
589 p_rec.business_group_id :=
590 ghr_pdi_shd.g_old_rec.business_group_id;
591 End If;
592 --
593 hr_utility.set_location(' Leaving:'||l_proc, 10);
594 --
595 End convert_defs;
596 --
597 -- ----------------------------------------------------------------------------
598 -- |---------------------------------< upd >----------------------------------|
599 -- ----------------------------------------------------------------------------
600 Procedure upd
601 (
602 p_rec in out nocopy ghr_pdi_shd.g_rec_type
603 ) is
604 --
605 l_proc varchar2(72) := g_package||'upd';
606 --
607 Begin
608 hr_utility.set_location('Entering:'||l_proc, 5);
609 --
610 -- We must lock the row which we need to update.
611 --
612
613 ghr_pdi_shd.lck
614 (
615 p_rec.position_description_id,
616 p_rec.object_version_number
617 );
618 --
619 -- 1. During an update system defaults are used to determine if
620 -- arguments have been defaulted or not. We must therefore
621 -- derive the full record structure values to be updated.
622 --
623 -- 2. Call the supporting update validate operations.
624 --
625 convert_defs(p_rec);
626 ghr_pdi_bus.update_validate(p_rec);
627 --
628 -- Call the supporting pre-update operation
629 --
630 pre_update(p_rec);
631 --
632 -- Update the row.
633 --
634 update_dml(p_rec);
635 --
636 -- Call the supporting post-update operation
637 --
638 post_update(p_rec);
639 End upd;
640 --
641 -- ----------------------------------------------------------------------------
642 -- |---------------------------------< upd >----------------------------------|
643 -- ----------------------------------------------------------------------------
644 Procedure upd
645 (
646 p_position_description_id in number,
647 p_routing_group_id in number default hr_api.g_number,
648 p_date_from in date default hr_api.g_date,
649 p_date_to in date default hr_api.g_date,
650 p_opm_cert_num in varchar2 default hr_api.g_varchar2,
651 p_flsa in varchar2 default hr_api.g_varchar2,
652 p_financial_statement in varchar2 default hr_api.g_varchar2,
653 p_subject_to_ia_action in varchar2 default hr_api.g_varchar2,
654 p_position_status in number default hr_api.g_number,
655 p_position_is in varchar2 default hr_api.g_varchar2,
656 p_position_sensitivity in varchar2 default hr_api.g_varchar2,
657 p_competitive_level in varchar2 default hr_api.g_varchar2,
658 p_pd_remarks in varchar2 default hr_api.g_varchar2,
659 p_position_class_std in varchar2 default hr_api.g_varchar2,
660 p_category in varchar2 default hr_api.g_varchar2,
661 p_career_ladder in varchar2 default hr_api.g_varchar2,
662 p_supervisor_name in varchar2 default hr_api.g_varchar2,
663 p_supervisor_title in varchar2 default hr_api.g_varchar2,
664 p_supervisor_date in date default hr_api.g_date,
665 p_manager_name in varchar2 default hr_api.g_varchar2,
666 p_manager_title in varchar2 default hr_api.g_varchar2,
667 p_manager_date in date default hr_api.g_date,
668 p_classifier_name in varchar2 default hr_api.g_varchar2,
669 p_classifier_title in varchar2 default hr_api.g_varchar2,
670 p_classifier_date in date default hr_api.g_date,
671 p_attribute_category in varchar2 default hr_api.g_varchar2,
672 p_attribute1 in varchar2 default hr_api.g_varchar2,
673 p_attribute2 in varchar2 default hr_api.g_varchar2,
674 p_attribute3 in varchar2 default hr_api.g_varchar2,
675 p_attribute4 in varchar2 default hr_api.g_varchar2,
676 p_attribute5 in varchar2 default hr_api.g_varchar2,
677 p_attribute6 in varchar2 default hr_api.g_varchar2,
678 p_attribute7 in varchar2 default hr_api.g_varchar2,
679 p_attribute8 in varchar2 default hr_api.g_varchar2,
680 p_attribute9 in varchar2 default hr_api.g_varchar2,
681 p_attribute10 in varchar2 default hr_api.g_varchar2,
682 p_attribute11 in varchar2 default hr_api.g_varchar2,
683 p_attribute12 in varchar2 default hr_api.g_varchar2,
684 p_attribute13 in varchar2 default hr_api.g_varchar2,
685 p_attribute14 in varchar2 default hr_api.g_varchar2,
686 p_attribute15 in varchar2 default hr_api.g_varchar2,
687 p_attribute16 in varchar2 default hr_api.g_varchar2,
688 p_attribute17 in varchar2 default hr_api.g_varchar2,
689 p_attribute18 in varchar2 default hr_api.g_varchar2,
690 p_attribute19 in varchar2 default hr_api.g_varchar2,
691 p_attribute20 in varchar2 default hr_api.g_varchar2,
692 p_business_group_id in number default hr_api.g_number,
693 p_object_version_number in out nocopy number
694 ) is
695 --
696 l_rec ghr_pdi_shd.g_rec_type;
697 l_proc varchar2(72) := g_package||'upd';
698 --
699 Begin
700
701
702 hr_utility.set_location('Entering:'||l_proc, 5);
703 --
704 -- Call conversion function to turn arguments into the
705 -- l_rec structure.
706 --
707 l_rec :=
708 ghr_pdi_shd.convert_args
709 (
710 p_position_description_id,
711 p_routing_group_id,
712 p_date_from,
713 p_date_to,
714 p_opm_cert_num,
715 p_flsa,
716 p_financial_statement,
717 p_subject_to_ia_action,
718 p_position_status,
719 p_position_is,
720 p_position_sensitivity,
721 p_competitive_level,
722 p_pd_remarks,
723 p_position_class_std,
724 p_category,
725 p_career_ladder,
726 p_supervisor_name,
727 p_supervisor_title,
728 p_supervisor_date,
729 p_manager_name,
730 p_manager_title,
731 p_manager_date,
732 p_classifier_name,
733 p_classifier_title,
734 p_classifier_date,
735 p_attribute_category,
736 p_attribute1,
737 p_attribute2,
738 p_attribute3,
739 p_attribute4,
740 p_attribute5,
741 p_attribute6,
742 p_attribute7,
743 p_attribute8,
744 p_attribute9,
745 p_attribute10,
746 p_attribute11,
747 p_attribute12,
748 p_attribute13,
749 p_attribute14,
750 p_attribute15,
751 p_attribute16,
752 p_attribute17,
753 p_attribute18,
754 p_attribute19,
755 p_attribute20,
756 p_business_group_id,
757 p_object_version_number
758 );
759 --
760 -- Having converted the arguments into the
761 -- plsql record structure we call the corresponding record
762 -- business process.
763 --
764 upd(l_rec);
765 p_object_version_number := l_rec.object_version_number;
766 --
767 hr_utility.set_location(' Leaving:'||l_proc, 10);
768 End upd;
769 --
770 end ghr_pdi_upd;