[Home] [Help]
PACKAGE BODY: APPS.BEN_BATCH_LER_INFO_API
Source
1 Package Body ben_batch_ler_info_api as
2 /* $Header: bebliapi.pkb 115.6 2002/12/13 08:27:47 bmanyam ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_batch_ler_info_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_batch_ler_info >-------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_batch_ler_info
13 (p_validate in boolean default false
14 ,p_batch_ler_id out nocopy number
15 ,p_benefit_action_id in number default null
16 ,p_person_id in number default null
17 ,p_ler_id in number default null
18 ,p_lf_evt_ocrd_dt in date default null
19 ,p_replcd_flag in varchar2 default 'N'
20 ,p_crtd_flag in varchar2 default 'N'
21 ,p_tmprl_flag in varchar2 default 'N'
22 ,p_dltd_flag in varchar2 default 'N'
23 ,p_open_and_clsd_flag in varchar2 default 'N'
24 ,p_clsd_flag in varchar2 default 'N'
25 ,p_not_crtd_flag in varchar2 default 'N'
26 ,p_stl_actv_flag in varchar2 default 'N'
27 ,p_clpsd_flag in varchar2 default 'N'
28 ,p_clsn_flag in varchar2 default 'N'
29 ,p_no_effect_flag in varchar2 default 'N'
30 ,p_cvrge_rt_prem_flag in varchar2 default 'N'
31 ,p_per_in_ler_id in number default null
32 ,p_business_group_id in number default null
33 ,p_object_version_number out nocopy number
34 ,p_effective_date in date) is
35 --
36 -- Declare cursors and local variables
37 --
38 l_batch_ler_id ben_batch_ler_info.batch_ler_id%TYPE;
39 l_proc varchar2(72) := g_package||'create_batch_ler_info';
40 l_object_version_number ben_batch_ler_info.object_version_number%TYPE;
41 --
42 begin
43 --
44 hr_utility.set_location('Entering:'|| l_proc, 10);
45 --
46 -- Issue a savepoint if operating in validation only mode
47 --
48 savepoint create_batch_ler_info;
49 --
50 hr_utility.set_location(l_proc, 20);
51 --
52 -- Process Logic
53 --
54 begin
55 --
56 -- Start of API User Hook for the before hook of create_batch_ler_info
57 --
58 ben_batch_ler_info_bk1.create_batch_ler_info_b
59 (p_benefit_action_id => p_benefit_action_id
60 ,p_person_id => p_person_id
61 ,p_ler_id => p_ler_id
62 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
63 ,p_replcd_flag => p_replcd_flag
64 ,p_crtd_flag => p_crtd_flag
65 ,p_tmprl_flag => p_tmprl_flag
66 ,p_dltd_flag => p_dltd_flag
67 ,p_open_and_clsd_flag => p_open_and_clsd_flag
68 ,p_clsd_flag => p_clsd_flag
69 ,p_not_crtd_flag => p_not_crtd_flag
70 ,p_stl_actv_flag => p_stl_actv_flag
71 ,p_clpsd_flag => p_clpsd_flag
72 ,p_clsn_flag => p_clsn_flag
73 ,p_no_effect_flag => p_no_effect_flag
74 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
75 ,p_per_in_ler_id => p_per_in_ler_id
76 ,p_business_group_id => p_business_group_id
77 ,p_effective_date => trunc(p_effective_date));
78 --
79 exception
80 --
81 when hr_api.cannot_find_prog_unit then
82 --
83 hr_api.cannot_find_prog_unit_error
84 (p_module_name => 'CREATE_batch_ler_info'
85 ,p_hook_type => 'BP');
86 --
87 -- End of API User Hook for the before hook of create_batch_ler_info
88 --
89 end;
90 --
91 ben_bli_ins.ins
92 (p_batch_ler_id => l_batch_ler_id
93 ,p_benefit_action_id => p_benefit_action_id
94 ,p_person_id => p_person_id
95 ,p_ler_id => p_ler_id
96 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
97 ,p_replcd_flag => p_replcd_flag
98 ,p_crtd_flag => p_crtd_flag
99 ,p_tmprl_flag => p_tmprl_flag
100 ,p_dltd_flag => p_dltd_flag
101 ,p_open_and_clsd_flag => p_open_and_clsd_flag
102 ,p_clsd_flag => p_clsd_flag
103 ,p_not_crtd_flag => p_not_crtd_flag
104 ,p_stl_actv_flag => p_stl_actv_flag
105 ,p_clpsd_flag => p_clpsd_flag
106 ,p_clsn_flag => p_clsn_flag
107 ,p_no_effect_flag => p_no_effect_flag
108 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
109 ,p_per_in_ler_id => p_per_in_ler_id
110 ,p_business_group_id => p_business_group_id
111 ,p_object_version_number => l_object_version_number
112 ,p_effective_date => trunc(p_effective_date));
113 --
114 begin
115 --
116 -- Start of API User Hook for the after hook of create_batch_ler_info
117 --
118 ben_batch_ler_info_bk1.create_batch_ler_info_a
119 (p_batch_ler_id => l_batch_ler_id
120 ,p_benefit_action_id => p_benefit_action_id
121 ,p_person_id => p_person_id
122 ,p_ler_id => p_ler_id
123 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
124 ,p_replcd_flag => p_replcd_flag
125 ,p_crtd_flag => p_crtd_flag
126 ,p_tmprl_flag => p_tmprl_flag
127 ,p_dltd_flag => p_dltd_flag
128 ,p_open_and_clsd_flag => p_open_and_clsd_flag
129 ,p_clsd_flag => p_clsd_flag
130 ,p_not_crtd_flag => p_not_crtd_flag
131 ,p_stl_actv_flag => p_stl_actv_flag
132 ,p_clpsd_flag => p_clpsd_flag
133 ,p_clsn_flag => p_clsn_flag
134 ,p_no_effect_flag => p_no_effect_flag
135 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
136 ,p_per_in_ler_id => p_per_in_ler_id
137 ,p_business_group_id => p_business_group_id
138 ,p_object_version_number => l_object_version_number
139 ,p_effective_date => trunc(p_effective_date));
140 --
141 exception
142 --
143 when hr_api.cannot_find_prog_unit then
144 --
145 hr_api.cannot_find_prog_unit_error
146 (p_module_name => 'CREATE_batch_ler_info'
147 ,p_hook_type => 'AP');
148 --
149 -- End of API User Hook for the after hook of create_batch_ler_info
150 --
151 end;
152 --
153 hr_utility.set_location(l_proc, 60);
154 --
155 -- When in validation only mode raise the Validate_Enabled exception
156 --
157 if p_validate then
158 raise hr_api.validate_enabled;
159 end if;
160 --
161 -- Set all output arguments
162 --
163 p_batch_ler_id := l_batch_ler_id;
164 p_object_version_number := l_object_version_number;
165 --
166 hr_utility.set_location(' Leaving:'||l_proc, 70);
167 --
168 exception
169 --
170 when hr_api.validate_enabled then
171 --
172 -- As the Validate_Enabled exception has been raised
173 -- we must rollback to the savepoint
174 --
175 ROLLBACK TO create_batch_ler_info;
176 --
177 -- Only set output warning arguments
178 -- (Any key or derived arguments must be set to null
179 -- when validation only mode is being used.)
180 --
181 p_batch_ler_id := null;
182 p_object_version_number := null;
183 hr_utility.set_location(' Leaving:'||l_proc, 80);
184 --
185 when others then
186 --
187 -- A validation or unexpected error has occured
188 --
189 ROLLBACK TO create_batch_ler_info;
190 p_batch_ler_id := null;
191 p_object_version_number := null;
192 raise;
193 --
194 end create_batch_ler_info;
195 -- ----------------------------------------------------------------------------
196 -- |------------------------< update_batch_ler_info >-------------------------|
197 -- ----------------------------------------------------------------------------
198 --
199 procedure update_batch_ler_info
200 (p_validate in boolean default false
201 ,p_batch_ler_id in number
202 ,p_benefit_action_id in number default hr_api.g_number
203 ,p_person_id in number default hr_api.g_number
204 ,p_ler_id in number default hr_api.g_number
205 ,p_lf_evt_ocrd_dt in date default hr_api.g_date
206 ,p_replcd_flag in varchar2 default hr_api.g_varchar2
207 ,p_crtd_flag in varchar2 default hr_api.g_varchar2
208 ,p_tmprl_flag in varchar2 default hr_api.g_varchar2
209 ,p_dltd_flag in varchar2 default hr_api.g_varchar2
210 ,p_open_and_clsd_flag in varchar2 default hr_api.g_varchar2
211 ,p_clsd_flag in varchar2 default hr_api.g_varchar2
212 ,p_not_crtd_flag in varchar2 default hr_api.g_varchar2
213 ,p_stl_actv_flag in varchar2 default hr_api.g_varchar2
214 ,p_clpsd_flag in varchar2 default hr_api.g_varchar2
215 ,p_clsn_flag in varchar2 default hr_api.g_varchar2
216 ,p_no_effect_flag in varchar2 default hr_api.g_varchar2
217 ,p_cvrge_rt_prem_flag in varchar2 default hr_api.g_varchar2
218 ,p_per_in_ler_id in number default hr_api.g_number
219 ,p_business_group_id in number default hr_api.g_number
220 ,p_object_version_number in out nocopy number
221 ,p_effective_date in date) is
222 --
223 -- Declare cursors and local variables
224 --
225 l_proc varchar2(72) := g_package||'update_batch_ler_info';
226 l_object_version_number ben_batch_ler_info.object_version_number%TYPE;
227 --
228 begin
229 --
230 hr_utility.set_location('Entering:'|| l_proc, 10);
231 --
232 -- Issue a savepoint if operating in validation only mode
233 --
234 savepoint update_batch_ler_info;
235 --
236 hr_utility.set_location(l_proc, 20);
237 --
238 -- Process Logic
239 --
240 l_object_version_number := p_object_version_number;
241 --
242 begin
243 --
244 -- Start of API User Hook for the before hook of update_batch_ler_info
245 --
246 ben_batch_ler_info_bk2.update_batch_ler_info_b
247 (p_batch_ler_id => p_batch_ler_id
248 ,p_benefit_action_id => p_benefit_action_id
249 ,p_person_id => p_person_id
250 ,p_ler_id => p_ler_id
251 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
252 ,p_replcd_flag => p_replcd_flag
253 ,p_crtd_flag => p_crtd_flag
254 ,p_tmprl_flag => p_tmprl_flag
255 ,p_dltd_flag => p_dltd_flag
256 ,p_open_and_clsd_flag => p_open_and_clsd_flag
257 ,p_clsd_flag => p_clsd_flag
258 ,p_not_crtd_flag => p_not_crtd_flag
259 ,p_stl_actv_flag => p_stl_actv_flag
260 ,p_clpsd_flag => p_clpsd_flag
261 ,p_clsn_flag => p_clsn_flag
262 ,p_no_effect_flag => p_no_effect_flag
263 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
264 ,p_per_in_ler_id => p_per_in_ler_id
265 ,p_business_group_id => p_business_group_id
266 ,p_object_version_number => p_object_version_number
267 ,p_effective_date => trunc(p_effective_date));
268 --
269 exception
270 --
271 when hr_api.cannot_find_prog_unit then
272 --
273 hr_api.cannot_find_prog_unit_error
274 (p_module_name => 'UPDATE_batch_ler_info'
275 ,p_hook_type => 'BP');
276 --
277 -- End of API User Hook for the before hook of update_batch_ler_info
278 --
279 end;
280 --
281 ben_bli_upd.upd
282 (p_batch_ler_id => p_batch_ler_id
283 ,p_benefit_action_id => p_benefit_action_id
284 ,p_person_id => p_person_id
285 ,p_ler_id => p_ler_id
286 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
287 ,p_replcd_flag => p_replcd_flag
288 ,p_crtd_flag => p_crtd_flag
289 ,p_tmprl_flag => p_tmprl_flag
290 ,p_dltd_flag => p_dltd_flag
291 ,p_open_and_clsd_flag => p_open_and_clsd_flag
292 ,p_clsd_flag => p_clsd_flag
293 ,p_not_crtd_flag => p_not_crtd_flag
294 ,p_stl_actv_flag => p_stl_actv_flag
295 ,p_clpsd_flag => p_clpsd_flag
296 ,p_clsn_flag => p_clsn_flag
297 ,p_no_effect_flag => p_no_effect_flag
298 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
299 ,p_per_in_ler_id => p_per_in_ler_id
300 ,p_business_group_id => p_business_group_id
301 ,p_object_version_number => l_object_version_number
302 ,p_effective_date => trunc(p_effective_date));
303 --
304 begin
305 --
306 -- Start of API User Hook for the after hook of update_batch_ler_info
307 --
311 ,p_person_id => p_person_id
308 ben_batch_ler_info_bk2.update_batch_ler_info_a
309 (p_batch_ler_id => p_batch_ler_id
310 ,p_benefit_action_id => p_benefit_action_id
312 ,p_ler_id => p_ler_id
313 ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
314 ,p_replcd_flag => p_replcd_flag
315 ,p_crtd_flag => p_crtd_flag
316 ,p_tmprl_flag => p_tmprl_flag
317 ,p_dltd_flag => p_dltd_flag
318 ,p_open_and_clsd_flag => p_open_and_clsd_flag
319 ,p_clsd_flag => p_clsd_flag
320 ,p_not_crtd_flag => p_not_crtd_flag
321 ,p_stl_actv_flag => p_stl_actv_flag
322 ,p_clpsd_flag => p_clpsd_flag
323 ,p_clsn_flag => p_clsn_flag
324 ,p_no_effect_flag => p_no_effect_flag
325 ,p_cvrge_rt_prem_flag => p_cvrge_rt_prem_flag
326 ,p_per_in_ler_id => p_per_in_ler_id
327 ,p_business_group_id => p_business_group_id
328 ,p_object_version_number => l_object_version_number
329 ,p_effective_date => trunc(p_effective_date));
330 --
331 exception
332 --
333 when hr_api.cannot_find_prog_unit then
334 --
335 hr_api.cannot_find_prog_unit_error
336 (p_module_name => 'UPDATE_batch_ler_info'
337 ,p_hook_type => 'AP');
338 --
339 -- End of API User Hook for the after hook of update_batch_ler_info
340 --
341 end;
342 --
343 hr_utility.set_location(l_proc, 60);
344 --
345 -- When in validation only mode raise the Validate_Enabled exception
346 --
347 if p_validate then
348 raise hr_api.validate_enabled;
349 end if;
350 --
351 -- Set all output arguments
352 --
353 p_object_version_number := l_object_version_number;
354 --
355 hr_utility.set_location(' Leaving:'||l_proc, 70);
356 --
357 exception
358 --
359 when hr_api.validate_enabled then
360 --
361 -- As the Validate_Enabled exception has been raised
362 -- we must rollback to the savepoint
363 --
364 ROLLBACK TO update_batch_ler_info;
365 --
366 -- Only set output warning arguments
367 -- (Any key or derived arguments must be set to null
368 -- when validation only mode is being used.)
369 --
370 hr_utility.set_location(' Leaving:'||l_proc, 80);
371 --
372 when others then
373 --
374 -- A validation or unexpected error has occured
375 --
376 ROLLBACK TO update_batch_ler_info;
377 raise;
378 --
379 end update_batch_ler_info;
380 -- ----------------------------------------------------------------------------
381 -- |------------------------< delete_batch_ler_info >-------------------------|
382 -- ----------------------------------------------------------------------------
383 --
384 procedure delete_batch_ler_info
385 (p_validate in boolean default false
386 ,p_batch_ler_id in number
387 ,p_object_version_number in out nocopy number
388 ,p_effective_date in date) is
389 --
390 -- Declare cursors and local variables
391 --
392 l_proc varchar2(72) := g_package||'update_batch_ler_info';
393 l_object_version_number ben_batch_ler_info.object_version_number%TYPE;
394 --
395 begin
396 --
397 hr_utility.set_location('Entering:'|| l_proc, 10);
398 --
399 -- Issue a savepoint if operating in validation only mode
400 --
401 savepoint delete_batch_ler_info;
402 --
403 hr_utility.set_location(l_proc, 20);
404 --
405 -- Process Logic
406 --
407 l_object_version_number := p_object_version_number;
408 --
409 --
410 begin
411 --
412 -- Start of API User Hook for the before hook of delete_batch_ler_info
413 --
414 ben_batch_ler_info_bk3.delete_batch_ler_info_b
415 (p_batch_ler_id => p_batch_ler_id
416 ,p_object_version_number => p_object_version_number
417 ,p_effective_date => trunc(p_effective_date));
418 --
419 exception
420 --
421 when hr_api.cannot_find_prog_unit then
422 --
423 hr_api.cannot_find_prog_unit_error
424 (p_module_name => 'DELETE_batch_ler_info'
425 ,p_hook_type => 'BP');
426 --
427 -- End of API User Hook for the before hook of delete_batch_ler_info
428 --
429 end;
430 --
431 ben_bli_del.del
432 (p_batch_ler_id => p_batch_ler_id
433 ,p_object_version_number => l_object_version_number
434 ,p_effective_date => p_effective_date);
435 --
436 begin
437 --
438 -- Start of API User Hook for the after hook of delete_batch_ler_info
439 --
440 ben_batch_ler_info_bk3.delete_batch_ler_info_a
441 (p_batch_ler_id => p_batch_ler_id
442 ,p_object_version_number => l_object_version_number
443 ,p_effective_date => trunc(p_effective_date));
444 --
445 exception
446 --
447 when hr_api.cannot_find_prog_unit then
448 --
452 --
449 hr_api.cannot_find_prog_unit_error
450 (p_module_name => 'DELETE_batch_ler_info'
451 ,p_hook_type => 'AP');
453 -- End of API User Hook for the after hook of delete_batch_ler_info
454 --
455 end;
456 --
457 hr_utility.set_location(l_proc, 60);
458 --
459 -- When in validation only mode raise the Validate_Enabled exception
460 --
461 if p_validate then
462 raise hr_api.validate_enabled;
463 end if;
464 --
465 hr_utility.set_location(' Leaving:'||l_proc, 70);
466 --
467 exception
468 --
469 when hr_api.validate_enabled then
470 --
471 -- As the Validate_Enabled exception has been raised
472 -- we must rollback to the savepoint
473 --
474 ROLLBACK TO delete_batch_ler_info;
475 --
476 -- Only set output warning arguments
477 -- (Any key or derived arguments must be set to null
478 -- when validation only mode is being used.)
479 --
480 --
481 when others then
482 --
483 -- A validation or unexpected error has occured
484 --
485 ROLLBACK TO delete_batch_ler_info;
486 raise;
487 --
488 end delete_batch_ler_info;
489 --
490 -- ----------------------------------------------------------------------------
491 -- |-------------------------------< lck >------------------------------------|
492 -- ----------------------------------------------------------------------------
493 --
494 procedure lck
495 (p_batch_ler_id in number
496 ,p_object_version_number in number) is
497 --
498 --
499 -- Declare cursors and local variables
500 --
501 l_proc varchar2(72) := g_package||'lck';
502 --
503 begin
504 --
505 hr_utility.set_location('Entering:'|| l_proc, 10);
506 --
507 ben_bli_shd.lck
508 (p_batch_ler_id => p_batch_ler_id
509 ,p_object_version_number => p_object_version_number);
510 --
511 hr_utility.set_location(' Leaving:'||l_proc, 70);
512 --
513 end lck;
514 --
515 end ben_batch_ler_info_api;