DBA Data[Home] [Help]

PACKAGE BODY: APPS.OTA_CRE_UPD

Source


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