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