DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_OTHR_PTIP_RT_API

Source


1 Package Body ben_OTHR_PTIP_RT_api as
2 /* $Header: beoprapi.pkb 115.1 2002/12/13 08:30:36 bmanyam noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_OTHR_PTIP_RT_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_OTHR_PTIP_RT >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_OTHR_PTIP_RT
13   (p_validate                       in  boolean   default false
14   ,p_othr_ptip_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_ordr_num                       in  number    default null
19   ,p_only_pls_subj_cobra_flag       in  varchar2  default 'N'
20   ,p_vrbl_rt_prfl_id                  in  number    default null
21   ,p_ptip_id                        in  number    default null
22   ,p_business_group_id              in  number    default null
23   ,p_opr_attribute_category         in  varchar2  default null
24   ,p_opr_attribute1                 in  varchar2  default null
25   ,p_opr_attribute2                 in  varchar2  default null
26   ,p_opr_attribute3                 in  varchar2  default null
27   ,p_opr_attribute4                 in  varchar2  default null
28   ,p_opr_attribute5                 in  varchar2  default null
29   ,p_opr_attribute6                 in  varchar2  default null
30   ,p_opr_attribute7                 in  varchar2  default null
31   ,p_opr_attribute8                 in  varchar2  default null
32   ,p_opr_attribute9                 in  varchar2  default null
33   ,p_opr_attribute10                in  varchar2  default null
34   ,p_opr_attribute11                in  varchar2  default null
35   ,p_opr_attribute12                in  varchar2  default null
36   ,p_opr_attribute13                in  varchar2  default null
37   ,p_opr_attribute14                in  varchar2  default null
38   ,p_opr_attribute15                in  varchar2  default null
39   ,p_opr_attribute16                in  varchar2  default null
40   ,p_opr_attribute17                in  varchar2  default null
41   ,p_opr_attribute18                in  varchar2  default null
42   ,p_opr_attribute19                in  varchar2  default null
43   ,p_opr_attribute20                in  varchar2  default null
44   ,p_opr_attribute21                in  varchar2  default null
45   ,p_opr_attribute22                in  varchar2  default null
46   ,p_opr_attribute23                in  varchar2  default null
47   ,p_opr_attribute24                in  varchar2  default null
48   ,p_opr_attribute25                in  varchar2  default null
49   ,p_opr_attribute26                in  varchar2  default null
50   ,p_opr_attribute27                in  varchar2  default null
51   ,p_opr_attribute28                in  varchar2  default null
52   ,p_opr_attribute29                in  varchar2  default null
53   ,p_opr_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_othr_ptip_rt_id ben_othr_ptip_rt_f.othr_ptip_rt_id%TYPE;
61   l_effective_start_date ben_othr_ptip_rt_f.effective_start_date%TYPE;
62   l_effective_end_date ben_othr_ptip_rt_f.effective_end_date%TYPE;
63   l_proc varchar2(72) := g_package||'create_OTHR_PTIP_RT';
64   l_object_version_number ben_othr_ptip_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_OTHR_PTIP_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_OTHR_PTIP_RT
81     --
82     ben_OTHR_PTIP_RT_bk1.create_OTHR_PTIP_RT_b
83       (
84        p_excld_flag                     =>  p_excld_flag
85       ,p_ordr_num                       =>  p_ordr_num
86       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
87       ,p_vrbl_rt_prfl_id                  =>  p_vrbl_rt_prfl_id
88       ,p_ptip_id                        =>  p_ptip_id
89       ,p_business_group_id              =>  p_business_group_id
90       ,p_opr_attribute_category         =>  p_opr_attribute_category
91       ,p_opr_attribute1                 =>  p_opr_attribute1
92       ,p_opr_attribute2                 =>  p_opr_attribute2
93       ,p_opr_attribute3                 =>  p_opr_attribute3
94       ,p_opr_attribute4                 =>  p_opr_attribute4
95       ,p_opr_attribute5                 =>  p_opr_attribute5
96       ,p_opr_attribute6                 =>  p_opr_attribute6
97       ,p_opr_attribute7                 =>  p_opr_attribute7
98       ,p_opr_attribute8                 =>  p_opr_attribute8
99       ,p_opr_attribute9                 =>  p_opr_attribute9
100       ,p_opr_attribute10                =>  p_opr_attribute10
101       ,p_opr_attribute11                =>  p_opr_attribute11
102       ,p_opr_attribute12                =>  p_opr_attribute12
103       ,p_opr_attribute13                =>  p_opr_attribute13
104       ,p_opr_attribute14                =>  p_opr_attribute14
105       ,p_opr_attribute15                =>  p_opr_attribute15
106       ,p_opr_attribute16                =>  p_opr_attribute16
107       ,p_opr_attribute17                =>  p_opr_attribute17
108       ,p_opr_attribute18                =>  p_opr_attribute18
109       ,p_opr_attribute19                =>  p_opr_attribute19
110       ,p_opr_attribute20                =>  p_opr_attribute20
111       ,p_opr_attribute21                =>  p_opr_attribute21
112       ,p_opr_attribute22                =>  p_opr_attribute22
113       ,p_opr_attribute23                =>  p_opr_attribute23
114       ,p_opr_attribute24                =>  p_opr_attribute24
115       ,p_opr_attribute25                =>  p_opr_attribute25
116       ,p_opr_attribute26                =>  p_opr_attribute26
117       ,p_opr_attribute27                =>  p_opr_attribute27
118       ,p_opr_attribute28                =>  p_opr_attribute28
119       ,p_opr_attribute29                =>  p_opr_attribute29
120       ,p_opr_attribute30                =>  p_opr_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_OTHR_PTIP_RT'
128         ,p_hook_type   => 'BP'
129         );
130     --
131     -- End of API User Hook for the before hook of create_OTHR_PTIP_RT
132     --
133   end;
134   --
135   ben_opr_ins.ins
136     (
137      p_othr_ptip_rt_id        => l_othr_ptip_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_ordr_num                      => p_ordr_num
142     ,p_only_pls_subj_cobra_flag      => p_only_pls_subj_cobra_flag
143     ,p_vrbl_rt_prfl_id                 => p_vrbl_rt_prfl_id
144     ,p_ptip_id                       => p_ptip_id
145     ,p_business_group_id             => p_business_group_id
146     ,p_opr_attribute_category        => p_opr_attribute_category
147     ,p_opr_attribute1                => p_opr_attribute1
148     ,p_opr_attribute2                => p_opr_attribute2
149     ,p_opr_attribute3                => p_opr_attribute3
150     ,p_opr_attribute4                => p_opr_attribute4
151     ,p_opr_attribute5                => p_opr_attribute5
152     ,p_opr_attribute6                => p_opr_attribute6
153     ,p_opr_attribute7                => p_opr_attribute7
154     ,p_opr_attribute8                => p_opr_attribute8
155     ,p_opr_attribute9                => p_opr_attribute9
156     ,p_opr_attribute10               => p_opr_attribute10
157     ,p_opr_attribute11               => p_opr_attribute11
158     ,p_opr_attribute12               => p_opr_attribute12
159     ,p_opr_attribute13               => p_opr_attribute13
160     ,p_opr_attribute14               => p_opr_attribute14
161     ,p_opr_attribute15               => p_opr_attribute15
162     ,p_opr_attribute16               => p_opr_attribute16
163     ,p_opr_attribute17               => p_opr_attribute17
164     ,p_opr_attribute18               => p_opr_attribute18
165     ,p_opr_attribute19               => p_opr_attribute19
166     ,p_opr_attribute20               => p_opr_attribute20
167     ,p_opr_attribute21               => p_opr_attribute21
168     ,p_opr_attribute22               => p_opr_attribute22
169     ,p_opr_attribute23               => p_opr_attribute23
170     ,p_opr_attribute24               => p_opr_attribute24
171     ,p_opr_attribute25               => p_opr_attribute25
172     ,p_opr_attribute26               => p_opr_attribute26
173     ,p_opr_attribute27               => p_opr_attribute27
174     ,p_opr_attribute28               => p_opr_attribute28
175     ,p_opr_attribute29               => p_opr_attribute29
176     ,p_opr_attribute30               => p_opr_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_OTHR_PTIP_RT
184     --
185     ben_OTHR_PTIP_RT_bk1.create_OTHR_PTIP_RT_a
186       (
187        p_othr_ptip_rt_id         =>  l_othr_ptip_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_ordr_num                       =>  p_ordr_num
192       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
193       ,p_vrbl_rt_prfl_id                  =>  p_vrbl_rt_prfl_id
194       ,p_ptip_id                        =>  p_ptip_id
195       ,p_business_group_id              =>  p_business_group_id
196       ,p_opr_attribute_category         =>  p_opr_attribute_category
197       ,p_opr_attribute1                 =>  p_opr_attribute1
198       ,p_opr_attribute2                 =>  p_opr_attribute2
199       ,p_opr_attribute3                 =>  p_opr_attribute3
200       ,p_opr_attribute4                 =>  p_opr_attribute4
201       ,p_opr_attribute5                 =>  p_opr_attribute5
202       ,p_opr_attribute6                 =>  p_opr_attribute6
203       ,p_opr_attribute7                 =>  p_opr_attribute7
204       ,p_opr_attribute8                 =>  p_opr_attribute8
205       ,p_opr_attribute9                 =>  p_opr_attribute9
206       ,p_opr_attribute10                =>  p_opr_attribute10
207       ,p_opr_attribute11                =>  p_opr_attribute11
208       ,p_opr_attribute12                =>  p_opr_attribute12
209       ,p_opr_attribute13                =>  p_opr_attribute13
210       ,p_opr_attribute14                =>  p_opr_attribute14
211       ,p_opr_attribute15                =>  p_opr_attribute15
212       ,p_opr_attribute16                =>  p_opr_attribute16
213       ,p_opr_attribute17                =>  p_opr_attribute17
214       ,p_opr_attribute18                =>  p_opr_attribute18
215       ,p_opr_attribute19                =>  p_opr_attribute19
216       ,p_opr_attribute20                =>  p_opr_attribute20
217       ,p_opr_attribute21                =>  p_opr_attribute21
218       ,p_opr_attribute22                =>  p_opr_attribute22
219       ,p_opr_attribute23                =>  p_opr_attribute23
220       ,p_opr_attribute24                =>  p_opr_attribute24
221       ,p_opr_attribute25                =>  p_opr_attribute25
222       ,p_opr_attribute26                =>  p_opr_attribute26
223       ,p_opr_attribute27                =>  p_opr_attribute27
224       ,p_opr_attribute28                =>  p_opr_attribute28
225       ,p_opr_attribute29                =>  p_opr_attribute29
226       ,p_opr_attribute30                =>  p_opr_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_OTHR_PTIP_RT'
234         ,p_hook_type   => 'AP'
235         );
236     --
237     -- End of API User Hook for the after hook of create_OTHR_PTIP_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_OTHR_PTIP_FLAG',
247      p_reference_table             => 'BEN_OTHR_PTIP_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_othr_ptip_rt_id := l_othr_ptip_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_OTHR_PTIP_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_othr_ptip_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_OTHR_PTIP_RT;
291 	-- NOCOPY Changes
292     p_othr_ptip_rt_id := null;
293     p_effective_start_date := null;
294     p_effective_end_date := null;
295     p_object_version_number  := null;
296     -- NOCOPY Changes
297 
298     raise;
299     --
300 end create_OTHR_PTIP_RT;
301 -- ----------------------------------------------------------------------------
302 -- |------------------------< update_OTHR_PTIP_RT >--- ------------------|
303 -- ----------------------------------------------------------------------------
304 --
305 procedure update_OTHR_PTIP_RT
306   (p_validate                       in  boolean   default false
307   ,p_othr_ptip_rt_id         in  number
308   ,p_effective_start_date           out nocopy date
309   ,p_effective_end_date             out nocopy date
310   ,p_excld_flag                     in  varchar2  default hr_api.g_varchar2
311   ,p_ordr_num                       in  number    default hr_api.g_number
312   ,p_only_pls_subj_cobra_flag       in  varchar2  default hr_api.g_varchar2
313   ,p_vrbl_rt_prfl_id                  in  number    default hr_api.g_number
314   ,p_ptip_id                        in  number    default hr_api.g_number
315   ,p_business_group_id              in  number    default hr_api.g_number
316   ,p_opr_attribute_category         in  varchar2  default hr_api.g_varchar2
317   ,p_opr_attribute1                 in  varchar2  default hr_api.g_varchar2
318   ,p_opr_attribute2                 in  varchar2  default hr_api.g_varchar2
319   ,p_opr_attribute3                 in  varchar2  default hr_api.g_varchar2
320   ,p_opr_attribute4                 in  varchar2  default hr_api.g_varchar2
321   ,p_opr_attribute5                 in  varchar2  default hr_api.g_varchar2
322   ,p_opr_attribute6                 in  varchar2  default hr_api.g_varchar2
323   ,p_opr_attribute7                 in  varchar2  default hr_api.g_varchar2
324   ,p_opr_attribute8                 in  varchar2  default hr_api.g_varchar2
325   ,p_opr_attribute9                 in  varchar2  default hr_api.g_varchar2
326   ,p_opr_attribute10                in  varchar2  default hr_api.g_varchar2
327   ,p_opr_attribute11                in  varchar2  default hr_api.g_varchar2
328   ,p_opr_attribute12                in  varchar2  default hr_api.g_varchar2
329   ,p_opr_attribute13                in  varchar2  default hr_api.g_varchar2
330   ,p_opr_attribute14                in  varchar2  default hr_api.g_varchar2
331   ,p_opr_attribute15                in  varchar2  default hr_api.g_varchar2
332   ,p_opr_attribute16                in  varchar2  default hr_api.g_varchar2
333   ,p_opr_attribute17                in  varchar2  default hr_api.g_varchar2
334   ,p_opr_attribute18                in  varchar2  default hr_api.g_varchar2
335   ,p_opr_attribute19                in  varchar2  default hr_api.g_varchar2
336   ,p_opr_attribute20                in  varchar2  default hr_api.g_varchar2
337   ,p_opr_attribute21                in  varchar2  default hr_api.g_varchar2
338   ,p_opr_attribute22                in  varchar2  default hr_api.g_varchar2
339   ,p_opr_attribute23                in  varchar2  default hr_api.g_varchar2
340   ,p_opr_attribute24                in  varchar2  default hr_api.g_varchar2
341   ,p_opr_attribute25                in  varchar2  default hr_api.g_varchar2
342   ,p_opr_attribute26                in  varchar2  default hr_api.g_varchar2
343   ,p_opr_attribute27                in  varchar2  default hr_api.g_varchar2
344   ,p_opr_attribute28                in  varchar2  default hr_api.g_varchar2
345   ,p_opr_attribute29                in  varchar2  default hr_api.g_varchar2
346   ,p_opr_attribute30                in  varchar2  default hr_api.g_varchar2
347   ,p_object_version_number          in out nocopy number
348   ,p_effective_date                 in  date
349   ,p_datetrack_mode                 in  varchar2
350   ) is
351   --
352   -- Declare cursors and local variables
353   --
354   l_proc varchar2(72) := g_package||'update_OTHR_PTIP_RT';
355   l_object_version_number ben_othr_ptip_rt_f.object_version_number%TYPE;
356   l_effective_start_date ben_othr_ptip_rt_f.effective_start_date%TYPE;
357   l_effective_end_date ben_othr_ptip_rt_f.effective_end_date%TYPE;
358   --
359 begin
360   --
361   hr_utility.set_location('Entering:'|| l_proc, 10);
362   --
363   -- Issue a savepoint if operating in validation only mode
364   --
365   savepoint update_OTHR_PTIP_RT;
366   --
367   hr_utility.set_location(l_proc, 20);
368   --
369   -- Process Logic
370   --
371   l_object_version_number := p_object_version_number;
372   --
373   begin
374     --
375     -- Start of API User Hook for the before hook of update_OTHR_PTIP_RT
376     --
377     ben_OTHR_PTIP_RT_bk2.update_OTHR_PTIP_RT_b
378       (
379        p_othr_ptip_rt_id         =>  p_othr_ptip_rt_id
380       ,p_excld_flag                     =>  p_excld_flag
381       ,p_ordr_num                       =>  p_ordr_num
382       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
383       ,p_vrbl_rt_prfl_id                  =>  p_vrbl_rt_prfl_id
384       ,p_ptip_id                        =>  p_ptip_id
385       ,p_business_group_id              =>  p_business_group_id
386       ,p_opr_attribute_category         =>  p_opr_attribute_category
387       ,p_opr_attribute1                 =>  p_opr_attribute1
388       ,p_opr_attribute2                 =>  p_opr_attribute2
389       ,p_opr_attribute3                 =>  p_opr_attribute3
390       ,p_opr_attribute4                 =>  p_opr_attribute4
391       ,p_opr_attribute5                 =>  p_opr_attribute5
392       ,p_opr_attribute6                 =>  p_opr_attribute6
393       ,p_opr_attribute7                 =>  p_opr_attribute7
394       ,p_opr_attribute8                 =>  p_opr_attribute8
395       ,p_opr_attribute9                 =>  p_opr_attribute9
396       ,p_opr_attribute10                =>  p_opr_attribute10
397       ,p_opr_attribute11                =>  p_opr_attribute11
398       ,p_opr_attribute12                =>  p_opr_attribute12
399       ,p_opr_attribute13                =>  p_opr_attribute13
400       ,p_opr_attribute14                =>  p_opr_attribute14
401       ,p_opr_attribute15                =>  p_opr_attribute15
402       ,p_opr_attribute16                =>  p_opr_attribute16
403       ,p_opr_attribute17                =>  p_opr_attribute17
404       ,p_opr_attribute18                =>  p_opr_attribute18
405       ,p_opr_attribute19                =>  p_opr_attribute19
406       ,p_opr_attribute20                =>  p_opr_attribute20
407       ,p_opr_attribute21                =>  p_opr_attribute21
408       ,p_opr_attribute22                =>  p_opr_attribute22
409       ,p_opr_attribute23                =>  p_opr_attribute23
410       ,p_opr_attribute24                =>  p_opr_attribute24
411       ,p_opr_attribute25                =>  p_opr_attribute25
412       ,p_opr_attribute26                =>  p_opr_attribute26
413       ,p_opr_attribute27                =>  p_opr_attribute27
414       ,p_opr_attribute28                =>  p_opr_attribute28
415       ,p_opr_attribute29                =>  p_opr_attribute29
416       ,p_opr_attribute30                =>  p_opr_attribute30
417       ,p_object_version_number          =>  p_object_version_number
418     ,p_effective_date                      => trunc(p_effective_date)
419     ,p_datetrack_mode                      => p_datetrack_mode
420       );
421   exception
422     when hr_api.cannot_find_prog_unit then
423       hr_api.cannot_find_prog_unit_error
424         (p_module_name => 'UPDATE_OTHR_PTIP_RT'
425         ,p_hook_type   => 'BP'
426         );
427     --
428     -- End of API User Hook for the before hook of update_OTHR_PTIP_RT
429     --
430   end;
431   --
432   ben_opr_upd.upd
433     (
434      p_othr_ptip_rt_id        => p_othr_ptip_rt_id
435     ,p_effective_start_date          => l_effective_start_date
436     ,p_effective_end_date            => l_effective_end_date
437     ,p_excld_flag                    => p_excld_flag
438     ,p_ordr_num                      => p_ordr_num
439     ,p_only_pls_subj_cobra_flag      => p_only_pls_subj_cobra_flag
440     ,p_vrbl_rt_prfl_id                 => p_vrbl_rt_prfl_id
441     ,p_ptip_id                       => p_ptip_id
442     ,p_business_group_id             => p_business_group_id
443     ,p_opr_attribute_category        => p_opr_attribute_category
444     ,p_opr_attribute1                => p_opr_attribute1
445     ,p_opr_attribute2                => p_opr_attribute2
446     ,p_opr_attribute3                => p_opr_attribute3
447     ,p_opr_attribute4                => p_opr_attribute4
448     ,p_opr_attribute5                => p_opr_attribute5
449     ,p_opr_attribute6                => p_opr_attribute6
450     ,p_opr_attribute7                => p_opr_attribute7
451     ,p_opr_attribute8                => p_opr_attribute8
452     ,p_opr_attribute9                => p_opr_attribute9
453     ,p_opr_attribute10               => p_opr_attribute10
454     ,p_opr_attribute11               => p_opr_attribute11
455     ,p_opr_attribute12               => p_opr_attribute12
456     ,p_opr_attribute13               => p_opr_attribute13
457     ,p_opr_attribute14               => p_opr_attribute14
458     ,p_opr_attribute15               => p_opr_attribute15
459     ,p_opr_attribute16               => p_opr_attribute16
460     ,p_opr_attribute17               => p_opr_attribute17
461     ,p_opr_attribute18               => p_opr_attribute18
462     ,p_opr_attribute19               => p_opr_attribute19
463     ,p_opr_attribute20               => p_opr_attribute20
464     ,p_opr_attribute21               => p_opr_attribute21
465     ,p_opr_attribute22               => p_opr_attribute22
466     ,p_opr_attribute23               => p_opr_attribute23
467     ,p_opr_attribute24               => p_opr_attribute24
468     ,p_opr_attribute25               => p_opr_attribute25
469     ,p_opr_attribute26               => p_opr_attribute26
470     ,p_opr_attribute27               => p_opr_attribute27
471     ,p_opr_attribute28               => p_opr_attribute28
472     ,p_opr_attribute29               => p_opr_attribute29
473     ,p_opr_attribute30               => p_opr_attribute30
474     ,p_object_version_number         => l_object_version_number
475     ,p_effective_date                => trunc(p_effective_date)
476     ,p_datetrack_mode                => p_datetrack_mode
477     );
478   --
479   begin
480     --
481     -- Start of API User Hook for the after hook of update_OTHR_PTIP_RT
482     --
483     ben_OTHR_PTIP_RT_bk2.update_OTHR_PTIP_RT_a
484       (
485        p_othr_ptip_rt_id         =>  p_othr_ptip_rt_id
486       ,p_effective_start_date           =>  l_effective_start_date
487       ,p_effective_end_date             =>  l_effective_end_date
488       ,p_excld_flag                     =>  p_excld_flag
489       ,p_ordr_num                       =>  p_ordr_num
490       ,p_only_pls_subj_cobra_flag       =>  p_only_pls_subj_cobra_flag
491       ,p_vrbl_rt_prfl_id                  =>  p_vrbl_rt_prfl_id
492       ,p_ptip_id                        =>  p_ptip_id
493       ,p_business_group_id              =>  p_business_group_id
494       ,p_opr_attribute_category         =>  p_opr_attribute_category
495       ,p_opr_attribute1                 =>  p_opr_attribute1
496       ,p_opr_attribute2                 =>  p_opr_attribute2
497       ,p_opr_attribute3                 =>  p_opr_attribute3
498       ,p_opr_attribute4                 =>  p_opr_attribute4
499       ,p_opr_attribute5                 =>  p_opr_attribute5
500       ,p_opr_attribute6                 =>  p_opr_attribute6
501       ,p_opr_attribute7                 =>  p_opr_attribute7
502       ,p_opr_attribute8                 =>  p_opr_attribute8
503       ,p_opr_attribute9                 =>  p_opr_attribute9
504       ,p_opr_attribute10                =>  p_opr_attribute10
505       ,p_opr_attribute11                =>  p_opr_attribute11
506       ,p_opr_attribute12                =>  p_opr_attribute12
507       ,p_opr_attribute13                =>  p_opr_attribute13
508       ,p_opr_attribute14                =>  p_opr_attribute14
509       ,p_opr_attribute15                =>  p_opr_attribute15
510       ,p_opr_attribute16                =>  p_opr_attribute16
511       ,p_opr_attribute17                =>  p_opr_attribute17
512       ,p_opr_attribute18                =>  p_opr_attribute18
513       ,p_opr_attribute19                =>  p_opr_attribute19
514       ,p_opr_attribute20                =>  p_opr_attribute20
515       ,p_opr_attribute21                =>  p_opr_attribute21
516       ,p_opr_attribute22                =>  p_opr_attribute22
517       ,p_opr_attribute23                =>  p_opr_attribute23
518       ,p_opr_attribute24                =>  p_opr_attribute24
519       ,p_opr_attribute25                =>  p_opr_attribute25
520       ,p_opr_attribute26                =>  p_opr_attribute26
521       ,p_opr_attribute27                =>  p_opr_attribute27
522       ,p_opr_attribute28                =>  p_opr_attribute28
523       ,p_opr_attribute29                =>  p_opr_attribute29
524       ,p_opr_attribute30                =>  p_opr_attribute30
525       ,p_object_version_number          =>  l_object_version_number
526       ,p_effective_date                     => trunc(p_effective_date)
527       ,p_datetrack_mode                     => p_datetrack_mode
528       );
529   exception
530     when hr_api.cannot_find_prog_unit then
531       hr_api.cannot_find_prog_unit_error
532         (p_module_name => 'UPDATE_OTHR_PTIP_RT'
533         ,p_hook_type   => 'AP'
534         );
535     --
536     -- End of API User Hook for the after hook of update_OTHR_PTIP_RT
537     --
538   end;
539   --
540   hr_utility.set_location(l_proc, 60);
541   --
542   -- When in validation only mode raise the Validate_Enabled exception
543   --
544   if p_validate then
545     raise hr_api.validate_enabled;
546   end if;
547   --
548   -- Set all output arguments
549   --
550   p_object_version_number := l_object_version_number;
551   p_effective_start_date := l_effective_start_date;
552   p_effective_end_date := l_effective_end_date;
553   --
554   hr_utility.set_location(' Leaving:'||l_proc, 70);
555   --
556 exception
557   --
558   when hr_api.validate_enabled then
559     --
560     -- As the Validate_Enabled exception has been raised
561     -- we must rollback to the savepoint
562     --
563     ROLLBACK TO update_OTHR_PTIP_RT;
564     --
565 	-- NOCOPY Changes
566     p_effective_start_date := null;
567     p_effective_end_date := null;
568     -- NOCOPY Changes
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     hr_utility.set_location(' Leaving:'||l_proc, 80);
575     --
576   when others then
577     --
578     -- A validation or unexpected error has occured
579     --
580     ROLLBACK TO update_OTHR_PTIP_RT;
581 	-- NOCOPY Changes
582     p_effective_start_date := null;
583     p_effective_end_date := null;
584     -- NOCOPY Changes
585 
586     raise;
587     --
588 end update_OTHR_PTIP_RT;
589 -- ----------------------------------------------------------------------------
590 -- |------------------------< delete_OTHR_PTIP_RT >----------------------|
591 -- ----------------------------------------------------------------------------
592 --
593 procedure delete_OTHR_PTIP_RT
594   (p_validate                       in  boolean  default false
595   ,p_othr_ptip_rt_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_OTHR_PTIP_RT';
606   l_object_version_number ben_othr_ptip_rt_f.object_version_number%TYPE;
607   l_effective_start_date ben_othr_ptip_rt_f.effective_start_date%TYPE;
608   l_effective_end_date ben_othr_ptip_rt_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_OTHR_PTIP_RT;
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_OTHR_PTIP_RT
628     --
629     ben_OTHR_PTIP_RT_bk3.delete_OTHR_PTIP_RT_b
630       (
631        p_othr_ptip_rt_id         =>  p_othr_ptip_rt_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_OTHR_PTIP_RT'
640         ,p_hook_type   => 'BP'
641         );
642     --
643     -- End of API User Hook for the before hook of delete_OTHR_PTIP_RT
644     --
645   end;
646   --
647   ben_opr_del.del
648     (
649      p_othr_ptip_rt_id        => p_othr_ptip_rt_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_OTHR_PTIP_RT
660     --
661     ben_OTHR_PTIP_RT_bk3.delete_OTHR_PTIP_RT_a
662       (
663        p_othr_ptip_rt_id         =>  p_othr_ptip_rt_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_OTHR_PTIP_RT'
674         ,p_hook_type   => 'AP'
675         );
676     --
677     -- End of API User Hook for the after hook of delete_OTHR_PTIP_RT
678     --
679   end;
680   --
681   ben_profile_handler.event_handler
682     (p_event                       => 'DELETE',
683      p_base_table                  => 'BEN_VRBL_RT_PRFL_F',
684      p_base_table_column           => 'VRBL_RT_PRFL_ID',
685      p_base_table_column_value     => ben_opr_shd.g_old_rec.vrbl_rt_prfl_id,
686      p_base_table_reference_column => 'RT_OTHR_PTIP_FLAG',
687      p_reference_table             => 'BEN_OTHR_PTIP_RT_F',
688      p_reference_table_column      => 'VRBL_RT_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_OTHR_PTIP_RT;
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_OTHR_PTIP_RT;
721 	-- NOCOPY Changes
722     p_effective_start_date := null;
723     p_effective_end_date := null;
724     -- NOCOPY Changes
725 
726     raise;
727     --
728 end delete_OTHR_PTIP_RT;
729 --
730 -- ----------------------------------------------------------------------------
731 -- |-------------------------------< lck >------------------------------------|
732 -- ----------------------------------------------------------------------------
733 --
734 procedure lck
735   (
736    p_othr_ptip_rt_id                   in     number
737   ,p_object_version_number          in     number
738   ,p_effective_date                 in     date
739   ,p_datetrack_mode                 in     varchar2
740   ,p_validation_start_date          out nocopy    date
741   ,p_validation_end_date            out nocopy    date
742   ) is
743   --
744   --
745   -- Declare cursors and local variables
746   --
747   l_proc varchar2(72) := g_package||'lck';
748   l_validation_start_date date;
749   l_validation_end_date date;
750   --
751 begin
752   --
753   hr_utility.set_location('Entering:'|| l_proc, 10);
754   --
755   ben_opr_shd.lck
756     (
757       p_othr_ptip_rt_id                 => p_othr_ptip_rt_id
758      ,p_validation_start_date      => l_validation_start_date
759      ,p_validation_end_date        => l_validation_end_date
760      ,p_object_version_number      => p_object_version_number
761      ,p_effective_date             => p_effective_date
762      ,p_datetrack_mode             => p_datetrack_mode
763     );
764   --
765   hr_utility.set_location(' Leaving:'||l_proc, 70);
766   --
767 end lck;
768 --
769 end ben_OTHR_PTIP_RT_api;