DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_INC_UPD

Source


1 Package Body per_inc_upd as
2 /* $Header: peincrhi.pkb 115.29 2003/08/31 00:49:48 kjagadee noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  per_inc_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 per_inc_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 per_work_incidents Row
69   --
70   update per_work_incidents
71     set
72      incident_id                     = p_rec.incident_id
73     ,incident_reference              = p_rec.incident_reference
74     ,incident_type                   = p_rec.incident_type
75     ,incident_date                   = p_rec.incident_date
76     ,incident_time                   = p_rec.incident_time
77     ,org_notified_date               = p_rec.org_notified_date
78     ,assignment_id                   = p_rec.assignment_id
79     ,location                        = p_rec.location
80     ,at_work_flag                    = p_rec.at_work_flag
81     ,report_date                     = p_rec.report_date
82     ,report_time                     = p_rec.report_time
83     ,report_method                   = p_rec.report_method
84     ,person_reported_by              = p_rec.person_reported_by
85     ,person_reported_to              = p_rec.person_reported_to
86     ,witness_details                 = p_rec.witness_details
87     ,description                     = p_rec.description
88     ,injury_type                     = p_rec.injury_type
89     ,disease_type                    = p_rec.disease_type
90     ,hazard_type                     = p_rec.hazard_type
91     ,body_part                       = p_rec.body_part
92     ,treatment_received_flag         = p_rec.treatment_received_flag
93     ,hospital_details                = p_rec.hospital_details
94         ,emergency_code                 = p_rec.emergency_code
95         ,hospitalized_flag              = p_rec.hospitalized_flag
96         ,hospital_address               = p_rec.hospital_address
97         ,activity_at_time_of_work       = p_rec.activity_at_time_of_work
98         ,objects_involved               = p_rec.objects_involved
99         ,privacy_issue                  = p_rec.privacy_issue
100         ,work_start_time                = p_rec.work_start_time
101         ,date_of_death                  = p_rec.date_of_death
102         ,report_completed_by            = p_rec.report_completed_by
103         ,reporting_person_title         = p_rec.reporting_person_title
104         ,reporting_person_phone         = p_rec.reporting_person_phone
105         ,days_restricted_work           = p_rec.days_restricted_work
106         ,days_away_from_work            = p_rec.days_away_from_work
107     ,doctor_name                     = p_rec.doctor_name
108     ,compensation_date               = p_rec.compensation_date
109     ,compensation_currency           = p_rec.compensation_currency
110     ,compensation_amount             = p_rec.compensation_amount
111     ,remedial_hs_action              = p_rec.remedial_hs_action
112     ,notified_hsrep_id               = p_rec.notified_hsrep_id
113     ,notified_hsrep_date             = p_rec.notified_hsrep_date
114     ,notified_rep_id                 = p_rec.notified_rep_id
115     ,notified_rep_date               = p_rec.notified_rep_date
116     ,notified_rep_org_id             = p_rec.notified_rep_org_id
117     ,related_incident_id             = p_rec.related_incident_id
118     ,over_time_flag                  = p_rec.over_time_flag
119     ,absence_exists_flag             = p_rec.absence_exists_flag
120     ,attribute_category              = p_rec.attribute_category
121     ,attribute1                      = p_rec.attribute1
122     ,attribute2                      = p_rec.attribute2
123     ,attribute3                      = p_rec.attribute3
124     ,attribute4                      = p_rec.attribute4
125     ,attribute5                      = p_rec.attribute5
126     ,attribute6                      = p_rec.attribute6
127     ,attribute7                      = p_rec.attribute7
128     ,attribute8                      = p_rec.attribute8
129     ,attribute9                      = p_rec.attribute9
130     ,attribute10                     = p_rec.attribute10
131     ,attribute11                     = p_rec.attribute11
132     ,attribute12                     = p_rec.attribute12
133     ,attribute13                     = p_rec.attribute13
134     ,attribute14                     = p_rec.attribute14
135     ,attribute15                     = p_rec.attribute15
136     ,attribute16                     = p_rec.attribute16
137     ,attribute17                     = p_rec.attribute17
138     ,attribute18                     = p_rec.attribute18
139     ,attribute19                     = p_rec.attribute19
140     ,attribute20                     = p_rec.attribute20
141     ,attribute21                     = p_rec.attribute21
142     ,attribute22                     = p_rec.attribute22
143     ,attribute23                     = p_rec.attribute23
144     ,attribute24                     = p_rec.attribute24
145     ,attribute25                     = p_rec.attribute25
146     ,attribute26                     = p_rec.attribute26
147     ,attribute27                     = p_rec.attribute27
148     ,attribute28                     = p_rec.attribute28
149     ,attribute29                     = p_rec.attribute29
150     ,attribute30                     = p_rec.attribute30
151     ,inc_information_category        = p_rec.inc_information_category
152     ,inc_information1                = p_rec.inc_information1
153     ,inc_information2                = p_rec.inc_information2
154     ,inc_information3                = p_rec.inc_information3
155     ,inc_information4                = p_rec.inc_information4
156     ,inc_information5                = p_rec.inc_information5
157     ,inc_information6                = p_rec.inc_information6
158     ,inc_information7                = p_rec.inc_information7
159     ,inc_information8                = p_rec.inc_information8
160     ,inc_information9                = p_rec.inc_information9
161     ,inc_information10               = p_rec.inc_information10
162     ,inc_information11               = p_rec.inc_information11
163     ,inc_information12               = p_rec.inc_information12
164     ,inc_information13               = p_rec.inc_information13
165     ,inc_information14               = p_rec.inc_information14
166     ,inc_information15               = p_rec.inc_information15
167     ,inc_information16               = p_rec.inc_information16
168     ,inc_information17               = p_rec.inc_information17
169     ,inc_information18               = p_rec.inc_information18
170     ,inc_information19               = p_rec.inc_information19
171     ,inc_information20               = p_rec.inc_information20
172     ,inc_information21               = p_rec.inc_information21
173     ,inc_information22               = p_rec.inc_information22
174     ,inc_information23               = p_rec.inc_information23
175     ,inc_information24               = p_rec.inc_information24
176     ,inc_information25               = p_rec.inc_information25
177     ,inc_information26               = p_rec.inc_information26
178     ,inc_information27               = p_rec.inc_information27
179     ,inc_information28               = p_rec.inc_information28
180     ,inc_information29               = p_rec.inc_information29
181     ,inc_information30               = p_rec.inc_information30
182     ,object_version_number           = p_rec.object_version_number
183     where incident_id = p_rec.incident_id;
184   --
185   --
186   --
187   hr_utility.set_location(' Leaving:'||l_proc, 10);
188 --
189 Exception
190   When hr_api.check_integrity_violated Then
191     -- A check constraint has been violated
192     --
193     per_inc_shd.constraint_error
194       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
195   When hr_api.parent_integrity_violated Then
196     -- Parent integrity has been violated
197     --
198     per_inc_shd.constraint_error
199       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
200   When hr_api.unique_integrity_violated Then
201     -- Unique integrity has been violated
202     --
203     per_inc_shd.constraint_error
204       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
205   When Others Then
206     --
207     Raise;
208 End update_dml;
209 --
210 -- ----------------------------------------------------------------------------
211 -- |------------------------------< pre_update >------------------------------|
212 -- ----------------------------------------------------------------------------
213 -- {Start Of Comments}
214 --
215 -- Description:
216 --   This private procedure contains any processing which is required before
217 --   the update dml.
218 --
219 -- Prerequisites:
220 --   This is an internal procedure which is called from the upd procedure.
221 --
222 -- In Parameters:
223 --   A Pl/Sql record structure.
224 --
225 -- Post Success:
226 --   Processing continues.
227 --
228 -- Post Failure:
229 --   If an error has occurred, an error message and exception wil be raised
230 --   but not handled.
231 --
232 -- Developer Implementation Notes:
233 --   Any pre-processing required before the update dml is issued should be
234 --   coded within this procedure. It is important to note that any 3rd party
235 --   maintenance should be reviewed before placing in this procedure.
236 --
237 -- Access Status:
238 --   Internal Row Handler Use Only.
239 --
240 -- {End Of Comments}
241 -- ----------------------------------------------------------------------------
242 Procedure pre_update
243   (p_rec in per_inc_shd.g_rec_type
244   ) is
245 --
246   l_proc  varchar2(72) := g_package||'pre_update';
247 --
248 Begin
249   hr_utility.set_location('Entering:'||l_proc, 5);
250   --
251   hr_utility.set_location(' Leaving:'||l_proc, 10);
252 End pre_update;
253 --
254 -- ----------------------------------------------------------------------------
255 -- |-----------------------------< post_update >------------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start Of Comments}
258 --
259 -- Description:
260 --   This private procedure contains any processing which is required after the
261 --   update dml.
262 --
263 -- Prerequisites:
264 --   This is an internal procedure which is called from the upd procedure.
265 --
266 -- In Parameters:
267 --   A Pl/Sql record structure.
268 --
269 -- Post Success:
270 --   Processing continues.
271 --
272 -- Post Failure:
273 --   If an error has occurred, an error message and exception will be raised
274 --   but not handled.
275 --
276 -- Developer Implementation Notes:
277 --   Any post-processing required after the update dml is issued should be
278 --   coded within this procedure. It is important to note that any 3rd party
279 --   maintenance should be reviewed before placing in this procedure.
280 --
281 -- Access Status:
282 --   Internal Row Handler Use Only.
283 --
284 -- {End Of Comments}
285 -- ----------------------------------------------------------------------------
286 Procedure post_update
287   (p_effective_date               in date
288   ,p_rec                          in per_inc_shd.g_rec_type
289   ) is
290 --
291   l_proc  varchar2(72) := g_package||'post_update';
292 --
293 Begin
294   hr_utility.set_location('Entering:'||l_proc, 5);
295   begin
296     --
297     per_inc_rku.after_update
298       (p_effective_date              => p_effective_date
299       ,p_incident_id
300       => p_rec.incident_id
301       ,p_incident_reference
302       => p_rec.incident_reference
303       ,p_incident_type
304       => p_rec.incident_type
305       ,p_incident_date
306       => p_rec.incident_date
307       ,p_incident_time
308       => p_rec.incident_time
309       ,p_org_notified_date
310       => p_rec.org_notified_date
311       ,p_assignment_id
312       => p_rec.assignment_id
313       ,p_location
314       => p_rec.location
315       ,p_at_work_flag
316       => p_rec.at_work_flag
317       ,p_report_date
318       => p_rec.report_date
319       ,p_report_time
320       => p_rec.report_time
321       ,p_report_method
322       => p_rec.report_method
323       ,p_person_reported_by
324       => p_rec.person_reported_by
325       ,p_person_reported_to
326       => p_rec.person_reported_to
327       ,p_witness_details
328       => p_rec.witness_details
329       ,p_description
330       => p_rec.description
331       ,p_injury_type
332       => p_rec.injury_type
333       ,p_disease_type
334       => p_rec.disease_type
335       ,p_hazard_type
336       => p_rec.hazard_type
337       ,p_body_part
338       => p_rec.body_part
339       ,p_treatment_received_flag
340       => p_rec.treatment_received_flag
341       ,p_hospital_details
342       => p_rec.hospital_details
343   ,p_emergency_code                 => p_rec.emergency_code
344   ,p_hospitalized_flag              => p_rec.hospitalized_flag
345   ,p_hospital_address               => p_rec.hospital_address
346   ,p_activity_at_time_of_work       => p_rec.activity_at_time_of_work
347   ,p_objects_involved               => p_rec.objects_involved
348   ,p_privacy_issue                  => p_rec.privacy_issue
349   ,p_work_start_time                => p_rec.work_start_time
350   ,p_date_of_death                  => p_rec.date_of_death
351   ,p_report_completed_by            => p_rec.report_completed_by
352   ,p_reporting_person_title         => p_rec.reporting_person_title
353   ,p_reporting_person_phone         => p_rec.reporting_person_phone
354   ,p_days_restricted_work           => p_rec.days_restricted_work
355   ,p_days_away_from_work            => p_rec.days_away_from_work
356       ,p_doctor_name
357       => p_rec.doctor_name
358       ,p_compensation_date
359       => p_rec.compensation_date
360       ,p_compensation_currency
361       => p_rec.compensation_currency
362       ,p_compensation_amount
363       => p_rec.compensation_amount
364       ,p_remedial_hs_action
365       => p_rec.remedial_hs_action
366       ,p_notified_hsrep_id
367       => p_rec.notified_hsrep_id
368       ,p_notified_hsrep_date
369       => p_rec.notified_hsrep_date
370       ,p_notified_rep_id
371       => p_rec.notified_rep_id
372       ,p_notified_rep_date
373       => p_rec.notified_rep_date
374       ,p_notified_rep_org_id
375       => p_rec.notified_rep_org_id
376       ,p_related_incident_id
377       => p_rec.related_incident_id
378       ,p_over_time_flag
379       => p_rec.over_time_flag
380       ,p_absence_exists_flag
381       => p_rec.absence_exists_flag
382       ,p_attribute_category
383       => p_rec.attribute_category
384       ,p_attribute1
385       => p_rec.attribute1
386       ,p_attribute2
387       => p_rec.attribute2
388       ,p_attribute3
389       => p_rec.attribute3
390       ,p_attribute4
391       => p_rec.attribute4
392       ,p_attribute5
393       => p_rec.attribute5
394       ,p_attribute6
395       => p_rec.attribute6
396       ,p_attribute7
397       => p_rec.attribute7
398       ,p_attribute8
399       => p_rec.attribute8
400       ,p_attribute9
401       => p_rec.attribute9
402       ,p_attribute10
403       => p_rec.attribute10
404       ,p_attribute11
405       => p_rec.attribute11
406       ,p_attribute12
407       => p_rec.attribute12
408       ,p_attribute13
409       => p_rec.attribute13
410       ,p_attribute14
411       => p_rec.attribute14
412       ,p_attribute15
413       => p_rec.attribute15
414       ,p_attribute16
415       => p_rec.attribute16
416       ,p_attribute17
417       => p_rec.attribute17
418       ,p_attribute18
419       => p_rec.attribute18
420       ,p_attribute19
421       => p_rec.attribute19
422       ,p_attribute20
423       => p_rec.attribute20
424       ,p_attribute21
425       => p_rec.attribute21
426       ,p_attribute22
427       => p_rec.attribute22
428       ,p_attribute23
429       => p_rec.attribute23
430       ,p_attribute24
431       => p_rec.attribute24
432       ,p_attribute25
433       => p_rec.attribute25
434       ,p_attribute26
435       => p_rec.attribute26
436       ,p_attribute27
437       => p_rec.attribute27
438       ,p_attribute28
439       => p_rec.attribute28
440       ,p_attribute29
441       => p_rec.attribute29
442       ,p_attribute30
443       => p_rec.attribute30
444       ,p_inc_information_category
445       => p_rec.inc_information_category
446       ,p_inc_information1
447       => p_rec.inc_information1
448       ,p_inc_information2
449       => p_rec.inc_information2
450       ,p_inc_information3
451       => p_rec.inc_information3
452       ,p_inc_information4
453       => p_rec.inc_information4
454       ,p_inc_information5
455       => p_rec.inc_information5
456       ,p_inc_information6
457       => p_rec.inc_information6
458       ,p_inc_information7
459       => p_rec.inc_information7
460       ,p_inc_information8
461       => p_rec.inc_information8
462       ,p_inc_information9
463       => p_rec.inc_information9
464       ,p_inc_information10
465       => p_rec.inc_information10
466       ,p_inc_information11
467       => p_rec.inc_information11
468       ,p_inc_information12
469       => p_rec.inc_information12
470       ,p_inc_information13
471       => p_rec.inc_information13
472       ,p_inc_information14
473       => p_rec.inc_information14
474       ,p_inc_information15
475       => p_rec.inc_information15
476       ,p_inc_information16
477       => p_rec.inc_information16
478       ,p_inc_information17
479       => p_rec.inc_information17
480       ,p_inc_information18
481       => p_rec.inc_information18
482       ,p_inc_information19
483       => p_rec.inc_information19
484       ,p_inc_information20
485       => p_rec.inc_information20
486       ,p_inc_information21
487       => p_rec.inc_information21
488       ,p_inc_information22
489       => p_rec.inc_information22
490       ,p_inc_information23
491       => p_rec.inc_information23
492       ,p_inc_information24
493       => p_rec.inc_information24
494       ,p_inc_information25
495       => p_rec.inc_information25
496       ,p_inc_information26
497       => p_rec.inc_information26
498       ,p_inc_information27
499       => p_rec.inc_information27
500       ,p_inc_information28
501       => p_rec.inc_information28
502       ,p_inc_information29
503       => p_rec.inc_information29
504       ,p_inc_information30
505       => p_rec.inc_information30
506       ,p_object_version_number
507       => p_rec.object_version_number
508       ,p_person_id_o
509       => per_inc_shd.g_old_rec.person_id
510       ,p_incident_reference_o
511       => per_inc_shd.g_old_rec.incident_reference
512       ,p_incident_type_o
513       => per_inc_shd.g_old_rec.incident_type
514       ,p_incident_date_o
515       => per_inc_shd.g_old_rec.incident_date
516       ,p_incident_time_o
517       => per_inc_shd.g_old_rec.incident_time
518       ,p_org_notified_date_o
519       => per_inc_shd.g_old_rec.org_notified_date
520       ,p_assignment_id_o
521       => per_inc_shd.g_old_rec.assignment_id
522       ,p_location_o
523       => per_inc_shd.g_old_rec.location
524       ,p_at_work_flag_o
525       => per_inc_shd.g_old_rec.at_work_flag
526       ,p_report_date_o
527       => per_inc_shd.g_old_rec.report_date
528       ,p_report_time_o
529       => per_inc_shd.g_old_rec.report_time
530       ,p_report_method_o
531       => per_inc_shd.g_old_rec.report_method
532       ,p_person_reported_by_o
533       => per_inc_shd.g_old_rec.person_reported_by
534       ,p_person_reported_to_o
535       => per_inc_shd.g_old_rec.person_reported_to
536       ,p_witness_details_o
537       => per_inc_shd.g_old_rec.witness_details
538       ,p_description_o
539       => per_inc_shd.g_old_rec.description
540       ,p_injury_type_o
541       => per_inc_shd.g_old_rec.injury_type
542       ,p_disease_type_o
543       => per_inc_shd.g_old_rec.disease_type
544       ,p_hazard_type_o
545       => per_inc_shd.g_old_rec.hazard_type
546       ,p_body_part_o
547       => per_inc_shd.g_old_rec.body_part
548       ,p_treatment_received_flag_o
549       => per_inc_shd.g_old_rec.treatment_received_flag
550       ,p_hospital_details_o
551       => per_inc_shd.g_old_rec.hospital_details
552   ,p_emergency_code_o           => per_inc_shd.g_old_rec.emergency_code
553   ,p_hospitalized_flag_o        => per_inc_shd.g_old_rec.hospitalized_flag
554   ,p_hospital_address_o         => per_inc_shd.g_old_rec.hospital_address
555   ,p_activity_at_time_of_work_o => per_inc_shd.g_old_rec.activity_at_time_of_work
556   ,p_objects_involved_o         => per_inc_shd.g_old_rec.objects_involved
557   ,p_privacy_issue_o            => per_inc_shd.g_old_rec.privacy_issue
558   ,p_work_start_time_o          => per_inc_shd.g_old_rec.work_start_time
559   ,p_date_of_death_o            => per_inc_shd.g_old_rec.date_of_death
560   ,p_report_completed_by_o      => per_inc_shd.g_old_rec.report_completed_by
561   ,p_reporting_person_title_o   => per_inc_shd.g_old_rec.reporting_person_title
562   ,p_reporting_person_phone_o   => per_inc_shd.g_old_rec.reporting_person_phone
563   ,p_days_restricted_work_o     => per_inc_shd.g_old_rec.days_restricted_work
564   ,p_days_away_from_work_o      => per_inc_shd.g_old_rec.days_away_from_work
565       ,p_doctor_name_o
566       => per_inc_shd.g_old_rec.doctor_name
567       ,p_compensation_date_o
568       => per_inc_shd.g_old_rec.compensation_date
569       ,p_compensation_currency_o
570       => per_inc_shd.g_old_rec.compensation_currency
571       ,p_compensation_amount_o
572       => per_inc_shd.g_old_rec.compensation_amount
573       ,p_remedial_hs_action_o
574       => per_inc_shd.g_old_rec.remedial_hs_action
575       ,p_notified_hsrep_id_o
576       => per_inc_shd.g_old_rec.notified_hsrep_id
577       ,p_notified_hsrep_date_o
578       => per_inc_shd.g_old_rec.notified_hsrep_date
579       ,p_notified_rep_id_o
580       => per_inc_shd.g_old_rec.notified_rep_id
581       ,p_notified_rep_date_o
582       => per_inc_shd.g_old_rec.notified_rep_date
583       ,p_notified_rep_org_id_o
584       => per_inc_shd.g_old_rec.notified_rep_org_id
585       ,p_related_incident_id_o
586       => per_inc_shd.g_old_rec.related_incident_id
587       ,p_over_time_flag_o
588       => per_inc_shd.g_old_rec.over_time_flag
589       ,p_absence_exists_flag_o
590       => per_inc_shd.g_old_rec.absence_exists_flag
591       ,p_attribute_category_o
592       => per_inc_shd.g_old_rec.attribute_category
593       ,p_attribute1_o
594       => per_inc_shd.g_old_rec.attribute1
595       ,p_attribute2_o
596       => per_inc_shd.g_old_rec.attribute2
597       ,p_attribute3_o
598       => per_inc_shd.g_old_rec.attribute3
599       ,p_attribute4_o
600       => per_inc_shd.g_old_rec.attribute4
601       ,p_attribute5_o
602       => per_inc_shd.g_old_rec.attribute5
603       ,p_attribute6_o
604       => per_inc_shd.g_old_rec.attribute6
605       ,p_attribute7_o
606       => per_inc_shd.g_old_rec.attribute7
607       ,p_attribute8_o
608       => per_inc_shd.g_old_rec.attribute8
609       ,p_attribute9_o
610       => per_inc_shd.g_old_rec.attribute9
611       ,p_attribute10_o
612       => per_inc_shd.g_old_rec.attribute10
613       ,p_attribute11_o
614       => per_inc_shd.g_old_rec.attribute11
615       ,p_attribute12_o
616       => per_inc_shd.g_old_rec.attribute12
617       ,p_attribute13_o
618       => per_inc_shd.g_old_rec.attribute13
619       ,p_attribute14_o
620       => per_inc_shd.g_old_rec.attribute14
621       ,p_attribute15_o
622       => per_inc_shd.g_old_rec.attribute15
623       ,p_attribute16_o
624       => per_inc_shd.g_old_rec.attribute16
625       ,p_attribute17_o
626       => per_inc_shd.g_old_rec.attribute17
627       ,p_attribute18_o
628       => per_inc_shd.g_old_rec.attribute18
629       ,p_attribute19_o
630       => per_inc_shd.g_old_rec.attribute19
631       ,p_attribute20_o
632       => per_inc_shd.g_old_rec.attribute20
633       ,p_attribute21_o
634       => per_inc_shd.g_old_rec.attribute21
635       ,p_attribute22_o
636       => per_inc_shd.g_old_rec.attribute22
637       ,p_attribute23_o
638       => per_inc_shd.g_old_rec.attribute23
639       ,p_attribute24_o
640       => per_inc_shd.g_old_rec.attribute24
641       ,p_attribute25_o
642       => per_inc_shd.g_old_rec.attribute25
643       ,p_attribute26_o
644       => per_inc_shd.g_old_rec.attribute26
645       ,p_attribute27_o
646       => per_inc_shd.g_old_rec.attribute27
647       ,p_attribute28_o
648       => per_inc_shd.g_old_rec.attribute28
649       ,p_attribute29_o
650       => per_inc_shd.g_old_rec.attribute29
651       ,p_attribute30_o
652       => per_inc_shd.g_old_rec.attribute30
653       ,p_inc_information_category_o
654       => per_inc_shd.g_old_rec.inc_information_category
655       ,p_inc_information1_o
656       => per_inc_shd.g_old_rec.inc_information1
657       ,p_inc_information2_o
658       => per_inc_shd.g_old_rec.inc_information2
659       ,p_inc_information3_o
660       => per_inc_shd.g_old_rec.inc_information3
661       ,p_inc_information4_o
662       => per_inc_shd.g_old_rec.inc_information4
663       ,p_inc_information5_o
664       => per_inc_shd.g_old_rec.inc_information5
665       ,p_inc_information6_o
666       => per_inc_shd.g_old_rec.inc_information6
667       ,p_inc_information7_o
668       => per_inc_shd.g_old_rec.inc_information7
669       ,p_inc_information8_o
670       => per_inc_shd.g_old_rec.inc_information8
671       ,p_inc_information9_o
672       => per_inc_shd.g_old_rec.inc_information9
673       ,p_inc_information10_o
674       => per_inc_shd.g_old_rec.inc_information10
675       ,p_inc_information11_o
676       => per_inc_shd.g_old_rec.inc_information11
677       ,p_inc_information12_o
678       => per_inc_shd.g_old_rec.inc_information12
679       ,p_inc_information13_o
680       => per_inc_shd.g_old_rec.inc_information13
681       ,p_inc_information14_o
682       => per_inc_shd.g_old_rec.inc_information14
683       ,p_inc_information15_o
684       => per_inc_shd.g_old_rec.inc_information15
685       ,p_inc_information16_o
686       => per_inc_shd.g_old_rec.inc_information16
687       ,p_inc_information17_o
688       => per_inc_shd.g_old_rec.inc_information17
689       ,p_inc_information18_o
690       => per_inc_shd.g_old_rec.inc_information18
691       ,p_inc_information19_o
692       => per_inc_shd.g_old_rec.inc_information19
693       ,p_inc_information20_o
694       => per_inc_shd.g_old_rec.inc_information20
695       ,p_inc_information21_o
696       => per_inc_shd.g_old_rec.inc_information21
697       ,p_inc_information22_o
698       => per_inc_shd.g_old_rec.inc_information22
699       ,p_inc_information23_o
700       => per_inc_shd.g_old_rec.inc_information23
701       ,p_inc_information24_o
702       => per_inc_shd.g_old_rec.inc_information24
703       ,p_inc_information25_o
704       => per_inc_shd.g_old_rec.inc_information25
705       ,p_inc_information26_o
706       => per_inc_shd.g_old_rec.inc_information26
707       ,p_inc_information27_o
708       => per_inc_shd.g_old_rec.inc_information27
709       ,p_inc_information28_o
710       => per_inc_shd.g_old_rec.inc_information28
711       ,p_inc_information29_o
712       => per_inc_shd.g_old_rec.inc_information29
713       ,p_inc_information30_o
714       => per_inc_shd.g_old_rec.inc_information30
715       ,p_object_version_number_o
716       => per_inc_shd.g_old_rec.object_version_number
717       );
718     --
719   exception
720     --
721     when hr_api.cannot_find_prog_unit then
722       --
723       hr_api.cannot_find_prog_unit_error
724         (p_module_name => 'PER_WORK_INCIDENTS'
725         ,p_hook_type   => 'AU');
726       --
727   end;
728   --
729   hr_utility.set_location(' Leaving:'||l_proc, 10);
730 End post_update;
731 --
732 -- ----------------------------------------------------------------------------
733 -- |-----------------------------< convert_defs >-----------------------------|
734 -- ----------------------------------------------------------------------------
735 -- {Start Of Comments}
736 --
737 -- Description:
738 --   The Convert_Defs procedure has one very important function:
739 --   It must return the record structure for the row with all system defaulted
740 --   values converted into its corresponding parameter value for update. When
741 --   we attempt to update a row through the Upd process , certain
742 --   parameters can be defaulted which enables flexibility in the calling of
743 --   the upd process (e.g. only attributes which need to be updated need to be
744 --   specified). For the upd process to determine which attributes
745 --   have NOT been specified we need to check if the parameter has a reserved
746 --   system default value. Therefore, for all parameters which have a
747 --   corresponding reserved system default mechanism specified we need to
748 --   check if a system default is being used. If a system default is being
749 --   used then we convert the defaulted value into its corresponding attribute
750 --   value held in the g_old_rec data structure.
751 --
752 -- Prerequisites:
753 --   This private function can only be called from the upd process.
754 --
755 -- In Parameters:
756 --   A Pl/Sql record structure.
757 --
758 -- Post Success:
759 --   The record structure will be returned with all system defaulted parameter
760 --   values converted into its current row attribute value.
761 --
762 -- Post Failure:
763 --   No direct error handling is required within this function. Any possible
764 --   errors within this procedure will be a PL/SQL value error due to
765 --   conversion of datatypes or data lengths.
766 --
767 -- Developer Implementation Notes:
768 --   None.
769 --
770 -- Access Status:
771 --   Internal Row Handler Use Only.
772 --
773 -- {End Of Comments}
774 -- ----------------------------------------------------------------------------
775 Procedure convert_defs
776   (p_rec in out nocopy per_inc_shd.g_rec_type
777   ) is
778 --
779 Begin
780   --
781   -- We must now examine each argument value in the
782   -- p_rec plsql record structure
783   -- to see if a system default is being used. If a system default
784   -- is being used then we must set to the 'current' argument value.
785   --
786   If (p_rec.person_id = hr_api.g_number) then
787     p_rec.person_id :=
788     per_inc_shd.g_old_rec.person_id;
789   End If;
790   If (p_rec.incident_reference = hr_api.g_varchar2) then
791     p_rec.incident_reference :=
792     per_inc_shd.g_old_rec.incident_reference;
793   End If;
794   If (p_rec.incident_type = hr_api.g_varchar2) then
795     p_rec.incident_type :=
796     per_inc_shd.g_old_rec.incident_type;
797   End If;
798   If (p_rec.incident_date = hr_api.g_date) then
799     p_rec.incident_date :=
800     per_inc_shd.g_old_rec.incident_date;
801   End If;
802   If (p_rec.incident_time = hr_api.g_varchar2) then
803     p_rec.incident_time :=
804     per_inc_shd.g_old_rec.incident_time;
805   End If;
806   If (p_rec.org_notified_date = hr_api.g_date) then
807     p_rec.org_notified_date :=
808     per_inc_shd.g_old_rec.org_notified_date;
809   End If;
810   If (p_rec.assignment_id = hr_api.g_number) then
811     p_rec.assignment_id :=
812     per_inc_shd.g_old_rec.assignment_id;
813   End If;
814   If (p_rec.location = hr_api.g_varchar2) then
815     p_rec.location :=
816     per_inc_shd.g_old_rec.location;
817   End If;
818   If (p_rec.at_work_flag = hr_api.g_varchar2) then
819     p_rec.at_work_flag :=
820     per_inc_shd.g_old_rec.at_work_flag;
821   End If;
822   If (p_rec.report_date = hr_api.g_date) then
823     p_rec.report_date :=
824     per_inc_shd.g_old_rec.report_date;
825   End If;
826   If (p_rec.report_time = hr_api.g_varchar2) then
827     p_rec.report_time :=
828     per_inc_shd.g_old_rec.report_time;
829   End If;
830   If (p_rec.report_method = hr_api.g_varchar2) then
831     p_rec.report_method :=
832     per_inc_shd.g_old_rec.report_method;
833   End If;
834   If (p_rec.person_reported_by = hr_api.g_number) then
835     p_rec.person_reported_by :=
836     per_inc_shd.g_old_rec.person_reported_by;
837   End If;
838   If (p_rec.person_reported_to = hr_api.g_varchar2) then
839     p_rec.person_reported_to :=
840     per_inc_shd.g_old_rec.person_reported_to;
841   End If;
842   If (p_rec.witness_details = hr_api.g_varchar2) then
843     p_rec.witness_details :=
844     per_inc_shd.g_old_rec.witness_details;
845   End If;
846   If (p_rec.description = hr_api.g_varchar2) then
847     p_rec.description :=
848     per_inc_shd.g_old_rec.description;
849   End If;
850   If (p_rec.injury_type = hr_api.g_varchar2) then
851     p_rec.injury_type :=
852     per_inc_shd.g_old_rec.injury_type;
853   End If;
854   If (p_rec.disease_type = hr_api.g_varchar2) then
855     p_rec.disease_type :=
856     per_inc_shd.g_old_rec.disease_type;
857   End If;
858   If (p_rec.hazard_type = hr_api.g_varchar2) then
859     p_rec.hazard_type :=
860     per_inc_shd.g_old_rec.hazard_type;
861   End If;
862   If (p_rec.body_part = hr_api.g_varchar2) then
863     p_rec.body_part :=
864     per_inc_shd.g_old_rec.body_part;
865   End If;
866   If (p_rec.treatment_received_flag = hr_api.g_varchar2) then
867     p_rec.treatment_received_flag :=
868     per_inc_shd.g_old_rec.treatment_received_flag;
869   End If;
870   If (p_rec.hospital_details = hr_api.g_varchar2) then
871     p_rec.hospital_details :=
872     per_inc_shd.g_old_rec.hospital_details;
873   End If;
874 --
875 --
876   --
877   --
878   If (p_rec.emergency_code = hr_api.g_varchar2) then
879     p_rec.emergency_code :=
880     per_inc_shd.g_old_rec.emergency_code;
881   End If;
882   If (p_rec.hospitalized_flag = hr_api.g_varchar2) then
883     p_rec.hospitalized_flag :=
884     per_inc_shd.g_old_rec.hospitalized_flag;
885   End If;
886   If (p_rec.hospital_address = hr_api.g_varchar2) then
887     p_rec.hospital_address :=
888     per_inc_shd.g_old_rec.hospital_address;
889   End If;
890   If (p_rec.activity_at_time_of_work = hr_api.g_varchar2) then
891     p_rec.activity_at_time_of_work :=
892     per_inc_shd.g_old_rec.activity_at_time_of_work;
893   End If;
894   If (p_rec.objects_involved = hr_api.g_varchar2) then
895     p_rec.objects_involved :=
896     per_inc_shd.g_old_rec.objects_involved;
897   End If;
898   If (p_rec.privacy_issue = hr_api.g_varchar2) then
899     p_rec.privacy_issue :=
900     per_inc_shd.g_old_rec.privacy_issue;
901   End If;
902   If (p_rec.work_start_time = hr_api.g_varchar2) then
903     p_rec.work_start_time :=
904     per_inc_shd.g_old_rec.work_start_time;
905   End If;
906   If (p_rec.date_of_death = hr_api.g_date) then
907     p_rec.date_of_death :=
908     per_inc_shd.g_old_rec.date_of_death;
909   End If;
910   If (p_rec.report_completed_by = hr_api.g_varchar2) then
911     p_rec.report_completed_by :=
912     per_inc_shd.g_old_rec.report_completed_by;
913   End If;
914   If (p_rec.reporting_person_title = hr_api.g_varchar2) then
915     p_rec.reporting_person_title :=
916     per_inc_shd.g_old_rec.reporting_person_title;
917   End If;
918   If (p_rec.reporting_person_phone = hr_api.g_varchar2) then
919     p_rec.reporting_person_phone :=
920     per_inc_shd.g_old_rec.reporting_person_phone;
921   End If;
922   If (p_rec.days_restricted_work = hr_api.g_number) then
923     p_rec.days_restricted_work :=
924     per_inc_shd.g_old_rec.days_restricted_work;
925   End If;
926   If (p_rec.days_away_from_work = hr_api.g_number) then
927     p_rec.days_away_from_work :=
928     per_inc_shd.g_old_rec.days_away_from_work;
929   End If;
930   --
931   --
932 --
933 --
934 
935   If (p_rec.doctor_name = hr_api.g_varchar2) then
936     p_rec.doctor_name :=
937     per_inc_shd.g_old_rec.doctor_name;
938   End If;
939   If (p_rec.compensation_date = hr_api.g_date) then
940     p_rec.compensation_date :=
941     per_inc_shd.g_old_rec.compensation_date;
942   End If;
943   If (p_rec.compensation_currency = hr_api.g_varchar2) then
944     p_rec.compensation_currency :=
945     per_inc_shd.g_old_rec.compensation_currency;
946   End If;
947   If (p_rec.compensation_amount = hr_api.g_number) then
948     p_rec.compensation_amount :=
949     per_inc_shd.g_old_rec.compensation_amount;
950   End If;
951   If (p_rec.remedial_hs_action = hr_api.g_varchar2) then
952     p_rec.remedial_hs_action :=
953     per_inc_shd.g_old_rec.remedial_hs_action;
954   End If;
955   If (p_rec.notified_hsrep_id = hr_api.g_number) then
956     p_rec.notified_hsrep_id :=
957     per_inc_shd.g_old_rec.notified_hsrep_id;
958   End If;
959   If (p_rec.notified_hsrep_date = hr_api.g_date) then
960     p_rec.notified_hsrep_date :=
961     per_inc_shd.g_old_rec.notified_hsrep_date;
962   End If;
963   If (p_rec.notified_rep_id = hr_api.g_number) then
964     p_rec.notified_rep_id :=
965     per_inc_shd.g_old_rec.notified_rep_id;
966   End If;
967   If (p_rec.notified_rep_date = hr_api.g_date) then
968     p_rec.notified_rep_date :=
969     per_inc_shd.g_old_rec.notified_rep_date;
970   End If;
971   If (p_rec.notified_rep_org_id = hr_api.g_number) then
972     p_rec.notified_rep_org_id :=
973     per_inc_shd.g_old_rec.notified_rep_org_id;
974   End If;
975   If (p_rec.related_incident_id = hr_api.g_number) then
976     p_rec.related_incident_id :=
977     per_inc_shd.g_old_rec.related_incident_id;
978   End If;
979   If (p_rec.over_time_flag = hr_api.g_varchar2) then
980     p_rec.over_time_flag :=
981     per_inc_shd.g_old_rec.over_time_flag;
982   End If;
983   If (p_rec.absence_exists_flag = hr_api.g_varchar2) then
984     p_rec.absence_exists_flag :=
985     per_inc_shd.g_old_rec.absence_exists_flag;
986   End If;
987   If (p_rec.attribute_category = hr_api.g_varchar2) then
988     p_rec.attribute_category :=
989     per_inc_shd.g_old_rec.attribute_category;
990   End If;
991   If (p_rec.attribute1 = hr_api.g_varchar2) then
992     p_rec.attribute1 :=
993     per_inc_shd.g_old_rec.attribute1;
994   End If;
995   If (p_rec.attribute2 = hr_api.g_varchar2) then
996     p_rec.attribute2 :=
997     per_inc_shd.g_old_rec.attribute2;
998   End If;
999   If (p_rec.attribute3 = hr_api.g_varchar2) then
1000     p_rec.attribute3 :=
1001     per_inc_shd.g_old_rec.attribute3;
1002   End If;
1003   If (p_rec.attribute4 = hr_api.g_varchar2) then
1004     p_rec.attribute4 :=
1005     per_inc_shd.g_old_rec.attribute4;
1006   End If;
1007   If (p_rec.attribute5 = hr_api.g_varchar2) then
1008     p_rec.attribute5 :=
1009     per_inc_shd.g_old_rec.attribute5;
1010   End If;
1011   If (p_rec.attribute6 = hr_api.g_varchar2) then
1012     p_rec.attribute6 :=
1013     per_inc_shd.g_old_rec.attribute6;
1014   End If;
1015   If (p_rec.attribute7 = hr_api.g_varchar2) then
1016     p_rec.attribute7 :=
1017     per_inc_shd.g_old_rec.attribute7;
1018   End If;
1019   If (p_rec.attribute8 = hr_api.g_varchar2) then
1020     p_rec.attribute8 :=
1021     per_inc_shd.g_old_rec.attribute8;
1022   End If;
1023   If (p_rec.attribute9 = hr_api.g_varchar2) then
1024     p_rec.attribute9 :=
1025     per_inc_shd.g_old_rec.attribute9;
1026   End If;
1027   If (p_rec.attribute10 = hr_api.g_varchar2) then
1028     p_rec.attribute10 :=
1029     per_inc_shd.g_old_rec.attribute10;
1030   End If;
1031   If (p_rec.attribute11 = hr_api.g_varchar2) then
1032     p_rec.attribute11 :=
1033     per_inc_shd.g_old_rec.attribute11;
1034   End If;
1035   If (p_rec.attribute12 = hr_api.g_varchar2) then
1036     p_rec.attribute12 :=
1037     per_inc_shd.g_old_rec.attribute12;
1038   End If;
1039   If (p_rec.attribute13 = hr_api.g_varchar2) then
1040     p_rec.attribute13 :=
1041     per_inc_shd.g_old_rec.attribute13;
1042   End If;
1043   If (p_rec.attribute14 = hr_api.g_varchar2) then
1044     p_rec.attribute14 :=
1045     per_inc_shd.g_old_rec.attribute14;
1046   End If;
1047   If (p_rec.attribute15 = hr_api.g_varchar2) then
1048     p_rec.attribute15 :=
1049     per_inc_shd.g_old_rec.attribute15;
1050   End If;
1051   If (p_rec.attribute16 = hr_api.g_varchar2) then
1052     p_rec.attribute16 :=
1053     per_inc_shd.g_old_rec.attribute16;
1054   End If;
1055   If (p_rec.attribute17 = hr_api.g_varchar2) then
1056     p_rec.attribute17 :=
1057     per_inc_shd.g_old_rec.attribute17;
1058   End If;
1059   If (p_rec.attribute18 = hr_api.g_varchar2) then
1060     p_rec.attribute18 :=
1061     per_inc_shd.g_old_rec.attribute18;
1062   End If;
1063   If (p_rec.attribute19 = hr_api.g_varchar2) then
1064     p_rec.attribute19 :=
1065     per_inc_shd.g_old_rec.attribute19;
1066   End If;
1067   If (p_rec.attribute20 = hr_api.g_varchar2) then
1068     p_rec.attribute20 :=
1069     per_inc_shd.g_old_rec.attribute20;
1070   End If;
1071   If (p_rec.attribute21 = hr_api.g_varchar2) then
1072     p_rec.attribute21 :=
1073     per_inc_shd.g_old_rec.attribute21;
1074   End If;
1075   If (p_rec.attribute22 = hr_api.g_varchar2) then
1076     p_rec.attribute22 :=
1077     per_inc_shd.g_old_rec.attribute22;
1078   End If;
1079   If (p_rec.attribute23 = hr_api.g_varchar2) then
1080     p_rec.attribute23 :=
1081     per_inc_shd.g_old_rec.attribute23;
1082   End If;
1083   If (p_rec.attribute24 = hr_api.g_varchar2) then
1084     p_rec.attribute24 :=
1085     per_inc_shd.g_old_rec.attribute24;
1086   End If;
1087   If (p_rec.attribute25 = hr_api.g_varchar2) then
1088     p_rec.attribute25 :=
1089     per_inc_shd.g_old_rec.attribute25;
1090   End If;
1091   If (p_rec.attribute26 = hr_api.g_varchar2) then
1092     p_rec.attribute26 :=
1093     per_inc_shd.g_old_rec.attribute26;
1094   End If;
1095   If (p_rec.attribute27 = hr_api.g_varchar2) then
1096     p_rec.attribute27 :=
1097     per_inc_shd.g_old_rec.attribute27;
1098   End If;
1099   If (p_rec.attribute28 = hr_api.g_varchar2) then
1100     p_rec.attribute28 :=
1101     per_inc_shd.g_old_rec.attribute28;
1102   End If;
1103   If (p_rec.attribute29 = hr_api.g_varchar2) then
1104     p_rec.attribute29 :=
1105     per_inc_shd.g_old_rec.attribute29;
1106   End If;
1107   If (p_rec.attribute30 = hr_api.g_varchar2) then
1108     p_rec.attribute30 :=
1109     per_inc_shd.g_old_rec.attribute30;
1110   End If;
1111   If (p_rec.inc_information_category = hr_api.g_varchar2) then
1112     p_rec.inc_information_category :=
1113     per_inc_shd.g_old_rec.inc_information_category;
1114   End If;
1115   If (p_rec.inc_information1 = hr_api.g_varchar2) then
1116     p_rec.inc_information1 :=
1117     per_inc_shd.g_old_rec.inc_information1;
1118   End If;
1119   If (p_rec.inc_information2 = hr_api.g_varchar2) then
1120     p_rec.inc_information2 :=
1121     per_inc_shd.g_old_rec.inc_information2;
1122   End If;
1123   If (p_rec.inc_information3 = hr_api.g_varchar2) then
1124     p_rec.inc_information3 :=
1125     per_inc_shd.g_old_rec.inc_information3;
1126   End If;
1127   If (p_rec.inc_information4 = hr_api.g_varchar2) then
1128     p_rec.inc_information4 :=
1129     per_inc_shd.g_old_rec.inc_information4;
1130   End If;
1131   If (p_rec.inc_information5 = hr_api.g_varchar2) then
1132     p_rec.inc_information5 :=
1133     per_inc_shd.g_old_rec.inc_information5;
1134   End If;
1135   If (p_rec.inc_information6 = hr_api.g_varchar2) then
1136     p_rec.inc_information6 :=
1137     per_inc_shd.g_old_rec.inc_information6;
1138   End If;
1139   If (p_rec.inc_information7 = hr_api.g_varchar2) then
1140     p_rec.inc_information7 :=
1141     per_inc_shd.g_old_rec.inc_information7;
1142   End If;
1143   If (p_rec.inc_information8 = hr_api.g_varchar2) then
1144     p_rec.inc_information8 :=
1145     per_inc_shd.g_old_rec.inc_information8;
1146   End If;
1147   If (p_rec.inc_information9 = hr_api.g_varchar2) then
1148     p_rec.inc_information9 :=
1149     per_inc_shd.g_old_rec.inc_information9;
1150   End If;
1151   If (p_rec.inc_information10 = hr_api.g_varchar2) then
1152     p_rec.inc_information10 :=
1153     per_inc_shd.g_old_rec.inc_information10;
1154   End If;
1155   If (p_rec.inc_information11 = hr_api.g_varchar2) then
1156     p_rec.inc_information11 :=
1157     per_inc_shd.g_old_rec.inc_information11;
1158   End If;
1159   If (p_rec.inc_information12 = hr_api.g_varchar2) then
1160     p_rec.inc_information12 :=
1161     per_inc_shd.g_old_rec.inc_information12;
1162   End If;
1163   If (p_rec.inc_information13 = hr_api.g_varchar2) then
1164     p_rec.inc_information13 :=
1165     per_inc_shd.g_old_rec.inc_information13;
1166   End If;
1167   If (p_rec.inc_information14 = hr_api.g_varchar2) then
1168     p_rec.inc_information14 :=
1169     per_inc_shd.g_old_rec.inc_information14;
1170   End If;
1171   If (p_rec.inc_information15 = hr_api.g_varchar2) then
1172     p_rec.inc_information15 :=
1173     per_inc_shd.g_old_rec.inc_information15;
1174   End If;
1175   If (p_rec.inc_information16 = hr_api.g_varchar2) then
1176     p_rec.inc_information16 :=
1177     per_inc_shd.g_old_rec.inc_information16;
1178   End If;
1179   If (p_rec.inc_information17 = hr_api.g_varchar2) then
1180     p_rec.inc_information17 :=
1181     per_inc_shd.g_old_rec.inc_information17;
1182   End If;
1183   If (p_rec.inc_information18 = hr_api.g_varchar2) then
1184     p_rec.inc_information18 :=
1185     per_inc_shd.g_old_rec.inc_information18;
1186   End If;
1187   If (p_rec.inc_information19 = hr_api.g_varchar2) then
1188     p_rec.inc_information19 :=
1189     per_inc_shd.g_old_rec.inc_information19;
1190   End If;
1191   If (p_rec.inc_information20 = hr_api.g_varchar2) then
1192     p_rec.inc_information20 :=
1193     per_inc_shd.g_old_rec.inc_information20;
1194   End If;
1195   If (p_rec.inc_information21 = hr_api.g_varchar2) then
1196     p_rec.inc_information21 :=
1197     per_inc_shd.g_old_rec.inc_information21;
1198   End If;
1199   If (p_rec.inc_information22 = hr_api.g_varchar2) then
1200     p_rec.inc_information22 :=
1201     per_inc_shd.g_old_rec.inc_information22;
1202   End If;
1203   If (p_rec.inc_information23 = hr_api.g_varchar2) then
1204     p_rec.inc_information23 :=
1205     per_inc_shd.g_old_rec.inc_information23;
1206   End If;
1207   If (p_rec.inc_information24 = hr_api.g_varchar2) then
1208     p_rec.inc_information24 :=
1209     per_inc_shd.g_old_rec.inc_information24;
1210   End If;
1211   If (p_rec.inc_information25 = hr_api.g_varchar2) then
1212     p_rec.inc_information25 :=
1213     per_inc_shd.g_old_rec.inc_information25;
1214   End If;
1215   If (p_rec.inc_information26 = hr_api.g_varchar2) then
1216     p_rec.inc_information26 :=
1217     per_inc_shd.g_old_rec.inc_information26;
1218   End If;
1219   If (p_rec.inc_information27 = hr_api.g_varchar2) then
1220     p_rec.inc_information27 :=
1221     per_inc_shd.g_old_rec.inc_information27;
1222   End If;
1223   If (p_rec.inc_information28 = hr_api.g_varchar2) then
1224     p_rec.inc_information28 :=
1225     per_inc_shd.g_old_rec.inc_information28;
1226   End If;
1227   If (p_rec.inc_information29 = hr_api.g_varchar2) then
1228     p_rec.inc_information29 :=
1229     per_inc_shd.g_old_rec.inc_information29;
1230   End If;
1231   If (p_rec.inc_information30 = hr_api.g_varchar2) then
1232     p_rec.inc_information30 :=
1233     per_inc_shd.g_old_rec.inc_information30;
1234   End If;
1235   --
1236 End convert_defs;
1237 --
1238 -- ----------------------------------------------------------------------------
1239 -- |---------------------------------< upd >----------------------------------|
1240 -- ----------------------------------------------------------------------------
1241 Procedure upd
1242   (p_effective_date               in date
1243   ,p_rec                          in out nocopy per_inc_shd.g_rec_type
1244   ) is
1245 --
1246   l_proc  varchar2(72) := g_package||'upd';
1247 --
1248 Begin
1249   hr_utility.set_location('Entering:'||l_proc, 5);
1250   --
1251   -- We must lock the row which we need to update.
1252   --
1253   per_inc_shd.lck
1254     (p_rec.incident_id
1255     ,p_rec.object_version_number
1256     );
1257   --
1258   -- 1. During an update system defaults are used to determine if
1259   --    arguments have been defaulted or not. We must therefore
1260   --    derive the full record structure values to be updated.
1261   --
1262   -- 2. Call the supporting update validate operations.
1263   --
1264   convert_defs(p_rec);
1265   per_inc_bus.update_validate
1266      (p_effective_date
1267      ,p_rec
1268      );
1269   --
1270   -- Call the supporting pre-update operation
1271   --
1272   per_inc_upd.pre_update(p_rec);
1273   --
1274   -- Update the row.
1275   --
1276   per_inc_upd.update_dml(p_rec);
1277   --
1278   -- Call the supporting post-update operation
1279   --
1280   per_inc_upd.post_update
1281      (p_effective_date
1282      ,p_rec
1283      );
1284 End upd;
1285 --
1286 -- ----------------------------------------------------------------------------
1287 -- |---------------------------------< upd >----------------------------------|
1288 -- ----------------------------------------------------------------------------
1289 Procedure upd
1290   (p_effective_date               in     date
1291   ,p_incident_id                  in     number
1292   ,p_object_version_number        in out nocopy number
1293   ,p_incident_reference           in     varchar2  default hr_api.g_varchar2
1294   ,p_incident_type                in     varchar2  default hr_api.g_varchar2
1295   ,p_incident_date                in     date      default hr_api.g_date
1296   ,p_at_work_flag                 in     varchar2  default hr_api.g_varchar2
1297   ,p_related_incident_id          in     number    default hr_api.g_number
1298   ,p_incident_time                in     varchar2  default hr_api.g_varchar2
1299   ,p_org_notified_date            in     date      default hr_api.g_date
1300   ,p_assignment_id                in     number    default hr_api.g_number
1301   ,p_location                     in     varchar2  default hr_api.g_varchar2
1302   ,p_report_date                  in     date      default hr_api.g_date
1303   ,p_report_time                  in     varchar2  default hr_api.g_varchar2
1304   ,p_report_method                in     varchar2  default hr_api.g_varchar2
1305   ,p_person_reported_by           in     number    default hr_api.g_number
1306   ,p_person_reported_to           in     varchar2  default hr_api.g_varchar2
1307   ,p_witness_details              in     varchar2  default hr_api.g_varchar2
1308   ,p_description                  in     varchar2  default hr_api.g_varchar2
1309   ,p_injury_type                  in     varchar2  default hr_api.g_varchar2
1310   ,p_disease_type                 in     varchar2  default hr_api.g_varchar2
1311   ,p_hazard_type                  in     varchar2  default hr_api.g_varchar2
1312   ,p_body_part                    in     varchar2  default hr_api.g_varchar2
1313   ,p_treatment_received_flag      in     varchar2  default hr_api.g_varchar2
1314   ,p_hospital_details             in     varchar2  default hr_api.g_varchar2
1315     ,p_emergency_code                 in     varchar2 default hr_api.g_varchar2
1316     ,p_hospitalized_flag              in     varchar2 default hr_api.g_varchar2
1317     ,p_hospital_address               in     varchar2 default hr_api.g_varchar2
1318     ,p_activity_at_time_of_work       in     varchar2 default hr_api.g_varchar2
1319     ,p_objects_involved               in     varchar2 default hr_api.g_varchar2
1320     ,p_privacy_issue                  in     varchar2 default hr_api.g_varchar2
1321     ,p_work_start_time                in     varchar2 default hr_api.g_varchar2
1322     ,p_date_of_death                  in     date     default hr_api.g_date
1323     ,p_report_completed_by            in     varchar2 default hr_api.g_varchar2
1324     ,p_reporting_person_title         in     varchar2 default hr_api.g_varchar2
1325     ,p_reporting_person_phone         in     varchar2 default hr_api.g_varchar2
1326     ,p_days_restricted_work           in     number   default hr_api.g_number
1327     ,p_days_away_from_work            in     number   default hr_api.g_number
1328   ,p_doctor_name                  in     varchar2  default hr_api.g_varchar2
1329   ,p_compensation_date            in     date      default hr_api.g_date
1330   ,p_compensation_currency        in     varchar2  default hr_api.g_varchar2
1331   ,p_compensation_amount          in     number    default hr_api.g_number
1332   ,p_remedial_hs_action           in     varchar2  default hr_api.g_varchar2
1333   ,p_notified_hsrep_id            in     number    default hr_api.g_number
1334   ,p_notified_hsrep_date          in     date      default hr_api.g_date
1335   ,p_notified_rep_id              in     number    default hr_api.g_number
1336   ,p_notified_rep_date            in     date      default hr_api.g_date
1337   ,p_notified_rep_org_id          in     number    default hr_api.g_number
1338   ,p_over_time_flag               in     varchar2  default hr_api.g_varchar2
1339   ,p_absence_exists_flag          in     varchar2  default hr_api.g_varchar2
1340   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
1341   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
1342   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
1343   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
1344   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
1345   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
1346   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
1347   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
1348   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
1349   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
1350   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
1351   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
1352   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
1353   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
1354   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
1355   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
1356   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
1357   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
1358   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
1359   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
1360   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
1361   ,p_attribute21                  in     varchar2  default hr_api.g_varchar2
1362   ,p_attribute22                  in     varchar2  default hr_api.g_varchar2
1363   ,p_attribute23                  in     varchar2  default hr_api.g_varchar2
1364   ,p_attribute24                  in     varchar2  default hr_api.g_varchar2
1365   ,p_attribute25                  in     varchar2  default hr_api.g_varchar2
1366   ,p_attribute26                  in     varchar2  default hr_api.g_varchar2
1367   ,p_attribute27                  in     varchar2  default hr_api.g_varchar2
1368   ,p_attribute28                  in     varchar2  default hr_api.g_varchar2
1369   ,p_attribute29                  in     varchar2  default hr_api.g_varchar2
1370   ,p_attribute30                  in     varchar2  default hr_api.g_varchar2
1371   ,p_inc_information_category     in     varchar2  default hr_api.g_varchar2
1372   ,p_inc_information1             in     varchar2  default hr_api.g_varchar2
1373   ,p_inc_information2             in     varchar2  default hr_api.g_varchar2
1374   ,p_inc_information3             in     varchar2  default hr_api.g_varchar2
1375   ,p_inc_information4             in     varchar2  default hr_api.g_varchar2
1376   ,p_inc_information5             in     varchar2  default hr_api.g_varchar2
1377   ,p_inc_information6             in     varchar2  default hr_api.g_varchar2
1378   ,p_inc_information7             in     varchar2  default hr_api.g_varchar2
1379   ,p_inc_information8             in     varchar2  default hr_api.g_varchar2
1380   ,p_inc_information9             in     varchar2  default hr_api.g_varchar2
1381   ,p_inc_information10            in     varchar2  default hr_api.g_varchar2
1382   ,p_inc_information11            in     varchar2  default hr_api.g_varchar2
1383   ,p_inc_information12            in     varchar2  default hr_api.g_varchar2
1384   ,p_inc_information13            in     varchar2  default hr_api.g_varchar2
1385   ,p_inc_information14            in     varchar2  default hr_api.g_varchar2
1386   ,p_inc_information15            in     varchar2  default hr_api.g_varchar2
1387   ,p_inc_information16            in     varchar2  default hr_api.g_varchar2
1388   ,p_inc_information17            in     varchar2  default hr_api.g_varchar2
1389   ,p_inc_information18            in     varchar2  default hr_api.g_varchar2
1390   ,p_inc_information19            in     varchar2  default hr_api.g_varchar2
1391   ,p_inc_information20            in     varchar2  default hr_api.g_varchar2
1392   ,p_inc_information21            in     varchar2  default hr_api.g_varchar2
1393   ,p_inc_information22            in     varchar2  default hr_api.g_varchar2
1394   ,p_inc_information23            in     varchar2  default hr_api.g_varchar2
1395   ,p_inc_information24            in     varchar2  default hr_api.g_varchar2
1396   ,p_inc_information25            in     varchar2  default hr_api.g_varchar2
1397   ,p_inc_information26            in     varchar2  default hr_api.g_varchar2
1398   ,p_inc_information27            in     varchar2  default hr_api.g_varchar2
1399   ,p_inc_information28            in     varchar2  default hr_api.g_varchar2
1400   ,p_inc_information29            in     varchar2  default hr_api.g_varchar2
1401   ,p_inc_information30            in     varchar2  default hr_api.g_varchar2
1402   ) is
1403 --
1404   l_rec	  per_inc_shd.g_rec_type;
1405   l_proc  varchar2(72) := g_package||'upd';
1406 --
1407 Begin
1408   hr_utility.set_location('Entering:'||l_proc, 5);
1409   --
1410   -- Call conversion function to turn arguments into the
1411   -- l_rec structure.
1412   --
1413   l_rec := per_inc_shd.convert_args
1414   (p_incident_id
1415   ,hr_api.g_number
1416   ,p_incident_reference
1417   ,p_incident_type
1418   ,p_incident_date
1419   ,p_incident_time
1420   ,p_org_notified_date
1421   ,p_assignment_id
1422   ,p_location
1423   ,p_at_work_flag
1424   ,p_report_date
1425   ,p_report_time
1426   ,p_report_method
1427   ,p_person_reported_by
1428   ,p_person_reported_to
1429   ,p_witness_details
1430   ,p_description
1431   ,p_injury_type
1432   ,p_disease_type
1433   ,p_hazard_type
1434   ,p_body_part
1435   ,p_treatment_received_flag
1436   ,p_hospital_details
1437      ,p_emergency_code
1438      ,p_hospitalized_flag
1439      ,p_hospital_address
1440      ,p_activity_at_time_of_work
1441      ,p_objects_involved
1442      ,p_privacy_issue
1443      ,p_work_start_time
1444      ,p_date_of_death
1445      ,p_report_completed_by
1446      ,p_reporting_person_title
1447      ,p_reporting_person_phone
1448      ,p_days_restricted_work
1449      ,p_days_away_from_work
1450   ,p_doctor_name
1451   ,p_compensation_date
1452   ,p_compensation_currency
1453   ,p_compensation_amount
1454   ,p_remedial_hs_action
1455   ,p_notified_hsrep_id
1456   ,p_notified_hsrep_date
1457   ,p_notified_rep_id
1458   ,p_notified_rep_date
1459   ,p_notified_rep_org_id
1460   ,p_related_incident_id
1461   ,p_over_time_flag
1462   ,p_absence_exists_flag
1463   ,p_attribute_category
1464   ,p_attribute1
1465   ,p_attribute2
1466   ,p_attribute3
1467   ,p_attribute4
1468   ,p_attribute5
1469   ,p_attribute6
1470   ,p_attribute7
1471   ,p_attribute8
1472   ,p_attribute9
1473   ,p_attribute10
1474   ,p_attribute11
1475   ,p_attribute12
1476   ,p_attribute13
1477   ,p_attribute14
1478   ,p_attribute15
1479   ,p_attribute16
1480   ,p_attribute17
1481   ,p_attribute18
1482   ,p_attribute19
1483   ,p_attribute20
1484   ,p_attribute21
1485   ,p_attribute22
1486   ,p_attribute23
1487   ,p_attribute24
1488   ,p_attribute25
1489   ,p_attribute26
1490   ,p_attribute27
1491   ,p_attribute28
1492   ,p_attribute29
1493   ,p_attribute30
1494   ,p_inc_information_category
1495   ,p_inc_information1
1496   ,p_inc_information2
1497   ,p_inc_information3
1498   ,p_inc_information4
1499   ,p_inc_information5
1500   ,p_inc_information6
1501   ,p_inc_information7
1502   ,p_inc_information8
1503   ,p_inc_information9
1504   ,p_inc_information10
1505   ,p_inc_information11
1506   ,p_inc_information12
1507   ,p_inc_information13
1508   ,p_inc_information14
1509   ,p_inc_information15
1510   ,p_inc_information16
1511   ,p_inc_information17
1512   ,p_inc_information18
1513   ,p_inc_information19
1514   ,p_inc_information20
1515   ,p_inc_information21
1516   ,p_inc_information22
1517   ,p_inc_information23
1518   ,p_inc_information24
1519   ,p_inc_information25
1520   ,p_inc_information26
1521   ,p_inc_information27
1522   ,p_inc_information28
1523   ,p_inc_information29
1524   ,p_inc_information30
1525   ,p_object_version_number
1526   );
1527   --
1528   -- Having converted the arguments into the
1529   -- plsql record structure we call the corresponding record
1530   -- business process.
1531 
1532   per_inc_upd.upd
1533      (p_effective_date
1534      ,l_rec
1535      );
1536   p_object_version_number := l_rec.object_version_number;
1537   --
1538   hr_utility.set_location(' Leaving:'||l_proc, 10);
1539 End upd;
1540 --
1541 end per_inc_upd;