DBA Data[Home] [Help]

PACKAGE BODY: APPS.OTA_RUD_UPD

Source


1 PACKAGE BODY OTA_RUD_UPD as
2 /* $Header: otrudrhi.pkb 120.2 2005/09/08 06:34:32 pgupta noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  ota_rud_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_rud_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_resource_usages Row
69   --
70   update ota_resource_usages
71     set
72      resource_usage_id               = p_rec.resource_usage_id
73     ,supplied_resource_id            = p_rec.supplied_resource_id
74     ,activity_version_id             = p_rec.activity_version_id
75     ,object_version_number           = p_rec.object_version_number
76     ,required_flag                   = p_rec.required_flag
77     ,start_date                      = p_rec.start_date
78     ,comments                        = p_rec.comments
79     ,end_date                        = p_rec.end_date
80     ,quantity                        = p_rec.quantity
81     ,resource_type                   = p_rec.resource_type
82     ,role_to_play                    = p_rec.role_to_play
83     ,usage_reason                    = p_rec.usage_reason
84     ,rud_information_category        = p_rec.rud_information_category
85     ,rud_information1                = p_rec.rud_information1
86     ,rud_information2                = p_rec.rud_information2
87     ,rud_information3                = p_rec.rud_information3
88     ,rud_information4                = p_rec.rud_information4
89     ,rud_information5                = p_rec.rud_information5
90     ,rud_information6                = p_rec.rud_information6
91     ,rud_information7                = p_rec.rud_information7
92     ,rud_information8                = p_rec.rud_information8
93     ,rud_information9                = p_rec.rud_information9
94     ,rud_information10               = p_rec.rud_information10
95     ,rud_information11               = p_rec.rud_information11
96     ,rud_information12               = p_rec.rud_information12
97     ,rud_information13               = p_rec.rud_information13
98     ,rud_information14               = p_rec.rud_information14
99     ,rud_information15               = p_rec.rud_information15
100     ,rud_information16               = p_rec.rud_information16
101     ,rud_information17               = p_rec.rud_information17
102     ,rud_information18               = p_rec.rud_information18
103     ,rud_information19               = p_rec.rud_information19
104     ,rud_information20               = p_rec.rud_information20
105     ,offering_id                     = p_rec.offering_id
106     where resource_usage_id = p_rec.resource_usage_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_rud_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_rud_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_rud_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_rud_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_rud_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_rud_rku.after_update
221       (p_effective_date              => p_effective_date
222       ,p_resource_usage_id
223       => p_rec.resource_usage_id
224       ,p_supplied_resource_id
225       => p_rec.supplied_resource_id
226       ,p_activity_version_id
227       => p_rec.activity_version_id
228       ,p_object_version_number
229       => p_rec.object_version_number
230       ,p_required_flag
231       => p_rec.required_flag
232       ,p_start_date
233       => p_rec.start_date
234       ,p_comments
235       => p_rec.comments
236       ,p_end_date
237       => p_rec.end_date
238       ,p_quantity
239       => p_rec.quantity
240       ,p_resource_type
241       => p_rec.resource_type
242       ,p_role_to_play
243       => p_rec.role_to_play
244       ,p_usage_reason
245       => p_rec.usage_reason
246       ,p_rud_information_category
247       => p_rec.rud_information_category
248       ,p_rud_information1
249       => p_rec.rud_information1
250       ,p_rud_information2
251       => p_rec.rud_information2
252       ,p_rud_information3
253       => p_rec.rud_information3
254       ,p_rud_information4
255       => p_rec.rud_information4
256       ,p_rud_information5
257       => p_rec.rud_information5
258       ,p_rud_information6
259       => p_rec.rud_information6
260       ,p_rud_information7
261       => p_rec.rud_information7
262       ,p_rud_information8
263       => p_rec.rud_information8
264       ,p_rud_information9
265       => p_rec.rud_information9
266       ,p_rud_information10
267       => p_rec.rud_information10
268       ,p_rud_information11
269       => p_rec.rud_information11
270       ,p_rud_information12
271       => p_rec.rud_information12
272       ,p_rud_information13
273       => p_rec.rud_information13
274       ,p_rud_information14
275       => p_rec.rud_information14
276       ,p_rud_information15
277       => p_rec.rud_information15
278       ,p_rud_information16
279       => p_rec.rud_information16
280       ,p_rud_information17
281       => p_rec.rud_information17
282       ,p_rud_information18
283       => p_rec.rud_information18
284       ,p_rud_information19
285       => p_rec.rud_information19
286       ,p_rud_information20
287       => p_rec.rud_information20
288       ,p_offering_id
289       => p_rec.offering_id
290       ,p_supplied_resource_id_o
291       => ota_rud_shd.g_old_rec.supplied_resource_id
292       ,p_activity_version_id_o
293       => ota_rud_shd.g_old_rec.activity_version_id
294       ,p_object_version_number_o
295       => ota_rud_shd.g_old_rec.object_version_number
296       ,p_required_flag_o
297       => ota_rud_shd.g_old_rec.required_flag
298       ,p_start_date_o
299       => ota_rud_shd.g_old_rec.start_date
300       ,p_comments_o
301       => ota_rud_shd.g_old_rec.comments
302       ,p_end_date_o
303       => ota_rud_shd.g_old_rec.end_date
304       ,p_quantity_o
305       => ota_rud_shd.g_old_rec.quantity
306       ,p_resource_type_o
307       => ota_rud_shd.g_old_rec.resource_type
308       ,p_role_to_play_o
309       => ota_rud_shd.g_old_rec.role_to_play
310       ,p_usage_reason_o
311       => ota_rud_shd.g_old_rec.usage_reason
312       ,p_rud_information_category_o
313       => ota_rud_shd.g_old_rec.rud_information_category
314       ,p_rud_information1_o
315       => ota_rud_shd.g_old_rec.rud_information1
316       ,p_rud_information2_o
317       => ota_rud_shd.g_old_rec.rud_information2
318       ,p_rud_information3_o
319       => ota_rud_shd.g_old_rec.rud_information3
320       ,p_rud_information4_o
321       => ota_rud_shd.g_old_rec.rud_information4
322       ,p_rud_information5_o
323       => ota_rud_shd.g_old_rec.rud_information5
324       ,p_rud_information6_o
325       => ota_rud_shd.g_old_rec.rud_information6
326       ,p_rud_information7_o
327       => ota_rud_shd.g_old_rec.rud_information7
328       ,p_rud_information8_o
329       => ota_rud_shd.g_old_rec.rud_information8
330       ,p_rud_information9_o
331       => ota_rud_shd.g_old_rec.rud_information9
332       ,p_rud_information10_o
333       => ota_rud_shd.g_old_rec.rud_information10
334       ,p_rud_information11_o
335       => ota_rud_shd.g_old_rec.rud_information11
336       ,p_rud_information12_o
337       => ota_rud_shd.g_old_rec.rud_information12
338       ,p_rud_information13_o
339       => ota_rud_shd.g_old_rec.rud_information13
340       ,p_rud_information14_o
341       => ota_rud_shd.g_old_rec.rud_information14
342       ,p_rud_information15_o
343       => ota_rud_shd.g_old_rec.rud_information15
344       ,p_rud_information16_o
345       => ota_rud_shd.g_old_rec.rud_information16
346       ,p_rud_information17_o
347       => ota_rud_shd.g_old_rec.rud_information17
348       ,p_rud_information18_o
349       => ota_rud_shd.g_old_rec.rud_information18
350       ,p_rud_information19_o
351       => ota_rud_shd.g_old_rec.rud_information19
352       ,p_rud_information20_o
353       => ota_rud_shd.g_old_rec.rud_information20
354       ,p_offering_id_o
355       => ota_rud_shd.g_old_rec.offering_id
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_RESOURCE_USAGES'
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_rud_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.supplied_resource_id = hr_api.g_number) then
426     p_rec.supplied_resource_id :=
427     ota_rud_shd.g_old_rec.supplied_resource_id;
428   End If;
429   If (p_rec.activity_version_id = hr_api.g_number) then
430     p_rec.activity_version_id :=
431     ota_rud_shd.g_old_rec.activity_version_id;
432   End If;
433   If (p_rec.required_flag = hr_api.g_varchar2) then
434     p_rec.required_flag :=
435     ota_rud_shd.g_old_rec.required_flag;
436   End If;
437   If (p_rec.start_date = hr_api.g_date) then
438     p_rec.start_date :=
439     ota_rud_shd.g_old_rec.start_date;
440   End If;
441   If (p_rec.comments = hr_api.g_varchar2) then
442     p_rec.comments :=
443     ota_rud_shd.g_old_rec.comments;
444   End If;
445   If (p_rec.end_date = hr_api.g_date) then
446     p_rec.end_date :=
447     ota_rud_shd.g_old_rec.end_date;
448   End If;
449   If (p_rec.quantity = hr_api.g_number) then
450     p_rec.quantity :=
451     ota_rud_shd.g_old_rec.quantity;
452   End If;
453   If (p_rec.resource_type = hr_api.g_varchar2) then
454     p_rec.resource_type :=
455     ota_rud_shd.g_old_rec.resource_type;
456   End If;
457   If (p_rec.role_to_play = hr_api.g_varchar2) then
458     p_rec.role_to_play :=
459     ota_rud_shd.g_old_rec.role_to_play;
460   End If;
461   If (p_rec.usage_reason = hr_api.g_varchar2) then
462     p_rec.usage_reason :=
463     ota_rud_shd.g_old_rec.usage_reason;
464   End If;
465   If (p_rec.rud_information_category = hr_api.g_varchar2) then
466     p_rec.rud_information_category :=
467     ota_rud_shd.g_old_rec.rud_information_category;
468   End If;
469   If (p_rec.rud_information1 = hr_api.g_varchar2) then
470     p_rec.rud_information1 :=
471     ota_rud_shd.g_old_rec.rud_information1;
472   End If;
473   If (p_rec.rud_information2 = hr_api.g_varchar2) then
474     p_rec.rud_information2 :=
475     ota_rud_shd.g_old_rec.rud_information2;
476   End If;
477   If (p_rec.rud_information3 = hr_api.g_varchar2) then
478     p_rec.rud_information3 :=
479     ota_rud_shd.g_old_rec.rud_information3;
480   End If;
481   If (p_rec.rud_information4 = hr_api.g_varchar2) then
482     p_rec.rud_information4 :=
483     ota_rud_shd.g_old_rec.rud_information4;
484   End If;
485   If (p_rec.rud_information5 = hr_api.g_varchar2) then
486     p_rec.rud_information5 :=
487     ota_rud_shd.g_old_rec.rud_information5;
488   End If;
489   If (p_rec.rud_information6 = hr_api.g_varchar2) then
490     p_rec.rud_information6 :=
491     ota_rud_shd.g_old_rec.rud_information6;
492   End If;
493   If (p_rec.rud_information7 = hr_api.g_varchar2) then
494     p_rec.rud_information7 :=
495     ota_rud_shd.g_old_rec.rud_information7;
496   End If;
497   If (p_rec.rud_information8 = hr_api.g_varchar2) then
498     p_rec.rud_information8 :=
499     ota_rud_shd.g_old_rec.rud_information8;
500   End If;
501   If (p_rec.rud_information9 = hr_api.g_varchar2) then
502     p_rec.rud_information9 :=
503     ota_rud_shd.g_old_rec.rud_information9;
504   End If;
505   If (p_rec.rud_information10 = hr_api.g_varchar2) then
506     p_rec.rud_information10 :=
507     ota_rud_shd.g_old_rec.rud_information10;
508   End If;
509   If (p_rec.rud_information11 = hr_api.g_varchar2) then
510     p_rec.rud_information11 :=
511     ota_rud_shd.g_old_rec.rud_information11;
512   End If;
513   If (p_rec.rud_information12 = hr_api.g_varchar2) then
514     p_rec.rud_information12 :=
515     ota_rud_shd.g_old_rec.rud_information12;
516   End If;
517   If (p_rec.rud_information13 = hr_api.g_varchar2) then
518     p_rec.rud_information13 :=
519     ota_rud_shd.g_old_rec.rud_information13;
520   End If;
521   If (p_rec.rud_information14 = hr_api.g_varchar2) then
522     p_rec.rud_information14 :=
523     ota_rud_shd.g_old_rec.rud_information14;
524   End If;
525   If (p_rec.rud_information15 = hr_api.g_varchar2) then
526     p_rec.rud_information15 :=
527     ota_rud_shd.g_old_rec.rud_information15;
528   End If;
529   If (p_rec.rud_information16 = hr_api.g_varchar2) then
530     p_rec.rud_information16 :=
531     ota_rud_shd.g_old_rec.rud_information16;
532   End If;
533   If (p_rec.rud_information17 = hr_api.g_varchar2) then
534     p_rec.rud_information17 :=
535     ota_rud_shd.g_old_rec.rud_information17;
536   End If;
537   If (p_rec.rud_information18 = hr_api.g_varchar2) then
538     p_rec.rud_information18 :=
539     ota_rud_shd.g_old_rec.rud_information18;
540   End If;
541   If (p_rec.rud_information19 = hr_api.g_varchar2) then
542     p_rec.rud_information19 :=
543     ota_rud_shd.g_old_rec.rud_information19;
544   End If;
545   If (p_rec.rud_information20 = hr_api.g_varchar2) then
546     p_rec.rud_information20 :=
547     ota_rud_shd.g_old_rec.rud_information20;
548   End If;
549   If (p_rec.offering_id = hr_api.g_number) then
550     p_rec.offering_id :=
551     ota_rud_shd.g_old_rec.offering_id;
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_rud_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_rud_shd.lck
572     (p_rec.resource_usage_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_rud_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_rud_upd.pre_update(p_rec);
594   --
595   -- Update the row.
596   --
597   ota_rud_upd.update_dml(p_rec);
598   --
599   -- Call the supporting post-update operation
600   --
601   ota_rud_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_resource_usage_id            in     number
616   ,p_object_version_number        in out nocopy number
617   ,p_activity_version_id          in     number    default hr_api.g_number
618   ,p_required_flag                in     varchar2  default hr_api.g_varchar2
619   ,p_start_date                   in     date      default hr_api.g_date
620   ,p_supplied_resource_id         in     number    default hr_api.g_number
621   ,p_comments                     in     varchar2  default hr_api.g_varchar2
622   ,p_end_date                     in     date      default hr_api.g_date
623   ,p_quantity                     in     number    default hr_api.g_number
624   ,p_resource_type                in     varchar2  default hr_api.g_varchar2
625   ,p_role_to_play                 in     varchar2  default hr_api.g_varchar2
626   ,p_usage_reason                 in     varchar2  default hr_api.g_varchar2
627   ,p_rud_information_category     in     varchar2  default hr_api.g_varchar2
628   ,p_rud_information1             in     varchar2  default hr_api.g_varchar2
629   ,p_rud_information2             in     varchar2  default hr_api.g_varchar2
630   ,p_rud_information3             in     varchar2  default hr_api.g_varchar2
631   ,p_rud_information4             in     varchar2  default hr_api.g_varchar2
632   ,p_rud_information5             in     varchar2  default hr_api.g_varchar2
633   ,p_rud_information6             in     varchar2  default hr_api.g_varchar2
634   ,p_rud_information7             in     varchar2  default hr_api.g_varchar2
635   ,p_rud_information8             in     varchar2  default hr_api.g_varchar2
636   ,p_rud_information9             in     varchar2  default hr_api.g_varchar2
637   ,p_rud_information10            in     varchar2  default hr_api.g_varchar2
638   ,p_rud_information11            in     varchar2  default hr_api.g_varchar2
639   ,p_rud_information12            in     varchar2  default hr_api.g_varchar2
640   ,p_rud_information13            in     varchar2  default hr_api.g_varchar2
641   ,p_rud_information14            in     varchar2  default hr_api.g_varchar2
642   ,p_rud_information15            in     varchar2  default hr_api.g_varchar2
643   ,p_rud_information16            in     varchar2  default hr_api.g_varchar2
644   ,p_rud_information17            in     varchar2  default hr_api.g_varchar2
645   ,p_rud_information18            in     varchar2  default hr_api.g_varchar2
646   ,p_rud_information19            in     varchar2  default hr_api.g_varchar2
647   ,p_rud_information20            in     varchar2  default hr_api.g_varchar2
648   ,p_offering_id                  in     number    default hr_api.g_number
649   ) is
650 --
651   l_rec   ota_rud_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_rud_shd.convert_args
662   (p_resource_usage_id
663   ,p_supplied_resource_id
664   ,p_activity_version_id
665   ,p_object_version_number
666   ,p_required_flag
667   ,p_start_date
668   ,p_comments
669   ,p_end_date
670   ,p_quantity
671   ,p_resource_type
672   ,p_role_to_play
673   ,p_usage_reason
674   ,p_rud_information_category
675   ,p_rud_information1
676   ,p_rud_information2
677   ,p_rud_information3
678   ,p_rud_information4
679   ,p_rud_information5
680   ,p_rud_information6
681   ,p_rud_information7
682   ,p_rud_information8
683   ,p_rud_information9
684   ,p_rud_information10
685   ,p_rud_information11
686   ,p_rud_information12
687   ,p_rud_information13
688   ,p_rud_information14
689   ,p_rud_information15
690   ,p_rud_information16
691   ,p_rud_information17
692   ,p_rud_information18
693   ,p_rud_information19
694   ,p_rud_information20
695   ,p_offering_id
696   );
697   --
698   -- Having converted the arguments into the
699   -- plsql record structure we call the corresponding record
700   -- business process.
701   --
702   ota_rud_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_rud_upd;