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