DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_DSGNTR_ENRLD_CVG_API

Source


1 Package Body ben_DSGNTR_ENRLD_CVG_api as
2 /* $Header: bedecapi.pkb 115.4 2002/12/13 08:28:25 bmanyam ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_DSGNTR_ENRLD_CVG_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_DSGNTR_ENRLD_CVG >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_DSGNTR_ENRLD_CVG
13   (p_validate                       in  boolean   default false
14   ,p_dsgntr_enrld_cvg_id            out nocopy number
15   ,p_effective_start_date           out nocopy date
16   ,p_effective_end_date             out nocopy date
17   ,p_dsgntr_crntly_enrld_flag       in  varchar2  default 'N'
18   ,p_dpnt_cvg_eligy_prfl_id         in  number    default null
19   ,p_business_group_id              in  number    default null
20   ,p_dec_attribute_category         in  varchar2  default null
21   ,p_dec_attribute1                 in  varchar2  default null
22   ,p_dec_attribute2                 in  varchar2  default null
23   ,p_dec_attribute3                 in  varchar2  default null
24   ,p_dec_attribute4                 in  varchar2  default null
25   ,p_dec_attribute5                 in  varchar2  default null
26   ,p_dec_attribute6                 in  varchar2  default null
27   ,p_dec_attribute7                 in  varchar2  default null
28   ,p_dec_attribute8                 in  varchar2  default null
29   ,p_dec_attribute9                 in  varchar2  default null
30   ,p_dec_attribute10                in  varchar2  default null
31   ,p_dec_attribute11                in  varchar2  default null
32   ,p_dec_attribute12                in  varchar2  default null
33   ,p_dec_attribute13                in  varchar2  default null
34   ,p_dec_attribute14                in  varchar2  default null
35   ,p_dec_attribute15                in  varchar2  default null
36   ,p_dec_attribute16                in  varchar2  default null
37   ,p_dec_attribute17                in  varchar2  default null
38   ,p_dec_attribute18                in  varchar2  default null
39   ,p_dec_attribute19                in  varchar2  default null
40   ,p_dec_attribute20                in  varchar2  default null
41   ,p_dec_attribute21                in  varchar2  default null
42   ,p_dec_attribute22                in  varchar2  default null
43   ,p_dec_attribute23                in  varchar2  default null
44   ,p_dec_attribute24                in  varchar2  default null
45   ,p_dec_attribute25                in  varchar2  default null
46   ,p_dec_attribute26                in  varchar2  default null
47   ,p_dec_attribute27                in  varchar2  default null
48   ,p_dec_attribute28                in  varchar2  default null
49   ,p_dec_attribute29                in  varchar2  default null
50   ,p_dec_attribute30                in  varchar2  default null
51   ,p_object_version_number          out nocopy number
52   ,p_effective_date                 in  date
53   ) is
54   --
55   -- Declare cursors and local variables
56   --
57   l_dsgntr_enrld_cvg_id ben_dsgntr_enrld_cvg_f.dsgntr_enrld_cvg_id%TYPE;
58   l_effective_start_date ben_dsgntr_enrld_cvg_f.effective_start_date%TYPE;
59   l_effective_end_date ben_dsgntr_enrld_cvg_f.effective_end_date%TYPE;
60   l_proc varchar2(72) := g_package||'create_DSGNTR_ENRLD_CVG';
61   l_object_version_number ben_dsgntr_enrld_cvg_f.object_version_number%TYPE;
62   --
63 begin
64   --
65   hr_utility.set_location('Entering:'|| l_proc, 10);
66   --
67   -- Issue a savepoint if operating in validation only mode
68   --
69   savepoint create_DSGNTR_ENRLD_CVG;
70   --
71   hr_utility.set_location(l_proc, 20);
72   --
73   -- Process Logic
74   --
75   begin
76     --
77     -- Start of API User Hook for the before hook of create_DSGNTR_ENRLD_CVG
78     --
79     ben_DSGNTR_ENRLD_CVG_bk1.create_DSGNTR_ENRLD_CVG_b
80       (
81        p_dsgntr_crntly_enrld_flag       =>  p_dsgntr_crntly_enrld_flag
82       ,p_dpnt_cvg_eligy_prfl_id         =>  p_dpnt_cvg_eligy_prfl_id
83       ,p_business_group_id              =>  p_business_group_id
84       ,p_dec_attribute_category         =>  p_dec_attribute_category
85       ,p_dec_attribute1                 =>  p_dec_attribute1
86       ,p_dec_attribute2                 =>  p_dec_attribute2
87       ,p_dec_attribute3                 =>  p_dec_attribute3
88       ,p_dec_attribute4                 =>  p_dec_attribute4
89       ,p_dec_attribute5                 =>  p_dec_attribute5
90       ,p_dec_attribute6                 =>  p_dec_attribute6
91       ,p_dec_attribute7                 =>  p_dec_attribute7
92       ,p_dec_attribute8                 =>  p_dec_attribute8
93       ,p_dec_attribute9                 =>  p_dec_attribute9
94       ,p_dec_attribute10                =>  p_dec_attribute10
95       ,p_dec_attribute11                =>  p_dec_attribute11
96       ,p_dec_attribute12                =>  p_dec_attribute12
97       ,p_dec_attribute13                =>  p_dec_attribute13
98       ,p_dec_attribute14                =>  p_dec_attribute14
99       ,p_dec_attribute15                =>  p_dec_attribute15
100       ,p_dec_attribute16                =>  p_dec_attribute16
101       ,p_dec_attribute17                =>  p_dec_attribute17
102       ,p_dec_attribute18                =>  p_dec_attribute18
103       ,p_dec_attribute19                =>  p_dec_attribute19
104       ,p_dec_attribute20                =>  p_dec_attribute20
105       ,p_dec_attribute21                =>  p_dec_attribute21
106       ,p_dec_attribute22                =>  p_dec_attribute22
107       ,p_dec_attribute23                =>  p_dec_attribute23
108       ,p_dec_attribute24                =>  p_dec_attribute24
109       ,p_dec_attribute25                =>  p_dec_attribute25
110       ,p_dec_attribute26                =>  p_dec_attribute26
111       ,p_dec_attribute27                =>  p_dec_attribute27
112       ,p_dec_attribute28                =>  p_dec_attribute28
113       ,p_dec_attribute29                =>  p_dec_attribute29
114       ,p_dec_attribute30                =>  p_dec_attribute30
115       ,p_effective_date                 => trunc(p_effective_date)
116       );
117   exception
118     when hr_api.cannot_find_prog_unit then
119       hr_api.cannot_find_prog_unit_error
120         (
121          p_module_name => 'CREATE_DSGNTR_ENRLD_CVG'
122         ,p_hook_type   => 'BP'
123         );
124     --
125     -- End of API User Hook for the before hook of create_DSGNTR_ENRLD_CVG
126     --
127   end;
128   --
129   ben_dec_ins.ins
130     (
131      p_dsgntr_enrld_cvg_id           => l_dsgntr_enrld_cvg_id
132     ,p_effective_start_date          => l_effective_start_date
133     ,p_effective_end_date            => l_effective_end_date
134     ,p_dsgntr_crntly_enrld_flag      => p_dsgntr_crntly_enrld_flag
135     ,p_dpnt_cvg_eligy_prfl_id        => p_dpnt_cvg_eligy_prfl_id
136     ,p_business_group_id             => p_business_group_id
137     ,p_dec_attribute_category        => p_dec_attribute_category
138     ,p_dec_attribute1                => p_dec_attribute1
139     ,p_dec_attribute2                => p_dec_attribute2
140     ,p_dec_attribute3                => p_dec_attribute3
141     ,p_dec_attribute4                => p_dec_attribute4
142     ,p_dec_attribute5                => p_dec_attribute5
143     ,p_dec_attribute6                => p_dec_attribute6
144     ,p_dec_attribute7                => p_dec_attribute7
145     ,p_dec_attribute8                => p_dec_attribute8
146     ,p_dec_attribute9                => p_dec_attribute9
147     ,p_dec_attribute10               => p_dec_attribute10
148     ,p_dec_attribute11               => p_dec_attribute11
149     ,p_dec_attribute12               => p_dec_attribute12
150     ,p_dec_attribute13               => p_dec_attribute13
151     ,p_dec_attribute14               => p_dec_attribute14
152     ,p_dec_attribute15               => p_dec_attribute15
153     ,p_dec_attribute16               => p_dec_attribute16
154     ,p_dec_attribute17               => p_dec_attribute17
155     ,p_dec_attribute18               => p_dec_attribute18
156     ,p_dec_attribute19               => p_dec_attribute19
157     ,p_dec_attribute20               => p_dec_attribute20
158     ,p_dec_attribute21               => p_dec_attribute21
159     ,p_dec_attribute22               => p_dec_attribute22
160     ,p_dec_attribute23               => p_dec_attribute23
161     ,p_dec_attribute24               => p_dec_attribute24
162     ,p_dec_attribute25               => p_dec_attribute25
163     ,p_dec_attribute26               => p_dec_attribute26
164     ,p_dec_attribute27               => p_dec_attribute27
165     ,p_dec_attribute28               => p_dec_attribute28
166     ,p_dec_attribute29               => p_dec_attribute29
167     ,p_dec_attribute30               => p_dec_attribute30
168     ,p_object_version_number         => l_object_version_number
169     ,p_effective_date                => trunc(p_effective_date)
170     );
171   --
172   begin
173     --
174     -- Start of API User Hook for the after hook of create_DSGNTR_ENRLD_CVG
175     --
176     ben_DSGNTR_ENRLD_CVG_bk1.create_DSGNTR_ENRLD_CVG_a
177       (
178        p_dsgntr_enrld_cvg_id            =>  l_dsgntr_enrld_cvg_id
179       ,p_effective_start_date           =>  l_effective_start_date
180       ,p_effective_end_date             =>  l_effective_end_date
181       ,p_dsgntr_crntly_enrld_flag       =>  p_dsgntr_crntly_enrld_flag
182       ,p_dpnt_cvg_eligy_prfl_id         =>  p_dpnt_cvg_eligy_prfl_id
183       ,p_business_group_id              =>  p_business_group_id
184       ,p_dec_attribute_category         =>  p_dec_attribute_category
185       ,p_dec_attribute1                 =>  p_dec_attribute1
186       ,p_dec_attribute2                 =>  p_dec_attribute2
187       ,p_dec_attribute3                 =>  p_dec_attribute3
188       ,p_dec_attribute4                 =>  p_dec_attribute4
189       ,p_dec_attribute5                 =>  p_dec_attribute5
190       ,p_dec_attribute6                 =>  p_dec_attribute6
191       ,p_dec_attribute7                 =>  p_dec_attribute7
192       ,p_dec_attribute8                 =>  p_dec_attribute8
193       ,p_dec_attribute9                 =>  p_dec_attribute9
194       ,p_dec_attribute10                =>  p_dec_attribute10
195       ,p_dec_attribute11                =>  p_dec_attribute11
196       ,p_dec_attribute12                =>  p_dec_attribute12
197       ,p_dec_attribute13                =>  p_dec_attribute13
198       ,p_dec_attribute14                =>  p_dec_attribute14
199       ,p_dec_attribute15                =>  p_dec_attribute15
200       ,p_dec_attribute16                =>  p_dec_attribute16
201       ,p_dec_attribute17                =>  p_dec_attribute17
202       ,p_dec_attribute18                =>  p_dec_attribute18
203       ,p_dec_attribute19                =>  p_dec_attribute19
204       ,p_dec_attribute20                =>  p_dec_attribute20
205       ,p_dec_attribute21                =>  p_dec_attribute21
206       ,p_dec_attribute22                =>  p_dec_attribute22
207       ,p_dec_attribute23                =>  p_dec_attribute23
208       ,p_dec_attribute24                =>  p_dec_attribute24
209       ,p_dec_attribute25                =>  p_dec_attribute25
210       ,p_dec_attribute26                =>  p_dec_attribute26
211       ,p_dec_attribute27                =>  p_dec_attribute27
212       ,p_dec_attribute28                =>  p_dec_attribute28
213       ,p_dec_attribute29                =>  p_dec_attribute29
214       ,p_dec_attribute30                =>  p_dec_attribute30
215       ,p_object_version_number          =>  l_object_version_number
216       ,p_effective_date                      => trunc(p_effective_date)
217       );
218   exception
219     when hr_api.cannot_find_prog_unit then
220       hr_api.cannot_find_prog_unit_error
221         (p_module_name => 'CREATE_DSGNTR_ENRLD_CVG'
222         ,p_hook_type   => 'AP'
223         );
224     --
225     -- End of API User Hook for the after hook of create_DSGNTR_ENRLD_CVG
226     --
227   end;
228   --
229   hr_utility.set_location(l_proc, 60);
230   --
231    ben_profile_handler.event_handler
232          (p_event                       => 'CREATE',
233           p_base_table                  => 'BEN_DPNT_CVG_ELIGY_PRFL_F',
234           p_base_table_column           => 'DPNT_CVG_ELIGY_PRFL_ID',
235           p_base_table_column_value     =>  p_dpnt_cvg_eligy_prfl_id,
236           p_base_table_reference_column => 'DPNT_DSGNT_CRNTLY_ENRLD_FLAG',
237           p_reference_table             => 'BEN_DSGNTR_ENRLD_CVG_F',
238           p_reference_table_column      => 'DPNT_CVG_ELIGY_PRFL_ID');
239   --
240 
241   -- When in validation only mode raise the Validate_Enabled exception
242   --
243   if p_validate then
244     raise hr_api.validate_enabled;
245   end if;
246   --
247   -- Set all output arguments
248   --
249   p_dsgntr_enrld_cvg_id := l_dsgntr_enrld_cvg_id;
250   p_effective_start_date := l_effective_start_date;
251   p_effective_end_date := l_effective_end_date;
252   p_object_version_number := l_object_version_number;
253   --
254   hr_utility.set_location(' Leaving:'||l_proc, 70);
255   --
256 exception
257   --
258   when hr_api.validate_enabled then
259     --
260     -- As the Validate_Enabled exception has been raised
261     -- we must rollback to the savepoint
262     --
263     ROLLBACK TO create_DSGNTR_ENRLD_CVG;
264     --
265     -- Only set output warning arguments
266     -- (Any key or derived arguments must be set to null
267     -- when validation only mode is being used.)
268     --
269     p_dsgntr_enrld_cvg_id := null;
270     p_effective_start_date := null;
271     p_effective_end_date := null;
272     p_object_version_number  := null;
273     hr_utility.set_location(' Leaving:'||l_proc, 80);
274     --
275   when others then
276     --
277     -- A validation or unexpected error has occured
278     --
279     ROLLBACK TO create_DSGNTR_ENRLD_CVG;
280     -- NOCOPY Changes
281 		p_dsgntr_enrld_cvg_id := null;
282 		p_effective_start_date := null;
283 		p_effective_end_date := null;
284 		p_object_version_number  := null;
285     -- NOCOPY Changes
286     raise;
287     --
288 end create_DSGNTR_ENRLD_CVG;
289 -- ----------------------------------------------------------------------------
290 -- |------------------------< update_DSGNTR_ENRLD_CVG >--- ------------------|
291 -- ----------------------------------------------------------------------------
292 --
293 procedure update_DSGNTR_ENRLD_CVG
294   (p_validate                       in  boolean   default false
295   ,p_dsgntr_enrld_cvg_id            in  number
296   ,p_effective_start_date           out nocopy date
297   ,p_effective_end_date             out nocopy date
298   ,p_dsgntr_crntly_enrld_flag       in  varchar2  default hr_api.g_varchar2
299   ,p_dpnt_cvg_eligy_prfl_id         in  number    default hr_api.g_number
300   ,p_business_group_id              in  number    default hr_api.g_number
301   ,p_dec_attribute_category         in  varchar2  default hr_api.g_varchar2
302   ,p_dec_attribute1                 in  varchar2  default hr_api.g_varchar2
303   ,p_dec_attribute2                 in  varchar2  default hr_api.g_varchar2
304   ,p_dec_attribute3                 in  varchar2  default hr_api.g_varchar2
305   ,p_dec_attribute4                 in  varchar2  default hr_api.g_varchar2
306   ,p_dec_attribute5                 in  varchar2  default hr_api.g_varchar2
307   ,p_dec_attribute6                 in  varchar2  default hr_api.g_varchar2
308   ,p_dec_attribute7                 in  varchar2  default hr_api.g_varchar2
309   ,p_dec_attribute8                 in  varchar2  default hr_api.g_varchar2
310   ,p_dec_attribute9                 in  varchar2  default hr_api.g_varchar2
311   ,p_dec_attribute10                in  varchar2  default hr_api.g_varchar2
312   ,p_dec_attribute11                in  varchar2  default hr_api.g_varchar2
313   ,p_dec_attribute12                in  varchar2  default hr_api.g_varchar2
314   ,p_dec_attribute13                in  varchar2  default hr_api.g_varchar2
315   ,p_dec_attribute14                in  varchar2  default hr_api.g_varchar2
316   ,p_dec_attribute15                in  varchar2  default hr_api.g_varchar2
317   ,p_dec_attribute16                in  varchar2  default hr_api.g_varchar2
318   ,p_dec_attribute17                in  varchar2  default hr_api.g_varchar2
319   ,p_dec_attribute18                in  varchar2  default hr_api.g_varchar2
320   ,p_dec_attribute19                in  varchar2  default hr_api.g_varchar2
321   ,p_dec_attribute20                in  varchar2  default hr_api.g_varchar2
322   ,p_dec_attribute21                in  varchar2  default hr_api.g_varchar2
323   ,p_dec_attribute22                in  varchar2  default hr_api.g_varchar2
324   ,p_dec_attribute23                in  varchar2  default hr_api.g_varchar2
325   ,p_dec_attribute24                in  varchar2  default hr_api.g_varchar2
326   ,p_dec_attribute25                in  varchar2  default hr_api.g_varchar2
327   ,p_dec_attribute26                in  varchar2  default hr_api.g_varchar2
328   ,p_dec_attribute27                in  varchar2  default hr_api.g_varchar2
329   ,p_dec_attribute28                in  varchar2  default hr_api.g_varchar2
330   ,p_dec_attribute29                in  varchar2  default hr_api.g_varchar2
331   ,p_dec_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_DSGNTR_ENRLD_CVG';
340   l_object_version_number ben_dsgntr_enrld_cvg_f.object_version_number%TYPE;
341   l_effective_start_date ben_dsgntr_enrld_cvg_f.effective_start_date%TYPE;
342   l_effective_end_date ben_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG;
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_DSGNTR_ENRLD_CVG
361     --
362     ben_DSGNTR_ENRLD_CVG_bk2.update_DSGNTR_ENRLD_CVG_b
363       (
364        p_dsgntr_enrld_cvg_id            =>  p_dsgntr_enrld_cvg_id
365       ,p_dsgntr_crntly_enrld_flag       =>  p_dsgntr_crntly_enrld_flag
366       ,p_dpnt_cvg_eligy_prfl_id         =>  p_dpnt_cvg_eligy_prfl_id
367       ,p_business_group_id              =>  p_business_group_id
368       ,p_dec_attribute_category         =>  p_dec_attribute_category
369       ,p_dec_attribute1                 =>  p_dec_attribute1
370       ,p_dec_attribute2                 =>  p_dec_attribute2
371       ,p_dec_attribute3                 =>  p_dec_attribute3
372       ,p_dec_attribute4                 =>  p_dec_attribute4
373       ,p_dec_attribute5                 =>  p_dec_attribute5
374       ,p_dec_attribute6                 =>  p_dec_attribute6
375       ,p_dec_attribute7                 =>  p_dec_attribute7
376       ,p_dec_attribute8                 =>  p_dec_attribute8
377       ,p_dec_attribute9                 =>  p_dec_attribute9
378       ,p_dec_attribute10                =>  p_dec_attribute10
379       ,p_dec_attribute11                =>  p_dec_attribute11
380       ,p_dec_attribute12                =>  p_dec_attribute12
381       ,p_dec_attribute13                =>  p_dec_attribute13
382       ,p_dec_attribute14                =>  p_dec_attribute14
383       ,p_dec_attribute15                =>  p_dec_attribute15
384       ,p_dec_attribute16                =>  p_dec_attribute16
385       ,p_dec_attribute17                =>  p_dec_attribute17
386       ,p_dec_attribute18                =>  p_dec_attribute18
387       ,p_dec_attribute19                =>  p_dec_attribute19
388       ,p_dec_attribute20                =>  p_dec_attribute20
389       ,p_dec_attribute21                =>  p_dec_attribute21
390       ,p_dec_attribute22                =>  p_dec_attribute22
391       ,p_dec_attribute23                =>  p_dec_attribute23
392       ,p_dec_attribute24                =>  p_dec_attribute24
393       ,p_dec_attribute25                =>  p_dec_attribute25
394       ,p_dec_attribute26                =>  p_dec_attribute26
395       ,p_dec_attribute27                =>  p_dec_attribute27
396       ,p_dec_attribute28                =>  p_dec_attribute28
397       ,p_dec_attribute29                =>  p_dec_attribute29
398       ,p_dec_attribute30                =>  p_dec_attribute30
399       ,p_object_version_number          =>  p_object_version_number
400     ,p_effective_date                      => trunc(p_effective_date)
401     ,p_datetrack_mode                      => p_datetrack_mode
402       );
403   exception
404     when hr_api.cannot_find_prog_unit then
405       hr_api.cannot_find_prog_unit_error
406         (p_module_name => 'UPDATE_DSGNTR_ENRLD_CVG'
407         ,p_hook_type   => 'BP'
408         );
409     --
410     -- End of API User Hook for the before hook of update_DSGNTR_ENRLD_CVG
411     --
412   end;
413   --
414   ben_dec_upd.upd
415     (
416      p_dsgntr_enrld_cvg_id           => p_dsgntr_enrld_cvg_id
417     ,p_effective_start_date          => l_effective_start_date
418     ,p_effective_end_date            => l_effective_end_date
419     ,p_dsgntr_crntly_enrld_flag      => p_dsgntr_crntly_enrld_flag
420     ,p_dpnt_cvg_eligy_prfl_id        => p_dpnt_cvg_eligy_prfl_id
421     ,p_business_group_id             => p_business_group_id
422     ,p_dec_attribute_category        => p_dec_attribute_category
423     ,p_dec_attribute1                => p_dec_attribute1
424     ,p_dec_attribute2                => p_dec_attribute2
425     ,p_dec_attribute3                => p_dec_attribute3
426     ,p_dec_attribute4                => p_dec_attribute4
427     ,p_dec_attribute5                => p_dec_attribute5
428     ,p_dec_attribute6                => p_dec_attribute6
429     ,p_dec_attribute7                => p_dec_attribute7
430     ,p_dec_attribute8                => p_dec_attribute8
431     ,p_dec_attribute9                => p_dec_attribute9
432     ,p_dec_attribute10               => p_dec_attribute10
433     ,p_dec_attribute11               => p_dec_attribute11
434     ,p_dec_attribute12               => p_dec_attribute12
435     ,p_dec_attribute13               => p_dec_attribute13
436     ,p_dec_attribute14               => p_dec_attribute14
437     ,p_dec_attribute15               => p_dec_attribute15
438     ,p_dec_attribute16               => p_dec_attribute16
439     ,p_dec_attribute17               => p_dec_attribute17
440     ,p_dec_attribute18               => p_dec_attribute18
441     ,p_dec_attribute19               => p_dec_attribute19
442     ,p_dec_attribute20               => p_dec_attribute20
443     ,p_dec_attribute21               => p_dec_attribute21
444     ,p_dec_attribute22               => p_dec_attribute22
445     ,p_dec_attribute23               => p_dec_attribute23
446     ,p_dec_attribute24               => p_dec_attribute24
447     ,p_dec_attribute25               => p_dec_attribute25
448     ,p_dec_attribute26               => p_dec_attribute26
449     ,p_dec_attribute27               => p_dec_attribute27
450     ,p_dec_attribute28               => p_dec_attribute28
451     ,p_dec_attribute29               => p_dec_attribute29
452     ,p_dec_attribute30               => p_dec_attribute30
453     ,p_object_version_number         => l_object_version_number
454     ,p_effective_date                => trunc(p_effective_date)
455     ,p_datetrack_mode                => p_datetrack_mode
456     );
457   --
458   begin
459     --
460     -- Start of API User Hook for the after hook of update_DSGNTR_ENRLD_CVG
461     --
462     ben_DSGNTR_ENRLD_CVG_bk2.update_DSGNTR_ENRLD_CVG_a
463       (
464        p_dsgntr_enrld_cvg_id            =>  p_dsgntr_enrld_cvg_id
465       ,p_effective_start_date           =>  l_effective_start_date
466       ,p_effective_end_date             =>  l_effective_end_date
467       ,p_dsgntr_crntly_enrld_flag       =>  p_dsgntr_crntly_enrld_flag
468       ,p_dpnt_cvg_eligy_prfl_id         =>  p_dpnt_cvg_eligy_prfl_id
469       ,p_business_group_id              =>  p_business_group_id
470       ,p_dec_attribute_category         =>  p_dec_attribute_category
471       ,p_dec_attribute1                 =>  p_dec_attribute1
472       ,p_dec_attribute2                 =>  p_dec_attribute2
473       ,p_dec_attribute3                 =>  p_dec_attribute3
474       ,p_dec_attribute4                 =>  p_dec_attribute4
475       ,p_dec_attribute5                 =>  p_dec_attribute5
476       ,p_dec_attribute6                 =>  p_dec_attribute6
477       ,p_dec_attribute7                 =>  p_dec_attribute7
478       ,p_dec_attribute8                 =>  p_dec_attribute8
479       ,p_dec_attribute9                 =>  p_dec_attribute9
480       ,p_dec_attribute10                =>  p_dec_attribute10
481       ,p_dec_attribute11                =>  p_dec_attribute11
482       ,p_dec_attribute12                =>  p_dec_attribute12
483       ,p_dec_attribute13                =>  p_dec_attribute13
484       ,p_dec_attribute14                =>  p_dec_attribute14
485       ,p_dec_attribute15                =>  p_dec_attribute15
486       ,p_dec_attribute16                =>  p_dec_attribute16
487       ,p_dec_attribute17                =>  p_dec_attribute17
488       ,p_dec_attribute18                =>  p_dec_attribute18
489       ,p_dec_attribute19                =>  p_dec_attribute19
490       ,p_dec_attribute20                =>  p_dec_attribute20
491       ,p_dec_attribute21                =>  p_dec_attribute21
492       ,p_dec_attribute22                =>  p_dec_attribute22
493       ,p_dec_attribute23                =>  p_dec_attribute23
494       ,p_dec_attribute24                =>  p_dec_attribute24
495       ,p_dec_attribute25                =>  p_dec_attribute25
496       ,p_dec_attribute26                =>  p_dec_attribute26
497       ,p_dec_attribute27                =>  p_dec_attribute27
498       ,p_dec_attribute28                =>  p_dec_attribute28
499       ,p_dec_attribute29                =>  p_dec_attribute29
500       ,p_dec_attribute30                =>  p_dec_attribute30
501       ,p_object_version_number          =>  l_object_version_number
502       ,p_effective_date                     => trunc(p_effective_date)
503       ,p_datetrack_mode                     => p_datetrack_mode
504       );
505   exception
506     when hr_api.cannot_find_prog_unit then
507       hr_api.cannot_find_prog_unit_error
508         (p_module_name => 'UPDATE_DSGNTR_ENRLD_CVG'
509         ,p_hook_type   => 'AP'
510         );
511     --
512     -- End of API User Hook for the after hook of update_DSGNTR_ENRLD_CVG
513     --
514   end;
515   --
516   hr_utility.set_location(l_proc, 60);
517   --
518   -- When in validation only mode raise the Validate_Enabled exception
519   --
520   if p_validate then
521     raise hr_api.validate_enabled;
522   end if;
523   --
524   -- Set all output arguments
525   --
526   p_object_version_number := l_object_version_number;
527   p_effective_start_date := l_effective_start_date;
528   p_effective_end_date := l_effective_end_date;
529   --
530   hr_utility.set_location(' Leaving:'||l_proc, 70);
531   --
532 exception
533   --
534   when hr_api.validate_enabled then
535     --
536     -- As the Validate_Enabled exception has been raised
537     -- we must rollback to the savepoint
538     --
539     ROLLBACK TO update_DSGNTR_ENRLD_CVG;
540     --
541     -- NOCOPY Changes
542 		p_effective_start_date := null;
543 		p_effective_end_date := null;
544     -- NOCOPY Changes
545 
546     -- Only set output warning arguments
547     -- (Any key or derived arguments must be set to null
548     -- when validation only mode is being used.)
549     --
550     hr_utility.set_location(' Leaving:'||l_proc, 80);
551     --
552   when others then
553     --
554     -- A validation or unexpected error has occured
555     --
556     ROLLBACK TO update_DSGNTR_ENRLD_CVG;
557     -- NOCOPY Changes
558 		p_effective_start_date := null;
559 		p_effective_end_date := null;
560     -- NOCOPY Changes
561 
562     raise;
563     --
564 end update_DSGNTR_ENRLD_CVG;
565 -- ----------------------------------------------------------------------------
566 -- |------------------------< delete_DSGNTR_ENRLD_CVG >----------------------|
567 -- ----------------------------------------------------------------------------
568 --
569 procedure delete_DSGNTR_ENRLD_CVG
570   (p_validate                       in  boolean  default false
571   ,p_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG';
582   l_object_version_number ben_dsgntr_enrld_cvg_f.object_version_number%TYPE;
583   l_effective_start_date ben_dsgntr_enrld_cvg_f.effective_start_date%TYPE;
584   l_effective_end_date ben_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG;
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_DSGNTR_ENRLD_CVG
604     --
605     ben_DSGNTR_ENRLD_CVG_bk3.delete_DSGNTR_ENRLD_CVG_b
606       (
607        p_dsgntr_enrld_cvg_id            =>  p_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG'
616         ,p_hook_type   => 'BP'
617         );
618     --
619     -- End of API User Hook for the before hook of delete_DSGNTR_ENRLD_CVG
620     --
621   end;
622   --
623   ben_dec_del.del
624     (
625      p_dsgntr_enrld_cvg_id           => p_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG
636     --
637     ben_DSGNTR_ENRLD_CVG_bk3.delete_DSGNTR_ENRLD_CVG_a
638       (
639        p_dsgntr_enrld_cvg_id            =>  p_dsgntr_enrld_cvg_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_DSGNTR_ENRLD_CVG'
650         ,p_hook_type   => 'AP'
651         );
652     --
653     -- End of API User Hook for the after hook of delete_DSGNTR_ENRLD_CVG
654     --
655   end;
656   --
657   hr_utility.set_location(l_proc, 60);
658   --
659    ben_profile_handler.event_handler
660          (p_event                       => 'DELETE',
661           p_base_table                  => 'BEN_DPNT_CVG_ELIGY_PRFL_F',
662           p_base_table_column           => 'DPNT_CVG_ELIGY_PRFL_ID',
663           p_base_table_column_value     =>  ben_dec_shd.g_old_rec.dpnt_cvg_eligy_prfl_id,
664           p_base_table_reference_column => 'DPNT_DSGNT_CRNTLY_ENRLD_FLAG',
665           p_reference_table             => 'BEN_DSGNTR_ENRLD_CVG_F',
666           p_reference_table_column      => 'DPNT_CVG_ELIGY_PRFL_ID');
667   --
668   -- When in validation only mode raise the Validate_Enabled exception
669   --
670   if p_validate then
671     raise hr_api.validate_enabled;
672   end if;
673   --
674   hr_utility.set_location(' Leaving:'||l_proc, 70);
675   --
676 exception
677   --
678   when hr_api.validate_enabled then
679     --
680     -- As the Validate_Enabled exception has been raised
681     -- we must rollback to the savepoint
682     --
683     ROLLBACK TO delete_DSGNTR_ENRLD_CVG;
684     --
685     -- Only set output warning arguments
686     -- (Any key or derived arguments must be set to null
687     -- when validation only mode is being used.)
688     --
689     p_effective_start_date := null;
690     p_effective_end_date := null;
691     --
692   when others then
693     --
694     -- A validation or unexpected error has occured
695     --
696     ROLLBACK TO delete_DSGNTR_ENRLD_CVG;
697     -- NOCOPY Changes
698 		p_effective_start_date := null;
699 		p_effective_end_date := null;
700     -- NOCOPY Changes
701     raise;
702     --
703 end delete_DSGNTR_ENRLD_CVG;
704 --
705 -- ----------------------------------------------------------------------------
706 -- |-------------------------------< lck >------------------------------------|
707 -- ----------------------------------------------------------------------------
708 --
709 procedure lck
710   (
711    p_dsgntr_enrld_cvg_id                   in     number
712   ,p_object_version_number          in     number
713   ,p_effective_date                 in     date
714   ,p_datetrack_mode                 in     varchar2
715   ,p_validation_start_date          out nocopy    date
716   ,p_validation_end_date            out nocopy    date
717   ) is
718   --
719   --
720   -- Declare cursors and local variables
721   --
722   l_proc varchar2(72) := g_package||'lck';
723   l_validation_start_date date;
724   l_validation_end_date date;
725   --
726 begin
727   --
728   hr_utility.set_location('Entering:'|| l_proc, 10);
729   --
730   ben_dec_shd.lck
731     (
732       p_dsgntr_enrld_cvg_id                 => p_dsgntr_enrld_cvg_id
733      ,p_validation_start_date      => l_validation_start_date
734      ,p_validation_end_date        => l_validation_end_date
735      ,p_object_version_number      => p_object_version_number
736      ,p_effective_date             => p_effective_date
737      ,p_datetrack_mode             => p_datetrack_mode
738     );
739   --
740   hr_utility.set_location(' Leaving:'||l_proc, 70);
741   --
742 end lck;
743 --
744 end ben_DSGNTR_ENRLD_CVG_api;