DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_OPTION_IN_PLAN_IN_PGM_API

Source


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