DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PAYROLL_RATE_API

Source


1 Package Body ben_PAYROLL_RATE_api as
2 /* $Header: bepyrapi.pkb 115.3 2002/12/13 08:31:34 bmanyam ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_PAYROLL_RATE_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_PAYROLL_RATE >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_PAYROLL_RATE
13   (p_validate                       in  boolean   default false
14   ,p_pyrl_rt_id                     out nocopy number
15   ,p_effective_start_date           out nocopy date
16   ,p_effective_end_date             out nocopy date
17   ,p_vrbl_rt_prfl_id                in  number    default null
18   ,p_payroll_id                     in  number    default null
19   ,p_ordr_num                       in  number    default null
20   ,p_excld_flag                     in  varchar2  default null
21   ,p_business_group_id              in  number    default null
22   ,p_pr_attribute_category          in  varchar2  default null
23   ,p_pr_attribute1                  in  varchar2  default null
24   ,p_pr_attribute2                  in  varchar2  default null
25   ,p_pr_attribute3                  in  varchar2  default null
26   ,p_pr_attribute4                  in  varchar2  default null
27   ,p_pr_attribute5                  in  varchar2  default null
28   ,p_pr_attribute6                  in  varchar2  default null
29   ,p_pr_attribute7                  in  varchar2  default null
30   ,p_pr_attribute8                  in  varchar2  default null
31   ,p_pr_attribute9                  in  varchar2  default null
32   ,p_pr_attribute10                 in  varchar2  default null
33   ,p_pr_attribute11                 in  varchar2  default null
34   ,p_pr_attribute12                 in  varchar2  default null
35   ,p_pr_attribute13                 in  varchar2  default null
36   ,p_pr_attribute14                 in  varchar2  default null
37   ,p_pr_attribute15                 in  varchar2  default null
38   ,p_pr_attribute16                 in  varchar2  default null
39   ,p_pr_attribute17                 in  varchar2  default null
40   ,p_pr_attribute18                 in  varchar2  default null
41   ,p_pr_attribute19                 in  varchar2  default null
42   ,p_pr_attribute20                 in  varchar2  default null
43   ,p_pr_attribute21                 in  varchar2  default null
44   ,p_pr_attribute22                 in  varchar2  default null
45   ,p_pr_attribute23                 in  varchar2  default null
46   ,p_pr_attribute24                 in  varchar2  default null
47   ,p_pr_attribute25                 in  varchar2  default null
48   ,p_pr_attribute26                 in  varchar2  default null
49   ,p_pr_attribute27                 in  varchar2  default null
50   ,p_pr_attribute28                 in  varchar2  default null
51   ,p_pr_attribute29                 in  varchar2  default null
52   ,p_pr_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_pyrl_rt_id ben_pyrl_rt_f.pyrl_rt_id%TYPE;
60   l_effective_start_date ben_pyrl_rt_f.effective_start_date%TYPE;
61   l_effective_end_date ben_pyrl_rt_f.effective_end_date%TYPE;
62   l_proc varchar2(72) := g_package||'create_PAYROLL_RATE';
63   l_object_version_number ben_pyrl_rt_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_PAYROLL_RATE;
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_PAYROLL_RATE
80     --
81     ben_PAYROLL_RATE_bk1.create_PAYROLL_RATE_b
82       (
83        p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
84       ,p_payroll_id                     =>  p_payroll_id
85       ,p_ordr_num                       =>  p_ordr_num
86       ,p_excld_flag                     =>  p_excld_flag
87       ,p_business_group_id              =>  p_business_group_id
88       ,p_pr_attribute_category          =>  p_pr_attribute_category
89       ,p_pr_attribute1                  =>  p_pr_attribute1
90       ,p_pr_attribute2                  =>  p_pr_attribute2
91       ,p_pr_attribute3                  =>  p_pr_attribute3
92       ,p_pr_attribute4                  =>  p_pr_attribute4
93       ,p_pr_attribute5                  =>  p_pr_attribute5
94       ,p_pr_attribute6                  =>  p_pr_attribute6
95       ,p_pr_attribute7                  =>  p_pr_attribute7
96       ,p_pr_attribute8                  =>  p_pr_attribute8
97       ,p_pr_attribute9                  =>  p_pr_attribute9
98       ,p_pr_attribute10                 =>  p_pr_attribute10
99       ,p_pr_attribute11                 =>  p_pr_attribute11
100       ,p_pr_attribute12                 =>  p_pr_attribute12
101       ,p_pr_attribute13                 =>  p_pr_attribute13
102       ,p_pr_attribute14                 =>  p_pr_attribute14
103       ,p_pr_attribute15                 =>  p_pr_attribute15
104       ,p_pr_attribute16                 =>  p_pr_attribute16
105       ,p_pr_attribute17                 =>  p_pr_attribute17
106       ,p_pr_attribute18                 =>  p_pr_attribute18
107       ,p_pr_attribute19                 =>  p_pr_attribute19
108       ,p_pr_attribute20                 =>  p_pr_attribute20
109       ,p_pr_attribute21                 =>  p_pr_attribute21
110       ,p_pr_attribute22                 =>  p_pr_attribute22
111       ,p_pr_attribute23                 =>  p_pr_attribute23
112       ,p_pr_attribute24                 =>  p_pr_attribute24
113       ,p_pr_attribute25                 =>  p_pr_attribute25
114       ,p_pr_attribute26                 =>  p_pr_attribute26
115       ,p_pr_attribute27                 =>  p_pr_attribute27
116       ,p_pr_attribute28                 =>  p_pr_attribute28
117       ,p_pr_attribute29                 =>  p_pr_attribute29
118       ,p_pr_attribute30                 =>  p_pr_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_PAYROLL_RATE'
126         ,p_hook_type   => 'BP'
127         );
128     --
129     -- End of API User Hook for the before hook of create_PAYROLL_RATE
130     --
131   end;
132   --
133   ben_pyr_ins.ins
134     (
135      p_pyrl_rt_id                    => l_pyrl_rt_id
136     ,p_effective_start_date          => l_effective_start_date
137     ,p_effective_end_date            => l_effective_end_date
138     ,p_vrbl_rt_prfl_id               => p_vrbl_rt_prfl_id
139     ,p_payroll_id                    => p_payroll_id
140     ,p_ordr_num                      => p_ordr_num
141     ,p_excld_flag                    => p_excld_flag
142     ,p_business_group_id             => p_business_group_id
143     ,p_pr_attribute_category         => p_pr_attribute_category
144     ,p_pr_attribute1                 => p_pr_attribute1
145     ,p_pr_attribute2                 => p_pr_attribute2
146     ,p_pr_attribute3                 => p_pr_attribute3
147     ,p_pr_attribute4                 => p_pr_attribute4
148     ,p_pr_attribute5                 => p_pr_attribute5
149     ,p_pr_attribute6                 => p_pr_attribute6
150     ,p_pr_attribute7                 => p_pr_attribute7
151     ,p_pr_attribute8                 => p_pr_attribute8
152     ,p_pr_attribute9                 => p_pr_attribute9
153     ,p_pr_attribute10                => p_pr_attribute10
154     ,p_pr_attribute11                => p_pr_attribute11
155     ,p_pr_attribute12                => p_pr_attribute12
156     ,p_pr_attribute13                => p_pr_attribute13
157     ,p_pr_attribute14                => p_pr_attribute14
158     ,p_pr_attribute15                => p_pr_attribute15
159     ,p_pr_attribute16                => p_pr_attribute16
160     ,p_pr_attribute17                => p_pr_attribute17
161     ,p_pr_attribute18                => p_pr_attribute18
162     ,p_pr_attribute19                => p_pr_attribute19
163     ,p_pr_attribute20                => p_pr_attribute20
164     ,p_pr_attribute21                => p_pr_attribute21
165     ,p_pr_attribute22                => p_pr_attribute22
166     ,p_pr_attribute23                => p_pr_attribute23
167     ,p_pr_attribute24                => p_pr_attribute24
168     ,p_pr_attribute25                => p_pr_attribute25
169     ,p_pr_attribute26                => p_pr_attribute26
170     ,p_pr_attribute27                => p_pr_attribute27
171     ,p_pr_attribute28                => p_pr_attribute28
172     ,p_pr_attribute29                => p_pr_attribute29
173     ,p_pr_attribute30                => p_pr_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_PAYROLL_RATE
181     --
182     ben_PAYROLL_RATE_bk1.create_PAYROLL_RATE_a
183       (
184        p_pyrl_rt_id                     =>  l_pyrl_rt_id
185       ,p_effective_start_date           =>  l_effective_start_date
186       ,p_effective_end_date             =>  l_effective_end_date
187       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
188       ,p_payroll_id                     =>  p_payroll_id
189       ,p_ordr_num                       =>  p_ordr_num
190       ,p_excld_flag                     =>  p_excld_flag
191       ,p_business_group_id              =>  p_business_group_id
192       ,p_pr_attribute_category          =>  p_pr_attribute_category
193       ,p_pr_attribute1                  =>  p_pr_attribute1
194       ,p_pr_attribute2                  =>  p_pr_attribute2
195       ,p_pr_attribute3                  =>  p_pr_attribute3
196       ,p_pr_attribute4                  =>  p_pr_attribute4
197       ,p_pr_attribute5                  =>  p_pr_attribute5
198       ,p_pr_attribute6                  =>  p_pr_attribute6
199       ,p_pr_attribute7                  =>  p_pr_attribute7
200       ,p_pr_attribute8                  =>  p_pr_attribute8
201       ,p_pr_attribute9                  =>  p_pr_attribute9
202       ,p_pr_attribute10                 =>  p_pr_attribute10
203       ,p_pr_attribute11                 =>  p_pr_attribute11
204       ,p_pr_attribute12                 =>  p_pr_attribute12
205       ,p_pr_attribute13                 =>  p_pr_attribute13
206       ,p_pr_attribute14                 =>  p_pr_attribute14
207       ,p_pr_attribute15                 =>  p_pr_attribute15
208       ,p_pr_attribute16                 =>  p_pr_attribute16
209       ,p_pr_attribute17                 =>  p_pr_attribute17
210       ,p_pr_attribute18                 =>  p_pr_attribute18
211       ,p_pr_attribute19                 =>  p_pr_attribute19
212       ,p_pr_attribute20                 =>  p_pr_attribute20
213       ,p_pr_attribute21                 =>  p_pr_attribute21
214       ,p_pr_attribute22                 =>  p_pr_attribute22
215       ,p_pr_attribute23                 =>  p_pr_attribute23
216       ,p_pr_attribute24                 =>  p_pr_attribute24
217       ,p_pr_attribute25                 =>  p_pr_attribute25
218       ,p_pr_attribute26                 =>  p_pr_attribute26
219       ,p_pr_attribute27                 =>  p_pr_attribute27
220       ,p_pr_attribute28                 =>  p_pr_attribute28
221       ,p_pr_attribute29                 =>  p_pr_attribute29
222       ,p_pr_attribute30                 =>  p_pr_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_PAYROLL_RATE'
230         ,p_hook_type   => 'AP'
231         );
232     --
233     -- End of API User Hook for the after hook of create_PAYROLL_RATE
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_PYRL_FLAG',
243      p_reference_table             => 'BEN_PYRL_RT_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_pyrl_rt_id := l_pyrl_rt_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_PAYROLL_RATE;
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_pyrl_rt_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_PAYROLL_RATE;
287     -- NOCOPY Changes
288     p_pyrl_rt_id := null;
289     p_effective_start_date := null;
290     p_effective_end_date := null;
291     p_object_version_number  := null;
292     -- NOCOPY Changes
293     raise;
294     --
295 end create_PAYROLL_RATE;
296 -- ----------------------------------------------------------------------------
297 -- |------------------------< update_PAYROLL_RATE >--- ------------------|
298 -- ----------------------------------------------------------------------------
299 --
300 procedure update_PAYROLL_RATE
301   (p_validate                       in  boolean   default false
302   ,p_pyrl_rt_id                     in  number
303   ,p_effective_start_date           out nocopy date
304   ,p_effective_end_date             out nocopy date
305   ,p_vrbl_rt_prfl_id                in  number    default hr_api.g_number
306   ,p_payroll_id                     in  number    default hr_api.g_number
307   ,p_ordr_num                       in  number    default hr_api.g_number
308   ,p_excld_flag                     in  varchar2  default hr_api.g_varchar2
309   ,p_business_group_id              in  number    default hr_api.g_number
310   ,p_pr_attribute_category          in  varchar2  default hr_api.g_varchar2
311   ,p_pr_attribute1                  in  varchar2  default hr_api.g_varchar2
312   ,p_pr_attribute2                  in  varchar2  default hr_api.g_varchar2
313   ,p_pr_attribute3                  in  varchar2  default hr_api.g_varchar2
314   ,p_pr_attribute4                  in  varchar2  default hr_api.g_varchar2
315   ,p_pr_attribute5                  in  varchar2  default hr_api.g_varchar2
316   ,p_pr_attribute6                  in  varchar2  default hr_api.g_varchar2
317   ,p_pr_attribute7                  in  varchar2  default hr_api.g_varchar2
318   ,p_pr_attribute8                  in  varchar2  default hr_api.g_varchar2
319   ,p_pr_attribute9                  in  varchar2  default hr_api.g_varchar2
320   ,p_pr_attribute10                 in  varchar2  default hr_api.g_varchar2
321   ,p_pr_attribute11                 in  varchar2  default hr_api.g_varchar2
322   ,p_pr_attribute12                 in  varchar2  default hr_api.g_varchar2
323   ,p_pr_attribute13                 in  varchar2  default hr_api.g_varchar2
324   ,p_pr_attribute14                 in  varchar2  default hr_api.g_varchar2
325   ,p_pr_attribute15                 in  varchar2  default hr_api.g_varchar2
326   ,p_pr_attribute16                 in  varchar2  default hr_api.g_varchar2
327   ,p_pr_attribute17                 in  varchar2  default hr_api.g_varchar2
331   ,p_pr_attribute21                 in  varchar2  default hr_api.g_varchar2
328   ,p_pr_attribute18                 in  varchar2  default hr_api.g_varchar2
329   ,p_pr_attribute19                 in  varchar2  default hr_api.g_varchar2
330   ,p_pr_attribute20                 in  varchar2  default hr_api.g_varchar2
332   ,p_pr_attribute22                 in  varchar2  default hr_api.g_varchar2
333   ,p_pr_attribute23                 in  varchar2  default hr_api.g_varchar2
334   ,p_pr_attribute24                 in  varchar2  default hr_api.g_varchar2
335   ,p_pr_attribute25                 in  varchar2  default hr_api.g_varchar2
336   ,p_pr_attribute26                 in  varchar2  default hr_api.g_varchar2
337   ,p_pr_attribute27                 in  varchar2  default hr_api.g_varchar2
338   ,p_pr_attribute28                 in  varchar2  default hr_api.g_varchar2
339   ,p_pr_attribute29                 in  varchar2  default hr_api.g_varchar2
340   ,p_pr_attribute30                 in  varchar2  default hr_api.g_varchar2
341   ,p_object_version_number          in out nocopy number
342   ,p_effective_date                 in  date
343   ,p_datetrack_mode                 in  varchar2
344   ) is
345   --
346   -- Declare cursors and local variables
347   --
348   l_proc varchar2(72) := g_package||'update_PAYROLL_RATE';
349   l_object_version_number ben_pyrl_rt_f.object_version_number%TYPE;
350   l_effective_start_date ben_pyrl_rt_f.effective_start_date%TYPE;
351   l_effective_end_date ben_pyrl_rt_f.effective_end_date%TYPE;
352   --
353 begin
354   --
355   hr_utility.set_location('Entering:'|| l_proc, 10);
356   --
357   -- Issue a savepoint if operating in validation only mode
358   --
359   savepoint update_PAYROLL_RATE;
360   --
361   hr_utility.set_location(l_proc, 20);
362   --
363   -- Process Logic
364   --
365   l_object_version_number := p_object_version_number;
366   --
367   begin
368     --
369     -- Start of API User Hook for the before hook of update_PAYROLL_RATE
370     --
371     ben_PAYROLL_RATE_bk2.update_PAYROLL_RATE_b
372       (
373        p_pyrl_rt_id                     =>  p_pyrl_rt_id
374       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
375       ,p_payroll_id                     =>  p_payroll_id
376       ,p_ordr_num                       =>  p_ordr_num
377       ,p_excld_flag                     =>  p_excld_flag
378       ,p_business_group_id              =>  p_business_group_id
379       ,p_pr_attribute_category          =>  p_pr_attribute_category
380       ,p_pr_attribute1                  =>  p_pr_attribute1
381       ,p_pr_attribute2                  =>  p_pr_attribute2
382       ,p_pr_attribute3                  =>  p_pr_attribute3
383       ,p_pr_attribute4                  =>  p_pr_attribute4
384       ,p_pr_attribute5                  =>  p_pr_attribute5
385       ,p_pr_attribute6                  =>  p_pr_attribute6
386       ,p_pr_attribute7                  =>  p_pr_attribute7
387       ,p_pr_attribute8                  =>  p_pr_attribute8
388       ,p_pr_attribute9                  =>  p_pr_attribute9
389       ,p_pr_attribute10                 =>  p_pr_attribute10
390       ,p_pr_attribute11                 =>  p_pr_attribute11
391       ,p_pr_attribute12                 =>  p_pr_attribute12
392       ,p_pr_attribute13                 =>  p_pr_attribute13
393       ,p_pr_attribute14                 =>  p_pr_attribute14
394       ,p_pr_attribute15                 =>  p_pr_attribute15
395       ,p_pr_attribute16                 =>  p_pr_attribute16
396       ,p_pr_attribute17                 =>  p_pr_attribute17
397       ,p_pr_attribute18                 =>  p_pr_attribute18
398       ,p_pr_attribute19                 =>  p_pr_attribute19
399       ,p_pr_attribute20                 =>  p_pr_attribute20
400       ,p_pr_attribute21                 =>  p_pr_attribute21
401       ,p_pr_attribute22                 =>  p_pr_attribute22
402       ,p_pr_attribute23                 =>  p_pr_attribute23
403       ,p_pr_attribute24                 =>  p_pr_attribute24
404       ,p_pr_attribute25                 =>  p_pr_attribute25
405       ,p_pr_attribute26                 =>  p_pr_attribute26
406       ,p_pr_attribute27                 =>  p_pr_attribute27
407       ,p_pr_attribute28                 =>  p_pr_attribute28
408       ,p_pr_attribute29                 =>  p_pr_attribute29
409       ,p_pr_attribute30                 =>  p_pr_attribute30
410       ,p_object_version_number          =>  p_object_version_number
411     ,p_effective_date                      => trunc(p_effective_date)
412     ,p_datetrack_mode                      => p_datetrack_mode
413       );
414   exception
415     when hr_api.cannot_find_prog_unit then
416       hr_api.cannot_find_prog_unit_error
417         (p_module_name => 'UPDATE_PAYROLL_RATE'
418         ,p_hook_type   => 'BP'
419         );
420     --
421     -- End of API User Hook for the before hook of update_PAYROLL_RATE
422     --
423   end;
424   --
425   ben_pyr_upd.upd
426     (
427      p_pyrl_rt_id                    => p_pyrl_rt_id
428     ,p_effective_start_date          => l_effective_start_date
429     ,p_effective_end_date            => l_effective_end_date
430     ,p_vrbl_rt_prfl_id               => p_vrbl_rt_prfl_id
431     ,p_payroll_id                    => p_payroll_id
432     ,p_ordr_num                      => p_ordr_num
433     ,p_excld_flag                    => p_excld_flag
434     ,p_business_group_id             => p_business_group_id
435     ,p_pr_attribute_category         => p_pr_attribute_category
436     ,p_pr_attribute1                 => p_pr_attribute1
437     ,p_pr_attribute2                 => p_pr_attribute2
441     ,p_pr_attribute6                 => p_pr_attribute6
438     ,p_pr_attribute3                 => p_pr_attribute3
439     ,p_pr_attribute4                 => p_pr_attribute4
440     ,p_pr_attribute5                 => p_pr_attribute5
442     ,p_pr_attribute7                 => p_pr_attribute7
443     ,p_pr_attribute8                 => p_pr_attribute8
444     ,p_pr_attribute9                 => p_pr_attribute9
445     ,p_pr_attribute10                => p_pr_attribute10
446     ,p_pr_attribute11                => p_pr_attribute11
447     ,p_pr_attribute12                => p_pr_attribute12
448     ,p_pr_attribute13                => p_pr_attribute13
449     ,p_pr_attribute14                => p_pr_attribute14
450     ,p_pr_attribute15                => p_pr_attribute15
451     ,p_pr_attribute16                => p_pr_attribute16
452     ,p_pr_attribute17                => p_pr_attribute17
453     ,p_pr_attribute18                => p_pr_attribute18
454     ,p_pr_attribute19                => p_pr_attribute19
455     ,p_pr_attribute20                => p_pr_attribute20
456     ,p_pr_attribute21                => p_pr_attribute21
457     ,p_pr_attribute22                => p_pr_attribute22
458     ,p_pr_attribute23                => p_pr_attribute23
459     ,p_pr_attribute24                => p_pr_attribute24
460     ,p_pr_attribute25                => p_pr_attribute25
461     ,p_pr_attribute26                => p_pr_attribute26
462     ,p_pr_attribute27                => p_pr_attribute27
463     ,p_pr_attribute28                => p_pr_attribute28
464     ,p_pr_attribute29                => p_pr_attribute29
465     ,p_pr_attribute30                => p_pr_attribute30
466     ,p_object_version_number         => l_object_version_number
467     ,p_effective_date                => trunc(p_effective_date)
468     ,p_datetrack_mode                => p_datetrack_mode
469     );
470   --
471   begin
472     --
473     -- Start of API User Hook for the after hook of update_PAYROLL_RATE
474     --
475     ben_PAYROLL_RATE_bk2.update_PAYROLL_RATE_a
476       (
477        p_pyrl_rt_id                     =>  p_pyrl_rt_id
478       ,p_effective_start_date           =>  l_effective_start_date
479       ,p_effective_end_date             =>  l_effective_end_date
480       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
481       ,p_payroll_id                     =>  p_payroll_id
482       ,p_ordr_num                       =>  p_ordr_num
483       ,p_excld_flag                     =>  p_excld_flag
484       ,p_business_group_id              =>  p_business_group_id
485       ,p_pr_attribute_category          =>  p_pr_attribute_category
486       ,p_pr_attribute1                  =>  p_pr_attribute1
487       ,p_pr_attribute2                  =>  p_pr_attribute2
488       ,p_pr_attribute3                  =>  p_pr_attribute3
489       ,p_pr_attribute4                  =>  p_pr_attribute4
490       ,p_pr_attribute5                  =>  p_pr_attribute5
491       ,p_pr_attribute6                  =>  p_pr_attribute6
492       ,p_pr_attribute7                  =>  p_pr_attribute7
493       ,p_pr_attribute8                  =>  p_pr_attribute8
494       ,p_pr_attribute9                  =>  p_pr_attribute9
495       ,p_pr_attribute10                 =>  p_pr_attribute10
496       ,p_pr_attribute11                 =>  p_pr_attribute11
497       ,p_pr_attribute12                 =>  p_pr_attribute12
498       ,p_pr_attribute13                 =>  p_pr_attribute13
499       ,p_pr_attribute14                 =>  p_pr_attribute14
500       ,p_pr_attribute15                 =>  p_pr_attribute15
501       ,p_pr_attribute16                 =>  p_pr_attribute16
502       ,p_pr_attribute17                 =>  p_pr_attribute17
503       ,p_pr_attribute18                 =>  p_pr_attribute18
504       ,p_pr_attribute19                 =>  p_pr_attribute19
505       ,p_pr_attribute20                 =>  p_pr_attribute20
506       ,p_pr_attribute21                 =>  p_pr_attribute21
507       ,p_pr_attribute22                 =>  p_pr_attribute22
508       ,p_pr_attribute23                 =>  p_pr_attribute23
509       ,p_pr_attribute24                 =>  p_pr_attribute24
510       ,p_pr_attribute25                 =>  p_pr_attribute25
511       ,p_pr_attribute26                 =>  p_pr_attribute26
512       ,p_pr_attribute27                 =>  p_pr_attribute27
513       ,p_pr_attribute28                 =>  p_pr_attribute28
514       ,p_pr_attribute29                 =>  p_pr_attribute29
515       ,p_pr_attribute30                 =>  p_pr_attribute30
516       ,p_object_version_number          =>  l_object_version_number
517       ,p_effective_date                     => trunc(p_effective_date)
518       ,p_datetrack_mode                     => p_datetrack_mode
519       );
520   exception
521     when hr_api.cannot_find_prog_unit then
522       hr_api.cannot_find_prog_unit_error
523         (p_module_name => 'UPDATE_PAYROLL_RATE'
524         ,p_hook_type   => 'AP'
525         );
526     --
527     -- End of API User Hook for the after hook of update_PAYROLL_RATE
528     --
529   end;
530   --
531   hr_utility.set_location(l_proc, 60);
532   --
533   -- When in validation only mode raise the Validate_Enabled exception
534   --
535   if p_validate then
536     raise hr_api.validate_enabled;
537   end if;
538   --
539   -- Set all output arguments
540   --
541   p_object_version_number := l_object_version_number;
542   p_effective_start_date := l_effective_start_date;
543   p_effective_end_date := l_effective_end_date;
544   --
545   hr_utility.set_location(' Leaving:'||l_proc, 70);
546   --
547 exception
548   --
552     -- we must rollback to the savepoint
549   when hr_api.validate_enabled then
550     --
551     -- As the Validate_Enabled exception has been raised
553     --
554     ROLLBACK TO update_PAYROLL_RATE;
555     --
556     -- NOCOPY Changes
557     p_effective_start_date := null;
558     p_effective_end_date := null;
559     -- NOCOPY Changes
560 
561 	-- Only set output warning arguments
562     -- (Any key or derived arguments must be set to null
563     -- when validation only mode is being used.)
564     --
565     hr_utility.set_location(' Leaving:'||l_proc, 80);
566     --
567   when others then
568     --
569     -- A validation or unexpected error has occured
570     --
571     ROLLBACK TO update_PAYROLL_RATE;
572     -- NOCOPY Changes
573     p_effective_start_date := null;
574     p_effective_end_date := null;
575     -- NOCOPY Changes
576     raise;
577     --
578 end update_PAYROLL_RATE;
579 -- ----------------------------------------------------------------------------
580 -- |------------------------< delete_PAYROLL_RATE >----------------------|
581 -- ----------------------------------------------------------------------------
582 --
583 procedure delete_PAYROLL_RATE
584   (p_validate                       in  boolean  default false
585   ,p_pyrl_rt_id                     in  number
586   ,p_effective_start_date           out nocopy date
587   ,p_effective_end_date             out nocopy date
588   ,p_object_version_number          in out nocopy number
589   ,p_effective_date                 in  date
590   ,p_datetrack_mode                 in  varchar2
591   ) is
592   --
593   -- Declare cursors and local variables
594   --
595   l_proc varchar2(72) := g_package||'update_PAYROLL_RATE';
596   l_object_version_number ben_pyrl_rt_f.object_version_number%TYPE;
597   l_effective_start_date ben_pyrl_rt_f.effective_start_date%TYPE;
598   l_effective_end_date ben_pyrl_rt_f.effective_end_date%TYPE;
599   --
600 begin
601   --
602   hr_utility.set_location('Entering:'|| l_proc, 10);
603   --
604   -- Issue a savepoint if operating in validation only mode
605   --
606   savepoint delete_PAYROLL_RATE;
607   --
608   hr_utility.set_location(l_proc, 20);
609   --
610   -- Process Logic
611   --
612   l_object_version_number := p_object_version_number;
613   --
614   --
615   begin
616     --
617     -- Start of API User Hook for the before hook of delete_PAYROLL_RATE
618     --
619     ben_PAYROLL_RATE_bk3.delete_PAYROLL_RATE_b
620       (
621        p_pyrl_rt_id                     =>  p_pyrl_rt_id
622       ,p_object_version_number          =>  p_object_version_number
623     ,p_effective_date                      => trunc(p_effective_date)
624     ,p_datetrack_mode                      => p_datetrack_mode
625       );
626   exception
627     when hr_api.cannot_find_prog_unit then
628       hr_api.cannot_find_prog_unit_error
629         (p_module_name => 'DELETE_PAYROLL_RATE'
630         ,p_hook_type   => 'BP'
631         );
632     --
633     -- End of API User Hook for the before hook of delete_PAYROLL_RATE
634     --
635   end;
636   --
637   ben_pyr_del.del
638     (
639      p_pyrl_rt_id                    => p_pyrl_rt_id
640     ,p_effective_start_date          => l_effective_start_date
641     ,p_effective_end_date            => l_effective_end_date
642     ,p_object_version_number         => l_object_version_number
643     ,p_effective_date                => p_effective_date
644     ,p_datetrack_mode                => p_datetrack_mode
645     );
646   --
647   begin
648     --
649     -- Start of API User Hook for the after hook of delete_PAYROLL_RATE
650     --
651     ben_PAYROLL_RATE_bk3.delete_PAYROLL_RATE_a
652       (
653        p_pyrl_rt_id                     =>  p_pyrl_rt_id
654       ,p_effective_start_date           =>  l_effective_start_date
655       ,p_effective_end_date             =>  l_effective_end_date
656       ,p_object_version_number          =>  l_object_version_number
657     ,p_effective_date                      => trunc(p_effective_date)
658     ,p_datetrack_mode                      => p_datetrack_mode
659       );
660   exception
661     when hr_api.cannot_find_prog_unit then
662       hr_api.cannot_find_prog_unit_error
663         (p_module_name => 'DELETE_PAYROLL_RATE'
664         ,p_hook_type   => 'AP'
665         );
666     --
667     -- End of API User Hook for the after hook of delete_PAYROLL_RATE
668     --
669   end;
670   --
671   ben_profile_handler.event_handler
672     (p_event                       => 'DELETE',
673      p_base_table                  => 'BEN_VRBL_RT_PRFL_F',
674      p_base_table_column           => 'VRBL_RT_PRFL_ID',
675      p_base_table_column_value     => ben_pyr_shd.g_old_rec.vrbl_rt_prfl_id,
676      p_base_table_reference_column => 'RT_PYRL_FLAG',
677      p_reference_table             => 'BEN_PYRL_RT_F',
678      p_reference_table_column      => 'VRBL_RT_PRFL_ID');
679   --
680   hr_utility.set_location(l_proc, 60);
681   --
682   -- When in validation only mode raise the Validate_Enabled exception
683   --
684   if p_validate then
685     raise hr_api.validate_enabled;
686   end if;
687   --
688   hr_utility.set_location(' Leaving:'||l_proc, 70);
689   --
690 exception
691   --
695     -- we must rollback to the savepoint
692   when hr_api.validate_enabled then
693     --
694     -- As the Validate_Enabled exception has been raised
696     --
697     ROLLBACK TO delete_PAYROLL_RATE;
698     --
699     -- Only set output warning arguments
700     -- (Any key or derived arguments must be set to null
701     -- when validation only mode is being used.)
702     --
703     p_effective_start_date := null;
704     p_effective_end_date := null;
705     --
706   when others then
707     --
708     -- A validation or unexpected error has occured
709     --
710     ROLLBACK TO delete_PAYROLL_RATE;
711     -- NOCOPY Changes
712     p_effective_start_date := null;
713     p_effective_end_date := null;
714     -- NOCOPY Changes
715     raise;
716     --
717 end delete_PAYROLL_RATE;
718 --
719 -- ----------------------------------------------------------------------------
720 -- |-------------------------------< lck >------------------------------------|
721 -- ----------------------------------------------------------------------------
722 --
723 procedure lck
724   (
725    p_pyrl_rt_id                   in     number
726   ,p_object_version_number          in     number
727   ,p_effective_date                 in     date
728   ,p_datetrack_mode                 in     varchar2
729   ,p_validation_start_date          out nocopy    date
730   ,p_validation_end_date            out nocopy    date
731   ) is
732   --
733   --
734   -- Declare cursors and local variables
735   --
736   l_proc varchar2(72) := g_package||'lck';
737   l_validation_start_date date;
738   l_validation_end_date date;
739   --
740 begin
741   --
742   hr_utility.set_location('Entering:'|| l_proc, 10);
743   --
744   ben_pyr_shd.lck
745     (
746       p_pyrl_rt_id                 => p_pyrl_rt_id
747      ,p_validation_start_date      => l_validation_start_date
748      ,p_validation_end_date        => l_validation_end_date
749      ,p_object_version_number      => p_object_version_number
750      ,p_effective_date             => p_effective_date
751      ,p_datetrack_mode             => p_datetrack_mode
752     );
753   --
754   hr_utility.set_location(' Leaving:'||l_proc, 70);
755   --
756 end lck;
757 --
758 end ben_PAYROLL_RATE_api;