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