DBA Data[Home] [Help]

PACKAGE BODY: APPS.GHR_CCA_UPD

Source


1 Package Body ghr_cca_upd as
2 /* $Header: ghccarhi.pkb 115.1 2003/01/30 19:25:04 asubrahm noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  ghr_cca_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 ghr_cca_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 ghr_compl_appeals Row
69   --
70   update ghr_compl_appeals
71     set
72      compl_appeal_id                 = p_rec.compl_appeal_id
73     ,complaint_id                    = p_rec.complaint_id
74     ,appeal_date                     = p_rec.appeal_date
75     ,appealed_to                     = p_rec.appealed_to
76     ,reason_for_appeal               = p_rec.reason_for_appeal
77     ,source_decision_date            = p_rec.source_decision_date
78     ,docket_num                      = p_rec.docket_num
79     ,org_notified_of_appeal          = p_rec.org_notified_of_appeal
80     ,agency_recvd_req_for_files      = p_rec.agency_recvd_req_for_files
81     ,files_due                       = p_rec.files_due
82     ,files_forwd                     = p_rec.files_forwd
83     ,agcy_recvd_appellant_brief      = p_rec.agcy_recvd_appellant_brief
84     ,agency_brief_due                = p_rec.agency_brief_due
85     ,appellant_brief_forwd_org       = p_rec.appellant_brief_forwd_org
86     ,org_forwd_brief_to_agency       = p_rec.org_forwd_brief_to_agency
87     ,agency_brief_forwd              = p_rec.agency_brief_forwd
88     ,decision_date                   = p_rec.decision_date
89     ,dec_recvd_by_agency             = p_rec.dec_recvd_by_agency
90     ,decision                        = p_rec.decision
91     ,dec_forwd_to_org                = p_rec.dec_forwd_to_org
92     ,agency_rfr_suspense             = p_rec.agency_rfr_suspense
93     ,request_for_rfr                 = p_rec.request_for_rfr
94     ,rfr_docket_num                  = p_rec.rfr_docket_num
95     ,rfr_requested_by                = p_rec.rfr_requested_by
96     ,agency_rfr_due                  = p_rec.agency_rfr_due
97     ,rfr_forwd_to_org                = p_rec.rfr_forwd_to_org
98     ,org_forwd_rfr_to_agency         = p_rec.org_forwd_rfr_to_agency
99     ,agency_forwd_rfr_ofo            = p_rec.agency_forwd_rfr_ofo
100     ,rfr_decision                    = p_rec.rfr_decision
101     ,rfr_decision_date               = p_rec.rfr_decision_date
102     ,agency_recvd_rfr_dec            = p_rec.agency_recvd_rfr_dec
103     ,rfr_decision_forwd_to_org       = p_rec.rfr_decision_forwd_to_org
104     ,object_version_number           = p_rec.object_version_number
105     where compl_appeal_id = p_rec.compl_appeal_id;
106   --
107   --
108   --
109   hr_utility.set_location(' Leaving:'||l_proc, 10);
110 --
111 Exception
112   When hr_api.check_integrity_violated Then
113     -- A check constraint has been violated
114     --
115     ghr_cca_shd.constraint_error
116       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
117   When hr_api.parent_integrity_violated Then
118     -- Parent integrity has been violated
119     --
120     ghr_cca_shd.constraint_error
121       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122   When hr_api.unique_integrity_violated Then
123     -- Unique integrity has been violated
124     --
125     ghr_cca_shd.constraint_error
126       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127   When Others Then
128     --
129     Raise;
130 End update_dml;
131 --
132 -- ----------------------------------------------------------------------------
133 -- |------------------------------< pre_update >------------------------------|
134 -- ----------------------------------------------------------------------------
135 -- {Start Of Comments}
136 --
137 -- Description:
138 --   This private procedure contains any processing which is required before
139 --   the update dml.
140 --
141 -- Prerequisites:
142 --   This is an internal procedure which is called from the upd procedure.
143 --
144 -- In Parameters:
145 --   A Pl/Sql record structure.
146 --
147 -- Post Success:
148 --   Processing continues.
149 --
150 -- Post Failure:
151 --   If an error has occurred, an error message and exception wil be raised
152 --   but not handled.
153 --
154 -- Developer Implementation Notes:
155 --   Any pre-processing required before the update dml is issued should be
156 --   coded within this procedure. It is important to note that any 3rd party
157 --   maintenance should be reviewed before placing in this procedure.
158 --
159 -- Access Status:
160 --   Internal Row Handler Use Only.
161 --
162 -- {End Of Comments}
163 -- ----------------------------------------------------------------------------
164 Procedure pre_update
165   (p_rec in ghr_cca_shd.g_rec_type
166   ) is
167 --
168   l_proc  varchar2(72) := g_package||'pre_update';
169 --
170 Begin
171   hr_utility.set_location('Entering:'||l_proc, 5);
172   --
173   hr_utility.set_location(' Leaving:'||l_proc, 10);
174 End pre_update;
175 --
176 -- ----------------------------------------------------------------------------
177 -- |-----------------------------< post_update >------------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start Of Comments}
180 --
181 -- Description:
182 --   This private procedure contains any processing which is required after
183 --   the update dml.
184 --
185 -- Prerequisites:
186 --   This is an internal procedure which is called from the upd procedure.
187 --
188 -- In Parameters:
189 --   A Pl/Sql record structure.
190 --
191 -- Post Success:
192 --   Processing continues.
193 --
194 -- Post Failure:
195 --   If an error has occurred, an error message and exception will be raised
196 --   but not handled.
197 --
198 -- Developer Implementation Notes:
199 --   Any post-processing required after the update dml is issued should be
200 --   coded within this procedure. It is important to note that any 3rd party
201 --   maintenance should be reviewed before placing in this procedure.
202 --
203 -- Access Status:
204 --   Internal Row Handler Use Only.
205 --
206 -- {End Of Comments}
207 -- ----------------------------------------------------------------------------
208 Procedure post_update
209   (p_effective_date               in date
210   ,p_rec                          in ghr_cca_shd.g_rec_type
211   ) is
212 --
213   l_proc  varchar2(72) := g_package||'post_update';
214 --
215 Begin
216   hr_utility.set_location('Entering:'||l_proc, 5);
217   begin
218     --
219     ghr_cca_rku.after_update
220       (p_effective_date               => p_effective_date
221       ,p_compl_appeal_id              => p_rec.compl_appeal_id
222       ,p_complaint_id                 => p_rec.complaint_id
223       ,p_appeal_date                  => p_rec.appeal_date
224       ,p_appealed_to                  => p_rec.appealed_to
225       ,p_reason_for_appeal            => p_rec.reason_for_appeal
226       ,p_source_decision_date         => p_rec.source_decision_date
227       ,p_docket_num                   => p_rec.docket_num
228       ,p_org_notified_of_appeal       => p_rec.org_notified_of_appeal
229       ,p_agency_recvd_req_for_files   => p_rec.agency_recvd_req_for_files
230       ,p_files_due                    => p_rec.files_due
231       ,p_files_forwd                  => p_rec.files_forwd
232       ,p_agcy_recvd_appellant_brief   => p_rec.agcy_recvd_appellant_brief
233       ,p_agency_brief_due             => p_rec.agency_brief_due
234       ,p_appellant_brief_forwd_org    => p_rec.appellant_brief_forwd_org
235       ,p_org_forwd_brief_to_agency    => p_rec.org_forwd_brief_to_agency
236       ,p_agency_brief_forwd           => p_rec.agency_brief_forwd
237       ,p_decision_date                => p_rec.decision_date
238       ,p_dec_recvd_by_agency          => p_rec.dec_recvd_by_agency
239       ,p_decision                     => p_rec.decision
240       ,p_dec_forwd_to_org             => p_rec.dec_forwd_to_org
241       ,p_agency_rfr_suspense          => p_rec.agency_rfr_suspense
242       ,p_request_for_rfr              => p_rec.request_for_rfr
243       ,p_rfr_docket_num               => p_rec.rfr_docket_num
244       ,p_rfr_requested_by             => p_rec.rfr_requested_by
245       ,p_agency_rfr_due               => p_rec.agency_rfr_due
246       ,p_rfr_forwd_to_org             => p_rec.rfr_forwd_to_org
247       ,p_org_forwd_rfr_to_agency      => p_rec.org_forwd_rfr_to_agency
248       ,p_agency_forwd_rfr_ofo         => p_rec.agency_forwd_rfr_ofo
249       ,p_rfr_decision                 => p_rec.rfr_decision
250       ,p_rfr_decision_date            => p_rec.rfr_decision_date
251       ,p_agency_recvd_rfr_dec         => p_rec.agency_recvd_rfr_dec
252       ,p_rfr_decision_forwd_to_org    => p_rec.rfr_decision_forwd_to_org
253       ,p_object_version_number        => p_rec.object_version_number
254       ,p_complaint_id_o               => ghr_cca_shd.g_old_rec.complaint_id
255       ,p_appeal_date_o                => ghr_cca_shd.g_old_rec.appeal_date
256       ,p_appealed_to_o                => ghr_cca_shd.g_old_rec.appealed_to
257       ,p_reason_for_appeal_o          => ghr_cca_shd.g_old_rec.reason_for_appeal
258       ,p_source_decision_date_o       => ghr_cca_shd.g_old_rec.source_decision_date
259       ,p_docket_num_o                 => ghr_cca_shd.g_old_rec.docket_num
260       ,p_org_notified_of_appeal_o     => ghr_cca_shd.g_old_rec.org_notified_of_appeal
261       ,p_agency_recvd_req_for_files_o => ghr_cca_shd.g_old_rec.agency_recvd_req_for_files
262       ,p_files_due_o                  => ghr_cca_shd.g_old_rec.files_due
263       ,p_files_forwd_o                => ghr_cca_shd.g_old_rec.files_forwd
264       ,p_agcy_recvd_appellant_brief_o => ghr_cca_shd.g_old_rec.agcy_recvd_appellant_brief
265       ,p_agency_brief_due_o           => ghr_cca_shd.g_old_rec.agency_brief_due
266       ,p_appellant_brief_forwd_org_o  => ghr_cca_shd.g_old_rec.appellant_brief_forwd_org
267       ,p_org_forwd_brief_to_agency_o  => ghr_cca_shd.g_old_rec.org_forwd_brief_to_agency
268       ,p_agency_brief_forwd_o         => ghr_cca_shd.g_old_rec.agency_brief_forwd
269       ,p_decision_date_o              => ghr_cca_shd.g_old_rec.decision_date
270       ,p_dec_recvd_by_agency_o        => ghr_cca_shd.g_old_rec.dec_recvd_by_agency
271       ,p_decision_o                   => ghr_cca_shd.g_old_rec.decision
272       ,p_dec_forwd_to_org_o           => ghr_cca_shd.g_old_rec.dec_forwd_to_org
273       ,p_agency_rfr_suspense_o        => ghr_cca_shd.g_old_rec.agency_rfr_suspense
274       ,p_request_for_rfr_o            => ghr_cca_shd.g_old_rec.request_for_rfr
275       ,p_rfr_docket_num_o             => ghr_cca_shd.g_old_rec.rfr_docket_num
276       ,p_rfr_requested_by_o           => ghr_cca_shd.g_old_rec.rfr_requested_by
277       ,p_agency_rfr_due_o             => ghr_cca_shd.g_old_rec.agency_rfr_due
278       ,p_rfr_forwd_to_org_o           => ghr_cca_shd.g_old_rec.rfr_forwd_to_org
279       ,p_org_forwd_rfr_to_agency_o    => ghr_cca_shd.g_old_rec.org_forwd_rfr_to_agency
280       ,p_agency_forwd_rfr_ofo_o       => ghr_cca_shd.g_old_rec.agency_forwd_rfr_ofo
281       ,p_rfr_decision_o               => ghr_cca_shd.g_old_rec.rfr_decision
282       ,p_rfr_decision_date_o          => ghr_cca_shd.g_old_rec.rfr_decision_date
283       ,p_agency_recvd_rfr_dec_o       => ghr_cca_shd.g_old_rec.agency_recvd_rfr_dec
284       ,p_rfr_decision_forwd_to_org_o  => ghr_cca_shd.g_old_rec.rfr_decision_forwd_to_org
285       ,p_object_version_number_o      => ghr_cca_shd.g_old_rec.object_version_number
286       );
287     --
288   exception
289     --
290     when hr_api.cannot_find_prog_unit then
291       --
292       hr_api.cannot_find_prog_unit_error
293         (p_module_name => 'GHR_COMPL_APPEALS'
294         ,p_hook_type   => 'AU');
295       --
296   end;
297   --
298   hr_utility.set_location(' Leaving:'||l_proc, 10);
299 End post_update;
300 --
301 -- ----------------------------------------------------------------------------
302 -- |-----------------------------< convert_defs >-----------------------------|
303 -- ----------------------------------------------------------------------------
304 -- {Start Of Comments}
305 --
306 -- Description:
307 --   The Convert_Defs procedure has one very important function:
308 --   It must return the record structure for the row with all system defaulted
309 --   values converted into its corresponding parameter value for update. When
310 --   we attempt to update a row through the Upd process , certain
311 --   parameters can be defaulted which enables flexibility in the calling of
312 --   the upd process (e.g. only attributes which need to be updated need to be
313 --   specified). For the upd process to determine which attributes
314 --   have NOT been specified we need to check if the parameter has a reserved
315 --   system default value. Therefore, for all parameters which have a
316 --   corresponding reserved system default mechanism specified we need to
317 --   check if a system default is being used. If a system default is being
318 --   used then we convert the defaulted value into its corresponding attribute
319 --   value held in the g_old_rec data structure.
320 --
321 -- Prerequisites:
322 --   This private function can only be called from the upd process.
323 --
324 -- In Parameters:
325 --   A Pl/Sql record structure.
326 --
327 -- Post Success:
328 --   The record structure will be returned with all system defaulted parameter
329 --   values converted into its current row attribute value.
330 --
331 -- Post Failure:
332 --   No direct error handling is required within this function. Any possible
333 --   errors within this procedure will be a PL/SQL value error due to
334 --   conversion of datatypes or data lengths.
335 --
336 -- Developer Implementation Notes:
337 --   None.
338 --
339 -- Access Status:
340 --   Internal Row Handler Use Only.
341 --
342 -- {End Of Comments}
343 -- ----------------------------------------------------------------------------
344 Procedure convert_defs
345   (p_rec in out nocopy ghr_cca_shd.g_rec_type
346   ) is
347 --
348 Begin
349   --
350   -- We must now examine each argument value in the
351   -- p_rec plsql record structure
352   -- to see if a system default is being used. If a system default
353   -- is being used then we must set to the 'current' argument value.
354   --
355   If (p_rec.complaint_id = hr_api.g_number) then
356     p_rec.complaint_id :=
357     ghr_cca_shd.g_old_rec.complaint_id;
358   End If;
359   If (p_rec.appeal_date = hr_api.g_date) then
360     p_rec.appeal_date :=
361     ghr_cca_shd.g_old_rec.appeal_date;
362   End If;
363   If (p_rec.appealed_to = hr_api.g_varchar2) then
364     p_rec.appealed_to :=
365     ghr_cca_shd.g_old_rec.appealed_to;
366   End If;
367   If (p_rec.reason_for_appeal = hr_api.g_varchar2) then
368     p_rec.reason_for_appeal :=
369     ghr_cca_shd.g_old_rec.reason_for_appeal;
370   End If;
371   If (p_rec.source_decision_date = hr_api.g_date) then
372     p_rec.source_decision_date :=
373     ghr_cca_shd.g_old_rec.source_decision_date;
374   End If;
375   If (p_rec.docket_num = hr_api.g_varchar2) then
376     p_rec.docket_num :=
377     ghr_cca_shd.g_old_rec.docket_num;
378   End If;
379   If (p_rec.org_notified_of_appeal = hr_api.g_date) then
380     p_rec.org_notified_of_appeal :=
381     ghr_cca_shd.g_old_rec.org_notified_of_appeal;
382   End If;
383   If (p_rec.agency_recvd_req_for_files = hr_api.g_date) then
384     p_rec.agency_recvd_req_for_files :=
385     ghr_cca_shd.g_old_rec.agency_recvd_req_for_files;
386   End If;
387   If (p_rec.files_due = hr_api.g_date) then
388     p_rec.files_due :=
389     ghr_cca_shd.g_old_rec.files_due;
390   End If;
391   If (p_rec.files_forwd = hr_api.g_date) then
392     p_rec.files_forwd :=
393     ghr_cca_shd.g_old_rec.files_forwd;
394   End If;
395   If (p_rec.agcy_recvd_appellant_brief = hr_api.g_date) then
396     p_rec.agcy_recvd_appellant_brief :=
397     ghr_cca_shd.g_old_rec.agcy_recvd_appellant_brief;
398   End If;
399   If (p_rec.agency_brief_due = hr_api.g_date) then
400     p_rec.agency_brief_due :=
401     ghr_cca_shd.g_old_rec.agency_brief_due;
402   End If;
403   If (p_rec.appellant_brief_forwd_org = hr_api.g_date) then
404     p_rec.appellant_brief_forwd_org :=
405     ghr_cca_shd.g_old_rec.appellant_brief_forwd_org;
406   End If;
407   If (p_rec.org_forwd_brief_to_agency = hr_api.g_date) then
408     p_rec.org_forwd_brief_to_agency :=
409     ghr_cca_shd.g_old_rec.org_forwd_brief_to_agency;
410   End If;
411   If (p_rec.agency_brief_forwd = hr_api.g_date) then
412     p_rec.agency_brief_forwd :=
413     ghr_cca_shd.g_old_rec.agency_brief_forwd;
414   End If;
415   If (p_rec.decision_date = hr_api.g_date) then
416     p_rec.decision_date :=
417     ghr_cca_shd.g_old_rec.decision_date;
418   End If;
419   If (p_rec.dec_recvd_by_agency = hr_api.g_date) then
420     p_rec.dec_recvd_by_agency :=
421     ghr_cca_shd.g_old_rec.dec_recvd_by_agency;
422   End If;
423   If (p_rec.decision = hr_api.g_varchar2) then
424     p_rec.decision :=
425     ghr_cca_shd.g_old_rec.decision;
426   End If;
427   If (p_rec.dec_forwd_to_org = hr_api.g_date) then
428     p_rec.dec_forwd_to_org :=
429     ghr_cca_shd.g_old_rec.dec_forwd_to_org;
430   End If;
431   If (p_rec.agency_rfr_suspense = hr_api.g_date) then
432     p_rec.agency_rfr_suspense :=
433     ghr_cca_shd.g_old_rec.agency_rfr_suspense;
434   End If;
435   If (p_rec.request_for_rfr = hr_api.g_date) then
436     p_rec.request_for_rfr :=
437     ghr_cca_shd.g_old_rec.request_for_rfr;
438   End If;
439   If (p_rec.rfr_docket_num = hr_api.g_varchar2) then
440     p_rec.rfr_docket_num :=
441     ghr_cca_shd.g_old_rec.rfr_docket_num;
442   End If;
443   If (p_rec.rfr_requested_by = hr_api.g_varchar2) then
444     p_rec.rfr_requested_by :=
445     ghr_cca_shd.g_old_rec.rfr_requested_by;
446   End If;
447   If (p_rec.agency_rfr_due = hr_api.g_date) then
448     p_rec.agency_rfr_due :=
449     ghr_cca_shd.g_old_rec.agency_rfr_due;
450   End If;
451   If (p_rec.rfr_forwd_to_org = hr_api.g_date) then
452     p_rec.rfr_forwd_to_org :=
453     ghr_cca_shd.g_old_rec.rfr_forwd_to_org;
454   End If;
455   If (p_rec.org_forwd_rfr_to_agency = hr_api.g_date) then
456     p_rec.org_forwd_rfr_to_agency :=
457     ghr_cca_shd.g_old_rec.org_forwd_rfr_to_agency;
458   End If;
459   If (p_rec.agency_forwd_rfr_ofo = hr_api.g_date) then
460     p_rec.agency_forwd_rfr_ofo :=
461     ghr_cca_shd.g_old_rec.agency_forwd_rfr_ofo;
462   End If;
463   If (p_rec.rfr_decision = hr_api.g_varchar2) then
464     p_rec.rfr_decision :=
465     ghr_cca_shd.g_old_rec.rfr_decision;
466   End If;
467   If (p_rec.rfr_decision_date = hr_api.g_date) then
468     p_rec.rfr_decision_date :=
469     ghr_cca_shd.g_old_rec.rfr_decision_date;
470   End If;
471   If (p_rec.agency_recvd_rfr_dec = hr_api.g_date) then
472     p_rec.agency_recvd_rfr_dec :=
473     ghr_cca_shd.g_old_rec.agency_recvd_rfr_dec;
474   End If;
475   If (p_rec.rfr_decision_forwd_to_org = hr_api.g_date) then
476     p_rec.rfr_decision_forwd_to_org :=
477     ghr_cca_shd.g_old_rec.rfr_decision_forwd_to_org;
478   End If;
479   --
480 End convert_defs;
481 --
482 -- ----------------------------------------------------------------------------
483 -- |---------------------------------< upd >----------------------------------|
484 -- ----------------------------------------------------------------------------
485 Procedure upd
486   (p_effective_date               in date
487   ,p_rec                          in out nocopy ghr_cca_shd.g_rec_type
488   ) is
489 --
490   l_proc  varchar2(72) := g_package||'upd';
491 --
492 Begin
493   hr_utility.set_location('Entering:'||l_proc, 5);
494   --
495   -- We must lock the row which we need to update.
496   --
497   ghr_cca_shd.lck
498     (p_rec.compl_appeal_id
499     ,p_rec.object_version_number
500     );
501   --
502   -- 1. During an update system defaults are used to determine if
503   --    arguments have been defaulted or not. We must therefore
504   --    derive the full record structure values to be updated.
505   --
506   -- 2. Call the supporting update validate operations.
507   --
508   convert_defs(p_rec);
509   ghr_cca_bus.update_validate
510      (p_effective_date
511      ,p_rec
512      );
513   --
514   -- Call the supporting pre-update operation
515   --
516   ghr_cca_upd.pre_update(p_rec);
517   --
518   -- Update the row.
519   --
520   ghr_cca_upd.update_dml(p_rec);
521   --
522   -- Call the supporting post-update operation
523   --
524   ghr_cca_upd.post_update
525      (p_effective_date
526      ,p_rec
527      );
528 End upd;
529 --
530 -- ----------------------------------------------------------------------------
531 -- |---------------------------------< upd >----------------------------------|
532 -- ----------------------------------------------------------------------------
533 Procedure upd
534   (p_effective_date               in     date
535   ,p_compl_appeal_id              in     number
536   ,p_object_version_number        in out nocopy number
537   ,p_complaint_id                 in     number    default hr_api.g_number
538   ,p_appeal_date                  in     date      default hr_api.g_date
539   ,p_appealed_to                  in     varchar2  default hr_api.g_varchar2
540   ,p_reason_for_appeal            in     varchar2  default hr_api.g_varchar2
541   ,p_source_decision_date         in     date      default hr_api.g_date
542   ,p_docket_num                   in     varchar2  default hr_api.g_varchar2
543   ,p_org_notified_of_appeal       in     date      default hr_api.g_date
544   ,p_agency_recvd_req_for_files   in     date      default hr_api.g_date
545   ,p_files_due                    in     date      default hr_api.g_date
546   ,p_files_forwd                  in     date      default hr_api.g_date
547   ,p_agcy_recvd_appellant_brief   in     date      default hr_api.g_date
548   ,p_agency_brief_due             in     date      default hr_api.g_date
549   ,p_appellant_brief_forwd_org    in     date      default hr_api.g_date
550   ,p_org_forwd_brief_to_agency    in     date      default hr_api.g_date
551   ,p_agency_brief_forwd           in     date      default hr_api.g_date
552   ,p_decision_date                in     date      default hr_api.g_date
553   ,p_dec_recvd_by_agency          in     date      default hr_api.g_date
554   ,p_decision                     in     varchar2  default hr_api.g_varchar2
555   ,p_dec_forwd_to_org             in     date      default hr_api.g_date
556   ,p_agency_rfr_suspense          in     date      default hr_api.g_date
557   ,p_request_for_rfr              in     date      default hr_api.g_date
558   ,p_rfr_docket_num               in     varchar2  default hr_api.g_varchar2
559   ,p_rfr_requested_by             in     varchar2  default hr_api.g_varchar2
560   ,p_agency_rfr_due               in     date      default hr_api.g_date
561   ,p_rfr_forwd_to_org             in     date      default hr_api.g_date
562   ,p_org_forwd_rfr_to_agency      in     date      default hr_api.g_date
563   ,p_agency_forwd_rfr_ofo         in     date      default hr_api.g_date
564   ,p_rfr_decision                 in     varchar2  default hr_api.g_varchar2
565   ,p_rfr_decision_date            in     date      default hr_api.g_date
566   ,p_agency_recvd_rfr_dec         in     date      default hr_api.g_date
567   ,p_rfr_decision_forwd_to_org    in     date      default hr_api.g_date
568   ) is
569 --
570   l_rec   ghr_cca_shd.g_rec_type;
571   l_proc  varchar2(72) := g_package||'upd';
572 --
573 Begin
574   hr_utility.set_location('Entering:'||l_proc, 5);
575   --
576   -- Call conversion function to turn arguments into the
577   -- l_rec structure.
578   --
579   l_rec :=
580   ghr_cca_shd.convert_args
581   (p_compl_appeal_id
582   ,p_complaint_id
583   ,p_appeal_date
584   ,p_appealed_to
585   ,p_reason_for_appeal
586   ,p_source_decision_date
587   ,p_docket_num
588   ,p_org_notified_of_appeal
589   ,p_agency_recvd_req_for_files
590   ,p_files_due
591   ,p_files_forwd
592   ,p_agcy_recvd_appellant_brief
593   ,p_agency_brief_due
594   ,p_appellant_brief_forwd_org
595   ,p_org_forwd_brief_to_agency
596   ,p_agency_brief_forwd
597   ,p_decision_date
598   ,p_dec_recvd_by_agency
599   ,p_decision
600   ,p_dec_forwd_to_org
601   ,p_agency_rfr_suspense
602   ,p_request_for_rfr
603   ,p_rfr_docket_num
604   ,p_rfr_requested_by
605   ,p_agency_rfr_due
606   ,p_rfr_forwd_to_org
607   ,p_org_forwd_rfr_to_agency
608   ,p_agency_forwd_rfr_ofo
609   ,p_rfr_decision
610   ,p_rfr_decision_date
611   ,p_agency_recvd_rfr_dec
612   ,p_rfr_decision_forwd_to_org
613   ,p_object_version_number
614   );
615   --
616   -- Having converted the arguments into the
617   -- plsql record structure we call the corresponding record
618   -- business process.
619   --
620   ghr_cca_upd.upd
621      (p_effective_date
622      ,l_rec
623      );
624   p_object_version_number := l_rec.object_version_number;
625   --
626   hr_utility.set_location(' Leaving:'||l_proc, 10);
627 End upd;
628 --
629 end ghr_cca_upd;