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