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