DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_DPNT_CVRD_O_PTIP_API

Source


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