DBA Data[Home] [Help]

PACKAGE BODY: APPS.OTA_LME_UPD

Source


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