DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_DSBLD_STAT_CVG_API

Source


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