DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PERF_RTNG_RT_API

Source


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