DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_ORI_UPD

Source


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