1 Package Body ota_lme_upd as
2 /* $Header: otlmerhi.pkb 120.0.12010000.2 2009/05/14 08:48:52 pekasi ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ota_lme_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 ota_lme_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 ota_lp_member_enrollments Row
69 --
70 update ota_lp_member_enrollments
71 set
72 lp_member_enrollment_id = p_rec.lp_member_enrollment_id
73 ,lp_enrollment_id = p_rec.lp_enrollment_id
74 ,learning_path_section_id = p_rec.learning_path_section_id
75 ,learning_path_member_id = p_rec.learning_path_member_id
76 ,member_status_code = p_rec.member_status_code
77 ,completion_target_date = p_rec.completion_target_date
78 ,completion_date = p_rec.completion_date
79 ,business_group_id = p_rec.business_group_id
80 ,object_version_number = p_rec.object_version_number
81 ,attribute_category = p_rec.attribute_category
82 ,attribute1 = p_rec.attribute1
83 ,attribute2 = p_rec.attribute2
84 ,attribute3 = p_rec.attribute3
85 ,attribute4 = p_rec.attribute4
86 ,attribute5 = p_rec.attribute5
87 ,attribute6 = p_rec.attribute6
88 ,attribute7 = p_rec.attribute7
89 ,attribute8 = p_rec.attribute8
90 ,attribute9 = p_rec.attribute9
91 ,attribute10 = p_rec.attribute10
92 ,attribute11 = p_rec.attribute11
93 ,attribute12 = p_rec.attribute12
94 ,attribute13 = p_rec.attribute13
95 ,attribute14 = p_rec.attribute14
96 ,attribute15 = p_rec.attribute15
97 ,attribute16 = p_rec.attribute16
98 ,attribute17 = p_rec.attribute17
99 ,attribute18 = p_rec.attribute18
100 ,attribute19 = p_rec.attribute19
101 ,attribute20 = p_rec.attribute20
102 ,attribute21 = p_rec.attribute21
103 ,attribute22 = p_rec.attribute22
104 ,attribute23 = p_rec.attribute23
105 ,attribute24 = p_rec.attribute24
106 ,attribute25 = p_rec.attribute25
107 ,attribute26 = p_rec.attribute26
108 ,attribute27 = p_rec.attribute27
109 ,attribute28 = p_rec.attribute28
110 ,attribute29 = p_rec.attribute29
111 ,attribute30 = p_rec.attribute30
112 ,creator_person_id = p_rec.creator_person_id
113 ,event_id = p_rec.event_id
114 where lp_member_enrollment_id = p_rec.lp_member_enrollment_id;
115 --
116 --
117 --
118 hr_utility.set_location(' Leaving:'||l_proc, 10);
119 --
120 Exception
121 When hr_api.check_integrity_violated Then
122 -- A check constraint has been violated
123 --
124 ota_lme_shd.constraint_error
125 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126 When hr_api.parent_integrity_violated Then
127 -- Parent integrity has been violated
128 --
129 ota_lme_shd.constraint_error
130 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131 When hr_api.unique_integrity_violated Then
132 -- Unique integrity has been violated
133 --
134 ota_lme_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When Others Then
137 --
138 Raise;
139 End update_dml;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |------------------------------< pre_update >------------------------------|
143 -- ----------------------------------------------------------------------------
144 -- {Start Of Comments}
145 --
146 -- Description:
147 -- This private procedure contains any processing which is required before
148 -- the update dml.
149 --
150 -- Prerequisites:
151 -- This is an internal procedure which is called from the upd procedure.
152 --
153 -- In Parameters:
154 -- A Pl/Sql record structure.
155 --
156 -- Post Success:
157 -- Processing continues.
158 --
159 -- Post Failure:
160 -- If an error has occurred, an error message and exception wil be raised
161 -- but not handled.
162 --
163 -- Developer Implementation Notes:
164 -- Any pre-processing required before the update dml is issued should be
165 -- coded within this procedure. It is important to note that any 3rd party
166 -- maintenance should be reviewed before placing in this procedure.
167 --
168 -- Access Status:
169 -- Internal Row Handler Use Only.
170 --
171 -- {End Of Comments}
172 -- ----------------------------------------------------------------------------
173 Procedure pre_update
174 (p_rec in ota_lme_shd.g_rec_type
175 ) is
176 --
177 l_proc varchar2(72) := g_package||'pre_update';
178 --
179 Begin
180 hr_utility.set_location('Entering:'||l_proc, 5);
181 --
182 hr_utility.set_location(' Leaving:'||l_proc, 10);
183 End pre_update;
184 --
185 -- ----------------------------------------------------------------------------
186 -- |-----------------------------< post_update >------------------------------|
187 -- ----------------------------------------------------------------------------
188 -- {Start Of Comments}
189 --
190 -- Description:
191 -- This private procedure contains any processing which is required after
192 -- the update dml.
193 --
194 -- Prerequisites:
195 -- This is an internal procedure which is called from the upd procedure.
196 --
197 -- In Parameters:
198 -- A Pl/Sql record structure.
199 --
200 -- Post Success:
201 -- Processing continues.
202 --
203 -- Post Failure:
204 -- If an error has occurred, an error message and exception will be raised
205 -- but not handled.
206 --
207 -- Developer Implementation Notes:
208 -- Any post-processing required after the update dml is issued should be
209 -- coded within this procedure. It is important to note that any 3rd party
210 -- maintenance should be reviewed before placing in this procedure.
211 --
212 -- Access Status:
213 -- Internal Row Handler Use Only.
214 --
215 -- {End Of Comments}
216 -- ----------------------------------------------------------------------------
217 Procedure post_update
218 (p_effective_date in date
219 ,p_rec in ota_lme_shd.g_rec_type
220 ) is
221 --
222 l_proc varchar2(72) := g_package||'post_update';
223 --
224 Begin
225 hr_utility.set_location('Entering:'||l_proc, 5);
226 begin
227 --
228 ota_lme_rku.after_update
229 (p_effective_date => p_effective_date
230 ,p_lp_member_enrollment_id
231 => p_rec.lp_member_enrollment_id
232 ,p_lp_enrollment_id
233 => p_rec.lp_enrollment_id
234 ,p_learning_path_section_id
235 => p_rec.learning_path_section_id
236 ,p_learning_path_member_id
237 => p_rec.learning_path_member_id
238 ,p_member_status_code
239 => p_rec.member_status_code
240 ,p_completion_target_date
241 => p_rec.completion_target_date
242 ,p_completion_date
243 => p_rec.completion_date
244 ,p_business_group_id
245 => p_rec.business_group_id
246 ,p_object_version_number
247 => p_rec.object_version_number
248 ,p_attribute_category
249 => p_rec.attribute_category
250 ,p_attribute1
251 => p_rec.attribute1
252 ,p_attribute2
253 => p_rec.attribute2
254 ,p_attribute3
255 => p_rec.attribute3
256 ,p_attribute4
257 => p_rec.attribute4
258 ,p_attribute5
259 => p_rec.attribute5
260 ,p_attribute6
261 => p_rec.attribute6
262 ,p_attribute7
263 => p_rec.attribute7
264 ,p_attribute8
265 => p_rec.attribute8
266 ,p_attribute9
267 => p_rec.attribute9
268 ,p_attribute10
269 => p_rec.attribute10
270 ,p_attribute11
271 => p_rec.attribute11
272 ,p_attribute12
273 => p_rec.attribute12
274 ,p_attribute13
275 => p_rec.attribute13
276 ,p_attribute14
277 => p_rec.attribute14
278 ,p_attribute15
279 => p_rec.attribute15
280 ,p_attribute16
281 => p_rec.attribute16
282 ,p_attribute17
283 => p_rec.attribute17
284 ,p_attribute18
285 => p_rec.attribute18
286 ,p_attribute19
287 => p_rec.attribute19
288 ,p_attribute20
289 => p_rec.attribute20
290 ,p_attribute21
291 => p_rec.attribute21
292 ,p_attribute22
293 => p_rec.attribute22
294 ,p_attribute23
295 => p_rec.attribute23
296 ,p_attribute24
297 => p_rec.attribute24
298 ,p_attribute25
299 => p_rec.attribute25
300 ,p_attribute26
301 => p_rec.attribute26
302 ,p_attribute27
303 => p_rec.attribute27
304 ,p_attribute28
305 => p_rec.attribute28
306 ,p_attribute29
307 => p_rec.attribute29
308 ,p_attribute30
309 => p_rec.attribute30
310 ,p_creator_person_id
311 => p_rec.creator_person_id
312 ,p_event_id
313 => p_rec.event_id
314 ,p_lp_enrollment_id_o
315 => ota_lme_shd.g_old_rec.lp_enrollment_id
316 ,p_learning_path_section_id_o
317 => ota_lme_shd.g_old_rec.learning_path_section_id
318 ,p_learning_path_member_id_o
319 => ota_lme_shd.g_old_rec.learning_path_member_id
320 ,p_member_status_code_o
321 => ota_lme_shd.g_old_rec.member_status_code
322 ,p_completion_target_date_o
323 => ota_lme_shd.g_old_rec.completion_target_date
324 ,p_completion_date_o
325 => ota_lme_shd.g_old_rec.completion_date
326 ,p_business_group_id_o
327 => ota_lme_shd.g_old_rec.business_group_id
328 ,p_object_version_number_o
329 => ota_lme_shd.g_old_rec.object_version_number
330 ,p_attribute_category_o
331 => ota_lme_shd.g_old_rec.attribute_category
332 ,p_attribute1_o
333 => ota_lme_shd.g_old_rec.attribute1
334 ,p_attribute2_o
335 => ota_lme_shd.g_old_rec.attribute2
336 ,p_attribute3_o
337 => ota_lme_shd.g_old_rec.attribute3
338 ,p_attribute4_o
339 => ota_lme_shd.g_old_rec.attribute4
340 ,p_attribute5_o
341 => ota_lme_shd.g_old_rec.attribute5
342 ,p_attribute6_o
343 => ota_lme_shd.g_old_rec.attribute6
344 ,p_attribute7_o
345 => ota_lme_shd.g_old_rec.attribute7
346 ,p_attribute8_o
347 => ota_lme_shd.g_old_rec.attribute8
348 ,p_attribute9_o
349 => ota_lme_shd.g_old_rec.attribute9
350 ,p_attribute10_o
351 => ota_lme_shd.g_old_rec.attribute10
352 ,p_attribute11_o
353 => ota_lme_shd.g_old_rec.attribute11
354 ,p_attribute12_o
355 => ota_lme_shd.g_old_rec.attribute12
356 ,p_attribute13_o
357 => ota_lme_shd.g_old_rec.attribute13
358 ,p_attribute14_o
359 => ota_lme_shd.g_old_rec.attribute14
360 ,p_attribute15_o
361 => ota_lme_shd.g_old_rec.attribute15
362 ,p_attribute16_o
363 => ota_lme_shd.g_old_rec.attribute16
364 ,p_attribute17_o
365 => ota_lme_shd.g_old_rec.attribute17
366 ,p_attribute18_o
367 => ota_lme_shd.g_old_rec.attribute18
368 ,p_attribute19_o
369 => ota_lme_shd.g_old_rec.attribute19
370 ,p_attribute20_o
371 => ota_lme_shd.g_old_rec.attribute20
372 ,p_attribute21_o
373 => ota_lme_shd.g_old_rec.attribute21
374 ,p_attribute22_o
375 => ota_lme_shd.g_old_rec.attribute22
376 ,p_attribute23_o
377 => ota_lme_shd.g_old_rec.attribute23
378 ,p_attribute24_o
379 => ota_lme_shd.g_old_rec.attribute24
380 ,p_attribute25_o
381 => ota_lme_shd.g_old_rec.attribute25
382 ,p_attribute26_o
383 => ota_lme_shd.g_old_rec.attribute26
384 ,p_attribute27_o
385 => ota_lme_shd.g_old_rec.attribute27
386 ,p_attribute28_o
387 => ota_lme_shd.g_old_rec.attribute28
388 ,p_attribute29_o
389 => ota_lme_shd.g_old_rec.attribute29
390 ,p_attribute30_o
391 => ota_lme_shd.g_old_rec.attribute30
392 ,p_creator_person_id_o
393 => ota_lme_shd.g_old_rec.creator_person_id
394 ,p_event_id_o
395 => ota_lme_shd.g_old_rec.event_id
396 );
397 --
398 exception
399 --
400 when hr_api.cannot_find_prog_unit then
401 --
402 hr_api.cannot_find_prog_unit_error
403 (p_module_name => 'OTA_LP_MEMBER_ENROLLMENTS'
404 ,p_hook_type => 'AU');
405 --
406 end;
407 --
408 hr_utility.set_location(' Leaving:'||l_proc, 10);
409 End post_update;
410 --
411 -- ----------------------------------------------------------------------------
412 -- |-----------------------------< convert_defs >-----------------------------|
413 -- ----------------------------------------------------------------------------
414 -- {Start Of Comments}
415 --
416 -- Description:
417 -- The Convert_Defs procedure has one very important function:
418 -- It must return the record structure for the row with all system defaulted
419 -- values converted into its corresponding parameter value for update. When
420 -- we attempt to update a row through the Upd process , certain
421 -- parameters can be defaulted which enables flexibility in the calling of
422 -- the upd process (e.g. only attributes which need to be updated need to be
423 -- specified). For the upd process to determine which attributes
424 -- have NOT been specified we need to check if the parameter has a reserved
425 -- system default value. Therefore, for all parameters which have a
426 -- corresponding reserved system default mechanism specified we need to
427 -- check if a system default is being used. If a system default is being
428 -- used then we convert the defaulted value into its corresponding attribute
429 -- value held in the g_old_rec data structure.
430 --
431 -- Prerequisites:
432 -- This private function can only be called from the upd process.
433 --
434 -- In Parameters:
435 -- A Pl/Sql record structure.
436 --
437 -- Post Success:
438 -- The record structure will be returned with all system defaulted parameter
439 -- values converted into its current row attribute value.
440 --
441 -- Post Failure:
442 -- No direct error handling is required within this function. Any possible
443 -- errors within this procedure will be a PL/SQL value error due to
444 -- conversion of datatypes or data lengths.
445 --
446 -- Developer Implementation Notes:
447 -- None.
448 --
449 -- Access Status:
450 -- Internal Row Handler Use Only.
451 --
452 -- {End Of Comments}
453 -- ----------------------------------------------------------------------------
454 Procedure convert_defs
455 (p_rec in out nocopy ota_lme_shd.g_rec_type
456 ) is
457 --
458 Begin
459 --
460 -- We must now examine each argument value in the
461 -- p_rec plsql record structure
462 -- to see if a system default is being used. If a system default
463 -- is being used then we must set to the 'current' argument value.
464 --
465 If (p_rec.lp_enrollment_id = hr_api.g_number) then
466 p_rec.lp_enrollment_id :=
467 ota_lme_shd.g_old_rec.lp_enrollment_id;
468 End If;
469 If (p_rec.learning_path_section_id = hr_api.g_number) then
470 p_rec.learning_path_section_id :=
471 ota_lme_shd.g_old_rec.learning_path_section_id;
472 End If;
473 If (p_rec.learning_path_member_id = hr_api.g_number) then
474 p_rec.learning_path_member_id :=
475 ota_lme_shd.g_old_rec.learning_path_member_id;
476 End If;
477 If (p_rec.member_status_code = hr_api.g_varchar2) then
478 p_rec.member_status_code :=
479 ota_lme_shd.g_old_rec.member_status_code;
480 End If;
481 If (p_rec.completion_target_date = hr_api.g_date) then
482 p_rec.completion_target_date :=
483 ota_lme_shd.g_old_rec.completion_target_date;
484 End If;
485 If (p_rec.completion_date = hr_api.g_date) then
486 p_rec.completion_date :=
487 ota_lme_shd.g_old_rec.completion_date;
488 End If;
489 If (p_rec.business_group_id = hr_api.g_number) then
490 p_rec.business_group_id :=
491 ota_lme_shd.g_old_rec.business_group_id;
492 End If;
493 If (p_rec.attribute_category = hr_api.g_varchar2) then
494 p_rec.attribute_category :=
495 ota_lme_shd.g_old_rec.attribute_category;
496 End If;
497 If (p_rec.attribute1 = hr_api.g_varchar2) then
498 p_rec.attribute1 :=
499 ota_lme_shd.g_old_rec.attribute1;
500 End If;
501 If (p_rec.attribute2 = hr_api.g_varchar2) then
502 p_rec.attribute2 :=
503 ota_lme_shd.g_old_rec.attribute2;
504 End If;
505 If (p_rec.attribute3 = hr_api.g_varchar2) then
506 p_rec.attribute3 :=
507 ota_lme_shd.g_old_rec.attribute3;
508 End If;
509 If (p_rec.attribute4 = hr_api.g_varchar2) then
510 p_rec.attribute4 :=
511 ota_lme_shd.g_old_rec.attribute4;
512 End If;
513 If (p_rec.attribute5 = hr_api.g_varchar2) then
514 p_rec.attribute5 :=
515 ota_lme_shd.g_old_rec.attribute5;
516 End If;
517 If (p_rec.attribute6 = hr_api.g_varchar2) then
518 p_rec.attribute6 :=
519 ota_lme_shd.g_old_rec.attribute6;
520 End If;
521 If (p_rec.attribute7 = hr_api.g_varchar2) then
522 p_rec.attribute7 :=
523 ota_lme_shd.g_old_rec.attribute7;
524 End If;
525 If (p_rec.attribute8 = hr_api.g_varchar2) then
526 p_rec.attribute8 :=
527 ota_lme_shd.g_old_rec.attribute8;
528 End If;
529 If (p_rec.attribute9 = hr_api.g_varchar2) then
530 p_rec.attribute9 :=
531 ota_lme_shd.g_old_rec.attribute9;
532 End If;
533 If (p_rec.attribute10 = hr_api.g_varchar2) then
534 p_rec.attribute10 :=
535 ota_lme_shd.g_old_rec.attribute10;
536 End If;
537 If (p_rec.attribute11 = hr_api.g_varchar2) then
538 p_rec.attribute11 :=
539 ota_lme_shd.g_old_rec.attribute11;
540 End If;
541 If (p_rec.attribute12 = hr_api.g_varchar2) then
542 p_rec.attribute12 :=
543 ota_lme_shd.g_old_rec.attribute12;
544 End If;
545 If (p_rec.attribute13 = hr_api.g_varchar2) then
546 p_rec.attribute13 :=
547 ota_lme_shd.g_old_rec.attribute13;
548 End If;
549 If (p_rec.attribute14 = hr_api.g_varchar2) then
550 p_rec.attribute14 :=
551 ota_lme_shd.g_old_rec.attribute14;
552 End If;
553 If (p_rec.attribute15 = hr_api.g_varchar2) then
554 p_rec.attribute15 :=
555 ota_lme_shd.g_old_rec.attribute15;
556 End If;
557 If (p_rec.attribute16 = hr_api.g_varchar2) then
558 p_rec.attribute16 :=
559 ota_lme_shd.g_old_rec.attribute16;
560 End If;
561 If (p_rec.attribute17 = hr_api.g_varchar2) then
562 p_rec.attribute17 :=
563 ota_lme_shd.g_old_rec.attribute17;
564 End If;
565 If (p_rec.attribute18 = hr_api.g_varchar2) then
566 p_rec.attribute18 :=
567 ota_lme_shd.g_old_rec.attribute18;
568 End If;
569 If (p_rec.attribute19 = hr_api.g_varchar2) then
570 p_rec.attribute19 :=
571 ota_lme_shd.g_old_rec.attribute19;
572 End If;
573 If (p_rec.attribute20 = hr_api.g_varchar2) then
574 p_rec.attribute20 :=
575 ota_lme_shd.g_old_rec.attribute20;
576 End If;
577 If (p_rec.attribute21 = hr_api.g_varchar2) then
578 p_rec.attribute21 :=
579 ota_lme_shd.g_old_rec.attribute21;
580 End If;
581 If (p_rec.attribute22 = hr_api.g_varchar2) then
582 p_rec.attribute22 :=
583 ota_lme_shd.g_old_rec.attribute22;
584 End If;
585 If (p_rec.attribute23 = hr_api.g_varchar2) then
586 p_rec.attribute23 :=
587 ota_lme_shd.g_old_rec.attribute23;
588 End If;
589 If (p_rec.attribute24 = hr_api.g_varchar2) then
590 p_rec.attribute24 :=
591 ota_lme_shd.g_old_rec.attribute24;
592 End If;
593 If (p_rec.attribute25 = hr_api.g_varchar2) then
594 p_rec.attribute25 :=
595 ota_lme_shd.g_old_rec.attribute25;
596 End If;
597 If (p_rec.attribute26 = hr_api.g_varchar2) then
598 p_rec.attribute26 :=
599 ota_lme_shd.g_old_rec.attribute26;
600 End If;
601 If (p_rec.attribute27 = hr_api.g_varchar2) then
602 p_rec.attribute27 :=
603 ota_lme_shd.g_old_rec.attribute27;
604 End If;
605 If (p_rec.attribute28 = hr_api.g_varchar2) then
606 p_rec.attribute28 :=
607 ota_lme_shd.g_old_rec.attribute28;
608 End If;
609 If (p_rec.attribute29 = hr_api.g_varchar2) then
610 p_rec.attribute29 :=
611 ota_lme_shd.g_old_rec.attribute29;
612 End If;
613 If (p_rec.attribute30 = hr_api.g_varchar2) then
614 p_rec.attribute30 :=
615 ota_lme_shd.g_old_rec.attribute30;
616 End If;
617 If (p_rec.creator_person_id = hr_api.g_number) then
618 p_rec.creator_person_id :=
619 ota_lme_shd.g_old_rec.creator_person_id;
620 End If;
621 If (p_rec.event_id = hr_api.g_number) then
622 p_rec.event_id :=
623 ota_lme_shd.g_old_rec.event_id;
624 End If;
625 --
626 End convert_defs;
627 --
628 -- ----------------------------------------------------------------------------
629 -- |---------------------------------< upd >----------------------------------|
630 -- ----------------------------------------------------------------------------
631 Procedure upd
632 (p_effective_date in date
633 ,p_rec in out nocopy ota_lme_shd.g_rec_type
634 ) is
635 --
636 l_proc varchar2(72) := g_package||'upd';
637 --
638 Begin
639 hr_utility.set_location('Entering:'||l_proc, 5);
640 --
641 -- We must lock the row which we need to update.
642 --
643 ota_lme_shd.lck
644 (p_rec.lp_member_enrollment_id
645 ,p_rec.object_version_number
646 );
647 --
648 -- 1. During an update system defaults are used to determine if
649 -- arguments have been defaulted or not. We must therefore
650 -- derive the full record structure values to be updated.
651 --
652 -- 2. Call the supporting update validate operations.
653 --
654 convert_defs(p_rec);
655 ota_lme_bus.update_validate
656 (p_effective_date
657 ,p_rec
658 );
659 --
660 -- Call to raise any errors on multi-message list
661 hr_multi_message.end_validation_set;
662 --
663 -- Call the supporting pre-update operation
664 --
665 ota_lme_upd.pre_update(p_rec);
666 --
667 -- Update the row.
668 --
669 ota_lme_upd.update_dml(p_rec);
670 --
671 -- Call the supporting post-update operation
672 --
673 ota_lme_upd.post_update
674 (p_effective_date
675 ,p_rec
676 );
677 --
678 -- Call to raise any errors on multi-message list
679 hr_multi_message.end_validation_set;
680 End upd;
681 --
682 -- ----------------------------------------------------------------------------
683 -- |---------------------------------< upd >----------------------------------|
684 -- ----------------------------------------------------------------------------
685 Procedure upd
686 (p_effective_date in date
687 ,p_lp_member_enrollment_id in number
688 ,p_object_version_number in out nocopy number
689 ,p_lp_enrollment_id in number default hr_api.g_number
690 ,p_learning_path_section_id in number default hr_api.g_number
691 ,p_learning_path_member_id in number default hr_api.g_number
692 ,p_member_status_code in varchar2 default hr_api.g_varchar2
693 ,p_business_group_id in number default hr_api.g_number
694 ,p_completion_target_date in date default hr_api.g_date
695 ,p_completion_date in date default hr_api.g_date
696 ,p_attribute_category in varchar2 default hr_api.g_varchar2
697 ,p_attribute1 in varchar2 default hr_api.g_varchar2
698 ,p_attribute2 in varchar2 default hr_api.g_varchar2
699 ,p_attribute3 in varchar2 default hr_api.g_varchar2
700 ,p_attribute4 in varchar2 default hr_api.g_varchar2
701 ,p_attribute5 in varchar2 default hr_api.g_varchar2
702 ,p_attribute6 in varchar2 default hr_api.g_varchar2
703 ,p_attribute7 in varchar2 default hr_api.g_varchar2
704 ,p_attribute8 in varchar2 default hr_api.g_varchar2
705 ,p_attribute9 in varchar2 default hr_api.g_varchar2
706 ,p_attribute10 in varchar2 default hr_api.g_varchar2
707 ,p_attribute11 in varchar2 default hr_api.g_varchar2
708 ,p_attribute12 in varchar2 default hr_api.g_varchar2
709 ,p_attribute13 in varchar2 default hr_api.g_varchar2
710 ,p_attribute14 in varchar2 default hr_api.g_varchar2
711 ,p_attribute15 in varchar2 default hr_api.g_varchar2
712 ,p_attribute16 in varchar2 default hr_api.g_varchar2
713 ,p_attribute17 in varchar2 default hr_api.g_varchar2
714 ,p_attribute18 in varchar2 default hr_api.g_varchar2
715 ,p_attribute19 in varchar2 default hr_api.g_varchar2
716 ,p_attribute20 in varchar2 default hr_api.g_varchar2
717 ,p_attribute21 in varchar2 default hr_api.g_varchar2
718 ,p_attribute22 in varchar2 default hr_api.g_varchar2
719 ,p_attribute23 in varchar2 default hr_api.g_varchar2
720 ,p_attribute24 in varchar2 default hr_api.g_varchar2
721 ,p_attribute25 in varchar2 default hr_api.g_varchar2
722 ,p_attribute26 in varchar2 default hr_api.g_varchar2
723 ,p_attribute27 in varchar2 default hr_api.g_varchar2
724 ,p_attribute28 in varchar2 default hr_api.g_varchar2
725 ,p_attribute29 in varchar2 default hr_api.g_varchar2
726 ,p_attribute30 in varchar2 default hr_api.g_varchar2
727 ,p_creator_person_id in number default hr_api.g_number
728 ,p_event_id in number default hr_api.g_number
729 ) is
730 --
731 l_rec ota_lme_shd.g_rec_type;
732 l_proc varchar2(72) := g_package||'upd';
733 --
734 Begin
735 hr_utility.set_location('Entering:'||l_proc, 5);
736 --
737 -- Call conversion function to turn arguments into the
738 -- l_rec structure.
739 --
740 l_rec :=
741 ota_lme_shd.convert_args
742 (p_lp_member_enrollment_id
743 ,p_lp_enrollment_id
744 ,p_learning_path_section_id
745 ,p_learning_path_member_id
746 ,p_member_status_code
747 ,p_completion_target_date
748 ,p_completion_date
749 ,p_business_group_id
750 ,p_object_version_number
751 ,p_attribute_category
752 ,p_attribute1
753 ,p_attribute2
754 ,p_attribute3
755 ,p_attribute4
756 ,p_attribute5
757 ,p_attribute6
758 ,p_attribute7
759 ,p_attribute8
760 ,p_attribute9
761 ,p_attribute10
762 ,p_attribute11
763 ,p_attribute12
764 ,p_attribute13
765 ,p_attribute14
766 ,p_attribute15
767 ,p_attribute16
768 ,p_attribute17
769 ,p_attribute18
770 ,p_attribute19
771 ,p_attribute20
772 ,p_attribute21
773 ,p_attribute22
774 ,p_attribute23
775 ,p_attribute24
776 ,p_attribute25
777 ,p_attribute26
778 ,p_attribute27
779 ,p_attribute28
780 ,p_attribute29
781 ,p_attribute30
782 ,p_creator_person_id
783 ,p_event_id
784 );
785 --
786 -- Having converted the arguments into the
787 -- plsql record structure we call the corresponding record
788 -- business process.
789 --
790 ota_lme_upd.upd
791 (p_effective_date
792 ,l_rec
793 );
794 p_object_version_number := l_rec.object_version_number;
795 --
796 hr_utility.set_location(' Leaving:'||l_proc, 10);
797 End upd;
798 --
799 end ota_lme_upd;