DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_BLT_UPD

Source


1 Package Body pay_blt_upd as
2 /* $Header: pybltrhi.pkb 120.0 2005/05/29 03:21 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_blt_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 pay_blt_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   pay_blt_shd.g_api_dml := true;  -- Set the api dml status
67   --
68   -- Update the pay_balance_types Row
69   --
70   update pay_balance_types
71     set
72      balance_type_id                 = p_rec.balance_type_id
73     ,business_group_id               = p_rec.business_group_id
74     ,legislation_code                = p_rec.legislation_code
75     ,currency_code                   = p_rec.currency_code
76     ,assignment_remuneration_flag    = p_rec.assignment_remuneration_flag
77     ,balance_name                    = p_rec.balance_name
78     ,balance_uom                     = p_rec.balance_uom
79     ,comments                        = p_rec.comments
80     ,legislation_subgroup            = p_rec.legislation_subgroup
81     ,reporting_name                  = p_rec.reporting_name
82     ,attribute_category              = p_rec.attribute_category
83     ,attribute1                      = p_rec.attribute1
84     ,attribute2                      = p_rec.attribute2
85     ,attribute3                      = p_rec.attribute3
86     ,attribute4                      = p_rec.attribute4
87     ,attribute5                      = p_rec.attribute5
88     ,attribute6                      = p_rec.attribute6
89     ,attribute7                      = p_rec.attribute7
90     ,attribute8                      = p_rec.attribute8
91     ,attribute9                      = p_rec.attribute9
92     ,attribute10                     = p_rec.attribute10
93     ,attribute11                     = p_rec.attribute11
94     ,attribute12                     = p_rec.attribute12
95     ,attribute13                     = p_rec.attribute13
96     ,attribute14                     = p_rec.attribute14
97     ,attribute15                     = p_rec.attribute15
98     ,attribute16                     = p_rec.attribute16
99     ,attribute17                     = p_rec.attribute17
100     ,attribute18                     = p_rec.attribute18
101     ,attribute19                     = p_rec.attribute19
102     ,attribute20                     = p_rec.attribute20
103     ,jurisdiction_level              = p_rec.jurisdiction_level
104     ,tax_type                        = p_rec.tax_type
105     ,object_version_number           = p_rec.object_version_number
106     ,balance_category_id             = p_rec.balance_category_id
107     ,base_balance_type_id            = p_rec.base_balance_type_id
108     ,input_value_id                  = p_rec.input_value_id
109     where balance_type_id = p_rec.balance_type_id;
110   --
111   pay_blt_shd.g_api_dml := false;   -- Unset the api dml status
112   --
113   hr_utility.set_location(' Leaving:'||l_proc, 10);
114 --
115 Exception
116   When hr_api.check_integrity_violated Then
117     -- A check constraint has been violated
118     pay_blt_shd.g_api_dml := false;   -- Unset the api dml status
119     pay_blt_shd.constraint_error
120       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121   When hr_api.parent_integrity_violated Then
122     -- Parent integrity has been violated
123     pay_blt_shd.g_api_dml := false;   -- Unset the api dml status
124     pay_blt_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When hr_api.unique_integrity_violated Then
127     -- Unique integrity has been violated
128     pay_blt_shd.g_api_dml := false;   -- Unset the api dml status
129     pay_blt_shd.constraint_error
130       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131   When Others Then
132     pay_blt_shd.g_api_dml := false;   -- Unset the api dml status
133     Raise;
134 End update_dml;
135 --
136 -- ----------------------------------------------------------------------------
137 -- |------------------------------< pre_update >------------------------------|
138 -- ----------------------------------------------------------------------------
139 -- {Start Of Comments}
140 --
141 -- Description:
142 --   This private procedure contains any processing which is required before
143 --   the update dml.
144 --
145 -- Prerequisites:
146 --   This is an internal procedure which is called from the upd procedure.
147 --
148 -- In Parameters:
149 --   A Pl/Sql record structure.
150 --
151 -- Post Success:
152 --   Processing continues.
153 --
154 -- Post Failure:
155 --   If an error has occurred, an error message and exception wil be raised
156 --   but not handled.
157 --
158 -- Developer Implementation Notes:
159 --   Any pre-processing required before the update dml is issued should be
160 --   coded within this procedure. It is important to note that any 3rd party
161 --   maintenance should be reviewed before placing in this procedure.
162 --
163 -- Access Status:
164 --   Internal Row Handler Use Only.
165 --
166 -- {End Of Comments}
167 -- ----------------------------------------------------------------------------
168 Procedure pre_update
169   (p_rec in pay_blt_shd.g_rec_type
170   ) is
171 --
172   l_proc  varchar2(72) := g_package||'pre_update';
173 --
174 Begin
175   hr_utility.set_location('Entering:'||l_proc, 5);
176   --
177   hr_utility.set_location(' Leaving:'||l_proc, 10);
178 End pre_update;
179 --
180 -- ----------------------------------------------------------------------------
181 -- |-----------------------------< post_update >------------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 --   This private procedure contains any processing which is required after
187 --   the update dml.
188 --
189 -- Prerequisites:
190 --   This is an internal procedure which is called from the upd procedure.
191 --
192 -- In Parameters:
193 --   A Pl/Sql record structure.
194 --
195 -- Post Success:
196 --   Processing continues.
197 --
198 -- Post Failure:
199 --   If an error has occurred, an error message and exception will be raised
200 --   but not handled.
201 --
202 -- Developer Implementation Notes:
203 --   Any post-processing required after the update dml is issued should be
204 --   coded within this procedure. It is important to note that any 3rd party
205 --   maintenance should be reviewed before placing in this procedure.
206 --
207 -- Access Status:
208 --   Internal Row Handler Use Only.
209 --
210 -- {End Of Comments}
211 -- ----------------------------------------------------------------------------
212 Procedure post_update
213   (p_effective_date               in date
214   ,p_rec                          in pay_blt_shd.g_rec_type
215   ,p_balance_name_warning         in number
216   ) is
217 --
218   l_proc  varchar2(72) := g_package||'post_update';
219 --
220 Begin
221   hr_utility.set_location('Entering:'||l_proc, 5);
222   begin
223     --
224     pay_blt_rku.after_update
225       (p_effective_date              => p_effective_date
226       ,p_balance_type_id             => p_rec.balance_type_id
227       ,p_business_group_id           => p_rec.business_group_id
228       ,p_legislation_code            => p_rec.legislation_code
229       ,p_currency_code               => p_rec.currency_code
230       ,p_assignment_remuneration_flag  => p_rec.assignment_remuneration_flag
231       ,p_balance_name                  => p_rec.balance_name
232       ,p_balance_uom                   => p_rec.balance_uom
233       ,p_comments                      => p_rec.comments
234       ,p_legislation_subgroup          => p_rec.legislation_subgroup
235       ,p_reporting_name                => p_rec.reporting_name
236       ,p_attribute_category            => p_rec.attribute_category
237       ,p_attribute1                    => p_rec.attribute1
238       ,p_attribute2                    => p_rec.attribute2
239       ,p_attribute3                    => p_rec.attribute3
240       ,p_attribute4                    => p_rec.attribute4
241       ,p_attribute5                    => p_rec.attribute5
242       ,p_attribute6                    => p_rec.attribute6
243       ,p_attribute7                    => p_rec.attribute7
244       ,p_attribute8                    => p_rec.attribute8
245       ,p_attribute9                    => p_rec.attribute9
246       ,p_attribute10                   => p_rec.attribute10
247       ,p_attribute11                   => p_rec.attribute11
248       ,p_attribute12                   => p_rec.attribute12
249       ,p_attribute13                   => p_rec.attribute13
250       ,p_attribute14                   => p_rec.attribute14
251       ,p_attribute15                   => p_rec.attribute15
252       ,p_attribute16                   => p_rec.attribute16
253       ,p_attribute17                   => p_rec.attribute17
254       ,p_attribute18                   => p_rec.attribute18
255       ,p_attribute19                   => p_rec.attribute19
256       ,p_attribute20                   => p_rec.attribute20
257       ,p_jurisdiction_level            => p_rec.jurisdiction_level
258       ,p_tax_type                      => p_rec.tax_type
259       ,p_object_version_number         => p_rec.object_version_number
260       ,p_balance_category_id           => p_rec.balance_category_id
261       ,p_base_balance_type_id          => p_rec.base_balance_type_id
262       ,p_input_value_id                => p_rec.input_value_id
263       ,p_balance_name_warning     => p_balance_name_warning
264       ,p_business_group_id_o      => pay_blt_shd.g_old_rec.business_group_id
265       ,p_legislation_code_o       => pay_blt_shd.g_old_rec.legislation_code
266       ,p_currency_code_o          => pay_blt_shd.g_old_rec.currency_code
267       ,p_assignment_remuneration_fl_o
268                            => pay_blt_shd.g_old_rec.assignment_remuneration_flag
269       ,p_balance_name_o           => pay_blt_shd.g_old_rec.balance_name
270       ,p_balance_uom_o            => pay_blt_shd.g_old_rec.balance_uom
271       ,p_comments_o               => pay_blt_shd.g_old_rec.comments
272       ,p_legislation_subgroup_o   => pay_blt_shd.g_old_rec.legislation_subgroup
273       ,p_reporting_name_o         => pay_blt_shd.g_old_rec.reporting_name
274       ,p_attribute_category_o     => pay_blt_shd.g_old_rec.attribute_category
275       ,p_attribute1_o             => pay_blt_shd.g_old_rec.attribute1
276       ,p_attribute2_o             => pay_blt_shd.g_old_rec.attribute2
277       ,p_attribute3_o             => pay_blt_shd.g_old_rec.attribute3
278       ,p_attribute4_o             => pay_blt_shd.g_old_rec.attribute4
279       ,p_attribute5_o             => pay_blt_shd.g_old_rec.attribute5
280       ,p_attribute6_o             => pay_blt_shd.g_old_rec.attribute6
281       ,p_attribute7_o             => pay_blt_shd.g_old_rec.attribute7
282       ,p_attribute8_o             => pay_blt_shd.g_old_rec.attribute8
283       ,p_attribute9_o             => pay_blt_shd.g_old_rec.attribute9
284       ,p_attribute10_o            => pay_blt_shd.g_old_rec.attribute10
285       ,p_attribute11_o            => pay_blt_shd.g_old_rec.attribute11
286       ,p_attribute12_o            => pay_blt_shd.g_old_rec.attribute12
287       ,p_attribute13_o            => pay_blt_shd.g_old_rec.attribute13
288       ,p_attribute14_o            => pay_blt_shd.g_old_rec.attribute14
289       ,p_attribute15_o            => pay_blt_shd.g_old_rec.attribute15
290       ,p_attribute16_o            => pay_blt_shd.g_old_rec.attribute16
291       ,p_attribute17_o            => pay_blt_shd.g_old_rec.attribute17
292       ,p_attribute18_o            => pay_blt_shd.g_old_rec.attribute18
293       ,p_attribute19_o            => pay_blt_shd.g_old_rec.attribute19
294       ,p_attribute20_o            => pay_blt_shd.g_old_rec.attribute20
295       ,p_jurisdiction_level_o     => pay_blt_shd.g_old_rec.jurisdiction_level
296       ,p_tax_type_o               => pay_blt_shd.g_old_rec.tax_type
297       ,p_object_version_number_o => pay_blt_shd.g_old_rec.object_version_number
298       ,p_balance_category_id_o    => pay_blt_shd.g_old_rec.balance_category_id
299       ,p_base_balance_type_id_o   => pay_blt_shd.g_old_rec.base_balance_type_id
300       ,p_input_value_id_o         => pay_blt_shd.g_old_rec.input_value_id
301       );
302     --
303   exception
304     --
305     when hr_api.cannot_find_prog_unit then
306       --
307       hr_api.cannot_find_prog_unit_error
308         (p_module_name => 'PAY_BALANCE_TYPES'
309         ,p_hook_type   => 'AU');
310       --
311   end;
312   --
313   hr_utility.set_location(' Leaving:'||l_proc, 10);
314 End post_update;
315 --
316 -- ----------------------------------------------------------------------------
317 -- |-----------------------------< convert_defs >-----------------------------|
318 -- ----------------------------------------------------------------------------
319 -- {Start Of Comments}
320 --
321 -- Description:
322 --   The Convert_Defs procedure has one very important function:
323 --   It must return the record structure for the row with all system defaulted
324 --   values converted into its corresponding parameter value for update. When
325 --   we attempt to update a row through the Upd process , certain
326 --   parameters can be defaulted which enables flexibility in the calling of
327 --   the upd process (e.g. only attributes which need to be updated need to be
328 --   specified). For the upd process to determine which attributes
329 --   have NOT been specified we need to check if the parameter has a reserved
330 --   system default value. Therefore, for all parameters which have a
331 --   corresponding reserved system default mechanism specified we need to
332 --   check if a system default is being used. If a system default is being
333 --   used then we convert the defaulted value into its corresponding attribute
334 --   value held in the g_old_rec data structure.
335 --
336 -- Prerequisites:
337 --   This private function can only be called from the upd process.
338 --
339 -- In Parameters:
340 --   A Pl/Sql record structure.
341 --
342 -- Post Success:
343 --   The record structure will be returned with all system defaulted parameter
344 --   values converted into its current row attribute value.
345 --
346 -- Post Failure:
347 --   No direct error handling is required within this function. Any possible
348 --   errors within this procedure will be a PL/SQL value error due to
349 --   conversion of datatypes or data lengths.
350 --
351 -- Developer Implementation Notes:
352 --   None.
353 --
354 -- Access Status:
355 --   Internal Row Handler Use Only.
356 --
357 -- {End Of Comments}
358 -- ----------------------------------------------------------------------------
359 Procedure convert_defs
360   (p_rec in out nocopy pay_blt_shd.g_rec_type
361   ) is
362 --
363 Begin
364   --
365   -- We must now examine each argument value in the
366   -- p_rec plsql record structure
367   -- to see if a system default is being used. If a system default
368   -- is being used then we must set to the 'current' argument value.
369   --
370   If (p_rec.business_group_id = hr_api.g_number) then
371     p_rec.business_group_id :=
372     pay_blt_shd.g_old_rec.business_group_id;
373   End If;
374   If (p_rec.legislation_code = hr_api.g_varchar2) then
375     p_rec.legislation_code :=
376     pay_blt_shd.g_old_rec.legislation_code;
377   End If;
378   If (p_rec.currency_code = hr_api.g_varchar2) then
379     p_rec.currency_code :=
380     pay_blt_shd.g_old_rec.currency_code;
381   End If;
382   If (p_rec.assignment_remuneration_flag = hr_api.g_varchar2) then
383     p_rec.assignment_remuneration_flag :=
384     pay_blt_shd.g_old_rec.assignment_remuneration_flag;
385   End If;
386   If (p_rec.balance_name = hr_api.g_varchar2) then
387     p_rec.balance_name :=
388     pay_blt_shd.g_old_rec.balance_name;
389   End If;
390   If (p_rec.balance_uom = hr_api.g_varchar2) then
391     p_rec.balance_uom :=
392     pay_blt_shd.g_old_rec.balance_uom;
393   End If;
394   If (p_rec.comments = hr_api.g_varchar2) then
395     p_rec.comments :=
396     pay_blt_shd.g_old_rec.comments;
397   End If;
398   If (p_rec.legislation_subgroup = hr_api.g_varchar2) then
399     p_rec.legislation_subgroup :=
400     pay_blt_shd.g_old_rec.legislation_subgroup;
401   End If;
402   If (p_rec.reporting_name = hr_api.g_varchar2) then
403     p_rec.reporting_name :=
404     pay_blt_shd.g_old_rec.reporting_name;
405   End If;
406   If (p_rec.attribute_category = hr_api.g_varchar2) then
407     p_rec.attribute_category :=
408     pay_blt_shd.g_old_rec.attribute_category;
409   End If;
410   If (p_rec.attribute1 = hr_api.g_varchar2) then
411     p_rec.attribute1 :=
412     pay_blt_shd.g_old_rec.attribute1;
413   End If;
414   If (p_rec.attribute2 = hr_api.g_varchar2) then
415     p_rec.attribute2 :=
416     pay_blt_shd.g_old_rec.attribute2;
417   End If;
418   If (p_rec.attribute3 = hr_api.g_varchar2) then
419     p_rec.attribute3 :=
420     pay_blt_shd.g_old_rec.attribute3;
421   End If;
422   If (p_rec.attribute4 = hr_api.g_varchar2) then
423     p_rec.attribute4 :=
424     pay_blt_shd.g_old_rec.attribute4;
425   End If;
426   If (p_rec.attribute5 = hr_api.g_varchar2) then
427     p_rec.attribute5 :=
428     pay_blt_shd.g_old_rec.attribute5;
429   End If;
430   If (p_rec.attribute6 = hr_api.g_varchar2) then
431     p_rec.attribute6 :=
432     pay_blt_shd.g_old_rec.attribute6;
433   End If;
434   If (p_rec.attribute7 = hr_api.g_varchar2) then
435     p_rec.attribute7 :=
436     pay_blt_shd.g_old_rec.attribute7;
437   End If;
438   If (p_rec.attribute8 = hr_api.g_varchar2) then
439     p_rec.attribute8 :=
440     pay_blt_shd.g_old_rec.attribute8;
441   End If;
442   If (p_rec.attribute9 = hr_api.g_varchar2) then
443     p_rec.attribute9 :=
444     pay_blt_shd.g_old_rec.attribute9;
445   End If;
446   If (p_rec.attribute10 = hr_api.g_varchar2) then
447     p_rec.attribute10 :=
448     pay_blt_shd.g_old_rec.attribute10;
449   End If;
450   If (p_rec.attribute11 = hr_api.g_varchar2) then
451     p_rec.attribute11 :=
452     pay_blt_shd.g_old_rec.attribute11;
453   End If;
454   If (p_rec.attribute12 = hr_api.g_varchar2) then
455     p_rec.attribute12 :=
456     pay_blt_shd.g_old_rec.attribute12;
457   End If;
458   If (p_rec.attribute13 = hr_api.g_varchar2) then
459     p_rec.attribute13 :=
460     pay_blt_shd.g_old_rec.attribute13;
461   End If;
462   If (p_rec.attribute14 = hr_api.g_varchar2) then
463     p_rec.attribute14 :=
464     pay_blt_shd.g_old_rec.attribute14;
465   End If;
466   If (p_rec.attribute15 = hr_api.g_varchar2) then
467     p_rec.attribute15 :=
468     pay_blt_shd.g_old_rec.attribute15;
469   End If;
470   If (p_rec.attribute16 = hr_api.g_varchar2) then
471     p_rec.attribute16 :=
472     pay_blt_shd.g_old_rec.attribute16;
473   End If;
474   If (p_rec.attribute17 = hr_api.g_varchar2) then
475     p_rec.attribute17 :=
476     pay_blt_shd.g_old_rec.attribute17;
477   End If;
478   If (p_rec.attribute18 = hr_api.g_varchar2) then
479     p_rec.attribute18 :=
480     pay_blt_shd.g_old_rec.attribute18;
481   End If;
482   If (p_rec.attribute19 = hr_api.g_varchar2) then
483     p_rec.attribute19 :=
484     pay_blt_shd.g_old_rec.attribute19;
485   End If;
486   If (p_rec.attribute20 = hr_api.g_varchar2) then
487     p_rec.attribute20 :=
488     pay_blt_shd.g_old_rec.attribute20;
489   End If;
490   If (p_rec.jurisdiction_level = hr_api.g_number) then
491     p_rec.jurisdiction_level :=
492     pay_blt_shd.g_old_rec.jurisdiction_level;
493   End If;
494   If (p_rec.tax_type = hr_api.g_varchar2) then
495     p_rec.tax_type :=
496     pay_blt_shd.g_old_rec.tax_type;
497   End If;
498   If (p_rec.balance_category_id = hr_api.g_number) then
499     p_rec.balance_category_id :=
500     pay_blt_shd.g_old_rec.balance_category_id;
501   End If;
502   If (p_rec.base_balance_type_id = hr_api.g_number) then
503     p_rec.base_balance_type_id :=
504     pay_blt_shd.g_old_rec.base_balance_type_id;
505   End If;
506   If (p_rec.input_value_id = hr_api.g_number) then
507     p_rec.input_value_id :=
508     pay_blt_shd.g_old_rec.input_value_id;
509   End If;
510   --
511 End convert_defs;
512 --
513 -- ----------------------------------------------------------------------------
514 -- |---------------------------------< upd >----------------------------------|
515 -- ----------------------------------------------------------------------------
516 Procedure upd
517   (p_effective_date               in date
518   ,p_rec                          in out nocopy pay_blt_shd.g_rec_type
519   ,p_balance_name_warning            out nocopy number
520   ) is
521 --
522   l_proc  varchar2(72) := g_package||'upd';
523   l_balance_name_warning    number;
524 --
525 Begin
526   hr_utility.set_location('Entering:'||l_proc, 5);
527   --
528   -- We must lock the row which we need to update.
529   --
530   pay_blt_shd.lck
531     (p_rec.balance_type_id
532     ,p_rec.object_version_number
533     );
534   --
535   -- 1. During an update system defaults are used to determine if
536   --    arguments have been defaulted or not. We must therefore
537   --    derive the full record structure values to be updated.
538   --
539   -- 2. Call the supporting update validate operations.
540   --
541   convert_defs(p_rec);
542 
543    pay_blt_bus.update_validate
544      (p_effective_date
545      ,p_rec
546      ,l_balance_name_warning
547      );
548   --
549 
550   p_balance_name_warning := l_balance_name_warning;
551   --
552 
553   -- Call to raise any errors on multi-message list
554   hr_multi_message.end_validation_set;
555   --
556   -- Call the supporting pre-update operation
557   --
558   pay_blt_upd.pre_update(p_rec);
559   --
560   -- Update the row.
561   --
562   pay_blt_upd.update_dml(p_rec);
563   --
564   -- Call the supporting post-update operation
565   --
566   pay_blt_upd.post_update
567      (p_effective_date
568      ,p_rec
569      ,l_balance_name_warning
570      );
571   --
572   -- recreate database item if balance name is changed
573   --
574   if l_balance_name_warning = 2 then
575      pay_blt_bus.recreate_db_items(p_rec.balance_type_id);
576   end if;
577   --
578   -- insert associated feed of primary balance
579   --
580   if p_rec.input_value_id is not null then
581     pay_blt_bus.insert_primary_balance_feed
582      ( p_effective_date       => p_effective_date
583       ,p_business_group_id    => p_rec.business_group_id
584       ,p_balance_type_id      => p_rec.balance_type_id
585       ,p_input_value_id       => p_rec.input_value_id
586      );
587   end if;
588   --
589 
590   -- Call to raise any errors on multi-message list
591   hr_multi_message.end_validation_set;
592 End upd;
593 --
594 -- ----------------------------------------------------------------------------
595 -- |---------------------------------< upd >----------------------------------|
596 -- ----------------------------------------------------------------------------
597 Procedure upd
598   (p_effective_date               in     date
599   ,p_balance_type_id              in     number
600   ,p_object_version_number        in out nocopy number
601   ,p_assignment_remuneration_flag in     varchar2  default hr_api.g_varchar2
602   ,p_balance_uom                  in     varchar2  default hr_api.g_varchar2
603   ,p_business_group_id            in     number    default hr_api.g_number
604   ,p_legislation_code             in     varchar2  default hr_api.g_varchar2
605   ,p_currency_code                in     varchar2  default hr_api.g_varchar2
606   ,p_balance_name                 in     varchar2  default hr_api.g_varchar2
607   ,p_comments                     in     varchar2  default hr_api.g_varchar2
608   ,p_legislation_subgroup         in     varchar2  default hr_api.g_varchar2
609   ,p_reporting_name               in     varchar2  default hr_api.g_varchar2
610   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
611   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
612   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
613   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
614   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
615   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
616   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
617   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
618   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
619   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
620   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
621   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
622   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
623   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
624   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
625   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
626   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
627   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
628   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
629   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
630   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
631   ,p_balance_category_id          in     number    default hr_api.g_number
632   ,p_base_balance_type_id         in     number    default hr_api.g_number
633   ,p_input_value_id               in     number    default hr_api.g_number
634   ,p_balance_name_warning            out nocopy number
635   ) is
636 --
637   l_rec   pay_blt_shd.g_rec_type;
638   l_proc  varchar2(72) := g_package||'upd';
639 
640   -- Bug 4248768. jurisdiction_level and tax type
641   -- must not be defaulted to null.
642   l_jurisdiction_level number        := hr_api.g_number;
643   l_tax_type           varchar2(30)  := hr_api.g_varchar2;
644   l_balance_name_warning    number;
645 --
646 Begin
647   hr_utility.set_location('Entering:'||l_proc, 5);
648   --
649   -- Call conversion function to turn arguments into the
650   -- l_rec structure.
651   --
652   l_rec :=
653   pay_blt_shd.convert_args
654   (p_balance_type_id
655   ,p_business_group_id
656   ,p_legislation_code
657   ,p_currency_code
658   ,p_assignment_remuneration_flag
659   ,p_balance_name
660   ,p_balance_uom
661   ,p_comments
662   ,p_legislation_subgroup
663   ,p_reporting_name
664   ,p_attribute_category
665   ,p_attribute1
666   ,p_attribute2
667   ,p_attribute3
668   ,p_attribute4
669   ,p_attribute5
670   ,p_attribute6
671   ,p_attribute7
672   ,p_attribute8
673   ,p_attribute9
674   ,p_attribute10
675   ,p_attribute11
676   ,p_attribute12
677   ,p_attribute13
678   ,p_attribute14
679   ,p_attribute15
680   ,p_attribute16
681   ,p_attribute17
682   ,p_attribute18
683   ,p_attribute19
684   ,p_attribute20
685   ,l_jurisdiction_level
686   ,l_tax_type
687   ,p_object_version_number
688   ,p_balance_category_id
689   ,p_base_balance_type_id
690   ,p_input_value_id
691   );
692   --
693   -- Having converted the arguments into the
694   -- plsql record structure we call the corresponding record
695   -- business process.
696   --
697   pay_blt_upd.upd
698      (p_effective_date
699      ,l_rec
700      ,l_balance_name_warning
701      );
702   p_balance_name_warning  := l_balance_name_warning;
703   p_object_version_number := l_rec.object_version_number;
704   --
705   hr_utility.set_location(' Leaving:'||l_proc, 10);
706 End upd;
707 --
708 end pay_blt_upd;