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