[Home] [Help]
PACKAGE BODY: APPS.BEN_PREM_CSTG_BY_SGMT_API
Source
1 Package Body ben_PREM_CSTG_BY_SGMT_api as
2 /* $Header: becbsapi.pkb 120.0 2005/05/28 00:56:21 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_PREM_CSTG_BY_SGMT_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_PREM_CSTG_BY_SGMT >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_PREM_CSTG_BY_SGMT
13 (p_validate in boolean default false
14 ,p_prem_cstg_by_sgmt_id out nocopy number
15 ,p_effective_start_date out nocopy date
16 ,p_effective_end_date out nocopy date
17 ,p_sgmt_num in number default null
18 ,p_sgmt_cstg_mthd_cd in varchar2 default null
19 ,p_sgmt_cstg_mthd_rl in number default null
20 ,p_business_group_id in number default null
21 ,p_actl_prem_id in number default null
22 ,p_cbs_attribute_category in varchar2 default null
23 ,p_cbs_attribute1 in varchar2 default null
24 ,p_cbs_attribute2 in varchar2 default null
25 ,p_cbs_attribute3 in varchar2 default null
26 ,p_cbs_attribute4 in varchar2 default null
27 ,p_cbs_attribute5 in varchar2 default null
28 ,p_cbs_attribute6 in varchar2 default null
29 ,p_cbs_attribute7 in varchar2 default null
30 ,p_cbs_attribute8 in varchar2 default null
31 ,p_cbs_attribute9 in varchar2 default null
32 ,p_cbs_attribute10 in varchar2 default null
33 ,p_cbs_attribute11 in varchar2 default null
34 ,p_cbs_attribute12 in varchar2 default null
35 ,p_cbs_attribute13 in varchar2 default null
36 ,p_cbs_attribute14 in varchar2 default null
37 ,p_cbs_attribute15 in varchar2 default null
38 ,p_cbs_attribute16 in varchar2 default null
39 ,p_cbs_attribute17 in varchar2 default null
40 ,p_cbs_attribute18 in varchar2 default null
41 ,p_cbs_attribute19 in varchar2 default null
42 ,p_cbs_attribute20 in varchar2 default null
43 ,p_cbs_attribute21 in varchar2 default null
44 ,p_cbs_attribute22 in varchar2 default null
45 ,p_cbs_attribute23 in varchar2 default null
46 ,p_cbs_attribute24 in varchar2 default null
47 ,p_cbs_attribute25 in varchar2 default null
48 ,p_cbs_attribute26 in varchar2 default null
49 ,p_cbs_attribute27 in varchar2 default null
50 ,p_cbs_attribute28 in varchar2 default null
51 ,p_cbs_attribute29 in varchar2 default null
52 ,p_cbs_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_prem_cstg_by_sgmt_id ben_prem_cstg_by_sgmt_f.prem_cstg_by_sgmt_id%TYPE;
60 l_effective_start_date ben_prem_cstg_by_sgmt_f.effective_start_date%TYPE;
61 l_effective_end_date ben_prem_cstg_by_sgmt_f.effective_end_date%TYPE;
62 l_proc varchar2(72) := g_package||'create_PREM_CSTG_BY_SGMT';
63 l_object_version_number ben_prem_cstg_by_sgmt_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_PREM_CSTG_BY_SGMT;
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_PREM_CSTG_BY_SGMT
80 --
81 ben_PREM_CSTG_BY_SGMT_bk1.create_PREM_CSTG_BY_SGMT_b
82 (
83 p_sgmt_num => p_sgmt_num
84 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
85 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
86 ,p_business_group_id => p_business_group_id
87 ,p_actl_prem_id => p_actl_prem_id
88 ,p_cbs_attribute_category => p_cbs_attribute_category
89 ,p_cbs_attribute1 => p_cbs_attribute1
90 ,p_cbs_attribute2 => p_cbs_attribute2
91 ,p_cbs_attribute3 => p_cbs_attribute3
92 ,p_cbs_attribute4 => p_cbs_attribute4
93 ,p_cbs_attribute5 => p_cbs_attribute5
94 ,p_cbs_attribute6 => p_cbs_attribute6
95 ,p_cbs_attribute7 => p_cbs_attribute7
96 ,p_cbs_attribute8 => p_cbs_attribute8
97 ,p_cbs_attribute9 => p_cbs_attribute9
98 ,p_cbs_attribute10 => p_cbs_attribute10
99 ,p_cbs_attribute11 => p_cbs_attribute11
100 ,p_cbs_attribute12 => p_cbs_attribute12
101 ,p_cbs_attribute13 => p_cbs_attribute13
102 ,p_cbs_attribute14 => p_cbs_attribute14
103 ,p_cbs_attribute15 => p_cbs_attribute15
104 ,p_cbs_attribute16 => p_cbs_attribute16
105 ,p_cbs_attribute17 => p_cbs_attribute17
106 ,p_cbs_attribute18 => p_cbs_attribute18
107 ,p_cbs_attribute19 => p_cbs_attribute19
108 ,p_cbs_attribute20 => p_cbs_attribute20
109 ,p_cbs_attribute21 => p_cbs_attribute21
110 ,p_cbs_attribute22 => p_cbs_attribute22
111 ,p_cbs_attribute23 => p_cbs_attribute23
112 ,p_cbs_attribute24 => p_cbs_attribute24
113 ,p_cbs_attribute25 => p_cbs_attribute25
114 ,p_cbs_attribute26 => p_cbs_attribute26
115 ,p_cbs_attribute27 => p_cbs_attribute27
116 ,p_cbs_attribute28 => p_cbs_attribute28
117 ,p_cbs_attribute29 => p_cbs_attribute29
118 ,p_cbs_attribute30 => p_cbs_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_PREM_CSTG_BY_SGMT'
126 ,p_hook_type => 'BP'
127 );
128 --
129 -- End of API User Hook for the before hook of create_PREM_CSTG_BY_SGMT
130 --
131 end;
132 --
133 ben_cbs_ins.ins
134 (
135 p_prem_cstg_by_sgmt_id => l_prem_cstg_by_sgmt_id
136 ,p_effective_start_date => l_effective_start_date
137 ,p_effective_end_date => l_effective_end_date
138 ,p_sgmt_num => p_sgmt_num
139 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
140 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
141 ,p_business_group_id => p_business_group_id
142 ,p_actl_prem_id => p_actl_prem_id
143 ,p_cbs_attribute_category => p_cbs_attribute_category
144 ,p_cbs_attribute1 => p_cbs_attribute1
145 ,p_cbs_attribute2 => p_cbs_attribute2
146 ,p_cbs_attribute3 => p_cbs_attribute3
147 ,p_cbs_attribute4 => p_cbs_attribute4
148 ,p_cbs_attribute5 => p_cbs_attribute5
149 ,p_cbs_attribute6 => p_cbs_attribute6
150 ,p_cbs_attribute7 => p_cbs_attribute7
151 ,p_cbs_attribute8 => p_cbs_attribute8
152 ,p_cbs_attribute9 => p_cbs_attribute9
153 ,p_cbs_attribute10 => p_cbs_attribute10
154 ,p_cbs_attribute11 => p_cbs_attribute11
155 ,p_cbs_attribute12 => p_cbs_attribute12
156 ,p_cbs_attribute13 => p_cbs_attribute13
157 ,p_cbs_attribute14 => p_cbs_attribute14
158 ,p_cbs_attribute15 => p_cbs_attribute15
159 ,p_cbs_attribute16 => p_cbs_attribute16
160 ,p_cbs_attribute17 => p_cbs_attribute17
161 ,p_cbs_attribute18 => p_cbs_attribute18
162 ,p_cbs_attribute19 => p_cbs_attribute19
163 ,p_cbs_attribute20 => p_cbs_attribute20
164 ,p_cbs_attribute21 => p_cbs_attribute21
165 ,p_cbs_attribute22 => p_cbs_attribute22
166 ,p_cbs_attribute23 => p_cbs_attribute23
167 ,p_cbs_attribute24 => p_cbs_attribute24
168 ,p_cbs_attribute25 => p_cbs_attribute25
169 ,p_cbs_attribute26 => p_cbs_attribute26
170 ,p_cbs_attribute27 => p_cbs_attribute27
171 ,p_cbs_attribute28 => p_cbs_attribute28
172 ,p_cbs_attribute29 => p_cbs_attribute29
173 ,p_cbs_attribute30 => p_cbs_attribute30
174 ,p_object_version_number => l_object_version_number
175 ,p_effective_date => trunc(p_effective_date)
176 );
177 --
178 begin
179 --
180 -- Start of API User Hook for the after hook of create_PREM_CSTG_BY_SGMT
181 --
182 ben_PREM_CSTG_BY_SGMT_bk1.create_PREM_CSTG_BY_SGMT_a
183 (
184 p_prem_cstg_by_sgmt_id => l_prem_cstg_by_sgmt_id
185 ,p_effective_start_date => l_effective_start_date
186 ,p_effective_end_date => l_effective_end_date
187 ,p_sgmt_num => p_sgmt_num
188 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
189 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
190 ,p_business_group_id => p_business_group_id
191 ,p_actl_prem_id => p_actl_prem_id
192 ,p_cbs_attribute_category => p_cbs_attribute_category
193 ,p_cbs_attribute1 => p_cbs_attribute1
194 ,p_cbs_attribute2 => p_cbs_attribute2
195 ,p_cbs_attribute3 => p_cbs_attribute3
196 ,p_cbs_attribute4 => p_cbs_attribute4
197 ,p_cbs_attribute5 => p_cbs_attribute5
198 ,p_cbs_attribute6 => p_cbs_attribute6
199 ,p_cbs_attribute7 => p_cbs_attribute7
200 ,p_cbs_attribute8 => p_cbs_attribute8
201 ,p_cbs_attribute9 => p_cbs_attribute9
202 ,p_cbs_attribute10 => p_cbs_attribute10
203 ,p_cbs_attribute11 => p_cbs_attribute11
204 ,p_cbs_attribute12 => p_cbs_attribute12
205 ,p_cbs_attribute13 => p_cbs_attribute13
206 ,p_cbs_attribute14 => p_cbs_attribute14
207 ,p_cbs_attribute15 => p_cbs_attribute15
208 ,p_cbs_attribute16 => p_cbs_attribute16
209 ,p_cbs_attribute17 => p_cbs_attribute17
210 ,p_cbs_attribute18 => p_cbs_attribute18
211 ,p_cbs_attribute19 => p_cbs_attribute19
212 ,p_cbs_attribute20 => p_cbs_attribute20
213 ,p_cbs_attribute21 => p_cbs_attribute21
214 ,p_cbs_attribute22 => p_cbs_attribute22
215 ,p_cbs_attribute23 => p_cbs_attribute23
216 ,p_cbs_attribute24 => p_cbs_attribute24
217 ,p_cbs_attribute25 => p_cbs_attribute25
218 ,p_cbs_attribute26 => p_cbs_attribute26
219 ,p_cbs_attribute27 => p_cbs_attribute27
220 ,p_cbs_attribute28 => p_cbs_attribute28
221 ,p_cbs_attribute29 => p_cbs_attribute29
222 ,p_cbs_attribute30 => p_cbs_attribute30
223 ,p_object_version_number => l_object_version_number
224 ,p_effective_date => trunc(p_effective_date)
225 );
226 exception
227 when hr_api.cannot_find_prog_unit then
228 hr_api.cannot_find_prog_unit_error
229 (p_module_name => 'CREATE_PREM_CSTG_BY_SGMT'
230 ,p_hook_type => 'AP'
231 );
232 --
233 -- End of API User Hook for the after hook of create_PREM_CSTG_BY_SGMT
234 --
235 end;
236 --
237 hr_utility.set_location(l_proc, 60);
238 --
239 -- When in validation only mode raise the Validate_Enabled exception
240 --
241 if p_validate then
242 raise hr_api.validate_enabled;
243 end if;
244 --
245 -- Set all output arguments
246 --
247 p_prem_cstg_by_sgmt_id := l_prem_cstg_by_sgmt_id;
248 p_effective_start_date := l_effective_start_date;
249 p_effective_end_date := l_effective_end_date;
250 p_object_version_number := l_object_version_number;
251 --
252 hr_utility.set_location(' Leaving:'||l_proc, 70);
253 --
254 exception
255 --
256 when hr_api.validate_enabled then
257 --
258 -- As the Validate_Enabled exception has been raised
259 -- we must rollback to the savepoint
260 --
261 ROLLBACK TO create_PREM_CSTG_BY_SGMT;
262 --
263 -- Only set output warning arguments
264 -- (Any key or derived arguments must be set to null
265 -- when validation only mode is being used.)
266 --
267 p_prem_cstg_by_sgmt_id := null;
268 p_effective_start_date := null;
269 p_effective_end_date := null;
270 p_object_version_number := null;
271 hr_utility.set_location(' Leaving:'||l_proc, 80);
272 --
273 when others then
274 --
275 -- A validation or unexpected error has occured
276 --
277 ROLLBACK TO create_PREM_CSTG_BY_SGMT;
278 -- NOCOPY Changas
279 p_prem_cstg_by_sgmt_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, 90);
284 raise;
285 --
286 end create_PREM_CSTG_BY_SGMT;
287 -- ----------------------------------------------------------------------------
288 -- |------------------------< update_PREM_CSTG_BY_SGMT >--- ------------------|
289 -- ----------------------------------------------------------------------------
290 --
291 procedure update_PREM_CSTG_BY_SGMT
292 (p_validate in boolean default false
293 ,p_prem_cstg_by_sgmt_id in number
294 ,p_effective_start_date out nocopy date
295 ,p_effective_end_date out nocopy date
296 ,p_sgmt_num in number default hr_api.g_number
297 ,p_sgmt_cstg_mthd_cd in varchar2 default hr_api.g_varchar2
298 ,p_sgmt_cstg_mthd_rl in number default hr_api.g_number
299 ,p_business_group_id in number default hr_api.g_number
300 ,p_actl_prem_id in number default hr_api.g_number
301 ,p_cbs_attribute_category in varchar2 default hr_api.g_varchar2
302 ,p_cbs_attribute1 in varchar2 default hr_api.g_varchar2
303 ,p_cbs_attribute2 in varchar2 default hr_api.g_varchar2
304 ,p_cbs_attribute3 in varchar2 default hr_api.g_varchar2
305 ,p_cbs_attribute4 in varchar2 default hr_api.g_varchar2
306 ,p_cbs_attribute5 in varchar2 default hr_api.g_varchar2
307 ,p_cbs_attribute6 in varchar2 default hr_api.g_varchar2
308 ,p_cbs_attribute7 in varchar2 default hr_api.g_varchar2
309 ,p_cbs_attribute8 in varchar2 default hr_api.g_varchar2
310 ,p_cbs_attribute9 in varchar2 default hr_api.g_varchar2
311 ,p_cbs_attribute10 in varchar2 default hr_api.g_varchar2
312 ,p_cbs_attribute11 in varchar2 default hr_api.g_varchar2
313 ,p_cbs_attribute12 in varchar2 default hr_api.g_varchar2
314 ,p_cbs_attribute13 in varchar2 default hr_api.g_varchar2
315 ,p_cbs_attribute14 in varchar2 default hr_api.g_varchar2
316 ,p_cbs_attribute15 in varchar2 default hr_api.g_varchar2
317 ,p_cbs_attribute16 in varchar2 default hr_api.g_varchar2
318 ,p_cbs_attribute17 in varchar2 default hr_api.g_varchar2
319 ,p_cbs_attribute18 in varchar2 default hr_api.g_varchar2
320 ,p_cbs_attribute19 in varchar2 default hr_api.g_varchar2
321 ,p_cbs_attribute20 in varchar2 default hr_api.g_varchar2
322 ,p_cbs_attribute21 in varchar2 default hr_api.g_varchar2
323 ,p_cbs_attribute22 in varchar2 default hr_api.g_varchar2
324 ,p_cbs_attribute23 in varchar2 default hr_api.g_varchar2
325 ,p_cbs_attribute24 in varchar2 default hr_api.g_varchar2
326 ,p_cbs_attribute25 in varchar2 default hr_api.g_varchar2
327 ,p_cbs_attribute26 in varchar2 default hr_api.g_varchar2
328 ,p_cbs_attribute27 in varchar2 default hr_api.g_varchar2
329 ,p_cbs_attribute28 in varchar2 default hr_api.g_varchar2
330 ,p_cbs_attribute29 in varchar2 default hr_api.g_varchar2
331 ,p_cbs_attribute30 in varchar2 default hr_api.g_varchar2
332 ,p_object_version_number in out nocopy number
333 ,p_effective_date in date
334 ,p_datetrack_mode in varchar2
335 ) is
336 --
337 -- Declare cursors and local variables
338 --
339 l_proc varchar2(72) := g_package||'update_PREM_CSTG_BY_SGMT';
340 l_object_version_number ben_prem_cstg_by_sgmt_f.object_version_number%TYPE;
341 l_effective_start_date ben_prem_cstg_by_sgmt_f.effective_start_date%TYPE;
342 l_effective_end_date ben_prem_cstg_by_sgmt_f.effective_end_date%TYPE;
343 --
344 begin
345 --
346 hr_utility.set_location('Entering:'|| l_proc, 10);
347 --
348 -- Issue a savepoint if operating in validation only mode
349 --
350 savepoint update_PREM_CSTG_BY_SGMT;
351 --
352 hr_utility.set_location(l_proc, 20);
353 --
354 -- Process Logic
355 --
356 l_object_version_number := p_object_version_number;
357 --
358 begin
359 --
360 -- Start of API User Hook for the before hook of update_PREM_CSTG_BY_SGMT
361 --
362 ben_PREM_CSTG_BY_SGMT_bk2.update_PREM_CSTG_BY_SGMT_b
363 (
364 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
365 ,p_sgmt_num => p_sgmt_num
366 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
367 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
368 ,p_business_group_id => p_business_group_id
369 ,p_actl_prem_id => p_actl_prem_id
370 ,p_cbs_attribute_category => p_cbs_attribute_category
371 ,p_cbs_attribute1 => p_cbs_attribute1
372 ,p_cbs_attribute2 => p_cbs_attribute2
373 ,p_cbs_attribute3 => p_cbs_attribute3
374 ,p_cbs_attribute4 => p_cbs_attribute4
375 ,p_cbs_attribute5 => p_cbs_attribute5
376 ,p_cbs_attribute6 => p_cbs_attribute6
377 ,p_cbs_attribute7 => p_cbs_attribute7
378 ,p_cbs_attribute8 => p_cbs_attribute8
379 ,p_cbs_attribute9 => p_cbs_attribute9
380 ,p_cbs_attribute10 => p_cbs_attribute10
381 ,p_cbs_attribute11 => p_cbs_attribute11
382 ,p_cbs_attribute12 => p_cbs_attribute12
383 ,p_cbs_attribute13 => p_cbs_attribute13
384 ,p_cbs_attribute14 => p_cbs_attribute14
385 ,p_cbs_attribute15 => p_cbs_attribute15
386 ,p_cbs_attribute16 => p_cbs_attribute16
387 ,p_cbs_attribute17 => p_cbs_attribute17
388 ,p_cbs_attribute18 => p_cbs_attribute18
389 ,p_cbs_attribute19 => p_cbs_attribute19
390 ,p_cbs_attribute20 => p_cbs_attribute20
391 ,p_cbs_attribute21 => p_cbs_attribute21
392 ,p_cbs_attribute22 => p_cbs_attribute22
393 ,p_cbs_attribute23 => p_cbs_attribute23
394 ,p_cbs_attribute24 => p_cbs_attribute24
395 ,p_cbs_attribute25 => p_cbs_attribute25
396 ,p_cbs_attribute26 => p_cbs_attribute26
397 ,p_cbs_attribute27 => p_cbs_attribute27
398 ,p_cbs_attribute28 => p_cbs_attribute28
399 ,p_cbs_attribute29 => p_cbs_attribute29
400 ,p_cbs_attribute30 => p_cbs_attribute30
401 ,p_object_version_number => p_object_version_number
402 ,p_effective_date => trunc(p_effective_date)
403 ,p_datetrack_mode => p_datetrack_mode
404 );
405 exception
406 when hr_api.cannot_find_prog_unit then
407 hr_api.cannot_find_prog_unit_error
408 (p_module_name => 'UPDATE_PREM_CSTG_BY_SGMT'
409 ,p_hook_type => 'BP'
410 );
411 --
412 -- End of API User Hook for the before hook of update_PREM_CSTG_BY_SGMT
413 --
414 end;
415 --
416 ben_cbs_upd.upd
417 (
418 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
419 ,p_effective_start_date => l_effective_start_date
420 ,p_effective_end_date => l_effective_end_date
421 ,p_sgmt_num => p_sgmt_num
422 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
423 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
424 ,p_business_group_id => p_business_group_id
425 ,p_actl_prem_id => p_actl_prem_id
426 ,p_cbs_attribute_category => p_cbs_attribute_category
427 ,p_cbs_attribute1 => p_cbs_attribute1
428 ,p_cbs_attribute2 => p_cbs_attribute2
429 ,p_cbs_attribute3 => p_cbs_attribute3
430 ,p_cbs_attribute4 => p_cbs_attribute4
431 ,p_cbs_attribute5 => p_cbs_attribute5
432 ,p_cbs_attribute6 => p_cbs_attribute6
433 ,p_cbs_attribute7 => p_cbs_attribute7
434 ,p_cbs_attribute8 => p_cbs_attribute8
435 ,p_cbs_attribute9 => p_cbs_attribute9
436 ,p_cbs_attribute10 => p_cbs_attribute10
437 ,p_cbs_attribute11 => p_cbs_attribute11
438 ,p_cbs_attribute12 => p_cbs_attribute12
439 ,p_cbs_attribute13 => p_cbs_attribute13
440 ,p_cbs_attribute14 => p_cbs_attribute14
441 ,p_cbs_attribute15 => p_cbs_attribute15
442 ,p_cbs_attribute16 => p_cbs_attribute16
443 ,p_cbs_attribute17 => p_cbs_attribute17
444 ,p_cbs_attribute18 => p_cbs_attribute18
445 ,p_cbs_attribute19 => p_cbs_attribute19
446 ,p_cbs_attribute20 => p_cbs_attribute20
447 ,p_cbs_attribute21 => p_cbs_attribute21
448 ,p_cbs_attribute22 => p_cbs_attribute22
449 ,p_cbs_attribute23 => p_cbs_attribute23
450 ,p_cbs_attribute24 => p_cbs_attribute24
451 ,p_cbs_attribute25 => p_cbs_attribute25
452 ,p_cbs_attribute26 => p_cbs_attribute26
453 ,p_cbs_attribute27 => p_cbs_attribute27
454 ,p_cbs_attribute28 => p_cbs_attribute28
455 ,p_cbs_attribute29 => p_cbs_attribute29
456 ,p_cbs_attribute30 => p_cbs_attribute30
457 ,p_object_version_number => l_object_version_number
458 ,p_effective_date => trunc(p_effective_date)
459 ,p_datetrack_mode => p_datetrack_mode
460 );
461 --
462 begin
463 --
464 -- Start of API User Hook for the after hook of update_PREM_CSTG_BY_SGMT
465 --
466 ben_PREM_CSTG_BY_SGMT_bk2.update_PREM_CSTG_BY_SGMT_a
467 (
468 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
469 ,p_effective_start_date => l_effective_start_date
470 ,p_effective_end_date => l_effective_end_date
471 ,p_sgmt_num => p_sgmt_num
472 ,p_sgmt_cstg_mthd_cd => p_sgmt_cstg_mthd_cd
473 ,p_sgmt_cstg_mthd_rl => p_sgmt_cstg_mthd_rl
474 ,p_business_group_id => p_business_group_id
475 ,p_actl_prem_id => p_actl_prem_id
476 ,p_cbs_attribute_category => p_cbs_attribute_category
477 ,p_cbs_attribute1 => p_cbs_attribute1
478 ,p_cbs_attribute2 => p_cbs_attribute2
479 ,p_cbs_attribute3 => p_cbs_attribute3
480 ,p_cbs_attribute4 => p_cbs_attribute4
481 ,p_cbs_attribute5 => p_cbs_attribute5
482 ,p_cbs_attribute6 => p_cbs_attribute6
483 ,p_cbs_attribute7 => p_cbs_attribute7
484 ,p_cbs_attribute8 => p_cbs_attribute8
485 ,p_cbs_attribute9 => p_cbs_attribute9
486 ,p_cbs_attribute10 => p_cbs_attribute10
487 ,p_cbs_attribute11 => p_cbs_attribute11
488 ,p_cbs_attribute12 => p_cbs_attribute12
489 ,p_cbs_attribute13 => p_cbs_attribute13
490 ,p_cbs_attribute14 => p_cbs_attribute14
491 ,p_cbs_attribute15 => p_cbs_attribute15
492 ,p_cbs_attribute16 => p_cbs_attribute16
493 ,p_cbs_attribute17 => p_cbs_attribute17
494 ,p_cbs_attribute18 => p_cbs_attribute18
495 ,p_cbs_attribute19 => p_cbs_attribute19
496 ,p_cbs_attribute20 => p_cbs_attribute20
497 ,p_cbs_attribute21 => p_cbs_attribute21
498 ,p_cbs_attribute22 => p_cbs_attribute22
499 ,p_cbs_attribute23 => p_cbs_attribute23
500 ,p_cbs_attribute24 => p_cbs_attribute24
501 ,p_cbs_attribute25 => p_cbs_attribute25
502 ,p_cbs_attribute26 => p_cbs_attribute26
503 ,p_cbs_attribute27 => p_cbs_attribute27
504 ,p_cbs_attribute28 => p_cbs_attribute28
505 ,p_cbs_attribute29 => p_cbs_attribute29
506 ,p_cbs_attribute30 => p_cbs_attribute30
507 ,p_object_version_number => l_object_version_number
508 ,p_effective_date => trunc(p_effective_date)
509 ,p_datetrack_mode => p_datetrack_mode
510 );
511 exception
512 when hr_api.cannot_find_prog_unit then
513 hr_api.cannot_find_prog_unit_error
514 (p_module_name => 'UPDATE_PREM_CSTG_BY_SGMT'
515 ,p_hook_type => 'AP'
516 );
517 --
518 -- End of API User Hook for the after hook of update_PREM_CSTG_BY_SGMT
519 --
520 end;
521 --
522 hr_utility.set_location(l_proc, 60);
523 --
524 -- When in validation only mode raise the Validate_Enabled exception
525 --
526 if p_validate then
527 raise hr_api.validate_enabled;
528 end if;
529 --
530 -- Set all output arguments
531 --
532 p_object_version_number := l_object_version_number;
533 p_effective_start_date := l_effective_start_date;
534 p_effective_end_date := l_effective_end_date;
535 --
536 hr_utility.set_location(' Leaving:'||l_proc, 70);
537 --
538 exception
539 --
540 when hr_api.validate_enabled then
541 --
542 -- As the Validate_Enabled exception has been raised
543 -- we must rollback to the savepoint
544 --
545 ROLLBACK TO update_PREM_CSTG_BY_SGMT;
546 --
547 -- Only set output warning arguments
548 -- (Any key or derived arguments must be set to null
549 -- when validation only mode is being used.)
550 --
551 hr_utility.set_location(' Leaving:'||l_proc, 80);
552 --
553 when others then
554 --
555 -- A validation or unexpected error has occured
556 --
557 ROLLBACK TO update_PREM_CSTG_BY_SGMT;
558 p_object_version_number := l_object_version_number ;
559 p_effective_start_date := null ;
560 p_effective_end_date := null;
561 hr_utility.set_location(' Leaving:'||l_proc, 90);
562 raise;
563 --
564 end update_PREM_CSTG_BY_SGMT;
565 -- ----------------------------------------------------------------------------
566 -- |------------------------< delete_PREM_CSTG_BY_SGMT >----------------------|
567 -- ----------------------------------------------------------------------------
568 --
569 procedure delete_PREM_CSTG_BY_SGMT
570 (p_validate in boolean default false
571 ,p_prem_cstg_by_sgmt_id in number
572 ,p_effective_start_date out nocopy date
573 ,p_effective_end_date out nocopy date
574 ,p_object_version_number in out nocopy number
575 ,p_effective_date in date
576 ,p_datetrack_mode in varchar2
577 ) is
578 --
579 -- Declare cursors and local variables
580 --
581 l_proc varchar2(72) := g_package||'update_PREM_CSTG_BY_SGMT';
582 l_object_version_number ben_prem_cstg_by_sgmt_f.object_version_number%TYPE;
583 l_effective_start_date ben_prem_cstg_by_sgmt_f.effective_start_date%TYPE;
584 l_effective_end_date ben_prem_cstg_by_sgmt_f.effective_end_date%TYPE;
585 --
586 begin
587 --
588 hr_utility.set_location('Entering:'|| l_proc, 10);
589 --
590 -- Issue a savepoint if operating in validation only mode
591 --
592 savepoint delete_PREM_CSTG_BY_SGMT;
593 --
594 hr_utility.set_location(l_proc, 20);
595 --
596 -- Process Logic
597 --
598 l_object_version_number := p_object_version_number;
599 --
600 --
601 begin
602 --
603 -- Start of API User Hook for the before hook of delete_PREM_CSTG_BY_SGMT
604 --
605 ben_PREM_CSTG_BY_SGMT_bk3.delete_PREM_CSTG_BY_SGMT_b
606 (
607 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
608 ,p_object_version_number => p_object_version_number
609 ,p_effective_date => trunc(p_effective_date)
610 ,p_datetrack_mode => p_datetrack_mode
611 );
612 exception
613 when hr_api.cannot_find_prog_unit then
614 hr_api.cannot_find_prog_unit_error
615 (p_module_name => 'DELETE_PREM_CSTG_BY_SGMT'
616 ,p_hook_type => 'BP'
617 );
618 --
619 -- End of API User Hook for the before hook of delete_PREM_CSTG_BY_SGMT
620 --
621 end;
622 --
623 ben_cbs_del.del
624 (
625 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
626 ,p_effective_start_date => l_effective_start_date
627 ,p_effective_end_date => l_effective_end_date
628 ,p_object_version_number => l_object_version_number
629 ,p_effective_date => p_effective_date
630 ,p_datetrack_mode => p_datetrack_mode
631 );
632 --
633 begin
634 --
635 -- Start of API User Hook for the after hook of delete_PREM_CSTG_BY_SGMT
636 --
637 ben_PREM_CSTG_BY_SGMT_bk3.delete_PREM_CSTG_BY_SGMT_a
638 (
639 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
640 ,p_effective_start_date => l_effective_start_date
641 ,p_effective_end_date => l_effective_end_date
642 ,p_object_version_number => l_object_version_number
643 ,p_effective_date => trunc(p_effective_date)
644 ,p_datetrack_mode => p_datetrack_mode
645 );
646 exception
647 when hr_api.cannot_find_prog_unit then
648 hr_api.cannot_find_prog_unit_error
649 (p_module_name => 'DELETE_PREM_CSTG_BY_SGMT'
650 ,p_hook_type => 'AP'
651 );
652 --
653 -- End of API User Hook for the after hook of delete_PREM_CSTG_BY_SGMT
654 --
655 end;
656 --
657 hr_utility.set_location(l_proc, 60);
658 --
659 -- When in validation only mode raise the Validate_Enabled exception
660 --
661 if p_validate then
662 raise hr_api.validate_enabled;
663 end if;
664 --
665 hr_utility.set_location(' Leaving:'||l_proc, 70);
666 --
667 exception
668 --
669 when hr_api.validate_enabled then
670 --
671 -- As the Validate_Enabled exception has been raised
672 -- we must rollback to the savepoint
673 --
674 ROLLBACK TO delete_PREM_CSTG_BY_SGMT;
675 --
676 -- Only set output warning arguments
677 -- (Any key or derived arguments must be set to null
678 -- when validation only mode is being used.)
679 --
680 p_effective_start_date := null;
681 p_effective_end_date := null;
682 --
683 when others then
684 --
685 -- A validation or unexpected error has occured
686 --
687 ROLLBACK TO delete_PREM_CSTG_BY_SGMT;
688 -- NOCOPY Changes
689 p_effective_start_date := null;
690 p_effective_end_date := null;
691 p_object_version_number := l_object_version_number ;
692 hr_utility.set_location(' Leaving:'||l_proc, 90);
693 raise;
694 --
695 end delete_PREM_CSTG_BY_SGMT;
696 --
697 -- ----------------------------------------------------------------------------
698 -- |-------------------------------< lck >------------------------------------|
699 -- ----------------------------------------------------------------------------
700 --
701 procedure lck
702 (
703 p_prem_cstg_by_sgmt_id in number
704 ,p_object_version_number in number
705 ,p_effective_date in date
706 ,p_datetrack_mode in varchar2
707 ,p_validation_start_date out nocopy date
708 ,p_validation_end_date out nocopy date
709 ) is
710 --
711 --
712 -- Declare cursors and local variables
713 --
714 l_proc varchar2(72) := g_package||'lck';
715 l_validation_start_date date;
716 l_validation_end_date date;
717 --
718 begin
719 --
720 hr_utility.set_location('Entering:'|| l_proc, 10);
721 --
722 ben_cbs_shd.lck
723 (
724 p_prem_cstg_by_sgmt_id => p_prem_cstg_by_sgmt_id
725 ,p_validation_start_date => l_validation_start_date
726 ,p_validation_end_date => l_validation_end_date
727 ,p_object_version_number => p_object_version_number
728 ,p_effective_date => p_effective_date
729 ,p_datetrack_mode => p_datetrack_mode
730 );
731 --
732 hr_utility.set_location(' Leaving:'||l_proc, 70);
733 --
734 end lck;
735 --
736 end ben_PREM_CSTG_BY_SGMT_api;