[Home] [Help]
PACKAGE BODY: APPS.BEN_PSTN_RT_API
Source
1 Package Body ben_PSTN_RT_api as
2 /* $Header: bepstapi.pkb 120.0 2005/05/28 11:20:43 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_PSTN_RT_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_PSTN_RT >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_PSTN_RT
13 (p_validate in boolean default false
14 ,p_PSTN_RT_id out nocopy number
15 ,p_effective_start_date out nocopy date
16 ,p_effective_end_date out nocopy date
17 ,p_excld_flag in varchar2 default null
18 ,p_ordr_num in number default null
19 ,p_position_id in number default null
20 ,p_vrbl_rt_prfl_id in number default null
21 ,p_business_group_id in number default null
22 ,p_pst_attribute_category in varchar2 default null
23 ,p_pst_attribute1 in varchar2 default null
24 ,p_pst_attribute2 in varchar2 default null
25 ,p_pst_attribute3 in varchar2 default null
26 ,p_pst_attribute4 in varchar2 default null
27 ,p_pst_attribute5 in varchar2 default null
28 ,p_pst_attribute6 in varchar2 default null
29 ,p_pst_attribute7 in varchar2 default null
30 ,p_pst_attribute8 in varchar2 default null
31 ,p_pst_attribute9 in varchar2 default null
32 ,p_pst_attribute10 in varchar2 default null
33 ,p_pst_attribute11 in varchar2 default null
34 ,p_pst_attribute12 in varchar2 default null
35 ,p_pst_attribute13 in varchar2 default null
36 ,p_pst_attribute14 in varchar2 default null
37 ,p_pst_attribute15 in varchar2 default null
38 ,p_pst_attribute16 in varchar2 default null
39 ,p_pst_attribute17 in varchar2 default null
40 ,p_pst_attribute18 in varchar2 default null
41 ,p_pst_attribute19 in varchar2 default null
42 ,p_pst_attribute20 in varchar2 default null
43 ,p_pst_attribute21 in varchar2 default null
44 ,p_pst_attribute22 in varchar2 default null
45 ,p_pst_attribute23 in varchar2 default null
46 ,p_pst_attribute24 in varchar2 default null
47 ,p_pst_attribute25 in varchar2 default null
48 ,p_pst_attribute26 in varchar2 default null
49 ,p_pst_attribute27 in varchar2 default null
50 ,p_pst_attribute28 in varchar2 default null
51 ,p_pst_attribute29 in varchar2 default null
52 ,p_pst_attribute30 in varchar2 default null
53 ,p_object_version_number out nocopy number
54 ,p_effective_date in date
55 ) is
56 --
57 -- Declare cursors and local variables
58 --
59 l_PSTN_RT_id ben_PSTN_RT_f.PSTN_RT_id%TYPE;
60 l_effective_start_date ben_PSTN_RT_f.effective_start_date%TYPE;
61 l_effective_end_date ben_PSTN_RT_f.effective_end_date%TYPE;
62 l_proc varchar2(72) := g_package||'create_PSTN_RT';
63 l_object_version_number ben_PSTN_RT_f.object_version_number%TYPE;
64 --
65 begin
66 --
67 hr_utility.set_location('Entering:'|| l_proc, 10);
68 --
69 -- Issue a savepoint if operating in validation only mode
70 --
71 savepoint create_PSTN_RT;
72 --
73 hr_utility.set_location(l_proc, 20);
74 --
75 -- Process Logic
76 --
77 begin
78 --
79 -- Start of API User Hook for the before hook of create_PSTN_RT
80 --
81 ben_PSTN_RT_bk1.create_PSTN_RT_b
82 (
83 p_excld_flag => p_excld_flag
84 ,p_ordr_num => p_ordr_num
85 ,p_position_id => p_position_id
86 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
87 ,p_business_group_id => p_business_group_id
88 ,p_pst_attribute_category => p_pst_attribute_category
89 ,p_pst_attribute1 => p_pst_attribute1
90 ,p_pst_attribute2 => p_pst_attribute2
91 ,p_pst_attribute3 => p_pst_attribute3
92 ,p_pst_attribute4 => p_pst_attribute4
93 ,p_pst_attribute5 => p_pst_attribute5
94 ,p_pst_attribute6 => p_pst_attribute6
95 ,p_pst_attribute7 => p_pst_attribute7
96 ,p_pst_attribute8 => p_pst_attribute8
97 ,p_pst_attribute9 => p_pst_attribute9
98 ,p_pst_attribute10 => p_pst_attribute10
99 ,p_pst_attribute11 => p_pst_attribute11
100 ,p_pst_attribute12 => p_pst_attribute12
101 ,p_pst_attribute13 => p_pst_attribute13
102 ,p_pst_attribute14 => p_pst_attribute14
103 ,p_pst_attribute15 => p_pst_attribute15
104 ,p_pst_attribute16 => p_pst_attribute16
105 ,p_pst_attribute17 => p_pst_attribute17
106 ,p_pst_attribute18 => p_pst_attribute18
107 ,p_pst_attribute19 => p_pst_attribute19
108 ,p_pst_attribute20 => p_pst_attribute20
109 ,p_pst_attribute21 => p_pst_attribute21
110 ,p_pst_attribute22 => p_pst_attribute22
111 ,p_pst_attribute23 => p_pst_attribute23
112 ,p_pst_attribute24 => p_pst_attribute24
113 ,p_pst_attribute25 => p_pst_attribute25
114 ,p_pst_attribute26 => p_pst_attribute26
115 ,p_pst_attribute27 => p_pst_attribute27
116 ,p_pst_attribute28 => p_pst_attribute28
117 ,p_pst_attribute29 => p_pst_attribute29
118 ,p_pst_attribute30 => p_pst_attribute30
119 ,p_effective_date => trunc(p_effective_date)
120 );
121 exception
122 when hr_api.cannot_find_prog_unit then
123 hr_api.cannot_find_prog_unit_error
124 (
125 p_module_name => 'CREATE_PSTN_RT'
126 ,p_hook_type => 'BP'
127 );
128 --
129 -- End of API User Hook for the before hook of create_PSTN_RT
130 --
131 end;
132 --
133 hr_utility.set_location(l_proc, 30);
134 ben_pst_ins.ins
135 (
136 p_PSTN_RT_id => l_PSTN_RT_id
137 ,p_effective_start_date => l_effective_start_date
138 ,p_effective_end_date => l_effective_end_date
139 ,p_excld_flag => p_excld_flag
140 ,p_ordr_num => p_ordr_num
141 ,p_position_id => p_position_id
142 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
143 ,p_business_group_id => p_business_group_id
144 ,p_pst_attribute_category => p_pst_attribute_category
145 ,p_pst_attribute1 => p_pst_attribute1
146 ,p_pst_attribute2 => p_pst_attribute2
147 ,p_pst_attribute3 => p_pst_attribute3
148 ,p_pst_attribute4 => p_pst_attribute4
149 ,p_pst_attribute5 => p_pst_attribute5
150 ,p_pst_attribute6 => p_pst_attribute6
151 ,p_pst_attribute7 => p_pst_attribute7
152 ,p_pst_attribute8 => p_pst_attribute8
153 ,p_pst_attribute9 => p_pst_attribute9
154 ,p_pst_attribute10 => p_pst_attribute10
155 ,p_pst_attribute11 => p_pst_attribute11
156 ,p_pst_attribute12 => p_pst_attribute12
157 ,p_pst_attribute13 => p_pst_attribute13
158 ,p_pst_attribute14 => p_pst_attribute14
159 ,p_pst_attribute15 => p_pst_attribute15
160 ,p_pst_attribute16 => p_pst_attribute16
161 ,p_pst_attribute17 => p_pst_attribute17
162 ,p_pst_attribute18 => p_pst_attribute18
163 ,p_pst_attribute19 => p_pst_attribute19
164 ,p_pst_attribute20 => p_pst_attribute20
165 ,p_pst_attribute21 => p_pst_attribute21
166 ,p_pst_attribute22 => p_pst_attribute22
167 ,p_pst_attribute23 => p_pst_attribute23
168 ,p_pst_attribute24 => p_pst_attribute24
169 ,p_pst_attribute25 => p_pst_attribute25
170 ,p_pst_attribute26 => p_pst_attribute26
171 ,p_pst_attribute27 => p_pst_attribute27
172 ,p_pst_attribute28 => p_pst_attribute28
173 ,p_pst_attribute29 => p_pst_attribute29
174 ,p_pst_attribute30 => p_pst_attribute30
175 ,p_object_version_number => l_object_version_number
176 ,p_effective_date => trunc(p_effective_date)
177 );
178 --
179 hr_utility.set_location(l_proc, 40);
180 begin
181 --
182 -- Start of API User Hook for the after hook of create_PSTN_RT
183 --
184 ben_PSTN_RT_bk1.create_PSTN_RT_a
185 (
186 p_PSTN_RT_id => l_PSTN_RT_id
187 ,p_effective_start_date => l_effective_start_date
188 ,p_effective_end_date => l_effective_end_date
189 ,p_excld_flag => p_excld_flag
190 ,p_ordr_num => p_ordr_num
191 ,p_position_id => p_position_id
192 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
193 ,p_business_group_id => p_business_group_id
194 ,p_pst_attribute_category => p_pst_attribute_category
195 ,p_pst_attribute1 => p_pst_attribute1
196 ,p_pst_attribute2 => p_pst_attribute2
197 ,p_pst_attribute3 => p_pst_attribute3
198 ,p_pst_attribute4 => p_pst_attribute4
199 ,p_pst_attribute5 => p_pst_attribute5
200 ,p_pst_attribute6 => p_pst_attribute6
201 ,p_pst_attribute7 => p_pst_attribute7
202 ,p_pst_attribute8 => p_pst_attribute8
203 ,p_pst_attribute9 => p_pst_attribute9
204 ,p_pst_attribute10 => p_pst_attribute10
205 ,p_pst_attribute11 => p_pst_attribute11
206 ,p_pst_attribute12 => p_pst_attribute12
207 ,p_pst_attribute13 => p_pst_attribute13
208 ,p_pst_attribute14 => p_pst_attribute14
209 ,p_pst_attribute15 => p_pst_attribute15
210 ,p_pst_attribute16 => p_pst_attribute16
211 ,p_pst_attribute17 => p_pst_attribute17
212 ,p_pst_attribute18 => p_pst_attribute18
213 ,p_pst_attribute19 => p_pst_attribute19
214 ,p_pst_attribute20 => p_pst_attribute20
215 ,p_pst_attribute21 => p_pst_attribute21
216 ,p_pst_attribute22 => p_pst_attribute22
217 ,p_pst_attribute23 => p_pst_attribute23
218 ,p_pst_attribute24 => p_pst_attribute24
219 ,p_pst_attribute25 => p_pst_attribute25
220 ,p_pst_attribute26 => p_pst_attribute26
221 ,p_pst_attribute27 => p_pst_attribute27
222 ,p_pst_attribute28 => p_pst_attribute28
223 ,p_pst_attribute29 => p_pst_attribute29
224 ,p_pst_attribute30 => p_pst_attribute30
225 ,p_object_version_number => l_object_version_number
226 ,p_effective_date => trunc(p_effective_date)
227 );
228 exception
229 when hr_api.cannot_find_prog_unit then
230 hr_api.cannot_find_prog_unit_error
231 (p_module_name => 'CREATE_PSTN_RT'
232 ,p_hook_type => 'AP'
233 );
234 --
235 -- End of API User Hook for the after hook of create_PSTN_RT
236 --
237 end;
238 hr_utility.set_location(l_proc, 50);
239 --
240 ben_profile_handler.event_handler
241 (p_event => 'CREATE',
242 p_base_table => 'BEN_VRBL_RT_PRFL_F',
243 p_base_table_column => 'VRBL_RT_PRFL_ID',
244 p_base_table_column_value => p_vrbl_rt_prfl_id,
245 p_base_table_reference_column => 'RT_PSTN_FLAG',
246 p_reference_table => 'BEN_PSTN_RT_F',
247 p_reference_table_column => 'VRBL_RT_PRFL_ID');
248 --
249 hr_utility.set_location(l_proc, 60);
250 --
251 -- When in validation only mode raise the Validate_Enabled exception
252 --
253 if p_validate then
254 raise hr_api.validate_enabled;
255 end if;
256 --
257 -- Set all output arguments
258 --
259 p_PSTN_RT_id := l_PSTN_RT_id;
260 p_effective_start_date := l_effective_start_date;
261 p_effective_end_date := l_effective_end_date;
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 create_PSTN_RT;
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 p_PSTN_RT_id := null;
280 p_effective_start_date := null;
281 p_effective_end_date := null;
282 p_object_version_number := null;
283 hr_utility.set_location(' Leaving:'||l_proc, 80);
284 --
285 when others then
286 --
287 -- A validation or unexpected error has occured
288
289 -- Initialize OUT Variables for NOCOPY
290 p_PSTN_RT_id :=null;
291 p_effective_start_date :=null;
292 p_effective_end_date :=null;
293 p_object_version_number :=null;
294
295 --
296 ROLLBACK TO create_PSTN_RT;
297 raise;
298 --
299 end create_PSTN_RT;
300 -- ----------------------------------------------------------------------------
301 -- |------------------------< update_PSTN_RT >--- ------------------|
302 -- ----------------------------------------------------------------------------
303 --
304 procedure update_PSTN_RT
305 (p_validate in boolean default false
306 ,p_PSTN_RT_id in number
307 ,p_effective_start_date out nocopy date
308 ,p_effective_end_date out nocopy date
309 ,p_excld_flag in varchar2 default hr_api.g_varchar2
310 ,p_ordr_num in number default hr_api.g_number
311 ,p_position_id in number default hr_api.g_number
312 ,p_vrbl_rt_prfl_id in number default hr_api.g_number
313 ,p_business_group_id in number default hr_api.g_number
314 ,p_pst_attribute_category in varchar2 default hr_api.g_varchar2
315 ,p_pst_attribute1 in varchar2 default hr_api.g_varchar2
316 ,p_pst_attribute2 in varchar2 default hr_api.g_varchar2
317 ,p_pst_attribute3 in varchar2 default hr_api.g_varchar2
318 ,p_pst_attribute4 in varchar2 default hr_api.g_varchar2
319 ,p_pst_attribute5 in varchar2 default hr_api.g_varchar2
320 ,p_pst_attribute6 in varchar2 default hr_api.g_varchar2
321 ,p_pst_attribute7 in varchar2 default hr_api.g_varchar2
322 ,p_pst_attribute8 in varchar2 default hr_api.g_varchar2
323 ,p_pst_attribute9 in varchar2 default hr_api.g_varchar2
324 ,p_pst_attribute10 in varchar2 default hr_api.g_varchar2
325 ,p_pst_attribute11 in varchar2 default hr_api.g_varchar2
326 ,p_pst_attribute12 in varchar2 default hr_api.g_varchar2
327 ,p_pst_attribute13 in varchar2 default hr_api.g_varchar2
328 ,p_pst_attribute14 in varchar2 default hr_api.g_varchar2
329 ,p_pst_attribute15 in varchar2 default hr_api.g_varchar2
330 ,p_pst_attribute16 in varchar2 default hr_api.g_varchar2
331 ,p_pst_attribute17 in varchar2 default hr_api.g_varchar2
332 ,p_pst_attribute18 in varchar2 default hr_api.g_varchar2
333 ,p_pst_attribute19 in varchar2 default hr_api.g_varchar2
334 ,p_pst_attribute20 in varchar2 default hr_api.g_varchar2
335 ,p_pst_attribute21 in varchar2 default hr_api.g_varchar2
336 ,p_pst_attribute22 in varchar2 default hr_api.g_varchar2
337 ,p_pst_attribute23 in varchar2 default hr_api.g_varchar2
338 ,p_pst_attribute24 in varchar2 default hr_api.g_varchar2
339 ,p_pst_attribute25 in varchar2 default hr_api.g_varchar2
340 ,p_pst_attribute26 in varchar2 default hr_api.g_varchar2
341 ,p_pst_attribute27 in varchar2 default hr_api.g_varchar2
342 ,p_pst_attribute28 in varchar2 default hr_api.g_varchar2
343 ,p_pst_attribute29 in varchar2 default hr_api.g_varchar2
344 ,p_pst_attribute30 in varchar2 default hr_api.g_varchar2
345 ,p_object_version_number in out nocopy number
346 ,p_effective_date in date
347 ,p_datetrack_mode in varchar2
348 ) is
349 --
350 -- Declare cursors and local variables
351 --
352 l_proc varchar2(72) := g_package||'update_PSTN_RT';
353 l_object_version_number ben_PSTN_RT_f.object_version_number%TYPE;
354 l_effective_start_date ben_PSTN_RT_f.effective_start_date%TYPE;
355 l_effective_end_date ben_PSTN_RT_f.effective_end_date%TYPE;
356 --
357 begin
358 --
359 hr_utility.set_location('Entering:'|| l_proc, 10);
360 --
361 -- Issue a savepoint if operating in validation only mode
362 --
363 savepoint update_PSTN_RT;
364 --
365 hr_utility.set_location(l_proc, 20);
366 --
367 -- Process Logic
368 --
369 l_object_version_number := p_object_version_number;
370 --
371 begin
372 --
373 -- Start of API User Hook for the before hook of update_PSTN_RT
374 --
375 ben_PSTN_RT_bk2.update_PSTN_RT_b
376 (
377 p_PSTN_RT_id => p_PSTN_RT_id
378 ,p_excld_flag => p_excld_flag
379 ,p_ordr_num => p_ordr_num
380 ,p_position_id => p_position_id
381 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
382 ,p_business_group_id => p_business_group_id
383 ,p_pst_attribute_category => p_pst_attribute_category
384 ,p_pst_attribute1 => p_pst_attribute1
385 ,p_pst_attribute2 => p_pst_attribute2
386 ,p_pst_attribute3 => p_pst_attribute3
387 ,p_pst_attribute4 => p_pst_attribute4
388 ,p_pst_attribute5 => p_pst_attribute5
389 ,p_pst_attribute6 => p_pst_attribute6
390 ,p_pst_attribute7 => p_pst_attribute7
391 ,p_pst_attribute8 => p_pst_attribute8
392 ,p_pst_attribute9 => p_pst_attribute9
393 ,p_pst_attribute10 => p_pst_attribute10
394 ,p_pst_attribute11 => p_pst_attribute11
395 ,p_pst_attribute12 => p_pst_attribute12
396 ,p_pst_attribute13 => p_pst_attribute13
397 ,p_pst_attribute14 => p_pst_attribute14
398 ,p_pst_attribute15 => p_pst_attribute15
399 ,p_pst_attribute16 => p_pst_attribute16
400 ,p_pst_attribute17 => p_pst_attribute17
401 ,p_pst_attribute18 => p_pst_attribute18
402 ,p_pst_attribute19 => p_pst_attribute19
403 ,p_pst_attribute20 => p_pst_attribute20
404 ,p_pst_attribute21 => p_pst_attribute21
405 ,p_pst_attribute22 => p_pst_attribute22
406 ,p_pst_attribute23 => p_pst_attribute23
407 ,p_pst_attribute24 => p_pst_attribute24
408 ,p_pst_attribute25 => p_pst_attribute25
409 ,p_pst_attribute26 => p_pst_attribute26
410 ,p_pst_attribute27 => p_pst_attribute27
411 ,p_pst_attribute28 => p_pst_attribute28
412 ,p_pst_attribute29 => p_pst_attribute29
413 ,p_pst_attribute30 => p_pst_attribute30
414 ,p_object_version_number => p_object_version_number
415 ,p_effective_date => trunc(p_effective_date)
416 ,p_datetrack_mode => p_datetrack_mode
417 );
418 exception
419 when hr_api.cannot_find_prog_unit then
420 hr_api.cannot_find_prog_unit_error
421 (p_module_name => 'UPDATE_PSTN_RT'
422 ,p_hook_type => 'BP'
423 );
424 --
425 -- End of API User Hook for the before hook of update_PSTN_RT
426 --
427 end;
428 --
429 ben_pst_upd.upd
430 (
431 p_PSTN_RT_id => p_PSTN_RT_id
432 ,p_effective_start_date => l_effective_start_date
433 ,p_effective_end_date => l_effective_end_date
434 ,p_excld_flag => p_excld_flag
435 ,p_ordr_num => p_ordr_num
436 ,p_position_id => p_position_id
437 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
438 ,p_business_group_id => p_business_group_id
439 ,p_pst_attribute_category => p_pst_attribute_category
440 ,p_pst_attribute1 => p_pst_attribute1
441 ,p_pst_attribute2 => p_pst_attribute2
442 ,p_pst_attribute3 => p_pst_attribute3
443 ,p_pst_attribute4 => p_pst_attribute4
444 ,p_pst_attribute5 => p_pst_attribute5
445 ,p_pst_attribute6 => p_pst_attribute6
446 ,p_pst_attribute7 => p_pst_attribute7
447 ,p_pst_attribute8 => p_pst_attribute8
448 ,p_pst_attribute9 => p_pst_attribute9
449 ,p_pst_attribute10 => p_pst_attribute10
450 ,p_pst_attribute11 => p_pst_attribute11
451 ,p_pst_attribute12 => p_pst_attribute12
452 ,p_pst_attribute13 => p_pst_attribute13
453 ,p_pst_attribute14 => p_pst_attribute14
454 ,p_pst_attribute15 => p_pst_attribute15
455 ,p_pst_attribute16 => p_pst_attribute16
456 ,p_pst_attribute17 => p_pst_attribute17
457 ,p_pst_attribute18 => p_pst_attribute18
458 ,p_pst_attribute19 => p_pst_attribute19
459 ,p_pst_attribute20 => p_pst_attribute20
460 ,p_pst_attribute21 => p_pst_attribute21
461 ,p_pst_attribute22 => p_pst_attribute22
462 ,p_pst_attribute23 => p_pst_attribute23
463 ,p_pst_attribute24 => p_pst_attribute24
464 ,p_pst_attribute25 => p_pst_attribute25
465 ,p_pst_attribute26 => p_pst_attribute26
466 ,p_pst_attribute27 => p_pst_attribute27
467 ,p_pst_attribute28 => p_pst_attribute28
468 ,p_pst_attribute29 => p_pst_attribute29
469 ,p_pst_attribute30 => p_pst_attribute30
470 ,p_object_version_number => l_object_version_number
471 ,p_effective_date => trunc(p_effective_date)
472 ,p_datetrack_mode => p_datetrack_mode
473 );
474 --
475 begin
476 --
477 -- Start of API User Hook for the after hook of update_PSTN_RT
478 --
479 ben_PSTN_RT_bk2.update_PSTN_RT_a
480 (
481 p_PSTN_RT_id => p_PSTN_RT_id
482 ,p_effective_start_date => l_effective_start_date
483 ,p_effective_end_date => l_effective_end_date
484 ,p_excld_flag => p_excld_flag
485 ,p_ordr_num => p_ordr_num
486 ,p_position_id => p_position_id
487 ,p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
488 ,p_business_group_id => p_business_group_id
489 ,p_pst_attribute_category => p_pst_attribute_category
490 ,p_pst_attribute1 => p_pst_attribute1
491 ,p_pst_attribute2 => p_pst_attribute2
492 ,p_pst_attribute3 => p_pst_attribute3
493 ,p_pst_attribute4 => p_pst_attribute4
494 ,p_pst_attribute5 => p_pst_attribute5
495 ,p_pst_attribute6 => p_pst_attribute6
496 ,p_pst_attribute7 => p_pst_attribute7
497 ,p_pst_attribute8 => p_pst_attribute8
498 ,p_pst_attribute9 => p_pst_attribute9
499 ,p_pst_attribute10 => p_pst_attribute10
500 ,p_pst_attribute11 => p_pst_attribute11
501 ,p_pst_attribute12 => p_pst_attribute12
502 ,p_pst_attribute13 => p_pst_attribute13
503 ,p_pst_attribute14 => p_pst_attribute14
504 ,p_pst_attribute15 => p_pst_attribute15
505 ,p_pst_attribute16 => p_pst_attribute16
506 ,p_pst_attribute17 => p_pst_attribute17
507 ,p_pst_attribute18 => p_pst_attribute18
508 ,p_pst_attribute19 => p_pst_attribute19
509 ,p_pst_attribute20 => p_pst_attribute20
510 ,p_pst_attribute21 => p_pst_attribute21
511 ,p_pst_attribute22 => p_pst_attribute22
512 ,p_pst_attribute23 => p_pst_attribute23
513 ,p_pst_attribute24 => p_pst_attribute24
514 ,p_pst_attribute25 => p_pst_attribute25
515 ,p_pst_attribute26 => p_pst_attribute26
516 ,p_pst_attribute27 => p_pst_attribute27
517 ,p_pst_attribute28 => p_pst_attribute28
518 ,p_pst_attribute29 => p_pst_attribute29
519 ,p_pst_attribute30 => p_pst_attribute30
520 ,p_object_version_number => l_object_version_number
521 ,p_effective_date => trunc(p_effective_date)
522 ,p_datetrack_mode => p_datetrack_mode
523 );
524 exception
525 when hr_api.cannot_find_prog_unit then
526 hr_api.cannot_find_prog_unit_error
527 (p_module_name => 'UPDATE_PSTN_RT'
528 ,p_hook_type => 'AP'
529 );
530 --
531 -- End of API User Hook for the after hook of update_PSTN_RT
532 --
533 end;
534 --
535 hr_utility.set_location(l_proc, 60);
536 --
537 -- When in validation only mode raise the Validate_Enabled exception
538 --
539 if p_validate then
540 raise hr_api.validate_enabled;
541 end if;
542 --
543 -- Set all output arguments
544 --
545 p_object_version_number := l_object_version_number;
546 p_effective_start_date := l_effective_start_date;
547 p_effective_end_date := l_effective_end_date;
548 --
549 hr_utility.set_location(' Leaving:'||l_proc, 70);
550 --
551 exception
552 --
553 when hr_api.validate_enabled then
554 --
555 -- As the Validate_Enabled exception has been raised
556 -- we must rollback to the savepoint
557 --
558 ROLLBACK TO update_PSTN_RT;
559 --
560 -- Only set output warning arguments
561 -- (Any key or derived arguments must be set to null
562 -- when validation only mode is being used.)
563 --
564 hr_utility.set_location(' Leaving:'||l_proc, 80);
565 --
566 when others then
567 --
568 -- A validation or unexpected error has occured
569
570 -- Initialize OUT Variables for NOCOPY
571 p_effective_start_date :=null;
572 p_effective_end_date :=null;
573
574 -- Initialize IN/OUT Variables for NOCOPY
575 p_object_version_number :=l_object_version_number ;
576
577 --
578 ROLLBACK TO update_PSTN_RT;
579 raise;
580 --
581 end update_PSTN_RT;
582 -- ----------------------------------------------------------------------------
583 -- |------------------------< delete_PSTN_RT >----------------------|
584 -- ----------------------------------------------------------------------------
585 --
586 procedure delete_PSTN_RT
587 (p_validate in boolean default false
588 ,p_PSTN_RT_id in number
589 ,p_effective_start_date out nocopy date
590 ,p_effective_end_date out nocopy date
591 ,p_object_version_number in out nocopy number
592 ,p_effective_date in date
593 ,p_datetrack_mode in varchar2
594 ) is
595 --
596 -- Declare cursors and local variables
597 --
598 l_proc varchar2(72) := g_package||'update_PSTN_RT';
599 l_object_version_number ben_PSTN_RT_f.object_version_number%TYPE;
600 l_effective_start_date ben_PSTN_RT_f.effective_start_date%TYPE;
601 l_effective_end_date ben_PSTN_RT_f.effective_end_date%TYPE;
602 --
603 begin
604 --
605 hr_utility.set_location('Entering:'|| l_proc, 10);
606 --
607 -- Issue a savepoint if operating in validation only mode
608 --
609 savepoint delete_PSTN_RT;
610 --
611 hr_utility.set_location(l_proc, 20);
612 --
613 -- Process Logic
614 --
615 l_object_version_number := p_object_version_number;
616 --
617 --
618 begin
619 --
620 -- Start of API User Hook for the before hook of delete_PSTN_RT
621 --
622 ben_PSTN_RT_bk3.delete_PSTN_RT_b
623 (
624 p_PSTN_RT_id => p_PSTN_RT_id
625 ,p_object_version_number => p_object_version_number
626 ,p_effective_date => trunc(p_effective_date)
627 ,p_datetrack_mode => p_datetrack_mode
628 );
629 exception
630 when hr_api.cannot_find_prog_unit then
631 hr_api.cannot_find_prog_unit_error
632 (p_module_name => 'DELETE_PSTN_RT'
633 ,p_hook_type => 'BP'
634 );
635 --
636 -- End of API User Hook for the before hook of delete_PSTN_RT
637 --
638 end;
639 --
640 ben_pst_del.del
641 (
642 p_PSTN_RT_id => p_PSTN_RT_id
643 ,p_effective_start_date => l_effective_start_date
644 ,p_effective_end_date => l_effective_end_date
645 ,p_object_version_number => l_object_version_number
646 ,p_effective_date => p_effective_date
647 ,p_datetrack_mode => p_datetrack_mode
648 );
649 --
650 begin
651 --
652 -- Start of API User Hook for the after hook of delete_PSTN_RT
653 --
654 ben_PSTN_RT_bk3.delete_PSTN_RT_a
655 (
656 p_PSTN_RT_id => p_PSTN_RT_id
657 ,p_effective_start_date => l_effective_start_date
658 ,p_effective_end_date => l_effective_end_date
659 ,p_object_version_number => l_object_version_number
660 ,p_effective_date => trunc(p_effective_date)
661 ,p_datetrack_mode => p_datetrack_mode
662 );
663 exception
664 when hr_api.cannot_find_prog_unit then
665 hr_api.cannot_find_prog_unit_error
666 (p_module_name => 'DELETE_PSTN_RT'
667 ,p_hook_type => 'AP'
668 );
669 --
670 -- End of API User Hook for the after hook of delete_PSTN_RT
671 --
672 end;
673 --
674 ben_profile_handler.event_handler
675 (p_event => 'DELETE',
676 p_base_table => 'BEN_VRBL_RT_PRFL_F',
677 p_base_table_column => 'VRBL_RT_PRFL_ID',
678 p_base_table_column_value => ben_pst_shd.g_old_rec.vrbl_rt_prfl_id,
679 p_base_table_reference_column => 'RT_PSTN_FLAG',
680 p_reference_table => 'BEN_PSTN_RT_F',
681 p_reference_table_column => 'VRBL_RT_PRFL_ID');
682 --
683 hr_utility.set_location(l_proc, 60);
684 --
685 -- When in validation only mode raise the Validate_Enabled exception
686 --
687 if p_validate then
688 raise hr_api.validate_enabled;
689 end if;
690 --
691 hr_utility.set_location(' Leaving:'||l_proc, 70);
692 --
693 exception
694 --
695 when hr_api.validate_enabled then
696 --
697 -- As the Validate_Enabled exception has been raised
698 -- we must rollback to the savepoint
699 --
700 ROLLBACK TO delete_PSTN_RT;
701 --
702 -- Only set output warning arguments
703 -- (Any key or derived arguments must be set to null
704 -- when validation only mode is being used.)
705 --
706 p_effective_start_date := null;
707 p_effective_end_date := null;
708 --
709 when others then
710 --
711 -- A validation or unexpected error has occured
712 -- Initialize OUT Variables for NOCOPY
713 p_effective_start_date :=null;
714 p_effective_end_date :=null ;
715 -- Initialize IN/OUT Variables for NOCOPY
716 p_object_version_number :=l_object_version_number;
717 --
718 ROLLBACK TO delete_PSTN_RT;
719 raise;
720 --
721 end delete_PSTN_RT;
722 --
723 -- ----------------------------------------------------------------------------
724 -- |-------------------------------< lck >------------------------------------|
725 -- ----------------------------------------------------------------------------
726 --
727 procedure lck
728 (
729 p_PSTN_RT_id in number
730 ,p_object_version_number in number
731 ,p_effective_date in date
732 ,p_datetrack_mode in varchar2
733 ,p_validation_start_date out nocopy date
734 ,p_validation_end_date out nocopy date
735 ) is
736 --
737 --
738 -- Declare cursors and local variables
739 --
740 l_proc varchar2(72) := g_package||'lck';
741 l_validation_start_date date;
742 l_validation_end_date date;
743 --
744 begin
745 --
746 hr_utility.set_location('Entering:'|| l_proc, 10);
747 --
748 ben_pst_shd.lck
749 (
750 p_PSTN_RT_id => p_PSTN_RT_id
751 ,p_validation_start_date => l_validation_start_date
752 ,p_validation_end_date => l_validation_end_date
753 ,p_object_version_number => p_object_version_number
754 ,p_effective_date => p_effective_date
755 ,p_datetrack_mode => p_datetrack_mode
756 );
757 --
758 hr_utility.set_location(' Leaving:'||l_proc, 70);
759 --
760 end lck;
761 --
762 end ben_PSTN_RT_api;