[Home] [Help]
PACKAGE BODY: APPS.BEN_CSO_UPD
Source
1 Package Body ben_cso_upd as
2 /* $Header: becsorhi.pkb 115.0 2003/03/17 13:37:07 csundar noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_cso_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
55 (p_rec in out nocopy ben_cso_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc, 5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 --
67 --
68 -- Update the ben_cwb_stock_optn_dtls Row
69 --
70 update ben_cwb_stock_optn_dtls
71 set
72 cwb_stock_optn_dtls_id = p_rec.cwb_stock_optn_dtls_id
73 ,grant_id = p_rec.grant_id
74 ,grant_number = p_rec.grant_number
75 ,grant_name = p_rec.grant_name
76 ,grant_type = p_rec.grant_type
77 ,grant_date = p_rec.grant_date
78 ,grant_shares = p_rec.grant_shares
79 ,grant_price = p_rec.grant_price
80 ,value_at_grant = p_rec.value_at_grant
81 ,current_share_price = p_rec.current_share_price
82 ,current_shares_outstanding = p_rec.current_shares_outstanding
83 ,vested_shares = p_rec.vested_shares
84 ,unvested_shares = p_rec.unvested_shares
85 ,exercisable_shares = p_rec.exercisable_shares
86 ,exercised_shares = p_rec.exercised_shares
87 ,cancelled_shares = p_rec.cancelled_shares
88 ,trading_symbol = p_rec.trading_symbol
89 ,expiration_date = p_rec.expiration_date
90 ,reason_code = p_rec.reason_code
91 ,class = p_rec.class
92 ,misc = p_rec.misc
93 ,employee_number = p_rec.employee_number
94 ,person_id = p_rec.person_id
95 ,business_group_id = p_rec.business_group_id
96 ,prtt_rt_val_id = p_rec.prtt_rt_val_id
97 ,object_version_number = p_rec.object_version_number
98 ,cso_attribute_category = p_rec.cso_attribute_category
99 ,cso_attribute1 = p_rec.cso_attribute1
100 ,cso_attribute2 = p_rec.cso_attribute2
101 ,cso_attribute3 = p_rec.cso_attribute3
102 ,cso_attribute4 = p_rec.cso_attribute4
103 ,cso_attribute5 = p_rec.cso_attribute5
104 ,cso_attribute6 = p_rec.cso_attribute6
105 ,cso_attribute7 = p_rec.cso_attribute7
106 ,cso_attribute8 = p_rec.cso_attribute8
107 ,cso_attribute9 = p_rec.cso_attribute9
108 ,cso_attribute10 = p_rec.cso_attribute10
109 ,cso_attribute11 = p_rec.cso_attribute11
110 ,cso_attribute12 = p_rec.cso_attribute12
111 ,cso_attribute13 = p_rec.cso_attribute13
112 ,cso_attribute14 = p_rec.cso_attribute14
113 ,cso_attribute15 = p_rec.cso_attribute15
114 ,cso_attribute16 = p_rec.cso_attribute16
115 ,cso_attribute17 = p_rec.cso_attribute17
116 ,cso_attribute18 = p_rec.cso_attribute18
117 ,cso_attribute19 = p_rec.cso_attribute19
118 ,cso_attribute20 = p_rec.cso_attribute20
119 ,cso_attribute21 = p_rec.cso_attribute21
120 ,cso_attribute22 = p_rec.cso_attribute22
121 ,cso_attribute23 = p_rec.cso_attribute23
122 ,cso_attribute24 = p_rec.cso_attribute24
123 ,cso_attribute25 = p_rec.cso_attribute25
124 ,cso_attribute26 = p_rec.cso_attribute26
125 ,cso_attribute27 = p_rec.cso_attribute27
126 ,cso_attribute28 = p_rec.cso_attribute28
127 ,cso_attribute29 = p_rec.cso_attribute29
128 ,cso_attribute30 = p_rec.cso_attribute30
129 where cwb_stock_optn_dtls_id = p_rec.cwb_stock_optn_dtls_id;
130 --
131 --
132 --
133 hr_utility.set_location(' Leaving:'||l_proc, 10);
134 --
135 Exception
136 When hr_api.check_integrity_violated Then
137 -- A check constraint has been violated
138 --
139 ben_cso_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When hr_api.parent_integrity_violated Then
142 -- Parent integrity has been violated
143 --
144 ben_cso_shd.constraint_error
145 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
146 When hr_api.unique_integrity_violated Then
147 -- Unique integrity has been violated
148 --
149 ben_cso_shd.constraint_error
150 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
151 When Others Then
152 --
153 Raise;
154 End update_dml;
155 --
156 -- ----------------------------------------------------------------------------
157 -- |------------------------------< pre_update >------------------------------|
158 -- ----------------------------------------------------------------------------
159 -- {Start Of Comments}
160 --
161 -- Description:
162 -- This private procedure contains any processing which is required before
163 -- the update dml.
164 --
165 -- Prerequisites:
166 -- This is an internal procedure which is called from the upd procedure.
167 --
168 -- In Parameters:
169 -- A Pl/Sql record structure.
170 --
171 -- Post Success:
172 -- Processing continues.
173 --
174 -- Post Failure:
175 -- If an error has occurred, an error message and exception wil be raised
176 -- but not handled.
177 --
178 -- Developer Implementation Notes:
179 -- Any pre-processing required before the update dml is issued should be
180 -- coded within this procedure. It is important to note that any 3rd party
181 -- maintenance should be reviewed before placing in this procedure.
182 --
183 -- Access Status:
184 -- Internal Row Handler Use Only.
185 --
186 -- {End Of Comments}
187 -- ----------------------------------------------------------------------------
188 Procedure pre_update
189 (p_rec in ben_cso_shd.g_rec_type
190 ) is
191 --
192 l_proc varchar2(72) := g_package||'pre_update';
193 --
194 Begin
195 hr_utility.set_location('Entering:'||l_proc, 5);
196 --
197 hr_utility.set_location(' Leaving:'||l_proc, 10);
198 End pre_update;
199 --
200 -- ----------------------------------------------------------------------------
201 -- |-----------------------------< post_update >------------------------------|
202 -- ----------------------------------------------------------------------------
203 -- {Start Of Comments}
204 --
205 -- Description:
206 -- This private procedure contains any processing which is required after
207 -- the update dml.
208 --
209 -- Prerequisites:
210 -- This is an internal procedure which is called from the upd procedure.
211 --
212 -- In Parameters:
213 -- A Pl/Sql record structure.
214 --
215 -- Post Success:
216 -- Processing continues.
217 --
218 -- Post Failure:
219 -- If an error has occurred, an error message and exception will be raised
220 -- but not handled.
221 --
222 -- Developer Implementation Notes:
223 -- Any post-processing required after the update dml is issued should be
224 -- coded within this procedure. It is important to note that any 3rd party
225 -- maintenance should be reviewed before placing in this procedure.
226 --
227 -- Access Status:
228 -- Internal Row Handler Use Only.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 Procedure post_update
233 (p_effective_date in date
234 ,p_rec in ben_cso_shd.g_rec_type
235 ) is
236 --
237 l_proc varchar2(72) := g_package||'post_update';
238 --
239 Begin
240 hr_utility.set_location('Entering:'||l_proc, 5);
241 begin
242 --
243 ben_cso_rku.after_update
244 (p_effective_date => p_effective_date
245 ,p_cwb_stock_optn_dtls_id
246 => p_rec.cwb_stock_optn_dtls_id
247 ,p_grant_id
248 => p_rec.grant_id
249 ,p_grant_number
250 => p_rec.grant_number
251 ,p_grant_name
252 => p_rec.grant_name
253 ,p_grant_type
254 => p_rec.grant_type
255 ,p_grant_date
256 => p_rec.grant_date
257 ,p_grant_shares
258 => p_rec.grant_shares
259 ,p_grant_price
260 => p_rec.grant_price
261 ,p_value_at_grant
262 => p_rec.value_at_grant
263 ,p_current_share_price
264 => p_rec.current_share_price
265 ,p_current_shares_outstanding
266 => p_rec.current_shares_outstanding
267 ,p_vested_shares
268 => p_rec.vested_shares
269 ,p_unvested_shares
270 => p_rec.unvested_shares
271 ,p_exercisable_shares
272 => p_rec.exercisable_shares
273 ,p_exercised_shares
274 => p_rec.exercised_shares
275 ,p_cancelled_shares
276 => p_rec.cancelled_shares
277 ,p_trading_symbol
278 => p_rec.trading_symbol
279 ,p_expiration_date
280 => p_rec.expiration_date
281 ,p_reason_code
282 => p_rec.reason_code
283 ,p_class
284 => p_rec.class
285 ,p_misc
286 => p_rec.misc
287 ,p_employee_number
288 => p_rec.employee_number
289 ,p_person_id
290 => p_rec.person_id
291 ,p_business_group_id
292 => p_rec.business_group_id
293 ,p_prtt_rt_val_id
294 => p_rec.prtt_rt_val_id
295 ,p_object_version_number
296 => p_rec.object_version_number
297 ,p_cso_attribute_category
298 => p_rec.cso_attribute_category
299 ,p_cso_attribute1
300 => p_rec.cso_attribute1
301 ,p_cso_attribute2
302 => p_rec.cso_attribute2
303 ,p_cso_attribute3
304 => p_rec.cso_attribute3
305 ,p_cso_attribute4
306 => p_rec.cso_attribute4
307 ,p_cso_attribute5
308 => p_rec.cso_attribute5
309 ,p_cso_attribute6
310 => p_rec.cso_attribute6
311 ,p_cso_attribute7
312 => p_rec.cso_attribute7
313 ,p_cso_attribute8
314 => p_rec.cso_attribute8
315 ,p_cso_attribute9
316 => p_rec.cso_attribute9
317 ,p_cso_attribute10
318 => p_rec.cso_attribute10
319 ,p_cso_attribute11
320 => p_rec.cso_attribute11
321 ,p_cso_attribute12
322 => p_rec.cso_attribute12
323 ,p_cso_attribute13
324 => p_rec.cso_attribute13
325 ,p_cso_attribute14
326 => p_rec.cso_attribute14
327 ,p_cso_attribute15
328 => p_rec.cso_attribute15
329 ,p_cso_attribute16
330 => p_rec.cso_attribute16
331 ,p_cso_attribute17
332 => p_rec.cso_attribute17
333 ,p_cso_attribute18
334 => p_rec.cso_attribute18
335 ,p_cso_attribute19
336 => p_rec.cso_attribute19
337 ,p_cso_attribute20
338 => p_rec.cso_attribute20
339 ,p_cso_attribute21
340 => p_rec.cso_attribute21
341 ,p_cso_attribute22
342 => p_rec.cso_attribute22
343 ,p_cso_attribute23
344 => p_rec.cso_attribute23
345 ,p_cso_attribute24
346 => p_rec.cso_attribute24
347 ,p_cso_attribute25
348 => p_rec.cso_attribute25
349 ,p_cso_attribute26
350 => p_rec.cso_attribute26
351 ,p_cso_attribute27
352 => p_rec.cso_attribute27
353 ,p_cso_attribute28
354 => p_rec.cso_attribute28
355 ,p_cso_attribute29
356 => p_rec.cso_attribute29
357 ,p_cso_attribute30
358 => p_rec.cso_attribute30
359 ,p_grant_id_o
360 => ben_cso_shd.g_old_rec.grant_id
361 ,p_grant_number_o
362 => ben_cso_shd.g_old_rec.grant_number
363 ,p_grant_name_o
364 => ben_cso_shd.g_old_rec.grant_name
365 ,p_grant_type_o
366 => ben_cso_shd.g_old_rec.grant_type
367 ,p_grant_date_o
368 => ben_cso_shd.g_old_rec.grant_date
369 ,p_grant_shares_o
370 => ben_cso_shd.g_old_rec.grant_shares
371 ,p_grant_price_o
372 => ben_cso_shd.g_old_rec.grant_price
373 ,p_value_at_grant_o
374 => ben_cso_shd.g_old_rec.value_at_grant
375 ,p_current_share_price_o
376 => ben_cso_shd.g_old_rec.current_share_price
377 ,p_current_shares_outstanding_o
378 => ben_cso_shd.g_old_rec.current_shares_outstanding
379 ,p_vested_shares_o
380 => ben_cso_shd.g_old_rec.vested_shares
381 ,p_unvested_shares_o
382 => ben_cso_shd.g_old_rec.unvested_shares
383 ,p_exercisable_shares_o
384 => ben_cso_shd.g_old_rec.exercisable_shares
385 ,p_exercised_shares_o
386 => ben_cso_shd.g_old_rec.exercised_shares
387 ,p_cancelled_shares_o
388 => ben_cso_shd.g_old_rec.cancelled_shares
389 ,p_trading_symbol_o
390 => ben_cso_shd.g_old_rec.trading_symbol
391 ,p_expiration_date_o
392 => ben_cso_shd.g_old_rec.expiration_date
393 ,p_reason_code_o
394 => ben_cso_shd.g_old_rec.reason_code
395 ,p_class_o
396 => ben_cso_shd.g_old_rec.class
397 ,p_misc_o
398 => ben_cso_shd.g_old_rec.misc
399 ,p_employee_number_o
400 => ben_cso_shd.g_old_rec.employee_number
401 ,p_person_id_o
402 => ben_cso_shd.g_old_rec.person_id
403 ,p_business_group_id_o
404 => ben_cso_shd.g_old_rec.business_group_id
405 ,p_prtt_rt_val_id_o
406 => ben_cso_shd.g_old_rec.prtt_rt_val_id
407 ,p_object_version_number_o
408 => ben_cso_shd.g_old_rec.object_version_number
409 ,p_cso_attribute_category_o
410 => ben_cso_shd.g_old_rec.cso_attribute_category
411 ,p_cso_attribute1_o
412 => ben_cso_shd.g_old_rec.cso_attribute1
413 ,p_cso_attribute2_o
414 => ben_cso_shd.g_old_rec.cso_attribute2
415 ,p_cso_attribute3_o
416 => ben_cso_shd.g_old_rec.cso_attribute3
417 ,p_cso_attribute4_o
418 => ben_cso_shd.g_old_rec.cso_attribute4
419 ,p_cso_attribute5_o
420 => ben_cso_shd.g_old_rec.cso_attribute5
421 ,p_cso_attribute6_o
422 => ben_cso_shd.g_old_rec.cso_attribute6
423 ,p_cso_attribute7_o
424 => ben_cso_shd.g_old_rec.cso_attribute7
425 ,p_cso_attribute8_o
426 => ben_cso_shd.g_old_rec.cso_attribute8
427 ,p_cso_attribute9_o
428 => ben_cso_shd.g_old_rec.cso_attribute9
429 ,p_cso_attribute10_o
430 => ben_cso_shd.g_old_rec.cso_attribute10
431 ,p_cso_attribute11_o
432 => ben_cso_shd.g_old_rec.cso_attribute11
433 ,p_cso_attribute12_o
434 => ben_cso_shd.g_old_rec.cso_attribute12
435 ,p_cso_attribute13_o
436 => ben_cso_shd.g_old_rec.cso_attribute13
437 ,p_cso_attribute14_o
438 => ben_cso_shd.g_old_rec.cso_attribute14
439 ,p_cso_attribute15_o
440 => ben_cso_shd.g_old_rec.cso_attribute15
441 ,p_cso_attribute16_o
442 => ben_cso_shd.g_old_rec.cso_attribute16
443 ,p_cso_attribute17_o
444 => ben_cso_shd.g_old_rec.cso_attribute17
445 ,p_cso_attribute18_o
446 => ben_cso_shd.g_old_rec.cso_attribute18
447 ,p_cso_attribute19_o
448 => ben_cso_shd.g_old_rec.cso_attribute19
449 ,p_cso_attribute20_o
450 => ben_cso_shd.g_old_rec.cso_attribute20
451 ,p_cso_attribute21_o
452 => ben_cso_shd.g_old_rec.cso_attribute21
453 ,p_cso_attribute22_o
454 => ben_cso_shd.g_old_rec.cso_attribute22
455 ,p_cso_attribute23_o
456 => ben_cso_shd.g_old_rec.cso_attribute23
457 ,p_cso_attribute24_o
458 => ben_cso_shd.g_old_rec.cso_attribute24
459 ,p_cso_attribute25_o
460 => ben_cso_shd.g_old_rec.cso_attribute25
461 ,p_cso_attribute26_o
462 => ben_cso_shd.g_old_rec.cso_attribute26
463 ,p_cso_attribute27_o
464 => ben_cso_shd.g_old_rec.cso_attribute27
465 ,p_cso_attribute28_o
466 => ben_cso_shd.g_old_rec.cso_attribute28
467 ,p_cso_attribute29_o
468 => ben_cso_shd.g_old_rec.cso_attribute29
469 ,p_cso_attribute30_o
470 => ben_cso_shd.g_old_rec.cso_attribute30
471 );
472 --
473 exception
474 --
475 when hr_api.cannot_find_prog_unit then
476 --
477 hr_api.cannot_find_prog_unit_error
478 (p_module_name => 'BEN_CWB_STOCK_OPTN_DTLS'
479 ,p_hook_type => 'AU');
480 --
481 end;
482 --
483 hr_utility.set_location(' Leaving:'||l_proc, 10);
484 End post_update;
485 --
486 -- ----------------------------------------------------------------------------
487 -- |-----------------------------< convert_defs >-----------------------------|
488 -- ----------------------------------------------------------------------------
489 -- {Start Of Comments}
490 --
491 -- Description:
492 -- The Convert_Defs procedure has one very important function:
493 -- It must return the record structure for the row with all system defaulted
494 -- values converted into its corresponding parameter value for update. When
495 -- we attempt to update a row through the Upd process , certain
496 -- parameters can be defaulted which enables flexibility in the calling of
497 -- the upd process (e.g. only attributes which need to be updated need to be
498 -- specified). For the upd process to determine which attributes
499 -- have NOT been specified we need to check if the parameter has a reserved
500 -- system default value. Therefore, for all parameters which have a
501 -- corresponding reserved system default mechanism specified we need to
502 -- check if a system default is being used. If a system default is being
503 -- used then we convert the defaulted value into its corresponding attribute
504 -- value held in the g_old_rec data structure.
505 --
506 -- Prerequisites:
507 -- This private function can only be called from the upd process.
508 --
509 -- In Parameters:
510 -- A Pl/Sql record structure.
511 --
512 -- Post Success:
513 -- The record structure will be returned with all system defaulted parameter
514 -- values converted into its current row attribute value.
515 --
516 -- Post Failure:
517 -- No direct error handling is required within this function. Any possible
518 -- errors within this procedure will be a PL/SQL value error due to
519 -- conversion of datatypes or data lengths.
520 --
521 -- Developer Implementation Notes:
522 -- None.
523 --
524 -- Access Status:
525 -- Internal Row Handler Use Only.
526 --
527 -- {End Of Comments}
528 -- ----------------------------------------------------------------------------
529 Procedure convert_defs
530 (p_rec in out nocopy ben_cso_shd.g_rec_type
531 ) is
532 --
533 Begin
534 --
535 -- We must now examine each argument value in the
536 -- p_rec plsql record structure
537 -- to see if a system default is being used. If a system default
538 -- is being used then we must set to the 'current' argument value.
539 --
540 If (p_rec.grant_id = hr_api.g_number) then
541 p_rec.grant_id :=
542 ben_cso_shd.g_old_rec.grant_id;
543 End If;
544 If (p_rec.grant_number = hr_api.g_varchar2) then
545 p_rec.grant_number :=
546 ben_cso_shd.g_old_rec.grant_number;
547 End If;
548 If (p_rec.grant_name = hr_api.g_varchar2) then
549 p_rec.grant_name :=
550 ben_cso_shd.g_old_rec.grant_name;
551 End If;
552 If (p_rec.grant_type = hr_api.g_varchar2) then
553 p_rec.grant_type :=
554 ben_cso_shd.g_old_rec.grant_type;
555 End If;
556 If (p_rec.grant_date = hr_api.g_date) then
557 p_rec.grant_date :=
558 ben_cso_shd.g_old_rec.grant_date;
559 End If;
560 If (p_rec.grant_shares = hr_api.g_number) then
561 p_rec.grant_shares :=
562 ben_cso_shd.g_old_rec.grant_shares;
563 End If;
564 If (p_rec.grant_price = hr_api.g_number) then
565 p_rec.grant_price :=
566 ben_cso_shd.g_old_rec.grant_price;
567 End If;
568 If (p_rec.value_at_grant = hr_api.g_number) then
569 p_rec.value_at_grant :=
570 ben_cso_shd.g_old_rec.value_at_grant;
571 End If;
572 If (p_rec.current_share_price = hr_api.g_number) then
573 p_rec.current_share_price :=
574 ben_cso_shd.g_old_rec.current_share_price;
575 End If;
576 If (p_rec.current_shares_outstanding = hr_api.g_number) then
577 p_rec.current_shares_outstanding :=
578 ben_cso_shd.g_old_rec.current_shares_outstanding;
579 End If;
580 If (p_rec.vested_shares = hr_api.g_number) then
581 p_rec.vested_shares :=
582 ben_cso_shd.g_old_rec.vested_shares;
583 End If;
584 If (p_rec.unvested_shares = hr_api.g_number) then
585 p_rec.unvested_shares :=
586 ben_cso_shd.g_old_rec.unvested_shares;
587 End If;
588 If (p_rec.exercisable_shares = hr_api.g_number) then
589 p_rec.exercisable_shares :=
590 ben_cso_shd.g_old_rec.exercisable_shares;
591 End If;
592 If (p_rec.exercised_shares = hr_api.g_number) then
593 p_rec.exercised_shares :=
594 ben_cso_shd.g_old_rec.exercised_shares;
595 End If;
596 If (p_rec.cancelled_shares = hr_api.g_number) then
597 p_rec.cancelled_shares :=
598 ben_cso_shd.g_old_rec.cancelled_shares;
599 End If;
600 If (p_rec.trading_symbol = hr_api.g_varchar2) then
601 p_rec.trading_symbol :=
602 ben_cso_shd.g_old_rec.trading_symbol;
603 End If;
604 If (p_rec.expiration_date = hr_api.g_date) then
605 p_rec.expiration_date :=
606 ben_cso_shd.g_old_rec.expiration_date;
607 End If;
608 If (p_rec.reason_code = hr_api.g_varchar2) then
609 p_rec.reason_code :=
610 ben_cso_shd.g_old_rec.reason_code;
611 End If;
612 If (p_rec.class = hr_api.g_varchar2) then
613 p_rec.class :=
614 ben_cso_shd.g_old_rec.class;
615 End If;
616 If (p_rec.misc = hr_api.g_varchar2) then
617 p_rec.misc :=
618 ben_cso_shd.g_old_rec.misc;
619 End If;
620 If (p_rec.employee_number = hr_api.g_varchar2) then
621 p_rec.employee_number :=
622 ben_cso_shd.g_old_rec.employee_number;
623 End If;
624 If (p_rec.person_id = hr_api.g_number) then
625 p_rec.person_id :=
626 ben_cso_shd.g_old_rec.person_id;
627 End If;
628 If (p_rec.business_group_id = hr_api.g_number) then
629 p_rec.business_group_id :=
630 ben_cso_shd.g_old_rec.business_group_id;
631 End If;
632 If (p_rec.prtt_rt_val_id = hr_api.g_number) then
633 p_rec.prtt_rt_val_id :=
634 ben_cso_shd.g_old_rec.prtt_rt_val_id;
635 End If;
636 If (p_rec.cso_attribute_category = hr_api.g_varchar2) then
637 p_rec.cso_attribute_category :=
638 ben_cso_shd.g_old_rec.cso_attribute_category;
639 End If;
640 If (p_rec.cso_attribute1 = hr_api.g_varchar2) then
641 p_rec.cso_attribute1 :=
642 ben_cso_shd.g_old_rec.cso_attribute1;
643 End If;
644 If (p_rec.cso_attribute2 = hr_api.g_varchar2) then
645 p_rec.cso_attribute2 :=
646 ben_cso_shd.g_old_rec.cso_attribute2;
647 End If;
648 If (p_rec.cso_attribute3 = hr_api.g_varchar2) then
649 p_rec.cso_attribute3 :=
650 ben_cso_shd.g_old_rec.cso_attribute3;
651 End If;
652 If (p_rec.cso_attribute4 = hr_api.g_varchar2) then
653 p_rec.cso_attribute4 :=
654 ben_cso_shd.g_old_rec.cso_attribute4;
655 End If;
656 If (p_rec.cso_attribute5 = hr_api.g_varchar2) then
657 p_rec.cso_attribute5 :=
658 ben_cso_shd.g_old_rec.cso_attribute5;
659 End If;
660 If (p_rec.cso_attribute6 = hr_api.g_varchar2) then
661 p_rec.cso_attribute6 :=
662 ben_cso_shd.g_old_rec.cso_attribute6;
663 End If;
664 If (p_rec.cso_attribute7 = hr_api.g_varchar2) then
665 p_rec.cso_attribute7 :=
666 ben_cso_shd.g_old_rec.cso_attribute7;
667 End If;
668 If (p_rec.cso_attribute8 = hr_api.g_varchar2) then
669 p_rec.cso_attribute8 :=
670 ben_cso_shd.g_old_rec.cso_attribute8;
671 End If;
672 If (p_rec.cso_attribute9 = hr_api.g_varchar2) then
673 p_rec.cso_attribute9 :=
674 ben_cso_shd.g_old_rec.cso_attribute9;
675 End If;
676 If (p_rec.cso_attribute10 = hr_api.g_varchar2) then
677 p_rec.cso_attribute10 :=
678 ben_cso_shd.g_old_rec.cso_attribute10;
679 End If;
680 If (p_rec.cso_attribute11 = hr_api.g_varchar2) then
681 p_rec.cso_attribute11 :=
682 ben_cso_shd.g_old_rec.cso_attribute11;
683 End If;
684 If (p_rec.cso_attribute12 = hr_api.g_varchar2) then
685 p_rec.cso_attribute12 :=
686 ben_cso_shd.g_old_rec.cso_attribute12;
687 End If;
688 If (p_rec.cso_attribute13 = hr_api.g_varchar2) then
689 p_rec.cso_attribute13 :=
690 ben_cso_shd.g_old_rec.cso_attribute13;
691 End If;
692 If (p_rec.cso_attribute14 = hr_api.g_varchar2) then
693 p_rec.cso_attribute14 :=
694 ben_cso_shd.g_old_rec.cso_attribute14;
695 End If;
696 If (p_rec.cso_attribute15 = hr_api.g_varchar2) then
697 p_rec.cso_attribute15 :=
698 ben_cso_shd.g_old_rec.cso_attribute15;
699 End If;
700 If (p_rec.cso_attribute16 = hr_api.g_varchar2) then
701 p_rec.cso_attribute16 :=
702 ben_cso_shd.g_old_rec.cso_attribute16;
703 End If;
704 If (p_rec.cso_attribute17 = hr_api.g_varchar2) then
705 p_rec.cso_attribute17 :=
706 ben_cso_shd.g_old_rec.cso_attribute17;
707 End If;
708 If (p_rec.cso_attribute18 = hr_api.g_varchar2) then
709 p_rec.cso_attribute18 :=
710 ben_cso_shd.g_old_rec.cso_attribute18;
711 End If;
712 If (p_rec.cso_attribute19 = hr_api.g_varchar2) then
713 p_rec.cso_attribute19 :=
714 ben_cso_shd.g_old_rec.cso_attribute19;
715 End If;
716 If (p_rec.cso_attribute20 = hr_api.g_varchar2) then
717 p_rec.cso_attribute20 :=
718 ben_cso_shd.g_old_rec.cso_attribute20;
719 End If;
720 If (p_rec.cso_attribute21 = hr_api.g_varchar2) then
721 p_rec.cso_attribute21 :=
722 ben_cso_shd.g_old_rec.cso_attribute21;
723 End If;
724 If (p_rec.cso_attribute22 = hr_api.g_varchar2) then
725 p_rec.cso_attribute22 :=
726 ben_cso_shd.g_old_rec.cso_attribute22;
727 End If;
728 If (p_rec.cso_attribute23 = hr_api.g_varchar2) then
729 p_rec.cso_attribute23 :=
730 ben_cso_shd.g_old_rec.cso_attribute23;
731 End If;
732 If (p_rec.cso_attribute24 = hr_api.g_varchar2) then
733 p_rec.cso_attribute24 :=
734 ben_cso_shd.g_old_rec.cso_attribute24;
735 End If;
736 If (p_rec.cso_attribute25 = hr_api.g_varchar2) then
737 p_rec.cso_attribute25 :=
738 ben_cso_shd.g_old_rec.cso_attribute25;
739 End If;
740 If (p_rec.cso_attribute26 = hr_api.g_varchar2) then
741 p_rec.cso_attribute26 :=
742 ben_cso_shd.g_old_rec.cso_attribute26;
743 End If;
744 If (p_rec.cso_attribute27 = hr_api.g_varchar2) then
745 p_rec.cso_attribute27 :=
746 ben_cso_shd.g_old_rec.cso_attribute27;
747 End If;
748 If (p_rec.cso_attribute28 = hr_api.g_varchar2) then
749 p_rec.cso_attribute28 :=
750 ben_cso_shd.g_old_rec.cso_attribute28;
751 End If;
752 If (p_rec.cso_attribute29 = hr_api.g_varchar2) then
753 p_rec.cso_attribute29 :=
754 ben_cso_shd.g_old_rec.cso_attribute29;
755 End If;
756 If (p_rec.cso_attribute30 = hr_api.g_varchar2) then
757 p_rec.cso_attribute30 :=
758 ben_cso_shd.g_old_rec.cso_attribute30;
759 End If;
760 --
761 End convert_defs;
762 --
763 -- ----------------------------------------------------------------------------
764 -- |---------------------------------< upd >----------------------------------|
765 -- ----------------------------------------------------------------------------
766 Procedure upd
767 (p_effective_date in date
768 ,p_rec in out nocopy ben_cso_shd.g_rec_type
769 ) is
770 --
771 l_proc varchar2(72) := g_package||'upd';
772 --
773 Begin
774 hr_utility.set_location('Entering:'||l_proc, 5);
775 --
776 -- We must lock the row which we need to update.
777 --
778 ben_cso_shd.lck
779 (p_rec.cwb_stock_optn_dtls_id
780 ,p_rec.object_version_number
781 );
782 --
783 -- 1. During an update system defaults are used to determine if
784 -- arguments have been defaulted or not. We must therefore
785 -- derive the full record structure values to be updated.
786 --
787 -- 2. Call the supporting update validate operations.
788 --
789 convert_defs(p_rec);
790 ben_cso_bus.update_validate
791 (p_effective_date
792 ,p_rec
793 );
794 --
795 -- Call to raise any errors on multi-message list
796 hr_multi_message.end_validation_set;
797 --
798 -- Call the supporting pre-update operation
799 --
800 ben_cso_upd.pre_update(p_rec);
801 --
802 -- Update the row.
803 --
804 ben_cso_upd.update_dml(p_rec);
805 --
806 -- Call the supporting post-update operation
807 --
808 ben_cso_upd.post_update
809 (p_effective_date
810 ,p_rec
811 );
812 --
813 -- Call to raise any errors on multi-message list
814 hr_multi_message.end_validation_set;
815 End upd;
816 --
817 -- ----------------------------------------------------------------------------
818 -- |---------------------------------< upd >----------------------------------|
819 -- ----------------------------------------------------------------------------
820 Procedure upd
821 (p_effective_date in date
822 ,p_cwb_stock_optn_dtls_id in number
823 ,p_object_version_number in out nocopy number
824 ,p_grant_id in number default hr_api.g_number
825 ,p_grant_number in varchar2 default hr_api.g_varchar2
826 ,p_grant_name in varchar2 default hr_api.g_varchar2
827 ,p_grant_type in varchar2 default hr_api.g_varchar2
828 ,p_grant_date in date default hr_api.g_date
829 ,p_grant_shares in number default hr_api.g_number
830 ,p_grant_price in number default hr_api.g_number
831 ,p_value_at_grant in number default hr_api.g_number
832 ,p_current_share_price in number default hr_api.g_number
833 ,p_current_shares_outstanding in number default hr_api.g_number
834 ,p_vested_shares in number default hr_api.g_number
835 ,p_unvested_shares in number default hr_api.g_number
836 ,p_exercisable_shares in number default hr_api.g_number
837 ,p_exercised_shares in number default hr_api.g_number
838 ,p_cancelled_shares in number default hr_api.g_number
839 ,p_trading_symbol in varchar2 default hr_api.g_varchar2
840 ,p_expiration_date in date default hr_api.g_date
841 ,p_reason_code in varchar2 default hr_api.g_varchar2
842 ,p_class in varchar2 default hr_api.g_varchar2
843 ,p_misc in varchar2 default hr_api.g_varchar2
844 ,p_employee_number in varchar2 default hr_api.g_varchar2
845 ,p_person_id in number default hr_api.g_number
846 ,p_business_group_id in number default hr_api.g_number
847 ,p_prtt_rt_val_id in number default hr_api.g_number
848 ,p_cso_attribute_category in varchar2 default hr_api.g_varchar2
849 ,p_cso_attribute1 in varchar2 default hr_api.g_varchar2
850 ,p_cso_attribute2 in varchar2 default hr_api.g_varchar2
851 ,p_cso_attribute3 in varchar2 default hr_api.g_varchar2
852 ,p_cso_attribute4 in varchar2 default hr_api.g_varchar2
853 ,p_cso_attribute5 in varchar2 default hr_api.g_varchar2
854 ,p_cso_attribute6 in varchar2 default hr_api.g_varchar2
855 ,p_cso_attribute7 in varchar2 default hr_api.g_varchar2
856 ,p_cso_attribute8 in varchar2 default hr_api.g_varchar2
857 ,p_cso_attribute9 in varchar2 default hr_api.g_varchar2
858 ,p_cso_attribute10 in varchar2 default hr_api.g_varchar2
859 ,p_cso_attribute11 in varchar2 default hr_api.g_varchar2
860 ,p_cso_attribute12 in varchar2 default hr_api.g_varchar2
861 ,p_cso_attribute13 in varchar2 default hr_api.g_varchar2
862 ,p_cso_attribute14 in varchar2 default hr_api.g_varchar2
863 ,p_cso_attribute15 in varchar2 default hr_api.g_varchar2
864 ,p_cso_attribute16 in varchar2 default hr_api.g_varchar2
865 ,p_cso_attribute17 in varchar2 default hr_api.g_varchar2
866 ,p_cso_attribute18 in varchar2 default hr_api.g_varchar2
867 ,p_cso_attribute19 in varchar2 default hr_api.g_varchar2
868 ,p_cso_attribute20 in varchar2 default hr_api.g_varchar2
869 ,p_cso_attribute21 in varchar2 default hr_api.g_varchar2
870 ,p_cso_attribute22 in varchar2 default hr_api.g_varchar2
871 ,p_cso_attribute23 in varchar2 default hr_api.g_varchar2
872 ,p_cso_attribute24 in varchar2 default hr_api.g_varchar2
873 ,p_cso_attribute25 in varchar2 default hr_api.g_varchar2
874 ,p_cso_attribute26 in varchar2 default hr_api.g_varchar2
875 ,p_cso_attribute27 in varchar2 default hr_api.g_varchar2
876 ,p_cso_attribute28 in varchar2 default hr_api.g_varchar2
877 ,p_cso_attribute29 in varchar2 default hr_api.g_varchar2
878 ,p_cso_attribute30 in varchar2 default hr_api.g_varchar2
879 ) is
880 --
881 l_rec ben_cso_shd.g_rec_type;
882 l_proc varchar2(72) := g_package||'upd';
883 --
884 Begin
885 hr_utility.set_location('Entering:'||l_proc, 5);
886 --
887 -- Call conversion function to turn arguments into the
888 -- l_rec structure.
889 --
890 l_rec :=
891 ben_cso_shd.convert_args
892 (p_cwb_stock_optn_dtls_id
893 ,p_grant_id
894 ,p_grant_number
895 ,p_grant_name
896 ,p_grant_type
897 ,p_grant_date
898 ,p_grant_shares
899 ,p_grant_price
900 ,p_value_at_grant
901 ,p_current_share_price
902 ,p_current_shares_outstanding
903 ,p_vested_shares
904 ,p_unvested_shares
905 ,p_exercisable_shares
906 ,p_exercised_shares
907 ,p_cancelled_shares
908 ,p_trading_symbol
909 ,p_expiration_date
910 ,p_reason_code
911 ,p_class
912 ,p_misc
913 ,p_employee_number
914 ,p_person_id
915 ,p_business_group_id
916 ,p_prtt_rt_val_id
917 ,p_object_version_number
918 ,p_cso_attribute_category
919 ,p_cso_attribute1
920 ,p_cso_attribute2
921 ,p_cso_attribute3
922 ,p_cso_attribute4
923 ,p_cso_attribute5
924 ,p_cso_attribute6
925 ,p_cso_attribute7
926 ,p_cso_attribute8
927 ,p_cso_attribute9
928 ,p_cso_attribute10
929 ,p_cso_attribute11
930 ,p_cso_attribute12
931 ,p_cso_attribute13
932 ,p_cso_attribute14
933 ,p_cso_attribute15
934 ,p_cso_attribute16
935 ,p_cso_attribute17
936 ,p_cso_attribute18
937 ,p_cso_attribute19
938 ,p_cso_attribute20
939 ,p_cso_attribute21
940 ,p_cso_attribute22
941 ,p_cso_attribute23
942 ,p_cso_attribute24
943 ,p_cso_attribute25
944 ,p_cso_attribute26
945 ,p_cso_attribute27
946 ,p_cso_attribute28
947 ,p_cso_attribute29
948 ,p_cso_attribute30
949 );
950 --
951 -- Having converted the arguments into the
952 -- plsql record structure we call the corresponding record
953 -- business process.
954 --
955 ben_cso_upd.upd
956 (p_effective_date
957 ,l_rec
958 );
959 p_object_version_number := l_rec.object_version_number;
960 --
961 hr_utility.set_location(' Leaving:'||l_proc, 10);
962 End upd;
963 --
964 end ben_cso_upd;