DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_WDT_UPD

Source


1 Package Body pqh_wdt_upd as
2 /* $Header: pqwdtrhi.pkb 120.0.12000000.1 2007/01/17 00:29:46 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pqh_wdt_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 update the specified row in the schema using the primary key in
21 --      the predicates.
22 --   3) To trap any constraint violations that may have occurred.
23 --   4) To raise any other errors.
24 --
25 -- Prerequisites:
26 --   This is an internal private procedure which must be called from the upd
27 --   procedure.
28 --
29 -- In Parameters:
30 --   A Pl/Sql record structre.
31 --
32 -- Post Success:
33 --   The specified row will be updated in the schema.
34 --
35 -- Post Failure:
36 --   If a check, unique or parent integrity constraint violation is raised the
37 --   constraint_error procedure will be called.
38 --
39 -- Developer Implementation Notes:
40 --   The update 'set' attribute list should be modified if any of your
41 --   attributes are not updateable.
42 --
43 -- Access Status:
44 --   Internal Row Handler Use Only.
45 --
46 -- {End Of Comments}
47 -- ----------------------------------------------------------------------------
48 Procedure update_dml(p_rec in out nocopy pqh_wdt_shd.g_rec_type) is
49 --
50   l_proc  varchar2(72) := g_package||'update_dml';
51 --
52 Begin
53   hr_utility.set_location('Entering:'||l_proc, 5);
54   --
55   -- Increment the object version
56   --
57   p_rec.object_version_number := p_rec.object_version_number + 1;
58   --
59   --
60   -- Update the pqh_worksheet_details Row
61   --
62   update pqh_worksheet_details
63   set
64   worksheet_detail_id               = p_rec.worksheet_detail_id,
65   worksheet_id                      = p_rec.worksheet_id,
66   organization_id                   = p_rec.organization_id,
67   job_id                            = p_rec.job_id,
68   position_id                       = p_rec.position_id,
69   grade_id                          = p_rec.grade_id,
70   position_transaction_id           = p_rec.position_transaction_id,
71   budget_detail_id                  = p_rec.budget_detail_id,
72   parent_worksheet_detail_id        = p_rec.parent_worksheet_detail_id,
73   user_id                           = p_rec.user_id,
74   action_cd                         = p_rec.action_cd,
75   budget_unit1_percent              = p_rec.budget_unit1_percent,
76   budget_unit1_value                = p_rec.budget_unit1_value,
77   budget_unit2_percent              = p_rec.budget_unit2_percent,
78   budget_unit2_value                = p_rec.budget_unit2_value,
79   budget_unit3_percent              = p_rec.budget_unit3_percent,
80   budget_unit3_value                = p_rec.budget_unit3_value,
81   object_version_number             = p_rec.object_version_number,
82   budget_unit1_value_type_cd        = p_rec.budget_unit1_value_type_cd,
83   budget_unit2_value_type_cd        = p_rec.budget_unit2_value_type_cd,
84   budget_unit3_value_type_cd        = p_rec.budget_unit3_value_type_cd,
85   status                            = p_rec.status,
86   budget_unit1_available            = p_rec.budget_unit1_available,
87   budget_unit2_available            = p_rec.budget_unit2_available,
88   budget_unit3_available            = p_rec.budget_unit3_available,
89   old_unit1_value                   = p_rec.old_unit1_value,
90   old_unit2_value                   = p_rec.old_unit2_value,
91   old_unit3_value                   = p_rec.old_unit3_value,
92   defer_flag                        = p_rec.defer_flag,
93   propagation_method                = p_rec.propagation_method
94   where worksheet_detail_id = p_rec.worksheet_detail_id;
95   --
96   --
97   hr_utility.set_location(' Leaving:'||l_proc, 10);
98 --
99 Exception
100   When hr_api.check_integrity_violated Then
101     -- A check constraint has been violated
102     pqh_wdt_shd.constraint_error
103       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
104   When hr_api.parent_integrity_violated Then
105     -- Parent integrity has been violated
106     pqh_wdt_shd.constraint_error
107       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
108   When hr_api.unique_integrity_violated Then
109     -- Unique integrity has been violated
110     pqh_wdt_shd.constraint_error
111       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
112   When Others Then
113     Raise;
114 End update_dml;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |------------------------------< pre_update >------------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start Of Comments}
120 --
121 -- Description:
122 --   This private procedure contains any processing which is required before
123 --   the update dml.
124 --
125 -- Prerequisites:
126 --   This is an internal procedure which is called from the upd procedure.
127 --
128 -- In Parameters:
129 --   A Pl/Sql record structre.
130 --
131 -- Post Success:
132 --   Processing continues.
133 --
134 -- Post Failure:
135 --   If an error has occurred, an error message and exception will be raised
136 --   but not handled.
137 --
138 -- Developer Implementation Notes:
139 --   Any pre-processing required before the update dml is issued should be
140 --   coded within this procedure. It is important to note that any 3rd party
141 --   maintenance should be reviewed before placing in this procedure.
142 --
143 -- Access Status:
144 --   Internal Row Handler Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Procedure pre_update(p_rec in pqh_wdt_shd.g_rec_type) is
149 --
150   l_proc  varchar2(72) := g_package||'pre_update';
151 --
152 Begin
153   hr_utility.set_location('Entering:'||l_proc, 5);
154   --
155   hr_utility.set_location(' Leaving:'||l_proc, 10);
156 End pre_update;
157 --
158 -- ----------------------------------------------------------------------------
159 -- |-----------------------------< post_update >------------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start Of Comments}
162 --
163 -- Description:
164 --   This private procedure contains any processing which is required after the
165 --   update dml.
166 --
167 -- Prerequisites:
168 --   This is an internal procedure which is called from the upd procedure.
169 --
170 -- In Parameters:
171 --   A Pl/Sql record structre.
172 --
173 -- Post Success:
174 --   Processing continues.
175 --
176 -- Post Failure:
177 --   If an error has occurred, an error message and exception will be raised
178 --   but not handled.
179 --
180 -- Developer Implementation Notes:
181 --   Any post-processing required after the update dml is issued should be
182 --   coded within this procedure. It is important to note that any 3rd party
183 --   maintenance should be reviewed before placing in this procedure.
184 --
185 -- Access Status:
186 --   Internal Row Handler Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Procedure post_update(
191 p_effective_date in date,p_rec in pqh_wdt_shd.g_rec_type) is
192 --
193   l_proc  varchar2(72) := g_package||'post_update';
194 --
195 Begin
196   hr_utility.set_location('Entering:'||l_proc, 5);
197 --
198   --
199   -- Start of API User Hook for post_update.
200   --
201   begin
202     --
203     pqh_wdt_rku.after_update
204       (
205   p_worksheet_detail_id           =>p_rec.worksheet_detail_id
206  ,p_worksheet_id                  =>p_rec.worksheet_id
207  ,p_organization_id               =>p_rec.organization_id
208  ,p_job_id                        =>p_rec.job_id
209  ,p_position_id                   =>p_rec.position_id
210  ,p_grade_id                      =>p_rec.grade_id
211  ,p_position_transaction_id       =>p_rec.position_transaction_id
212  ,p_budget_detail_id              =>p_rec.budget_detail_id
213  ,p_parent_worksheet_detail_id    =>p_rec.parent_worksheet_detail_id
214  ,p_user_id                       =>p_rec.user_id
215  ,p_action_cd                     =>p_rec.action_cd
216  ,p_budget_unit1_percent          =>p_rec.budget_unit1_percent
217  ,p_budget_unit1_value            =>p_rec.budget_unit1_value
218  ,p_budget_unit2_percent          =>p_rec.budget_unit2_percent
219  ,p_budget_unit2_value            =>p_rec.budget_unit2_value
220  ,p_budget_unit3_percent          =>p_rec.budget_unit3_percent
221  ,p_budget_unit3_value            =>p_rec.budget_unit3_value
222  ,p_object_version_number         =>p_rec.object_version_number
223  ,p_budget_unit1_value_type_cd    =>p_rec.budget_unit1_value_type_cd
224  ,p_budget_unit2_value_type_cd    =>p_rec.budget_unit2_value_type_cd
225  ,p_budget_unit3_value_type_cd    =>p_rec.budget_unit3_value_type_cd
226  ,p_status                        =>p_rec.status
227  ,p_budget_unit1_available        =>p_rec.budget_unit1_available
228  ,p_budget_unit2_available        =>p_rec.budget_unit2_available
229  ,p_budget_unit3_available        =>p_rec.budget_unit3_available
230  ,p_old_unit1_value               =>p_rec.old_unit1_value
231  ,p_old_unit2_value               =>p_rec.old_unit2_value
232  ,p_old_unit3_value               =>p_rec.old_unit3_value
233  ,p_defer_flag                    =>p_rec.defer_flag
234  ,p_propagation_method            =>p_rec.propagation_method
235  ,p_effective_date                =>p_effective_date
236  ,p_worksheet_id_o                =>pqh_wdt_shd.g_old_rec.worksheet_id
237  ,p_organization_id_o             =>pqh_wdt_shd.g_old_rec.organization_id
238  ,p_job_id_o                      =>pqh_wdt_shd.g_old_rec.job_id
239  ,p_position_id_o                 =>pqh_wdt_shd.g_old_rec.position_id
240  ,p_grade_id_o                    =>pqh_wdt_shd.g_old_rec.grade_id
241  ,p_position_transaction_id_o     =>pqh_wdt_shd.g_old_rec.position_transaction_id
242  ,p_budget_detail_id_o            =>pqh_wdt_shd.g_old_rec.budget_detail_id
243  ,p_parent_worksheet_detail_id_o  =>pqh_wdt_shd.g_old_rec.parent_worksheet_detail_id
244  ,p_user_id_o                     =>pqh_wdt_shd.g_old_rec.user_id
245  ,p_action_cd_o                   =>pqh_wdt_shd.g_old_rec.action_cd
246  ,p_budget_unit1_percent_o        =>pqh_wdt_shd.g_old_rec.budget_unit1_percent
247  ,p_budget_unit1_value_o          =>pqh_wdt_shd.g_old_rec.budget_unit1_value
248  ,p_budget_unit2_percent_o        =>pqh_wdt_shd.g_old_rec.budget_unit2_percent
249  ,p_budget_unit2_value_o          =>pqh_wdt_shd.g_old_rec.budget_unit2_value
250  ,p_budget_unit3_percent_o        =>pqh_wdt_shd.g_old_rec.budget_unit3_percent
251  ,p_budget_unit3_value_o          =>pqh_wdt_shd.g_old_rec.budget_unit3_value
252  ,p_object_version_number_o       =>pqh_wdt_shd.g_old_rec.object_version_number
253  ,p_budget_unit1_value_type_cd_o  =>pqh_wdt_shd.g_old_rec.budget_unit1_value_type_cd
254  ,p_budget_unit2_value_type_cd_o  =>pqh_wdt_shd.g_old_rec.budget_unit2_value_type_cd
255  ,p_budget_unit3_value_type_cd_o  =>pqh_wdt_shd.g_old_rec.budget_unit3_value_type_cd
256  ,p_status_o                      =>pqh_wdt_shd.g_old_rec.status
257  ,p_budget_unit1_available_o      =>pqh_wdt_shd.g_old_rec.budget_unit1_available
258  ,p_budget_unit2_available_o      =>pqh_wdt_shd.g_old_rec.budget_unit2_available
259  ,p_budget_unit3_available_o      =>pqh_wdt_shd.g_old_rec.budget_unit3_available
260  ,p_old_unit1_value_o             =>pqh_wdt_shd.g_old_rec.old_unit1_value
261  ,p_old_unit2_value_o             =>pqh_wdt_shd.g_old_rec.old_unit2_value
262  ,p_old_unit3_value_o             =>pqh_wdt_shd.g_old_rec.old_unit3_value
263  ,p_defer_flag_o                  =>pqh_wdt_shd.g_old_rec.defer_flag
264  ,p_propagation_method_o          =>pqh_wdt_shd.g_old_rec.propagation_method
265       );
266     --
267   exception
268     --
269     when hr_api.cannot_find_prog_unit then
270       --
271       hr_api.cannot_find_prog_unit_error
272         (p_module_name => 'pqh_worksheet_details'
273         ,p_hook_type   => 'AU');
274       --
275   end;
276   --
277   -- End of API User Hook for post_update.
278   --
279   --
280   hr_utility.set_location(' Leaving:'||l_proc, 10);
281 End post_update;
282 --
283 -- ----------------------------------------------------------------------------
284 -- |-----------------------------< convert_defs >-----------------------------|
285 -- ----------------------------------------------------------------------------
286 -- {Start Of Comments}
287 --
288 -- Description:
289 --   The Convert_Defs procedure has one very important function:
290 --   It must return the record structure for the row with all system defaulted
291 --   values converted into its corresponding parameter value for update. When
292 --   we attempt to update a row through the Upd process , certain
293 --   parameters can be defaulted which enables flexibility in the calling of
294 --   the upd process (e.g. only attributes which need to be updated need to be
295 --   specified). For the upd process to determine which attributes
296 --   have NOT been specified we need to check if the parameter has a reserved
297 --   system default value. Therefore, for all parameters which have a
298 --   corresponding reserved system default mechanism specified we need to
299 --   check if a system default is being used. If a system default is being
300 --   used then we convert the defaulted value into its corresponding attribute
301 --   value held in the g_old_rec data structure.
302 --
303 -- Prerequisites:
304 --   This private function can only be called from the upd process.
305 --
306 -- In Parameters:
307 --   A Pl/Sql record structre.
308 --
309 -- Post Success:
310 --   The record structure will be returned with all system defaulted parameter
311 --   values converted into its current row attribute value.
312 --
313 -- Post Failure:
314 --   No direct error handling is required within this function. Any possible
315 --   errors within this procedure will be a PL/SQL value error due to conversion
316 --   of datatypes or data lengths.
317 --
318 -- Developer Implementation Notes:
319 --   None.
320 --
321 -- Access Status:
322 --   Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure convert_defs(p_rec in out nocopy pqh_wdt_shd.g_rec_type) is
327 --
328   l_proc  varchar2(72) := g_package||'convert_defs';
329 --
330 Begin
331   --
332   hr_utility.set_location('Entering:'||l_proc, 5);
333   --
334   -- We must now examine each argument value in the
335   -- p_rec plsql record structure
336   -- to see if a system default is being used. If a system default
337   -- is being used then we must set to the 'current' argument value.
338   --
339   If (p_rec.worksheet_id = hr_api.g_number) then
340     p_rec.worksheet_id :=
341     pqh_wdt_shd.g_old_rec.worksheet_id;
342   End If;
343   If (p_rec.organization_id = hr_api.g_number) then
344     p_rec.organization_id :=
345     pqh_wdt_shd.g_old_rec.organization_id;
346   End If;
347   If (p_rec.job_id = hr_api.g_number) then
348     p_rec.job_id :=
349     pqh_wdt_shd.g_old_rec.job_id;
350   End If;
351   If (p_rec.position_id = hr_api.g_number) then
352     p_rec.position_id :=
353     pqh_wdt_shd.g_old_rec.position_id;
354   End If;
355   If (p_rec.grade_id = hr_api.g_number) then
356     p_rec.grade_id :=
357     pqh_wdt_shd.g_old_rec.grade_id;
358   End If;
359   If (p_rec.position_transaction_id = hr_api.g_number) then
360     p_rec.position_transaction_id :=
361     pqh_wdt_shd.g_old_rec.position_transaction_id;
362   End If;
363   If (p_rec.budget_detail_id = hr_api.g_number) then
364     p_rec.budget_detail_id :=
365     pqh_wdt_shd.g_old_rec.budget_detail_id;
366   End If;
367   If (p_rec.parent_worksheet_detail_id = hr_api.g_number) then
368     p_rec.parent_worksheet_detail_id :=
369     pqh_wdt_shd.g_old_rec.parent_worksheet_detail_id;
370   End If;
371   If (p_rec.user_id = hr_api.g_number) then
372     p_rec.user_id :=
373     pqh_wdt_shd.g_old_rec.user_id;
374   End If;
375   If (p_rec.action_cd = hr_api.g_varchar2) then
376     p_rec.action_cd :=
377     pqh_wdt_shd.g_old_rec.action_cd;
378   End If;
379   If (p_rec.budget_unit1_percent = hr_api.g_number) then
380     p_rec.budget_unit1_percent :=
381     pqh_wdt_shd.g_old_rec.budget_unit1_percent;
382   End If;
383   If (p_rec.budget_unit1_value = hr_api.g_number) then
384     p_rec.budget_unit1_value :=
385     pqh_wdt_shd.g_old_rec.budget_unit1_value;
386   End If;
387   If (p_rec.budget_unit2_percent = hr_api.g_number) then
388     p_rec.budget_unit2_percent :=
389     pqh_wdt_shd.g_old_rec.budget_unit2_percent;
390   End If;
391   If (p_rec.budget_unit2_value = hr_api.g_number) then
392     p_rec.budget_unit2_value :=
393     pqh_wdt_shd.g_old_rec.budget_unit2_value;
394   End If;
395   If (p_rec.budget_unit3_percent = hr_api.g_number) then
396     p_rec.budget_unit3_percent :=
397     pqh_wdt_shd.g_old_rec.budget_unit3_percent;
398   End If;
399   If (p_rec.budget_unit3_value = hr_api.g_number) then
400     p_rec.budget_unit3_value :=
401     pqh_wdt_shd.g_old_rec.budget_unit3_value;
402   End If;
403   If (p_rec.budget_unit1_value_type_cd = hr_api.g_varchar2) then
404     p_rec.budget_unit1_value_type_cd :=
405     pqh_wdt_shd.g_old_rec.budget_unit1_value_type_cd;
406   End If;
407   If (p_rec.budget_unit2_value_type_cd = hr_api.g_varchar2) then
408     p_rec.budget_unit2_value_type_cd :=
409     pqh_wdt_shd.g_old_rec.budget_unit2_value_type_cd;
410   End If;
411   If (p_rec.budget_unit3_value_type_cd = hr_api.g_varchar2) then
412     p_rec.budget_unit3_value_type_cd :=
413     pqh_wdt_shd.g_old_rec.budget_unit3_value_type_cd;
414   End If;
415   If (p_rec.status = hr_api.g_varchar2) then
416     p_rec.status :=
417     pqh_wdt_shd.g_old_rec.status;
418   End If;
419   If (p_rec.budget_unit1_available = hr_api.g_number) then
420     p_rec.budget_unit1_available :=
421     pqh_wdt_shd.g_old_rec.budget_unit1_available;
422   End If;
423   If (p_rec.budget_unit2_available = hr_api.g_number) then
424     p_rec.budget_unit2_available :=
425     pqh_wdt_shd.g_old_rec.budget_unit2_available;
426   End If;
427   If (p_rec.budget_unit3_available = hr_api.g_number) then
428     p_rec.budget_unit3_available :=
429     pqh_wdt_shd.g_old_rec.budget_unit3_available;
430   End If;
431   If (p_rec.old_unit1_value = hr_api.g_number) then
432     p_rec.old_unit1_value :=
433     pqh_wdt_shd.g_old_rec.old_unit1_value;
434   End If;
435   If (p_rec.old_unit2_value = hr_api.g_number) then
436     p_rec.old_unit2_value :=
437     pqh_wdt_shd.g_old_rec.old_unit2_value;
438   End If;
439   If (p_rec.old_unit3_value = hr_api.g_number) then
440     p_rec.old_unit3_value :=
441     pqh_wdt_shd.g_old_rec.old_unit3_value;
442   End If;
443   If (p_rec.defer_flag = hr_api.g_varchar2) then
444     p_rec.defer_flag :=
445     pqh_wdt_shd.g_old_rec.defer_flag;
446   End If;
447   If (p_rec.propagation_method = hr_api.g_varchar2) then
448     p_rec.propagation_method :=
449     pqh_wdt_shd.g_old_rec.propagation_method;
450   End If;
451   --
452   hr_utility.set_location(' Leaving:'||l_proc, 10);
453 --
454 End convert_defs;
455 --
456 -- ----------------------------------------------------------------------------
457 -- |---------------------------------< upd >----------------------------------|
458 -- ----------------------------------------------------------------------------
459 Procedure upd
460   (
461   p_effective_date in date,
462   p_rec        in out nocopy pqh_wdt_shd.g_rec_type
463   ) is
464 --
465   l_proc  varchar2(72) := g_package||'upd';
466 --
467 Begin
468   hr_utility.set_location('Entering:'||l_proc, 5);
469   --
470   -- We must lock the row which we need to update.
471   --
472   pqh_wdt_shd.lck
473 	(
474 	p_rec.worksheet_detail_id,
475 	p_rec.object_version_number
476 	);
477   --
478   -- 1. During an update system defaults are used to determine if
479   --    arguments have been defaulted or not. We must therefore
480   --    derive the full record structure values to be updated.
481   --
482   -- 2. Call the supporting update validate operations.
483   --
484   convert_defs(p_rec);
485   pqh_wdt_bus.update_validate(p_rec
486   ,p_effective_date);
487   --
488   -- Call the supporting pre-update operation
489   --
490   pre_update(p_rec);
491   --
492   -- Update the row.
493   --
494   update_dml(p_rec);
495   --
496   -- Call the supporting post-update operation
497   --
498   post_update(
499 p_effective_date,p_rec);
500 End upd;
501 --
502 -- ----------------------------------------------------------------------------
503 -- |---------------------------------< upd >----------------------------------|
504 -- ----------------------------------------------------------------------------
505 Procedure upd
506   (
507   p_effective_date in date,
508   p_worksheet_detail_id          in number,
509   p_worksheet_id                 in number           default hr_api.g_number,
510   p_organization_id              in number           default hr_api.g_number,
511   p_job_id                       in number           default hr_api.g_number,
512   p_position_id                  in number           default hr_api.g_number,
513   p_grade_id                     in number           default hr_api.g_number,
514   p_position_transaction_id      in number           default hr_api.g_number,
515   p_budget_detail_id             in number           default hr_api.g_number,
516   p_parent_worksheet_detail_id   in number           default hr_api.g_number,
517   p_user_id                      in number           default hr_api.g_number,
518   p_action_cd                    in varchar2         default hr_api.g_varchar2,
519   p_budget_unit1_percent         in number           default hr_api.g_number,
520   p_budget_unit1_value           in number           default hr_api.g_number,
521   p_budget_unit2_percent         in number           default hr_api.g_number,
522   p_budget_unit2_value           in number           default hr_api.g_number,
523   p_budget_unit3_percent         in number           default hr_api.g_number,
524   p_budget_unit3_value           in number           default hr_api.g_number,
525   p_object_version_number        in out nocopy number,
526   p_budget_unit1_value_type_cd   in varchar2         default hr_api.g_varchar2,
527   p_budget_unit2_value_type_cd   in varchar2         default hr_api.g_varchar2,
528   p_budget_unit3_value_type_cd   in varchar2         default hr_api.g_varchar2,
529   p_status                       in varchar2         default hr_api.g_varchar2,
530   p_budget_unit1_available       in number           default hr_api.g_number,
531   p_budget_unit2_available       in number           default hr_api.g_number,
532   p_budget_unit3_available       in number           default hr_api.g_number,
533   p_old_unit1_value              in number           default hr_api.g_number,
534   p_old_unit2_value              in number           default hr_api.g_number,
535   p_old_unit3_value              in number           default hr_api.g_number,
536   p_defer_flag                   in varchar2         default hr_api.g_varchar2,
537   p_propagation_method           in varchar2         default hr_api.g_varchar2
538   ) is
539 --
540   l_rec	  pqh_wdt_shd.g_rec_type;
541   l_proc  varchar2(72) := g_package||'upd';
542 --
543 Begin
544   hr_utility.set_location('Entering:'||l_proc, 5);
545   --
546   -- Call conversion function to turn arguments into the
547   -- l_rec structure.
548   --
549   l_rec :=
550   pqh_wdt_shd.convert_args
551   (
552   p_worksheet_detail_id,
553   p_worksheet_id,
554   p_organization_id,
555   p_job_id,
556   p_position_id,
557   p_grade_id,
558   p_position_transaction_id,
559   p_budget_detail_id,
560   p_parent_worksheet_detail_id,
561   p_user_id,
562   p_action_cd,
563   p_budget_unit1_percent,
564   p_budget_unit1_value,
565   p_budget_unit2_percent,
566   p_budget_unit2_value,
567   p_budget_unit3_percent,
568   p_budget_unit3_value,
569   p_object_version_number,
570   p_budget_unit1_value_type_cd,
571   p_budget_unit2_value_type_cd,
572   p_budget_unit3_value_type_cd,
573   p_status,
574   p_budget_unit1_available,
575   p_budget_unit2_available,
576   p_budget_unit3_available,
577   p_old_unit1_value,
578   p_old_unit2_value,
579   p_old_unit3_value,
580   p_defer_flag,
581   p_propagation_method
582   );
583   --
584   -- Having converted the arguments into the
585   -- plsql record structure we call the corresponding record
586   -- business process.
587   --
588   upd(
589     p_effective_date,l_rec);
590   p_object_version_number := l_rec.object_version_number;
591   --
592   hr_utility.set_location(' Leaving:'||l_proc, 10);
593 End upd;
594 --
595 end pqh_wdt_upd;