DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_HRS_WKD_IN_PERIOD_RT_API

Source


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