DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_ENRLD_ANTHR_PLIP_RT_API

Source


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