[Home] [Help]
PACKAGE BODY: APPS.BEN_EXT_INCL_CHG_API
Source
1 Package Body ben_EXT_INCL_CHG_api as
2 /* $Header: bexicapi.pkb 120.1 2005/06/08 13:23:25 tjesumic noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_EXT_INCL_CHG_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_EXT_INCL_CHG >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_EXT_INCL_CHG
13 (p_validate in boolean default false
14 ,p_ext_incl_chg_id out nocopy number
15 ,p_chg_evt_cd in varchar2 default null
16 ,p_chg_evt_source in varchar2 default null
17 ,p_ext_rcd_in_file_id in number default null
18 ,p_ext_data_elmt_in_rcd_id in number default null
19 ,p_business_group_id in number default null
20 ,p_legislation_code in varchar2 default null
21 ,p_object_version_number out nocopy number
22 ,p_effective_date in date
23 ) is
24 --
25 -- Declare cursors and local variables
26 --
27 l_ext_incl_chg_id ben_ext_incl_chg.ext_incl_chg_id%TYPE;
28 l_proc varchar2(72) := g_package||'create_EXT_INCL_CHG';
29 l_object_version_number ben_ext_incl_chg.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_EXT_INCL_CHG;
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_EXT_INCL_CHG
46 --
47 ben_EXT_INCL_CHG_bk1.create_EXT_INCL_CHG_b
48 (
49 p_chg_evt_cd => p_chg_evt_cd
50 ,p_chg_evt_source => p_chg_evt_source
51 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
52 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
53 ,p_business_group_id => p_business_group_id
54 ,p_legislation_code => p_legislation_code
55 ,p_effective_date => trunc(p_effective_date)
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_EXT_INCL_CHG'
62 ,p_hook_type => 'BP'
63 );
64 --
65 -- End of API User Hook for the before hook of create_EXT_INCL_CHG
66 --
67 end;
68 --
69 ben_xic_ins.ins
70 (
71 p_ext_incl_chg_id => l_ext_incl_chg_id
72 ,p_chg_evt_cd => p_chg_evt_cd
73 , p_chg_evt_source => p_chg_evt_source
74 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
75 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
76 ,p_business_group_id => p_business_group_id
77 ,p_legislation_code => p_legislation_code
78 ,p_object_version_number => l_object_version_number
79 ,p_effective_date => trunc(p_effective_date)
80 );
81 --
82 begin
83 --
84 -- Start of API User Hook for the after hook of create_EXT_INCL_CHG
85 --
86 ben_EXT_INCL_CHG_bk1.create_EXT_INCL_CHG_a
87 (
88 p_ext_incl_chg_id => l_ext_incl_chg_id
89 ,p_chg_evt_cd => p_chg_evt_cd
90 ,p_chg_evt_source => p_chg_evt_source
91 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
92 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
93 ,p_business_group_id => p_business_group_id
94 ,p_legislation_code => p_legislation_code
95 ,p_object_version_number => l_object_version_number
96 ,p_effective_date => trunc(p_effective_date)
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_EXT_INCL_CHG'
102 ,p_hook_type => 'AP'
103 );
104 --
105 -- End of API User Hook for the after hook of create_EXT_INCL_CHG
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_ext_incl_chg_id := l_ext_incl_chg_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_EXT_INCL_CHG;
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_ext_incl_chg_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 ROLLBACK TO create_EXT_INCL_CHG;
146 raise;
147 --
148 end create_EXT_INCL_CHG;
149 -- ----------------------------------------------------------------------------
150 -- |------------------------< update_EXT_INCL_CHG >--- ------------------|
151 -- ----------------------------------------------------------------------------
152 --
153 procedure update_EXT_INCL_CHG
154 (p_validate in boolean default false
155 ,p_ext_incl_chg_id in number
156 ,p_chg_evt_cd in varchar2 default hr_api.g_varchar2
157 ,p_chg_evt_source in varchar2 default hr_api.g_varchar2
158 ,p_ext_rcd_in_file_id in number default hr_api.g_number
159 ,p_ext_data_elmt_in_rcd_id in number default hr_api.g_number
160 ,p_business_group_id in number default hr_api.g_number
161 ,p_legislation_code in varchar2 default hr_api.g_varchar2
162 ,p_object_version_number in out nocopy number
163 ,p_effective_date in date
164 ) is
165 --
166 -- Declare cursors and local variables
167 --
168 l_proc varchar2(72) := g_package||'update_EXT_INCL_CHG';
169 l_object_version_number ben_ext_incl_chg.object_version_number%TYPE;
170 --
171 begin
172 --
173 hr_utility.set_location('Entering:'|| l_proc, 10);
174 --
175 -- Issue a savepoint if operating in validation only mode
176 --
177 savepoint update_EXT_INCL_CHG;
178 --
179 hr_utility.set_location(l_proc, 20);
180 --
181 -- Process Logic
182 --
183 l_object_version_number := p_object_version_number;
184 --
185 begin
186 --
187 -- Start of API User Hook for the before hook of update_EXT_INCL_CHG
188 --
189 ben_EXT_INCL_CHG_bk2.update_EXT_INCL_CHG_b
190 (
191 p_ext_incl_chg_id => p_ext_incl_chg_id
192 ,p_chg_evt_cd => p_chg_evt_cd
193 ,p_chg_evt_source => p_chg_evt_source
194 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
195 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
196 ,p_business_group_id => p_business_group_id
197 ,p_legislation_code => p_legislation_code
198 ,p_object_version_number => p_object_version_number
199 ,p_effective_date => trunc(p_effective_date)
200 );
201 exception
202 when hr_api.cannot_find_prog_unit then
203 hr_api.cannot_find_prog_unit_error
204 (p_module_name => 'UPDATE_EXT_INCL_CHG'
205 ,p_hook_type => 'BP'
206 );
207 --
208 -- End of API User Hook for the before hook of update_EXT_INCL_CHG
209 --
210 end;
211 --
212 ben_xic_upd.upd
213 (
214 p_ext_incl_chg_id => p_ext_incl_chg_id
215 ,p_chg_evt_cd => p_chg_evt_cd
216 ,p_chg_evt_source => p_chg_evt_source
217 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
218 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
219 ,p_business_group_id => p_business_group_id
220 ,p_legislation_code => p_legislation_code
221 ,p_object_version_number => l_object_version_number
222 ,p_effective_date => trunc(p_effective_date)
223 );
224 --
225 begin
226 --
227 -- Start of API User Hook for the after hook of update_EXT_INCL_CHG
228 --
229 ben_EXT_INCL_CHG_bk2.update_EXT_INCL_CHG_a
230 (
231 p_ext_incl_chg_id => p_ext_incl_chg_id
232 ,p_chg_evt_cd => p_chg_evt_cd
233 ,p_chg_evt_source => p_chg_evt_source
234 ,p_ext_rcd_in_file_id => p_ext_rcd_in_file_id
235 ,p_ext_data_elmt_in_rcd_id => p_ext_data_elmt_in_rcd_id
236 ,p_business_group_id => p_business_group_id
237 ,p_legislation_code => p_legislation_code
238 ,p_object_version_number => l_object_version_number
239 ,p_effective_date => trunc(p_effective_date)
240 );
241 exception
242 when hr_api.cannot_find_prog_unit then
243 hr_api.cannot_find_prog_unit_error
244 (p_module_name => 'UPDATE_EXT_INCL_CHG'
245 ,p_hook_type => 'AP'
246 );
247 --
248 -- End of API User Hook for the after hook of update_EXT_INCL_CHG
249 --
250 end;
251 --
252 hr_utility.set_location(l_proc, 60);
253 --
254 -- When in validation only mode raise the Validate_Enabled exception
255 --
256 if p_validate then
257 raise hr_api.validate_enabled;
258 end if;
259 --
260 -- Set all output arguments
261 --
262 p_object_version_number := l_object_version_number;
263 --
264 hr_utility.set_location(' Leaving:'||l_proc, 70);
265 --
266 exception
267 --
268 when hr_api.validate_enabled then
269 --
270 -- As the Validate_Enabled exception has been raised
271 -- we must rollback to the savepoint
272 --
273 ROLLBACK TO update_EXT_INCL_CHG;
274 --
275 -- Only set output warning arguments
276 -- (Any key or derived arguments must be set to null
277 -- when validation only mode is being used.)
278 --
279 hr_utility.set_location(' Leaving:'||l_proc, 80);
280 --
281 when others then
282 --
283 -- A validation or unexpected error has occured
284 --
285 ROLLBACK TO update_EXT_INCL_CHG;
286 raise;
287 --
288 end update_EXT_INCL_CHG;
289 -- ----------------------------------------------------------------------------
290 -- |------------------------< delete_EXT_INCL_CHG >----------------------|
291 -- ----------------------------------------------------------------------------
292 --
293 procedure delete_EXT_INCL_CHG
294 (p_validate in boolean default false
295 ,p_ext_incl_chg_id in number
296 ,p_legislation_code in varchar2 default null
297 ,p_object_version_number in out nocopy number
298 ,p_effective_date in date
299 ) is
300 --
301 -- Declare cursors and local variables
302 --
303 l_proc varchar2(72) := g_package||'update_EXT_INCL_CHG';
304 l_object_version_number ben_ext_incl_chg.object_version_number%TYPE;
305 --
306 begin
307 --
308 hr_utility.set_location('Entering:'|| l_proc, 10);
309 --
310 -- Issue a savepoint if operating in validation only mode
311 --
312 savepoint delete_EXT_INCL_CHG;
313 --
314 hr_utility.set_location(l_proc, 20);
315 --
316 -- Process Logic
317 --
318 l_object_version_number := p_object_version_number;
319 --
320 --
321 begin
322 --
323 -- Start of API User Hook for the before hook of delete_EXT_INCL_CHG
324 --
325 ben_EXT_INCL_CHG_bk3.delete_EXT_INCL_CHG_b
326 (
327 p_ext_incl_chg_id => p_ext_incl_chg_id
328 ,p_legislation_code => p_legislation_code
329 ,p_object_version_number => p_object_version_number
330 ,p_effective_date => trunc(p_effective_date)
331 );
332 exception
333 when hr_api.cannot_find_prog_unit then
334 hr_api.cannot_find_prog_unit_error
335 (p_module_name => 'DELETE_EXT_INCL_CHG'
336 ,p_hook_type => 'BP'
337 );
338 --
339 -- End of API User Hook for the before hook of delete_EXT_INCL_CHG
340 --
341 end;
342 --
343 ben_xic_del.del
344 (
345 p_ext_incl_chg_id => p_ext_incl_chg_id
346 ,p_legislation_code => p_legislation_code
347 ,p_object_version_number => l_object_version_number
348 ,p_effective_date => p_effective_date
349 );
350 --
351 begin
352 --
353 -- Start of API User Hook for the after hook of delete_EXT_INCL_CHG
354 --
355 ben_EXT_INCL_CHG_bk3.delete_EXT_INCL_CHG_a
356 (
357 p_ext_incl_chg_id => p_ext_incl_chg_id
358 ,p_legislation_code => p_legislation_code
359 ,p_object_version_number => l_object_version_number
360 ,p_effective_date => trunc(p_effective_date)
361 );
362 exception
363 when hr_api.cannot_find_prog_unit then
364 hr_api.cannot_find_prog_unit_error
365 (p_module_name => 'DELETE_EXT_INCL_CHG'
366 ,p_hook_type => 'AP'
367 );
368 --
369 -- End of API User Hook for the after hook of delete_EXT_INCL_CHG
370 --
371 end;
372 --
373 hr_utility.set_location(l_proc, 60);
374 --
375 -- When in validation only mode raise the Validate_Enabled exception
376 --
377 if p_validate then
378 raise hr_api.validate_enabled;
379 end if;
380 --
381 hr_utility.set_location(' Leaving:'||l_proc, 70);
382 --
383 exception
384 --
385 when hr_api.validate_enabled then
386 --
387 -- As the Validate_Enabled exception has been raised
388 -- we must rollback to the savepoint
389 --
390 ROLLBACK TO delete_EXT_INCL_CHG;
391 --
392 -- Only set output warning arguments
393 -- (Any key or derived arguments must be set to null
394 -- when validation only mode is being used.)
395 --
396 --
397 when others then
398 --
399 -- A validation or unexpected error has occured
400 --
401 ROLLBACK TO delete_EXT_INCL_CHG;
402 raise;
403 --
404 end delete_EXT_INCL_CHG;
405 --
406 -- ----------------------------------------------------------------------------
407 -- |-------------------------------< lck >------------------------------------|
408 -- ----------------------------------------------------------------------------
409 --
410 procedure lck
411 (
412 p_ext_incl_chg_id in number
413 ,p_object_version_number in number
414 ) is
415 --
416 --
417 -- Declare cursors and local variables
418 --
419 l_proc varchar2(72) := g_package||'lck';
420 --
421 begin
422 --
423 hr_utility.set_location('Entering:'|| l_proc, 10);
424 --
425 ben_xic_shd.lck
426 (
427 p_ext_incl_chg_id => p_ext_incl_chg_id
428 ,p_object_version_number => p_object_version_number
429 );
430 --
431 hr_utility.set_location(' Leaving:'||l_proc, 70);
432 --
433 end lck;
434 --
435 end ben_EXT_INCL_CHG_api;