DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ENRLD_ANTHR_PTIP_RT_API

Source


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