DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ELIG_ENRLD_ANTHR_PTIP_API

Source


1 Package Body ben_ELIG_ENRLD_ANTHR_PTIP_api as
2 /* $Header: beeetapi.pkb 120.0 2005/05/28 02:06:31 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_ELIG_ENRLD_ANTHR_PTIP_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_ELIG_ENRLD_ANTHR_PTIP >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_ELIG_ENRLD_ANTHR_PTIP
13   (p_validate                       in  boolean   default false
14   ,p_elig_enrld_anthr_ptip_id       out nocopy number
15   ,p_effective_start_date           out nocopy date
16   ,p_effective_end_date             out nocopy date
17   ,p_ordr_num                       in  number    default null
18   ,p_excld_flag                     in  varchar2  default 'N'
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_eet_attribute_category         in  varchar2  default null
25   ,p_eet_attribute1                 in  varchar2  default null
26   ,p_eet_attribute2                 in  varchar2  default null
27   ,p_eet_attribute3                 in  varchar2  default null
28   ,p_eet_attribute4                 in  varchar2  default null
29   ,p_eet_attribute5                 in  varchar2  default null
30   ,p_eet_attribute6                 in  varchar2  default null
31   ,p_eet_attribute7                 in  varchar2  default null
32   ,p_eet_attribute8                 in  varchar2  default null
33   ,p_eet_attribute9                 in  varchar2  default null
34   ,p_eet_attribute10                in  varchar2  default null
35   ,p_eet_attribute11                in  varchar2  default null
36   ,p_eet_attribute12                in  varchar2  default null
37   ,p_eet_attribute13                in  varchar2  default null
38   ,p_eet_attribute14                in  varchar2  default null
39   ,p_eet_attribute15                in  varchar2  default null
40   ,p_eet_attribute16                in  varchar2  default null
41   ,p_eet_attribute17                in  varchar2  default null
42   ,p_eet_attribute18                in  varchar2  default null
43   ,p_eet_attribute19                in  varchar2  default null
44   ,p_eet_attribute20                in  varchar2  default null
45   ,p_eet_attribute21                in  varchar2  default null
46   ,p_eet_attribute22                in  varchar2  default null
47   ,p_eet_attribute23                in  varchar2  default null
48   ,p_eet_attribute24                in  varchar2  default null
49   ,p_eet_attribute25                in  varchar2  default null
50   ,p_eet_attribute26                in  varchar2  default null
51   ,p_eet_attribute27                in  varchar2  default null
52   ,p_eet_attribute28                in  varchar2  default null
53   ,p_eet_attribute29                in  varchar2  default null
54   ,p_eet_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_enrld_anthr_ptip_id ben_elig_enrld_anthr_ptip_f.elig_enrld_anthr_ptip_id%TYPE;
62   l_effective_start_date ben_elig_enrld_anthr_ptip_f.effective_start_date%TYPE;
63   l_effective_end_date ben_elig_enrld_anthr_ptip_f.effective_end_date%TYPE;
64   l_proc varchar2(72) := g_package||'create_ELIG_ENRLD_ANTHR_PTIP';
65   l_object_version_number ben_elig_enrld_anthr_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_ENRLD_ANTHR_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_ENRLD_ANTHR_PTIP
82     --
83     ben_ELIG_ENRLD_ANTHR_PTIP_bk1.create_ELIG_ENRLD_ANTHR_PTIP_b
84       (
85        p_ordr_num                       =>  p_ordr_num
86       ,p_excld_flag                     =>  p_excld_flag
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_eet_attribute_category         =>  p_eet_attribute_category
93       ,p_eet_attribute1                 =>  p_eet_attribute1
94       ,p_eet_attribute2                 =>  p_eet_attribute2
95       ,p_eet_attribute3                 =>  p_eet_attribute3
96       ,p_eet_attribute4                 =>  p_eet_attribute4
97       ,p_eet_attribute5                 =>  p_eet_attribute5
98       ,p_eet_attribute6                 =>  p_eet_attribute6
99       ,p_eet_attribute7                 =>  p_eet_attribute7
100       ,p_eet_attribute8                 =>  p_eet_attribute8
101       ,p_eet_attribute9                 =>  p_eet_attribute9
102       ,p_eet_attribute10                =>  p_eet_attribute10
103       ,p_eet_attribute11                =>  p_eet_attribute11
104       ,p_eet_attribute12                =>  p_eet_attribute12
105       ,p_eet_attribute13                =>  p_eet_attribute13
106       ,p_eet_attribute14                =>  p_eet_attribute14
107       ,p_eet_attribute15                =>  p_eet_attribute15
108       ,p_eet_attribute16                =>  p_eet_attribute16
109       ,p_eet_attribute17                =>  p_eet_attribute17
110       ,p_eet_attribute18                =>  p_eet_attribute18
111       ,p_eet_attribute19                =>  p_eet_attribute19
112       ,p_eet_attribute20                =>  p_eet_attribute20
113       ,p_eet_attribute21                =>  p_eet_attribute21
114       ,p_eet_attribute22                =>  p_eet_attribute22
115       ,p_eet_attribute23                =>  p_eet_attribute23
116       ,p_eet_attribute24                =>  p_eet_attribute24
117       ,p_eet_attribute25                =>  p_eet_attribute25
118       ,p_eet_attribute26                =>  p_eet_attribute26
119       ,p_eet_attribute27                =>  p_eet_attribute27
120       ,p_eet_attribute28                =>  p_eet_attribute28
121       ,p_eet_attribute29                =>  p_eet_attribute29
122       ,p_eet_attribute30                =>  p_eet_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_ENRLD_ANTHR_PTIP'
130         ,p_hook_type   => 'BP'
131         );
132     --
133     -- End of API User Hook for the before hook of create_ELIG_ENRLD_ANTHR_PTIP
134     --
135   end;
136   --
137   ben_eet_ins.ins
138     (
139      p_elig_enrld_anthr_ptip_id      => l_elig_enrld_anthr_ptip_id
140     ,p_effective_start_date          => l_effective_start_date
141     ,p_effective_end_date            => l_effective_end_date
142     ,p_ordr_num                      => p_ordr_num
143     ,p_excld_flag                    => p_excld_flag
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_eet_attribute_category        => p_eet_attribute_category
150     ,p_eet_attribute1                => p_eet_attribute1
151     ,p_eet_attribute2                => p_eet_attribute2
152     ,p_eet_attribute3                => p_eet_attribute3
153     ,p_eet_attribute4                => p_eet_attribute4
154     ,p_eet_attribute5                => p_eet_attribute5
155     ,p_eet_attribute6                => p_eet_attribute6
156     ,p_eet_attribute7                => p_eet_attribute7
157     ,p_eet_attribute8                => p_eet_attribute8
158     ,p_eet_attribute9                => p_eet_attribute9
159     ,p_eet_attribute10               => p_eet_attribute10
160     ,p_eet_attribute11               => p_eet_attribute11
161     ,p_eet_attribute12               => p_eet_attribute12
162     ,p_eet_attribute13               => p_eet_attribute13
163     ,p_eet_attribute14               => p_eet_attribute14
164     ,p_eet_attribute15               => p_eet_attribute15
165     ,p_eet_attribute16               => p_eet_attribute16
166     ,p_eet_attribute17               => p_eet_attribute17
167     ,p_eet_attribute18               => p_eet_attribute18
168     ,p_eet_attribute19               => p_eet_attribute19
169     ,p_eet_attribute20               => p_eet_attribute20
170     ,p_eet_attribute21               => p_eet_attribute21
171     ,p_eet_attribute22               => p_eet_attribute22
172     ,p_eet_attribute23               => p_eet_attribute23
173     ,p_eet_attribute24               => p_eet_attribute24
174     ,p_eet_attribute25               => p_eet_attribute25
175     ,p_eet_attribute26               => p_eet_attribute26
176     ,p_eet_attribute27               => p_eet_attribute27
177     ,p_eet_attribute28               => p_eet_attribute28
178     ,p_eet_attribute29               => p_eet_attribute29
179     ,p_eet_attribute30               => p_eet_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_ENRLD_ANTHR_PTIP
187     --
188     ben_ELIG_ENRLD_ANTHR_PTIP_bk1.create_ELIG_ENRLD_ANTHR_PTIP_a
189       (
190        p_elig_enrld_anthr_ptip_id       =>  l_elig_enrld_anthr_ptip_id
191       ,p_effective_start_date           =>  l_effective_start_date
192       ,p_effective_end_date             =>  l_effective_end_date
193       ,p_ordr_num                       =>  p_ordr_num
194       ,p_excld_flag                     =>  p_excld_flag
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_eet_attribute_category         =>  p_eet_attribute_category
201       ,p_eet_attribute1                 =>  p_eet_attribute1
202       ,p_eet_attribute2                 =>  p_eet_attribute2
203       ,p_eet_attribute3                 =>  p_eet_attribute3
204       ,p_eet_attribute4                 =>  p_eet_attribute4
205       ,p_eet_attribute5                 =>  p_eet_attribute5
206       ,p_eet_attribute6                 =>  p_eet_attribute6
207       ,p_eet_attribute7                 =>  p_eet_attribute7
208       ,p_eet_attribute8                 =>  p_eet_attribute8
209       ,p_eet_attribute9                 =>  p_eet_attribute9
210       ,p_eet_attribute10                =>  p_eet_attribute10
211       ,p_eet_attribute11                =>  p_eet_attribute11
212       ,p_eet_attribute12                =>  p_eet_attribute12
213       ,p_eet_attribute13                =>  p_eet_attribute13
214       ,p_eet_attribute14                =>  p_eet_attribute14
215       ,p_eet_attribute15                =>  p_eet_attribute15
216       ,p_eet_attribute16                =>  p_eet_attribute16
217       ,p_eet_attribute17                =>  p_eet_attribute17
218       ,p_eet_attribute18                =>  p_eet_attribute18
219       ,p_eet_attribute19                =>  p_eet_attribute19
220       ,p_eet_attribute20                =>  p_eet_attribute20
221       ,p_eet_attribute21                =>  p_eet_attribute21
222       ,p_eet_attribute22                =>  p_eet_attribute22
223       ,p_eet_attribute23                =>  p_eet_attribute23
224       ,p_eet_attribute24                =>  p_eet_attribute24
225       ,p_eet_attribute25                =>  p_eet_attribute25
226       ,p_eet_attribute26                =>  p_eet_attribute26
227       ,p_eet_attribute27                =>  p_eet_attribute27
228       ,p_eet_attribute28                =>  p_eet_attribute28
229       ,p_eet_attribute29                =>  p_eet_attribute29
230       ,p_eet_attribute30                =>  p_eet_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_ENRLD_ANTHR_PTIP'
238         ,p_hook_type   => 'AP'
239         );
240     --
241     -- End of API User Hook for the after hook of create_ELIG_ENRLD_ANTHR_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_ENRLD_PTIP_FLAG',
251      p_reference_table             => 'BEN_ELIG_ENRLD_ANTHR_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_enrld_anthr_ptip_id := l_elig_enrld_anthr_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_ENRLD_ANTHR_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_enrld_anthr_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_ENRLD_ANTHR_PTIP;
295     p_elig_enrld_anthr_ptip_id := null;
296     p_effective_start_date := null;
297     p_effective_end_date := null;
298     p_object_version_number  := null;
299 
300     raise;
301     --
302 end create_ELIG_ENRLD_ANTHR_PTIP;
303 -- ----------------------------------------------------------------------------
304 -- |------------------------< update_ELIG_ENRLD_ANTHR_PTIP >--- ------------------|
305 -- ----------------------------------------------------------------------------
306 --
307 procedure update_ELIG_ENRLD_ANTHR_PTIP
308   (p_validate                       in  boolean   default false
309   ,p_elig_enrld_anthr_ptip_id       in  number
310   ,p_effective_start_date           out nocopy date
311   ,p_effective_end_date             out nocopy date
312   ,p_ordr_num                       in  number    default hr_api.g_number
313   ,p_excld_flag                     in  varchar2  default hr_api.g_varchar2
314   ,p_enrl_det_dt_cd                 in  varchar2  default hr_api.g_varchar2
315   ,p_only_pls_subj_cobra_flag       in  varchar2  default hr_api.g_varchar2
316   ,p_ptip_id                        in  number    default hr_api.g_number
317   ,p_eligy_prfl_id                  in  number    default hr_api.g_number
318   ,p_business_group_id              in  number    default hr_api.g_number
319   ,p_eet_attribute_category         in  varchar2  default hr_api.g_varchar2
320   ,p_eet_attribute1                 in  varchar2  default hr_api.g_varchar2
321   ,p_eet_attribute2                 in  varchar2  default hr_api.g_varchar2
322   ,p_eet_attribute3                 in  varchar2  default hr_api.g_varchar2
323   ,p_eet_attribute4                 in  varchar2  default hr_api.g_varchar2
324   ,p_eet_attribute5                 in  varchar2  default hr_api.g_varchar2
325   ,p_eet_attribute6                 in  varchar2  default hr_api.g_varchar2
326   ,p_eet_attribute7                 in  varchar2  default hr_api.g_varchar2
327   ,p_eet_attribute8                 in  varchar2  default hr_api.g_varchar2
328   ,p_eet_attribute9                 in  varchar2  default hr_api.g_varchar2
329   ,p_eet_attribute10                in  varchar2  default hr_api.g_varchar2
330   ,p_eet_attribute11                in  varchar2  default hr_api.g_varchar2
331   ,p_eet_attribute12                in  varchar2  default hr_api.g_varchar2
332   ,p_eet_attribute13                in  varchar2  default hr_api.g_varchar2
333   ,p_eet_attribute14                in  varchar2  default hr_api.g_varchar2
334   ,p_eet_attribute15                in  varchar2  default hr_api.g_varchar2
335   ,p_eet_attribute16                in  varchar2  default hr_api.g_varchar2
336   ,p_eet_attribute17                in  varchar2  default hr_api.g_varchar2
337   ,p_eet_attribute18                in  varchar2  default hr_api.g_varchar2
338   ,p_eet_attribute19                in  varchar2  default hr_api.g_varchar2
339   ,p_eet_attribute20                in  varchar2  default hr_api.g_varchar2
340   ,p_eet_attribute21                in  varchar2  default hr_api.g_varchar2
341   ,p_eet_attribute22                in  varchar2  default hr_api.g_varchar2
342   ,p_eet_attribute23                in  varchar2  default hr_api.g_varchar2
343   ,p_eet_attribute24                in  varchar2  default hr_api.g_varchar2
344   ,p_eet_attribute25                in  varchar2  default hr_api.g_varchar2
345   ,p_eet_attribute26                in  varchar2  default hr_api.g_varchar2
346   ,p_eet_attribute27                in  varchar2  default hr_api.g_varchar2
347   ,p_eet_attribute28                in  varchar2  default hr_api.g_varchar2
348   ,p_eet_attribute29                in  varchar2  default hr_api.g_varchar2
349   ,p_eet_attribute30                in  varchar2  default hr_api.g_varchar2
350   ,p_object_version_number          in out nocopy number
351   ,p_effective_date                 in  date
352   ,p_datetrack_mode                 in  varchar2
353   ) is
354   --
355   -- Declare cursors and local variables
356   --
357   l_proc varchar2(72) := g_package||'update_ELIG_ENRLD_ANTHR_PTIP';
358   l_object_version_number ben_elig_enrld_anthr_ptip_f.object_version_number%TYPE;
359   l_effective_start_date ben_elig_enrld_anthr_ptip_f.effective_start_date%TYPE;
360   l_effective_end_date ben_elig_enrld_anthr_ptip_f.effective_end_date%TYPE;
361   --
362 begin
363   --
364   hr_utility.set_location('Entering:'|| l_proc, 10);
365   --
366   -- Issue a savepoint if operating in validation only mode
367   --
368   savepoint update_ELIG_ENRLD_ANTHR_PTIP;
369   --
370   hr_utility.set_location(l_proc, 20);
371   --
372   -- Process Logic
373   --
374   l_object_version_number := p_object_version_number;
375   --
376   begin
377     --
378     -- Start of API User Hook for the before hook of update_ELIG_ENRLD_ANTHR_PTIP
379     --
380     ben_ELIG_ENRLD_ANTHR_PTIP_bk2.update_ELIG_ENRLD_ANTHR_PTIP_b
381       (
382        p_elig_enrld_anthr_ptip_id       =>  p_elig_enrld_anthr_ptip_id
383       ,p_ordr_num                       =>  p_ordr_num
384       ,p_excld_flag                     =>  p_excld_flag
385       ,p_enrl_det_dt_cd                 =>  p_enrl_det_dt_cd
386       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
387       ,p_ptip_id                        =>  p_ptip_id
388       ,p_eligy_prfl_id                  =>  p_eligy_prfl_id
389       ,p_business_group_id              =>  p_business_group_id
390       ,p_eet_attribute_category         =>  p_eet_attribute_category
391       ,p_eet_attribute1                 =>  p_eet_attribute1
392       ,p_eet_attribute2                 =>  p_eet_attribute2
393       ,p_eet_attribute3                 =>  p_eet_attribute3
394       ,p_eet_attribute4                 =>  p_eet_attribute4
395       ,p_eet_attribute5                 =>  p_eet_attribute5
396       ,p_eet_attribute6                 =>  p_eet_attribute6
397       ,p_eet_attribute7                 =>  p_eet_attribute7
398       ,p_eet_attribute8                 =>  p_eet_attribute8
399       ,p_eet_attribute9                 =>  p_eet_attribute9
400       ,p_eet_attribute10                =>  p_eet_attribute10
401       ,p_eet_attribute11                =>  p_eet_attribute11
402       ,p_eet_attribute12                =>  p_eet_attribute12
403       ,p_eet_attribute13                =>  p_eet_attribute13
404       ,p_eet_attribute14                =>  p_eet_attribute14
405       ,p_eet_attribute15                =>  p_eet_attribute15
406       ,p_eet_attribute16                =>  p_eet_attribute16
407       ,p_eet_attribute17                =>  p_eet_attribute17
408       ,p_eet_attribute18                =>  p_eet_attribute18
409       ,p_eet_attribute19                =>  p_eet_attribute19
410       ,p_eet_attribute20                =>  p_eet_attribute20
411       ,p_eet_attribute21                =>  p_eet_attribute21
412       ,p_eet_attribute22                =>  p_eet_attribute22
413       ,p_eet_attribute23                =>  p_eet_attribute23
414       ,p_eet_attribute24                =>  p_eet_attribute24
415       ,p_eet_attribute25                =>  p_eet_attribute25
416       ,p_eet_attribute26                =>  p_eet_attribute26
417       ,p_eet_attribute27                =>  p_eet_attribute27
418       ,p_eet_attribute28                =>  p_eet_attribute28
419       ,p_eet_attribute29                =>  p_eet_attribute29
420       ,p_eet_attribute30                =>  p_eet_attribute30
421       ,p_object_version_number          =>  p_object_version_number
422     ,p_effective_date                      => trunc(p_effective_date)
423     ,p_datetrack_mode                      => p_datetrack_mode
424       );
425   exception
426     when hr_api.cannot_find_prog_unit then
427       hr_api.cannot_find_prog_unit_error
428         (p_module_name => 'UPDATE_ELIG_ENRLD_ANTHR_PTIP'
429         ,p_hook_type   => 'BP'
430         );
431     --
432     -- End of API User Hook for the before hook of update_ELIG_ENRLD_ANTHR_PTIP
433     --
434   end;
435   --
436   ben_eet_upd.upd
437     (
438      p_elig_enrld_anthr_ptip_id      => p_elig_enrld_anthr_ptip_id
439     ,p_effective_start_date          => l_effective_start_date
440     ,p_effective_end_date            => l_effective_end_date
441     ,p_ordr_num                      => p_ordr_num
442     ,p_excld_flag                    => p_excld_flag
443     ,p_enrl_det_dt_cd                => p_enrl_det_dt_cd
444     ,p_only_pls_subj_cobra_flag      => p_only_pls_subj_cobra_flag
445     ,p_ptip_id                       => p_ptip_id
446     ,p_eligy_prfl_id                 => p_eligy_prfl_id
447     ,p_business_group_id             => p_business_group_id
448     ,p_eet_attribute_category        => p_eet_attribute_category
449     ,p_eet_attribute1                => p_eet_attribute1
450     ,p_eet_attribute2                => p_eet_attribute2
451     ,p_eet_attribute3                => p_eet_attribute3
452     ,p_eet_attribute4                => p_eet_attribute4
453     ,p_eet_attribute5                => p_eet_attribute5
454     ,p_eet_attribute6                => p_eet_attribute6
455     ,p_eet_attribute7                => p_eet_attribute7
456     ,p_eet_attribute8                => p_eet_attribute8
457     ,p_eet_attribute9                => p_eet_attribute9
458     ,p_eet_attribute10               => p_eet_attribute10
459     ,p_eet_attribute11               => p_eet_attribute11
460     ,p_eet_attribute12               => p_eet_attribute12
461     ,p_eet_attribute13               => p_eet_attribute13
462     ,p_eet_attribute14               => p_eet_attribute14
463     ,p_eet_attribute15               => p_eet_attribute15
464     ,p_eet_attribute16               => p_eet_attribute16
465     ,p_eet_attribute17               => p_eet_attribute17
466     ,p_eet_attribute18               => p_eet_attribute18
467     ,p_eet_attribute19               => p_eet_attribute19
468     ,p_eet_attribute20               => p_eet_attribute20
469     ,p_eet_attribute21               => p_eet_attribute21
470     ,p_eet_attribute22               => p_eet_attribute22
471     ,p_eet_attribute23               => p_eet_attribute23
472     ,p_eet_attribute24               => p_eet_attribute24
473     ,p_eet_attribute25               => p_eet_attribute25
474     ,p_eet_attribute26               => p_eet_attribute26
475     ,p_eet_attribute27               => p_eet_attribute27
476     ,p_eet_attribute28               => p_eet_attribute28
477     ,p_eet_attribute29               => p_eet_attribute29
478     ,p_eet_attribute30               => p_eet_attribute30
479     ,p_object_version_number         => l_object_version_number
480     ,p_effective_date                => trunc(p_effective_date)
481     ,p_datetrack_mode                => p_datetrack_mode
482     );
483   --
484   begin
485     --
486     -- Start of API User Hook for the after hook of update_ELIG_ENRLD_ANTHR_PTIP
487     --
488     ben_ELIG_ENRLD_ANTHR_PTIP_bk2.update_ELIG_ENRLD_ANTHR_PTIP_a
489       (
490        p_elig_enrld_anthr_ptip_id       =>  p_elig_enrld_anthr_ptip_id
491       ,p_effective_start_date           =>  l_effective_start_date
492       ,p_effective_end_date             =>  l_effective_end_date
493       ,p_ordr_num                       =>  p_ordr_num
494       ,p_excld_flag                     =>  p_excld_flag
495       ,p_enrl_det_dt_cd                 =>  p_enrl_det_dt_cd
496       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
497       ,p_ptip_id                        =>  p_ptip_id
498       ,p_eligy_prfl_id                  =>  p_eligy_prfl_id
499       ,p_business_group_id              =>  p_business_group_id
500       ,p_eet_attribute_category         =>  p_eet_attribute_category
501       ,p_eet_attribute1                 =>  p_eet_attribute1
502       ,p_eet_attribute2                 =>  p_eet_attribute2
503       ,p_eet_attribute3                 =>  p_eet_attribute3
504       ,p_eet_attribute4                 =>  p_eet_attribute4
505       ,p_eet_attribute5                 =>  p_eet_attribute5
506       ,p_eet_attribute6                 =>  p_eet_attribute6
507       ,p_eet_attribute7                 =>  p_eet_attribute7
508       ,p_eet_attribute8                 =>  p_eet_attribute8
509       ,p_eet_attribute9                 =>  p_eet_attribute9
510       ,p_eet_attribute10                =>  p_eet_attribute10
511       ,p_eet_attribute11                =>  p_eet_attribute11
512       ,p_eet_attribute12                =>  p_eet_attribute12
513       ,p_eet_attribute13                =>  p_eet_attribute13
514       ,p_eet_attribute14                =>  p_eet_attribute14
515       ,p_eet_attribute15                =>  p_eet_attribute15
516       ,p_eet_attribute16                =>  p_eet_attribute16
517       ,p_eet_attribute17                =>  p_eet_attribute17
518       ,p_eet_attribute18                =>  p_eet_attribute18
519       ,p_eet_attribute19                =>  p_eet_attribute19
520       ,p_eet_attribute20                =>  p_eet_attribute20
521       ,p_eet_attribute21                =>  p_eet_attribute21
522       ,p_eet_attribute22                =>  p_eet_attribute22
523       ,p_eet_attribute23                =>  p_eet_attribute23
524       ,p_eet_attribute24                =>  p_eet_attribute24
525       ,p_eet_attribute25                =>  p_eet_attribute25
526       ,p_eet_attribute26                =>  p_eet_attribute26
527       ,p_eet_attribute27                =>  p_eet_attribute27
528       ,p_eet_attribute28                =>  p_eet_attribute28
529       ,p_eet_attribute29                =>  p_eet_attribute29
530       ,p_eet_attribute30                =>  p_eet_attribute30
531       ,p_object_version_number          =>  l_object_version_number
532       ,p_effective_date                     => trunc(p_effective_date)
533       ,p_datetrack_mode                     => p_datetrack_mode
534       );
535   exception
536     when hr_api.cannot_find_prog_unit then
537       hr_api.cannot_find_prog_unit_error
538         (p_module_name => 'UPDATE_ELIG_ENRLD_ANTHR_PTIP'
539         ,p_hook_type   => 'AP'
540         );
541     --
542     -- End of API User Hook for the after hook of update_ELIG_ENRLD_ANTHR_PTIP
543     --
544   end;
545   --
546   hr_utility.set_location(l_proc, 60);
547   --
548   -- When in validation only mode raise the Validate_Enabled exception
549   --
550   if p_validate then
551     raise hr_api.validate_enabled;
552   end if;
553   --
554   -- Set all output arguments
555   --
556   p_object_version_number := l_object_version_number;
557   p_effective_start_date := l_effective_start_date;
558   p_effective_end_date := l_effective_end_date;
559   --
560   hr_utility.set_location(' Leaving:'||l_proc, 70);
561   --
562 exception
563   --
564   when hr_api.validate_enabled then
565     --
566     -- As the Validate_Enabled exception has been raised
567     -- we must rollback to the savepoint
568     --
569     ROLLBACK TO update_ELIG_ENRLD_ANTHR_PTIP;
570     --
571     -- Only set output warning arguments
572     -- (Any key or derived arguments must be set to null
573     -- when validation only mode is being used.)
574     --
575     hr_utility.set_location(' Leaving:'||l_proc, 80);
576     --
577   when others then
578     --
579     -- A validation or unexpected error has occured
580     --
581     ROLLBACK TO update_ELIG_ENRLD_ANTHR_PTIP;
582     p_effective_start_date := null;
583     p_effective_end_date := null;
584     p_object_version_number  := l_object_version_number;
585 
586     raise;
587     --
588 end update_ELIG_ENRLD_ANTHR_PTIP;
589 -- ----------------------------------------------------------------------------
590 -- |------------------------< delete_ELIG_ENRLD_ANTHR_PTIP >----------------------|
591 -- ----------------------------------------------------------------------------
592 --
593 procedure delete_ELIG_ENRLD_ANTHR_PTIP
594   (p_validate                       in  boolean  default false
595   ,p_elig_enrld_anthr_ptip_id       in  number
596   ,p_effective_start_date           out nocopy date
597   ,p_effective_end_date             out nocopy date
598   ,p_object_version_number          in out nocopy number
599   ,p_effective_date                 in  date
600   ,p_datetrack_mode                 in  varchar2
601   ) is
602   --
603   -- Declare cursors and local variables
604   --
605   l_proc varchar2(72) := g_package||'update_ELIG_ENRLD_ANTHR_PTIP';
606   l_object_version_number ben_elig_enrld_anthr_ptip_f.object_version_number%TYPE;
607   l_effective_start_date ben_elig_enrld_anthr_ptip_f.effective_start_date%TYPE;
608   l_effective_end_date ben_elig_enrld_anthr_ptip_f.effective_end_date%TYPE;
609   --
610 begin
611   --
612   hr_utility.set_location('Entering:'|| l_proc, 10);
613   --
614   -- Issue a savepoint if operating in validation only mode
615   --
616   savepoint delete_ELIG_ENRLD_ANTHR_PTIP;
617   --
618   hr_utility.set_location(l_proc, 20);
619   --
620   -- Process Logic
621   --
622   l_object_version_number := p_object_version_number;
623   --
624   --
625   begin
626     --
627     -- Start of API User Hook for the before hook of delete_ELIG_ENRLD_ANTHR_PTIP
628     --
629     ben_ELIG_ENRLD_ANTHR_PTIP_bk3.delete_ELIG_ENRLD_ANTHR_PTIP_b
630       (
631        p_elig_enrld_anthr_ptip_id       =>  p_elig_enrld_anthr_ptip_id
632       ,p_object_version_number          =>  p_object_version_number
633     ,p_effective_date                      => trunc(p_effective_date)
634     ,p_datetrack_mode                      => p_datetrack_mode
635       );
636   exception
637     when hr_api.cannot_find_prog_unit then
638       hr_api.cannot_find_prog_unit_error
639         (p_module_name => 'DELETE_ELIG_ENRLD_ANTHR_PTIP'
640         ,p_hook_type   => 'BP'
641         );
642     --
643     -- End of API User Hook for the before hook of delete_ELIG_ENRLD_ANTHR_PTIP
644     --
645   end;
646   --
647   ben_eet_del.del
648     (
649      p_elig_enrld_anthr_ptip_id      => p_elig_enrld_anthr_ptip_id
650     ,p_effective_start_date          => l_effective_start_date
651     ,p_effective_end_date            => l_effective_end_date
652     ,p_object_version_number         => l_object_version_number
653     ,p_effective_date                => p_effective_date
654     ,p_datetrack_mode                => p_datetrack_mode
655     );
656   --
657   begin
658     --
659     -- Start of API User Hook for the after hook of delete_ELIG_ENRLD_ANTHR_PTIP
660     --
661     ben_ELIG_ENRLD_ANTHR_PTIP_bk3.delete_ELIG_ENRLD_ANTHR_PTIP_a
662       (
663        p_elig_enrld_anthr_ptip_id       =>  p_elig_enrld_anthr_ptip_id
664       ,p_effective_start_date           =>  l_effective_start_date
665       ,p_effective_end_date             =>  l_effective_end_date
666       ,p_object_version_number          =>  l_object_version_number
667     ,p_effective_date                      => trunc(p_effective_date)
668     ,p_datetrack_mode                      => p_datetrack_mode
669       );
670   exception
671     when hr_api.cannot_find_prog_unit then
672       hr_api.cannot_find_prog_unit_error
673         (p_module_name => 'DELETE_ELIG_ENRLD_ANTHR_PTIP'
674         ,p_hook_type   => 'AP'
675         );
676     --
677     -- End of API User Hook for the after hook of delete_ELIG_ENRLD_ANTHR_PTIP
678     --
679   end;
680   --
681   ben_profile_handler.event_handler
682     (p_event                       => 'DELETE',
683      p_base_table                  => 'BEN_ELIGY_PRFL_F',
684      p_base_table_column           => 'ELIGY_PRFL_ID',
685      p_base_table_column_value     => ben_eet_shd.g_old_rec.eligy_prfl_id,
686      p_base_table_reference_column => 'ELIG_ENRLD_PTIP_FLAG',
687      p_reference_table             => 'BEN_ELIG_ENRLD_ANTHR_PTIP_F',
688      p_reference_table_column      => 'ELIGY_PRFL_ID');
689   --
690   hr_utility.set_location(l_proc, 60);
691   --
692   -- When in validation only mode raise the Validate_Enabled exception
693   --
694   if p_validate then
695     raise hr_api.validate_enabled;
696   end if;
697   --
698   hr_utility.set_location(' Leaving:'||l_proc, 70);
699   --
700 exception
701   --
702   when hr_api.validate_enabled then
703     --
704     -- As the Validate_Enabled exception has been raised
705     -- we must rollback to the savepoint
706     --
707     ROLLBACK TO delete_ELIG_ENRLD_ANTHR_PTIP;
708     --
709     -- Only set output warning arguments
710     -- (Any key or derived arguments must be set to null
711     -- when validation only mode is being used.)
712     --
713     p_effective_start_date := null;
714     p_effective_end_date := null;
715     --
716   when others then
717     --
718     -- A validation or unexpected error has occured
719     --
720     ROLLBACK TO delete_ELIG_ENRLD_ANTHR_PTIP;
721     p_effective_start_date := null;
722     p_effective_end_date := null;
723     p_object_version_number  := l_object_version_number;
724     raise;
725     --
726 end delete_ELIG_ENRLD_ANTHR_PTIP;
727 --
728 -- ----------------------------------------------------------------------------
729 -- |-------------------------------< lck >------------------------------------|
730 -- ----------------------------------------------------------------------------
731 --
732 procedure lck
733   (
734    p_elig_enrld_anthr_ptip_id                   in     number
735   ,p_object_version_number          in     number
736   ,p_effective_date                 in     date
737   ,p_datetrack_mode                 in     varchar2
738   ,p_validation_start_date          out nocopy    date
739   ,p_validation_end_date            out nocopy    date
740   ) is
741   --
742   --
743   -- Declare cursors and local variables
744   --
745   l_proc varchar2(72) := g_package||'lck';
746   l_validation_start_date date;
747   l_validation_end_date date;
748   --
749 begin
750   --
751   hr_utility.set_location('Entering:'|| l_proc, 10);
752   --
753   ben_eet_shd.lck
754     (
755       p_elig_enrld_anthr_ptip_id                 => p_elig_enrld_anthr_ptip_id
756      ,p_validation_start_date      => l_validation_start_date
757      ,p_validation_end_date        => l_validation_end_date
758      ,p_object_version_number      => p_object_version_number
759      ,p_effective_date             => p_effective_date
760      ,p_datetrack_mode             => p_datetrack_mode
761     );
762   --
763   hr_utility.set_location(' Leaving:'||l_proc, 70);
764   --
765 end lck;
766 --
767 end ben_ELIG_ENRLD_ANTHR_PTIP_api;