DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_VRBL_RT_PRFL_RULE_API

Source


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