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