DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_BATCH_PROC_INFO_API

Source


1 Package Body ben_batch_proc_info_api as
2 /* $Header: bebpiapi.pkb 115.3 2002/12/16 11:53:19 vsethi ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_batch_proc_info_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_batch_proc_info >------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_batch_proc_info
13   (p_validate                       in  boolean   default false
14   ,p_batch_proc_id                  out nocopy number
15   ,p_benefit_action_id              in  number    default null
19   ,p_end_tm                         in  varchar2  default null
16   ,p_strt_dt                        in  date      default null
17   ,p_end_dt                         in  date      default null
18   ,p_strt_tm                        in  varchar2  default null
20   ,p_elpsd_tm                       in  varchar2  default null
21   ,p_per_slctd                      in  number    default null
22   ,p_per_proc                       in  number    default null
23   ,p_per_unproc                     in  number    default null
24   ,p_per_proc_succ                  in  number    default null
25   ,p_per_err                        in  number    default null
26   ,p_business_group_id              in  number    default null
27   ,p_object_version_number          out nocopy number) is
28   --
29   -- Declare cursors and local variables
30   --
31   l_batch_proc_id ben_batch_proc_info.batch_proc_id%TYPE;
32   l_proc varchar2(72) := g_package||'create_batch_proc_info';
33   l_object_version_number ben_batch_proc_info.object_version_number%TYPE;
34   --
35 begin
36   --
37   hr_utility.set_location('Entering:'|| l_proc, 10);
38   --
39   -- Issue a savepoint if operating in validation only mode
40   --
41   savepoint create_batch_proc_info;
42   --
43   hr_utility.set_location(l_proc, 20);
44   --
45   -- Process Logic
46   --
47   begin
48     --
49     -- Start of API User Hook for the before hook of create_batch_proc_info
50     --
51     ben_batch_proc_info_bk1.create_batch_proc_info_b
52       (p_benefit_action_id              =>  p_benefit_action_id
53       ,p_strt_dt                        =>  p_strt_dt
54       ,p_end_dt                         =>  p_end_dt
55       ,p_strt_tm                        =>  p_strt_tm
56       ,p_end_tm                         =>  p_end_tm
57       ,p_elpsd_tm                       =>  p_elpsd_tm
58       ,p_per_slctd                      =>  p_per_slctd
59       ,p_per_proc                       =>  p_per_proc
60       ,p_per_unproc                     =>  p_per_unproc
61       ,p_per_proc_succ                  =>  p_per_proc_succ
62       ,p_per_err                        =>  p_per_err
63       ,p_business_group_id              =>  p_business_group_id);
64     --
65   exception
66     --
67     when hr_api.cannot_find_prog_unit then
68       --
69       hr_api.cannot_find_prog_unit_error
70         (p_module_name => 'CREATE_batch_proc_info'
71         ,p_hook_type   => 'BP');
72     --
73     -- End of API User Hook for the before hook of create_batch_proc_info
74     --
75   end;
76   --
77   ben_bpi_ins.ins
78     (p_batch_proc_id                 => l_batch_proc_id
79     ,p_benefit_action_id             => p_benefit_action_id
80     ,p_strt_dt                       => p_strt_dt
81     ,p_end_dt                        => p_end_dt
82     ,p_strt_tm                       => p_strt_tm
83     ,p_end_tm                        => p_end_tm
84     ,p_elpsd_tm                      => p_elpsd_tm
85     ,p_per_slctd                     => p_per_slctd
86     ,p_per_proc                      => p_per_proc
87     ,p_per_unproc                    => p_per_unproc
88     ,p_per_proc_succ                 => p_per_proc_succ
89     ,p_per_err                       => p_per_err
90     ,p_business_group_id             => p_business_group_id
91     ,p_object_version_number         => l_object_version_number);
92   --
93   begin
94     --
95     -- Start of API User Hook for the after hook of create_batch_proc_info
96     --
97     ben_batch_proc_info_bk1.create_batch_proc_info_a
98       (p_batch_proc_id                  =>  l_batch_proc_id
99       ,p_benefit_action_id              =>  p_benefit_action_id
100       ,p_strt_dt                        =>  p_strt_dt
101       ,p_end_dt                         =>  p_end_dt
102       ,p_strt_tm                        =>  p_strt_tm
103       ,p_end_tm                         =>  p_end_tm
104       ,p_elpsd_tm                       =>  p_elpsd_tm
105       ,p_per_slctd                      =>  p_per_slctd
106       ,p_per_proc                       =>  p_per_proc
107       ,p_per_unproc                     =>  p_per_unproc
108       ,p_per_proc_succ                  =>  p_per_proc_succ
109       ,p_per_err                        =>  p_per_err
110       ,p_business_group_id              =>  p_business_group_id
111       ,p_object_version_number          =>  l_object_version_number);
112     --
113   exception
114     --
115     when hr_api.cannot_find_prog_unit then
116       --
117       hr_api.cannot_find_prog_unit_error
118         (p_module_name => 'CREATE_batch_proc_info'
119         ,p_hook_type   => 'AP');
120     --
121     -- End of API User Hook for the after hook of create_batch_proc_info
122     --
123   end;
124   --
125   hr_utility.set_location(l_proc, 60);
126   --
127   -- When in validation only mode raise the Validate_Enabled exception
128   --
129   if p_validate then
130     raise hr_api.validate_enabled;
131   end if;
132   --
133   -- Set all output arguments
134   --
135   p_batch_proc_id := l_batch_proc_id;
136   p_object_version_number := l_object_version_number;
137   --
138   hr_utility.set_location(' Leaving:'||l_proc, 70);
139   --
140 exception
141   --
142   when hr_api.validate_enabled then
143     --
144     -- As the Validate_Enabled exception has been raised
145     -- we must rollback to the savepoint
146     --
147     ROLLBACK TO create_batch_proc_info;
148     --
149     -- Only set output warning arguments
150     -- (Any key or derived arguments must be set to null
151     -- when validation only mode is being used.)
152     --
153     p_batch_proc_id := null;
157   when others then
154     p_object_version_number  := null;
155     hr_utility.set_location(' Leaving:'||l_proc, 80);
156     --
158     --
159     -- A validation or unexpected error has occured
160     --
161     ROLLBACK TO create_batch_proc_info;
162     p_batch_proc_id := null;
163     p_object_version_number  := null;
164     hr_utility.set_location(' Leaving:'||l_proc, 90);
165     raise;
166     --
167 end create_batch_proc_info;
168 -- ----------------------------------------------------------------------------
169 -- |------------------------< update_batch_proc_info >------------------------|
170 -- ----------------------------------------------------------------------------
171 --
172 procedure update_batch_proc_info
173   (p_validate                       in  boolean   default false
174   ,p_batch_proc_id                  in  number
175   ,p_benefit_action_id              in  number    default hr_api.g_number
176   ,p_strt_dt                        in  date      default hr_api.g_date
177   ,p_end_dt                         in  date      default hr_api.g_date
178   ,p_strt_tm                        in  varchar2  default hr_api.g_varchar2
179   ,p_end_tm                         in  varchar2  default hr_api.g_varchar2
180   ,p_elpsd_tm                       in  varchar2  default hr_api.g_varchar2
181   ,p_per_slctd                      in  number    default hr_api.g_number
182   ,p_per_proc                       in  number    default hr_api.g_number
183   ,p_per_unproc                     in  number    default hr_api.g_number
184   ,p_per_proc_succ                  in  number    default hr_api.g_number
185   ,p_per_err                        in  number    default hr_api.g_number
186   ,p_business_group_id              in  number    default hr_api.g_number
187   ,p_object_version_number          in out nocopy number) is
188   --
189   -- Declare cursors and local variables
190   --
191   l_proc varchar2(72) := g_package||'update_batch_proc_info';
192   l_object_version_number ben_batch_proc_info.object_version_number%TYPE;
193   --
194 begin
195   --
196   hr_utility.set_location('Entering:'|| l_proc, 10);
197   --
198   -- Issue a savepoint if operating in validation only mode
199   --
200   savepoint update_batch_proc_info;
201   --
202   hr_utility.set_location(l_proc, 20);
203   --
204   -- Process Logic
205   --
206   l_object_version_number := p_object_version_number;
207   --
208   begin
209     --
210     -- Start of API User Hook for the before hook of update_batch_proc_info
211     --
212     ben_batch_proc_info_bk2.update_batch_proc_info_b
213       (p_batch_proc_id                  =>  p_batch_proc_id
214       ,p_benefit_action_id              =>  p_benefit_action_id
215       ,p_strt_dt                        =>  p_strt_dt
216       ,p_end_dt                         =>  p_end_dt
217       ,p_strt_tm                        =>  p_strt_tm
218       ,p_end_tm                         =>  p_end_tm
219       ,p_elpsd_tm                       =>  p_elpsd_tm
220       ,p_per_slctd                      =>  p_per_slctd
221       ,p_per_proc                       =>  p_per_proc
222       ,p_per_unproc                     =>  p_per_unproc
223       ,p_per_proc_succ                  =>  p_per_proc_succ
224       ,p_per_err                        =>  p_per_err
225       ,p_business_group_id              =>  p_business_group_id
226       ,p_object_version_number          =>  p_object_version_number);
227     --
228   exception
229     --
230     when hr_api.cannot_find_prog_unit then
231       hr_api.cannot_find_prog_unit_error
232         (p_module_name => 'UPDATE_batch_proc_info'
233         ,p_hook_type   => 'BP');
234     --
235     -- End of API User Hook for the before hook of update_batch_proc_info
236     --
237   end;
238   --
239   ben_bpi_upd.upd
240     (p_batch_proc_id                 => p_batch_proc_id
241     ,p_benefit_action_id             => p_benefit_action_id
242     ,p_strt_dt                       => p_strt_dt
243     ,p_end_dt                        => p_end_dt
244     ,p_strt_tm                       => p_strt_tm
245     ,p_end_tm                        => p_end_tm
246     ,p_elpsd_tm                      => p_elpsd_tm
247     ,p_per_slctd                     => p_per_slctd
248     ,p_per_proc                      => p_per_proc
249     ,p_per_unproc                    => p_per_unproc
250     ,p_per_proc_succ                 => p_per_proc_succ
251     ,p_per_err                       => p_per_err
252     ,p_business_group_id             => p_business_group_id
253     ,p_object_version_number         => l_object_version_number);
254   --
255   begin
256     --
257     -- Start of API User Hook for the after hook of update_batch_proc_info
258     --
259     ben_batch_proc_info_bk2.update_batch_proc_info_a
260       (p_batch_proc_id                  =>  p_batch_proc_id
261       ,p_benefit_action_id              =>  p_benefit_action_id
262       ,p_strt_dt                        =>  p_strt_dt
263       ,p_end_dt                         =>  p_end_dt
264       ,p_strt_tm                        =>  p_strt_tm
265       ,p_end_tm                         =>  p_end_tm
266       ,p_elpsd_tm                       =>  p_elpsd_tm
267       ,p_per_slctd                      =>  p_per_slctd
268       ,p_per_proc                       =>  p_per_proc
269       ,p_per_unproc                     =>  p_per_unproc
270       ,p_per_proc_succ                  =>  p_per_proc_succ
271       ,p_per_err                        =>  p_per_err
272       ,p_business_group_id              =>  p_business_group_id
273       ,p_object_version_number          =>  l_object_version_number);
274     --
275   exception
276     --
277     when hr_api.cannot_find_prog_unit then
278       --
279       hr_api.cannot_find_prog_unit_error
280         (p_module_name => 'UPDATE_batch_proc_info'
284     --
281         ,p_hook_type   => 'AP');
282     --
283     -- End of API User Hook for the after hook of update_batch_proc_info
285   end;
286   --
287   hr_utility.set_location(l_proc, 60);
288   --
289   -- When in validation only mode raise the Validate_Enabled exception
290   --
291   if p_validate then
292     raise hr_api.validate_enabled;
293   end if;
294   --
295   -- Set all output arguments
296   --
297   p_object_version_number := l_object_version_number;
298   --
299   hr_utility.set_location(' Leaving:'||l_proc, 70);
300   --
301 exception
302   --
303   when hr_api.validate_enabled then
304     --
305     -- As the Validate_Enabled exception has been raised
306     -- we must rollback to the savepoint
307     --
308     ROLLBACK TO update_batch_proc_info;
309     --
310     -- Only set output warning arguments
311     -- (Any key or derived arguments must be set to null
312     -- when validation only mode is being used.)
313     --
314     hr_utility.set_location(' Leaving:'||l_proc, 80);
315     --
316   when others then
317     --
318     -- A validation or unexpected error has occured
319     --
320     ROLLBACK TO update_batch_proc_info;
321     raise;
322     --
323 end update_batch_proc_info;
324 -- ----------------------------------------------------------------------------
325 -- |------------------------< delete_batch_proc_info >------------------------|
326 -- ----------------------------------------------------------------------------
327 --
328 procedure delete_batch_proc_info
329   (p_validate                       in  boolean  default false
330   ,p_batch_proc_id                  in  number
331   ,p_object_version_number          in out nocopy number) is
332   --
333   -- Declare cursors and local variables
334   --
335   l_proc varchar2(72) := g_package||'update_batch_proc_info';
336   l_object_version_number ben_batch_proc_info.object_version_number%TYPE;
337   --
338 begin
339   --
340   hr_utility.set_location('Entering:'|| l_proc, 10);
341   --
342   -- Issue a savepoint if operating in validation only mode
343   --
344   savepoint delete_batch_proc_info;
345   --
346   hr_utility.set_location(l_proc, 20);
347   --
348   -- Process Logic
349   --
350   l_object_version_number := p_object_version_number;
351   --
352   --
353   begin
354     --
355     -- Start of API User Hook for the before hook of delete_batch_proc_info
356     --
357     ben_batch_proc_info_bk3.delete_batch_proc_info_b
358       (p_batch_proc_id                  =>  p_batch_proc_id
359       ,p_object_version_number          =>  p_object_version_number);
360     --
361   exception
362     --
363     when hr_api.cannot_find_prog_unit then
364       --
365       hr_api.cannot_find_prog_unit_error
366         (p_module_name => 'DELETE_batch_proc_info'
367         ,p_hook_type   => 'BP');
368     --
369     -- End of API User Hook for the before hook of delete_batch_proc_info
370     --
371   end;
372   --
373   ben_bpi_del.del
374     (p_batch_proc_id                 => p_batch_proc_id
375     ,p_object_version_number         => l_object_version_number);
376   --
377   begin
378     --
379     -- Start of API User Hook for the after hook of delete_batch_proc_info
380     --
381     ben_batch_proc_info_bk3.delete_batch_proc_info_a
382       (p_batch_proc_id                  =>  p_batch_proc_id
383       ,p_object_version_number          =>  l_object_version_number);
384     --
385   exception
386     --
387     when hr_api.cannot_find_prog_unit then
388       --
389       hr_api.cannot_find_prog_unit_error
390         (p_module_name => 'DELETE_batch_proc_info'
391         ,p_hook_type   => 'AP');
392     --
393     -- End of API User Hook for the after hook of delete_batch_proc_info
394     --
395   end;
396   --
397   hr_utility.set_location(l_proc, 60);
398   --
399   -- When in validation only mode raise the Validate_Enabled exception
400   --
401   if p_validate then
402     raise hr_api.validate_enabled;
403   end if;
404   --
405   hr_utility.set_location(' Leaving:'||l_proc, 70);
406   --
407 exception
408   --
409   when hr_api.validate_enabled then
410     --
411     -- As the Validate_Enabled exception has been raised
412     -- we must rollback to the savepoint
413     --
414     ROLLBACK TO delete_batch_proc_info;
415     --
416     -- Only set output warning arguments
417     -- (Any key or derived arguments must be set to null
418     -- when validation only mode is being used.)
419     --
420     --
421   when others then
422     --
423     -- A validation or unexpected error has occured
424     --
425     ROLLBACK TO delete_batch_proc_info;
426     raise;
427     --
428 end delete_batch_proc_info;
429 --
430 -- ----------------------------------------------------------------------------
431 -- |-------------------------------< lck >------------------------------------|
432 -- ----------------------------------------------------------------------------
433 --
434 procedure lck
435   (p_batch_proc_id                  in     number
436   ,p_object_version_number          in     number) is
437   --
438   --
439   -- Declare cursors and local variables
440   --
441   l_proc varchar2(72) := g_package||'lck';
442   --
443 begin
444   --
445   hr_utility.set_location('Entering:'|| l_proc, 10);
446   --
447   ben_bpi_shd.lck
448     (p_batch_proc_id              => p_batch_proc_id
449     ,p_object_version_number      => p_object_version_number);
450   --
451   hr_utility.set_location(' Leaving:'||l_proc, 70);
452   --
453 end lck;
454 --
455 end ben_batch_proc_info_api;