DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PERSON_BNFTS_BAL_API

Source


1 Package Body ben_person_bnfts_bal_api as
2 /* $Header: bepbbapi.pkb 115.3 2002/12/16 09:36:54 hnarayan ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_person_bnfts_bal_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_person_bnfts_bal >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_person_bnfts_bal
13   (p_validate                       in  boolean   default false
14   ,p_per_bnfts_bal_id               out nocopy number
15   ,p_effective_start_date           out nocopy date
16   ,p_effective_end_date             out nocopy date
17   ,p_val                            in  number    default null
18   ,p_bnfts_bal_id                   in  number    default null
19   ,p_person_id                      in  number    default null
20   ,p_business_group_id              in  number    default null
21   ,p_pbb_attribute_category         in  varchar2  default null
22   ,p_pbb_attribute1                 in  varchar2  default null
23   ,p_pbb_attribute2                 in  varchar2  default null
24   ,p_pbb_attribute3                 in  varchar2  default null
25   ,p_pbb_attribute4                 in  varchar2  default null
26   ,p_pbb_attribute5                 in  varchar2  default null
27   ,p_pbb_attribute6                 in  varchar2  default null
28   ,p_pbb_attribute7                 in  varchar2  default null
29   ,p_pbb_attribute8                 in  varchar2  default null
30   ,p_pbb_attribute9                 in  varchar2  default null
31   ,p_pbb_attribute10                in  varchar2  default null
32   ,p_pbb_attribute11                in  varchar2  default null
33   ,p_pbb_attribute12                in  varchar2  default null
34   ,p_pbb_attribute13                in  varchar2  default null
35   ,p_pbb_attribute14                in  varchar2  default null
36   ,p_pbb_attribute15                in  varchar2  default null
37   ,p_pbb_attribute16                in  varchar2  default null
38   ,p_pbb_attribute17                in  varchar2  default null
39   ,p_pbb_attribute18                in  varchar2  default null
40   ,p_pbb_attribute19                in  varchar2  default null
41   ,p_pbb_attribute20                in  varchar2  default null
42   ,p_pbb_attribute21                in  varchar2  default null
43   ,p_pbb_attribute22                in  varchar2  default null
44   ,p_pbb_attribute23                in  varchar2  default null
45   ,p_pbb_attribute24                in  varchar2  default null
46   ,p_pbb_attribute25                in  varchar2  default null
47   ,p_pbb_attribute26                in  varchar2  default null
48   ,p_pbb_attribute27                in  varchar2  default null
49   ,p_pbb_attribute28                in  varchar2  default null
50   ,p_pbb_attribute29                in  varchar2  default null
51   ,p_pbb_attribute30                in  varchar2  default null
52   ,p_object_version_number          out nocopy number
53   ,p_effective_date                 in  date
54   ) is
55   --
56   -- Declare cursors and local variables
57   --
58   l_per_bnfts_bal_id ben_per_bnfts_bal_f.per_bnfts_bal_id%TYPE;
59   l_effective_start_date ben_per_bnfts_bal_f.effective_start_date%TYPE;
60   l_effective_end_date ben_per_bnfts_bal_f.effective_end_date%TYPE;
61   l_proc varchar2(72) := g_package||'create_person_bnfts_bal';
62   l_object_version_number ben_per_bnfts_bal_f.object_version_number%TYPE;
63   --
64 begin
65   --
66   hr_utility.set_location('Entering:'|| l_proc, 10);
67   --
68   -- Issue a savepoint if operating in validation only mode
69   --
70   savepoint create_person_bnfts_bal;
71   --
72   hr_utility.set_location(l_proc, 20);
73   --
74   -- Process Logic
75   --
76   begin
77     --
78     -- Start of API User Hook for the before hook of create_person_bnfts_bal
79     --
80     ben_person_bnfts_bal_bk1.create_person_bnfts_bal_b
81       (
82        p_val                            =>  p_val
83       ,p_bnfts_bal_id                   =>  p_bnfts_bal_id
84       ,p_person_id                      =>  p_person_id
85       ,p_business_group_id              =>  p_business_group_id
86       ,p_pbb_attribute_category         =>  p_pbb_attribute_category
87       ,p_pbb_attribute1                 =>  p_pbb_attribute1
88       ,p_pbb_attribute2                 =>  p_pbb_attribute2
89       ,p_pbb_attribute3                 =>  p_pbb_attribute3
90       ,p_pbb_attribute4                 =>  p_pbb_attribute4
91       ,p_pbb_attribute5                 =>  p_pbb_attribute5
92       ,p_pbb_attribute6                 =>  p_pbb_attribute6
93       ,p_pbb_attribute7                 =>  p_pbb_attribute7
94       ,p_pbb_attribute8                 =>  p_pbb_attribute8
95       ,p_pbb_attribute9                 =>  p_pbb_attribute9
96       ,p_pbb_attribute10                =>  p_pbb_attribute10
97       ,p_pbb_attribute11                =>  p_pbb_attribute11
98       ,p_pbb_attribute12                =>  p_pbb_attribute12
99       ,p_pbb_attribute13                =>  p_pbb_attribute13
100       ,p_pbb_attribute14                =>  p_pbb_attribute14
101       ,p_pbb_attribute15                =>  p_pbb_attribute15
102       ,p_pbb_attribute16                =>  p_pbb_attribute16
103       ,p_pbb_attribute17                =>  p_pbb_attribute17
104       ,p_pbb_attribute18                =>  p_pbb_attribute18
105       ,p_pbb_attribute19                =>  p_pbb_attribute19
106       ,p_pbb_attribute20                =>  p_pbb_attribute20
107       ,p_pbb_attribute21                =>  p_pbb_attribute21
108       ,p_pbb_attribute22                =>  p_pbb_attribute22
109       ,p_pbb_attribute23                =>  p_pbb_attribute23
110       ,p_pbb_attribute24                =>  p_pbb_attribute24
111       ,p_pbb_attribute25                =>  p_pbb_attribute25
112       ,p_pbb_attribute26                =>  p_pbb_attribute26
113       ,p_pbb_attribute27                =>  p_pbb_attribute27
114       ,p_pbb_attribute28                =>  p_pbb_attribute28
115       ,p_pbb_attribute29                =>  p_pbb_attribute29
116       ,p_pbb_attribute30                =>  p_pbb_attribute30
117       ,p_effective_date                 => trunc(p_effective_date)
118       );
119   exception
120     when hr_api.cannot_find_prog_unit then
121       hr_api.cannot_find_prog_unit_error
122         (
123          p_module_name => 'CREATE_person_bnfts_bal'
124         ,p_hook_type   => 'BP'
125         );
126     --
127     -- End of API User Hook for the before hook of create_person_bnfts_bal
128     --
129   end;
130   --
131   ben_pbb_ins.ins
132     (
133      p_per_bnfts_bal_id              => l_per_bnfts_bal_id
134     ,p_effective_start_date          => l_effective_start_date
135     ,p_effective_end_date            => l_effective_end_date
136     ,p_val                           => p_val
137     ,p_bnfts_bal_id                  => p_bnfts_bal_id
138     ,p_person_id                     => p_person_id
139     ,p_business_group_id             => p_business_group_id
140     ,p_pbb_attribute_category        => p_pbb_attribute_category
141     ,p_pbb_attribute1                => p_pbb_attribute1
142     ,p_pbb_attribute2                => p_pbb_attribute2
143     ,p_pbb_attribute3                => p_pbb_attribute3
144     ,p_pbb_attribute4                => p_pbb_attribute4
145     ,p_pbb_attribute5                => p_pbb_attribute5
146     ,p_pbb_attribute6                => p_pbb_attribute6
147     ,p_pbb_attribute7                => p_pbb_attribute7
148     ,p_pbb_attribute8                => p_pbb_attribute8
149     ,p_pbb_attribute9                => p_pbb_attribute9
150     ,p_pbb_attribute10               => p_pbb_attribute10
151     ,p_pbb_attribute11               => p_pbb_attribute11
152     ,p_pbb_attribute12               => p_pbb_attribute12
153     ,p_pbb_attribute13               => p_pbb_attribute13
154     ,p_pbb_attribute14               => p_pbb_attribute14
155     ,p_pbb_attribute15               => p_pbb_attribute15
156     ,p_pbb_attribute16               => p_pbb_attribute16
157     ,p_pbb_attribute17               => p_pbb_attribute17
158     ,p_pbb_attribute18               => p_pbb_attribute18
159     ,p_pbb_attribute19               => p_pbb_attribute19
160     ,p_pbb_attribute20               => p_pbb_attribute20
161     ,p_pbb_attribute21               => p_pbb_attribute21
162     ,p_pbb_attribute22               => p_pbb_attribute22
163     ,p_pbb_attribute23               => p_pbb_attribute23
164     ,p_pbb_attribute24               => p_pbb_attribute24
165     ,p_pbb_attribute25               => p_pbb_attribute25
166     ,p_pbb_attribute26               => p_pbb_attribute26
167     ,p_pbb_attribute27               => p_pbb_attribute27
168     ,p_pbb_attribute28               => p_pbb_attribute28
169     ,p_pbb_attribute29               => p_pbb_attribute29
170     ,p_pbb_attribute30               => p_pbb_attribute30
171     ,p_object_version_number         => l_object_version_number
172     ,p_effective_date                => trunc(p_effective_date)
173     );
174   --
175   begin
176     --
177     -- Start of API User Hook for the after hook of create_person_bnfts_bal
178     --
179     ben_person_bnfts_bal_bk1.create_person_bnfts_bal_a
180       (
181        p_per_bnfts_bal_id               =>  l_per_bnfts_bal_id
182       ,p_effective_start_date           =>  l_effective_start_date
183       ,p_effective_end_date             =>  l_effective_end_date
184       ,p_val                            =>  p_val
185       ,p_bnfts_bal_id                   =>  p_bnfts_bal_id
186       ,p_person_id                      =>  p_person_id
187       ,p_business_group_id              =>  p_business_group_id
188       ,p_pbb_attribute_category         =>  p_pbb_attribute_category
189       ,p_pbb_attribute1                 =>  p_pbb_attribute1
190       ,p_pbb_attribute2                 =>  p_pbb_attribute2
191       ,p_pbb_attribute3                 =>  p_pbb_attribute3
192       ,p_pbb_attribute4                 =>  p_pbb_attribute4
193       ,p_pbb_attribute5                 =>  p_pbb_attribute5
194       ,p_pbb_attribute6                 =>  p_pbb_attribute6
195       ,p_pbb_attribute7                 =>  p_pbb_attribute7
196       ,p_pbb_attribute8                 =>  p_pbb_attribute8
197       ,p_pbb_attribute9                 =>  p_pbb_attribute9
198       ,p_pbb_attribute10                =>  p_pbb_attribute10
199       ,p_pbb_attribute11                =>  p_pbb_attribute11
200       ,p_pbb_attribute12                =>  p_pbb_attribute12
201       ,p_pbb_attribute13                =>  p_pbb_attribute13
202       ,p_pbb_attribute14                =>  p_pbb_attribute14
203       ,p_pbb_attribute15                =>  p_pbb_attribute15
204       ,p_pbb_attribute16                =>  p_pbb_attribute16
205       ,p_pbb_attribute17                =>  p_pbb_attribute17
206       ,p_pbb_attribute18                =>  p_pbb_attribute18
207       ,p_pbb_attribute19                =>  p_pbb_attribute19
208       ,p_pbb_attribute20                =>  p_pbb_attribute20
209       ,p_pbb_attribute21                =>  p_pbb_attribute21
210       ,p_pbb_attribute22                =>  p_pbb_attribute22
211       ,p_pbb_attribute23                =>  p_pbb_attribute23
212       ,p_pbb_attribute24                =>  p_pbb_attribute24
213       ,p_pbb_attribute25                =>  p_pbb_attribute25
214       ,p_pbb_attribute26                =>  p_pbb_attribute26
215       ,p_pbb_attribute27                =>  p_pbb_attribute27
216       ,p_pbb_attribute28                =>  p_pbb_attribute28
217       ,p_pbb_attribute29                =>  p_pbb_attribute29
218       ,p_pbb_attribute30                =>  p_pbb_attribute30
219       ,p_object_version_number          =>  l_object_version_number
220       ,p_effective_date                      => trunc(p_effective_date)
221       );
222   exception
223     when hr_api.cannot_find_prog_unit then
224       hr_api.cannot_find_prog_unit_error
225         (p_module_name => 'CREATE_person_bnfts_bal'
226         ,p_hook_type   => 'AP'
227         );
228     --
229     -- End of API User Hook for the after hook of create_person_bnfts_bal
230     --
231   end;
232   --
233   hr_utility.set_location(l_proc, 60);
234   --
235   -- When in validation only mode raise the Validate_Enabled exception
236   --
237   if p_validate then
238     raise hr_api.validate_enabled;
239   end if;
240   --
241   -- Set all output arguments
242   --
243   p_per_bnfts_bal_id := l_per_bnfts_bal_id;
244   p_effective_start_date := l_effective_start_date;
245   p_effective_end_date := l_effective_end_date;
246   p_object_version_number := l_object_version_number;
247   --
248   hr_utility.set_location(' Leaving:'||l_proc, 70);
249   --
250 exception
251   --
252   when hr_api.validate_enabled then
253     --
254     -- As the Validate_Enabled exception has been raised
255     -- we must rollback to the savepoint
256     --
257     ROLLBACK TO create_person_bnfts_bal;
258     --
259     -- Only set output warning arguments
260     -- (Any key or derived arguments must be set to null
261     -- when validation only mode is being used.)
262     --
263     p_per_bnfts_bal_id := null;
264     p_effective_start_date := null;
265     p_effective_end_date := null;
266     p_object_version_number  := null;
267     hr_utility.set_location(' Leaving:'||l_proc, 80);
268     --
269   when others then
270     --
271     -- A validation or unexpected error has occured
272     --
273     ROLLBACK TO create_person_bnfts_bal;
274     p_per_bnfts_bal_id := null;
275     p_effective_start_date := null;
276     p_effective_end_date := null;
277     p_object_version_number  := null;
278     raise;
279     --
280 end create_person_bnfts_bal;
281 -- ----------------------------------------------------------------------------
282 -- |------------------------< update_person_bnfts_bal >--- ------------------|
283 -- ----------------------------------------------------------------------------
284 --
285 procedure update_person_bnfts_bal
286   (p_validate                       in  boolean   default false
287   ,p_per_bnfts_bal_id               in  number
288   ,p_effective_start_date           out nocopy date
289   ,p_effective_end_date             out nocopy date
290   ,p_val                            in  number    default hr_api.g_number
291   ,p_bnfts_bal_id                   in  number    default hr_api.g_number
292   ,p_person_id                      in  number    default hr_api.g_number
293   ,p_business_group_id              in  number    default hr_api.g_number
294   ,p_pbb_attribute_category         in  varchar2  default hr_api.g_varchar2
295   ,p_pbb_attribute1                 in  varchar2  default hr_api.g_varchar2
296   ,p_pbb_attribute2                 in  varchar2  default hr_api.g_varchar2
297   ,p_pbb_attribute3                 in  varchar2  default hr_api.g_varchar2
298   ,p_pbb_attribute4                 in  varchar2  default hr_api.g_varchar2
299   ,p_pbb_attribute5                 in  varchar2  default hr_api.g_varchar2
300   ,p_pbb_attribute6                 in  varchar2  default hr_api.g_varchar2
301   ,p_pbb_attribute7                 in  varchar2  default hr_api.g_varchar2
302   ,p_pbb_attribute8                 in  varchar2  default hr_api.g_varchar2
303   ,p_pbb_attribute9                 in  varchar2  default hr_api.g_varchar2
304   ,p_pbb_attribute10                in  varchar2  default hr_api.g_varchar2
305   ,p_pbb_attribute11                in  varchar2  default hr_api.g_varchar2
306   ,p_pbb_attribute12                in  varchar2  default hr_api.g_varchar2
307   ,p_pbb_attribute13                in  varchar2  default hr_api.g_varchar2
308   ,p_pbb_attribute14                in  varchar2  default hr_api.g_varchar2
309   ,p_pbb_attribute15                in  varchar2  default hr_api.g_varchar2
310   ,p_pbb_attribute16                in  varchar2  default hr_api.g_varchar2
311   ,p_pbb_attribute17                in  varchar2  default hr_api.g_varchar2
312   ,p_pbb_attribute18                in  varchar2  default hr_api.g_varchar2
313   ,p_pbb_attribute19                in  varchar2  default hr_api.g_varchar2
314   ,p_pbb_attribute20                in  varchar2  default hr_api.g_varchar2
315   ,p_pbb_attribute21                in  varchar2  default hr_api.g_varchar2
316   ,p_pbb_attribute22                in  varchar2  default hr_api.g_varchar2
317   ,p_pbb_attribute23                in  varchar2  default hr_api.g_varchar2
318   ,p_pbb_attribute24                in  varchar2  default hr_api.g_varchar2
319   ,p_pbb_attribute25                in  varchar2  default hr_api.g_varchar2
320   ,p_pbb_attribute26                in  varchar2  default hr_api.g_varchar2
321   ,p_pbb_attribute27                in  varchar2  default hr_api.g_varchar2
322   ,p_pbb_attribute28                in  varchar2  default hr_api.g_varchar2
323   ,p_pbb_attribute29                in  varchar2  default hr_api.g_varchar2
324   ,p_pbb_attribute30                in  varchar2  default hr_api.g_varchar2
325   ,p_object_version_number          in out nocopy number
326   ,p_effective_date                 in  date
327   ,p_datetrack_mode                 in  varchar2
328   ) is
329   --
330   -- Declare cursors and local variables
331   --
332   l_proc varchar2(72) := g_package||'update_person_bnfts_bal';
333   l_object_version_number ben_per_bnfts_bal_f.object_version_number%TYPE;
334   l_effective_start_date ben_per_bnfts_bal_f.effective_start_date%TYPE;
335   l_effective_end_date ben_per_bnfts_bal_f.effective_end_date%TYPE;
336   --
337 begin
338   --
339   hr_utility.set_location('Entering:'|| l_proc, 10);
340   --
341   -- Issue a savepoint if operating in validation only mode
342   --
343   savepoint update_person_bnfts_bal;
344   --
345   hr_utility.set_location(l_proc, 20);
346   --
347   -- Process Logic
348   --
349   l_object_version_number := p_object_version_number;
350   --
351   begin
352     --
353     -- Start of API User Hook for the before hook of update_person_bnfts_bal
354     --
355     ben_person_bnfts_bal_bk2.update_person_bnfts_bal_b
356       (
357        p_per_bnfts_bal_id               =>  p_per_bnfts_bal_id
358       ,p_val                            =>  p_val
359       ,p_bnfts_bal_id                   =>  p_bnfts_bal_id
360       ,p_person_id                      =>  p_person_id
361       ,p_business_group_id              =>  p_business_group_id
362       ,p_pbb_attribute_category         =>  p_pbb_attribute_category
363       ,p_pbb_attribute1                 =>  p_pbb_attribute1
364       ,p_pbb_attribute2                 =>  p_pbb_attribute2
365       ,p_pbb_attribute3                 =>  p_pbb_attribute3
366       ,p_pbb_attribute4                 =>  p_pbb_attribute4
367       ,p_pbb_attribute5                 =>  p_pbb_attribute5
368       ,p_pbb_attribute6                 =>  p_pbb_attribute6
369       ,p_pbb_attribute7                 =>  p_pbb_attribute7
370       ,p_pbb_attribute8                 =>  p_pbb_attribute8
371       ,p_pbb_attribute9                 =>  p_pbb_attribute9
372       ,p_pbb_attribute10                =>  p_pbb_attribute10
373       ,p_pbb_attribute11                =>  p_pbb_attribute11
374       ,p_pbb_attribute12                =>  p_pbb_attribute12
375       ,p_pbb_attribute13                =>  p_pbb_attribute13
376       ,p_pbb_attribute14                =>  p_pbb_attribute14
377       ,p_pbb_attribute15                =>  p_pbb_attribute15
378       ,p_pbb_attribute16                =>  p_pbb_attribute16
379       ,p_pbb_attribute17                =>  p_pbb_attribute17
380       ,p_pbb_attribute18                =>  p_pbb_attribute18
381       ,p_pbb_attribute19                =>  p_pbb_attribute19
382       ,p_pbb_attribute20                =>  p_pbb_attribute20
383       ,p_pbb_attribute21                =>  p_pbb_attribute21
384       ,p_pbb_attribute22                =>  p_pbb_attribute22
385       ,p_pbb_attribute23                =>  p_pbb_attribute23
386       ,p_pbb_attribute24                =>  p_pbb_attribute24
387       ,p_pbb_attribute25                =>  p_pbb_attribute25
388       ,p_pbb_attribute26                =>  p_pbb_attribute26
389       ,p_pbb_attribute27                =>  p_pbb_attribute27
390       ,p_pbb_attribute28                =>  p_pbb_attribute28
391       ,p_pbb_attribute29                =>  p_pbb_attribute29
392       ,p_pbb_attribute30                =>  p_pbb_attribute30
393       ,p_object_version_number          =>  p_object_version_number
394     ,p_effective_date                      => trunc(p_effective_date)
395     ,p_datetrack_mode                      => p_datetrack_mode
396       );
397   exception
398     when hr_api.cannot_find_prog_unit then
399       hr_api.cannot_find_prog_unit_error
400         (p_module_name => 'UPDATE_person_bnfts_bal'
401         ,p_hook_type   => 'BP'
402         );
403     --
404     -- End of API User Hook for the before hook of update_person_bnfts_bal
405     --
406   end;
407   --
408   ben_pbb_upd.upd
409     (
410      p_per_bnfts_bal_id              => p_per_bnfts_bal_id
411     ,p_effective_start_date          => l_effective_start_date
412     ,p_effective_end_date            => l_effective_end_date
413     ,p_val                           => p_val
414     ,p_bnfts_bal_id                  => p_bnfts_bal_id
415     ,p_person_id                     => p_person_id
416     ,p_business_group_id             => p_business_group_id
417     ,p_pbb_attribute_category        => p_pbb_attribute_category
418     ,p_pbb_attribute1                => p_pbb_attribute1
419     ,p_pbb_attribute2                => p_pbb_attribute2
420     ,p_pbb_attribute3                => p_pbb_attribute3
421     ,p_pbb_attribute4                => p_pbb_attribute4
422     ,p_pbb_attribute5                => p_pbb_attribute5
423     ,p_pbb_attribute6                => p_pbb_attribute6
424     ,p_pbb_attribute7                => p_pbb_attribute7
425     ,p_pbb_attribute8                => p_pbb_attribute8
426     ,p_pbb_attribute9                => p_pbb_attribute9
427     ,p_pbb_attribute10               => p_pbb_attribute10
428     ,p_pbb_attribute11               => p_pbb_attribute11
429     ,p_pbb_attribute12               => p_pbb_attribute12
430     ,p_pbb_attribute13               => p_pbb_attribute13
431     ,p_pbb_attribute14               => p_pbb_attribute14
432     ,p_pbb_attribute15               => p_pbb_attribute15
433     ,p_pbb_attribute16               => p_pbb_attribute16
434     ,p_pbb_attribute17               => p_pbb_attribute17
435     ,p_pbb_attribute18               => p_pbb_attribute18
436     ,p_pbb_attribute19               => p_pbb_attribute19
437     ,p_pbb_attribute20               => p_pbb_attribute20
438     ,p_pbb_attribute21               => p_pbb_attribute21
439     ,p_pbb_attribute22               => p_pbb_attribute22
440     ,p_pbb_attribute23               => p_pbb_attribute23
441     ,p_pbb_attribute24               => p_pbb_attribute24
442     ,p_pbb_attribute25               => p_pbb_attribute25
443     ,p_pbb_attribute26               => p_pbb_attribute26
444     ,p_pbb_attribute27               => p_pbb_attribute27
445     ,p_pbb_attribute28               => p_pbb_attribute28
446     ,p_pbb_attribute29               => p_pbb_attribute29
447     ,p_pbb_attribute30               => p_pbb_attribute30
448     ,p_object_version_number         => l_object_version_number
449     ,p_effective_date                => trunc(p_effective_date)
450     ,p_datetrack_mode                => p_datetrack_mode
451     );
452   --
453   begin
454     --
455     -- Start of API User Hook for the after hook of update_person_bnfts_bal
456     --
457     ben_person_bnfts_bal_bk2.update_person_bnfts_bal_a
458       (
459        p_per_bnfts_bal_id               =>  p_per_bnfts_bal_id
460       ,p_effective_start_date           =>  l_effective_start_date
461       ,p_effective_end_date             =>  l_effective_end_date
462       ,p_val                            =>  p_val
463       ,p_bnfts_bal_id                   =>  p_bnfts_bal_id
464       ,p_person_id                      =>  p_person_id
465       ,p_business_group_id              =>  p_business_group_id
466       ,p_pbb_attribute_category         =>  p_pbb_attribute_category
467       ,p_pbb_attribute1                 =>  p_pbb_attribute1
468       ,p_pbb_attribute2                 =>  p_pbb_attribute2
469       ,p_pbb_attribute3                 =>  p_pbb_attribute3
470       ,p_pbb_attribute4                 =>  p_pbb_attribute4
471       ,p_pbb_attribute5                 =>  p_pbb_attribute5
472       ,p_pbb_attribute6                 =>  p_pbb_attribute6
473       ,p_pbb_attribute7                 =>  p_pbb_attribute7
474       ,p_pbb_attribute8                 =>  p_pbb_attribute8
475       ,p_pbb_attribute9                 =>  p_pbb_attribute9
476       ,p_pbb_attribute10                =>  p_pbb_attribute10
477       ,p_pbb_attribute11                =>  p_pbb_attribute11
478       ,p_pbb_attribute12                =>  p_pbb_attribute12
479       ,p_pbb_attribute13                =>  p_pbb_attribute13
480       ,p_pbb_attribute14                =>  p_pbb_attribute14
481       ,p_pbb_attribute15                =>  p_pbb_attribute15
482       ,p_pbb_attribute16                =>  p_pbb_attribute16
483       ,p_pbb_attribute17                =>  p_pbb_attribute17
484       ,p_pbb_attribute18                =>  p_pbb_attribute18
485       ,p_pbb_attribute19                =>  p_pbb_attribute19
486       ,p_pbb_attribute20                =>  p_pbb_attribute20
487       ,p_pbb_attribute21                =>  p_pbb_attribute21
488       ,p_pbb_attribute22                =>  p_pbb_attribute22
489       ,p_pbb_attribute23                =>  p_pbb_attribute23
490       ,p_pbb_attribute24                =>  p_pbb_attribute24
491       ,p_pbb_attribute25                =>  p_pbb_attribute25
492       ,p_pbb_attribute26                =>  p_pbb_attribute26
493       ,p_pbb_attribute27                =>  p_pbb_attribute27
494       ,p_pbb_attribute28                =>  p_pbb_attribute28
495       ,p_pbb_attribute29                =>  p_pbb_attribute29
496       ,p_pbb_attribute30                =>  p_pbb_attribute30
497       ,p_object_version_number          =>  l_object_version_number
498       ,p_effective_date                     => trunc(p_effective_date)
499       ,p_datetrack_mode                     => p_datetrack_mode
500       );
501   exception
502     when hr_api.cannot_find_prog_unit then
503       hr_api.cannot_find_prog_unit_error
504         (p_module_name => 'UPDATE_person_bnfts_bal'
505         ,p_hook_type   => 'AP'
506         );
507     --
508     -- End of API User Hook for the after hook of update_person_bnfts_bal
509     --
510   end;
511   --
512   hr_utility.set_location(l_proc, 60);
513   --
514   -- When in validation only mode raise the Validate_Enabled exception
515   --
516   if p_validate then
517     raise hr_api.validate_enabled;
518   end if;
519   --
520   -- Set all output arguments
521   --
522   p_object_version_number := l_object_version_number;
523   p_effective_start_date := l_effective_start_date;
524   p_effective_end_date := l_effective_end_date;
525   --
526   hr_utility.set_location(' Leaving:'||l_proc, 70);
527   --
528 exception
529   --
530   when hr_api.validate_enabled then
531     --
532     -- As the Validate_Enabled exception has been raised
533     -- we must rollback to the savepoint
534     --
535     ROLLBACK TO update_person_bnfts_bal;
536     --
537     -- Only set output warning arguments
538     -- (Any key or derived arguments must be set to null
539     -- when validation only mode is being used.)
540     --
541     p_effective_start_date := null;
542     p_effective_end_date := null;
543     hr_utility.set_location(' Leaving:'||l_proc, 80);
544     --
545   when others then
546     --
547     -- A validation or unexpected error has occured
548     --
549     ROLLBACK TO update_person_bnfts_bal;
550     p_effective_start_date := null;
551     p_effective_end_date := null;
552     raise;
553     --
554 end update_person_bnfts_bal;
555 -- ----------------------------------------------------------------------------
556 -- |------------------------< delete_person_bnfts_bal >----------------------|
557 -- ----------------------------------------------------------------------------
558 --
559 procedure delete_person_bnfts_bal
560   (p_validate                       in  boolean  default false
561   ,p_per_bnfts_bal_id               in  number
562   ,p_effective_start_date           out nocopy date
563   ,p_effective_end_date             out nocopy date
564   ,p_object_version_number          in out nocopy number
565   ,p_effective_date                 in  date
566   ,p_datetrack_mode                 in  varchar2
567   ) is
568   --
569   -- Declare cursors and local variables
570   --
571   l_proc varchar2(72) := g_package||'update_person_bnfts_bal';
572   l_object_version_number ben_per_bnfts_bal_f.object_version_number%TYPE;
573   l_effective_start_date ben_per_bnfts_bal_f.effective_start_date%TYPE;
574   l_effective_end_date ben_per_bnfts_bal_f.effective_end_date%TYPE;
575   --
576 begin
577   --
578   hr_utility.set_location('Entering:'|| l_proc, 10);
579   --
580   -- Issue a savepoint if operating in validation only mode
581   --
582   savepoint delete_person_bnfts_bal;
583   --
584   hr_utility.set_location(l_proc, 20);
585   --
586   -- Process Logic
587   --
588   l_object_version_number := p_object_version_number;
589   --
590   --
591   begin
592     --
593     -- Start of API User Hook for the before hook of delete_person_bnfts_bal
594     --
595     ben_person_bnfts_bal_bk3.delete_person_bnfts_bal_b
596       (
597        p_per_bnfts_bal_id               =>  p_per_bnfts_bal_id
598       ,p_object_version_number          =>  p_object_version_number
599     ,p_effective_date                      => trunc(p_effective_date)
600     ,p_datetrack_mode                      => p_datetrack_mode
601       );
602   exception
603     when hr_api.cannot_find_prog_unit then
604       hr_api.cannot_find_prog_unit_error
605         (p_module_name => 'DELETE_person_bnfts_bal'
606         ,p_hook_type   => 'BP'
607         );
608     --
609     -- End of API User Hook for the before hook of delete_person_bnfts_bal
610     --
611   end;
612   --
613   ben_pbb_del.del
614     (
615      p_per_bnfts_bal_id              => p_per_bnfts_bal_id
616     ,p_effective_start_date          => l_effective_start_date
617     ,p_effective_end_date            => l_effective_end_date
618     ,p_object_version_number         => l_object_version_number
619     ,p_effective_date                => p_effective_date
620     ,p_datetrack_mode                => p_datetrack_mode
621     );
622   --
623   begin
624     --
625     -- Start of API User Hook for the after hook of delete_person_bnfts_bal
626     --
627     ben_person_bnfts_bal_bk3.delete_person_bnfts_bal_a
628       (
629        p_per_bnfts_bal_id               =>  p_per_bnfts_bal_id
630       ,p_effective_start_date           =>  l_effective_start_date
631       ,p_effective_end_date             =>  l_effective_end_date
632       ,p_object_version_number          =>  l_object_version_number
633     ,p_effective_date                      => trunc(p_effective_date)
634     ,p_datetrack_mode                      => p_datetrack_mode
635       );
636   exception
637     when hr_api.cannot_find_prog_unit then
638       hr_api.cannot_find_prog_unit_error
639         (p_module_name => 'DELETE_person_bnfts_bal'
640         ,p_hook_type   => 'AP'
641         );
642     --
643     -- End of API User Hook for the after hook of delete_person_bnfts_bal
644     --
645   end;
646   --
647   hr_utility.set_location(l_proc, 60);
648   --
649   -- When in validation only mode raise the Validate_Enabled exception
650   --
651   if p_validate then
652     raise hr_api.validate_enabled;
653   end if;
654   --
655   hr_utility.set_location(' Leaving:'||l_proc, 70);
656   --
657 exception
658   --
659   when hr_api.validate_enabled then
660     --
661     -- As the Validate_Enabled exception has been raised
662     -- we must rollback to the savepoint
663     --
664     ROLLBACK TO delete_person_bnfts_bal;
665     --
666     -- Only set output warning arguments
667     -- (Any key or derived arguments must be set to null
668     -- when validation only mode is being used.)
669     --
670     p_effective_start_date := null;
671     p_effective_end_date := null;
672     --
673   when others then
674     --
675     -- A validation or unexpected error has occured
676     --
677     ROLLBACK TO delete_person_bnfts_bal;
678     p_effective_start_date := null;
679     p_effective_end_date := null;
680     raise;
681     --
682 end delete_person_bnfts_bal;
683 --
684 -- ----------------------------------------------------------------------------
685 -- |-------------------------------< lck >------------------------------------|
686 -- ----------------------------------------------------------------------------
687 --
688 procedure lck
689   (
690    p_per_bnfts_bal_id                   in     number
691   ,p_object_version_number          in     number
692   ,p_effective_date                 in     date
693   ,p_datetrack_mode                 in     varchar2
694   ,p_validation_start_date          out nocopy    date
695   ,p_validation_end_date            out nocopy    date
696   ) is
697   --
698   --
699   -- Declare cursors and local variables
700   --
701   l_proc varchar2(72) := g_package||'lck';
702   l_validation_start_date date;
703   l_validation_end_date date;
704   --
705 begin
706   --
707   hr_utility.set_location('Entering:'|| l_proc, 10);
708   --
709   ben_pbb_shd.lck
710     (
711       p_per_bnfts_bal_id                 => p_per_bnfts_bal_id
712      ,p_validation_start_date      => l_validation_start_date
713      ,p_validation_end_date        => l_validation_end_date
714      ,p_object_version_number      => p_object_version_number
715      ,p_effective_date             => p_effective_date
716      ,p_datetrack_mode             => p_datetrack_mode
717     );
718   --
719   hr_utility.set_location(' Leaving:'||l_proc, 70);
720   --
721 end lck;
722 --
723 procedure set_foreign_key_locking(p_expression in boolean) is
724   --
725   l_proc varchar2(72) := g_package||'set_foreign_key_locking';
726   --
727 begin
728   --
729   hr_utility.set_location('Entering:'||l_proc, 70);
730   --
731   -- This procedure enables the changing of a global to turn off foreign
732   -- key locking of a benefit balance type. The routine should be called
733   -- once at the start of the migration and then again at the end of the
734   -- migration. The expression should be boolean and a true would enable
735   -- the foreign key locking and a false disable locking.
736   --
737   g_lock_row := p_expression;
738   --
739   hr_utility.set_location('Leaving:'||l_proc, 70);
740   --
741 end set_foreign_key_locking;
742 --
743 end ben_person_bnfts_bal_api;