DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_POSTAL_ZIP_RATE_API

Source


1 Package Body ben_POSTAL_ZIP_RATE_api as
2 /* $Header: bepzrapi.pkb 115.3 2002/12/13 08:31:53 bmanyam ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  ben_POSTAL_ZIP_RATE_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_POSTAL_ZIP_RATE >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_POSTAL_ZIP_RATE
13   (p_validate                       in  boolean   default false
14   ,p_pstl_zip_rt_id                 out nocopy number
15   ,p_effective_start_date           out nocopy date
16   ,p_effective_end_date             out nocopy date
17   ,p_excld_flag                     in  varchar2  default null
18   ,p_ordr_num                       in  number    default null
19   ,p_pstl_zip_rng_id                in  number    default null
20   ,p_vrbl_rt_prfl_id                in  number    default null
21   ,p_business_group_id              in  number    default null
22   ,p_pzr_attribute_category         in  varchar2  default null
23   ,p_pzr_attribute1                 in  varchar2  default null
24   ,p_pzr_attribute2                 in  varchar2  default null
25   ,p_pzr_attribute3                 in  varchar2  default null
26   ,p_pzr_attribute4                 in  varchar2  default null
27   ,p_pzr_attribute5                 in  varchar2  default null
28   ,p_pzr_attribute6                 in  varchar2  default null
29   ,p_pzr_attribute7                 in  varchar2  default null
30   ,p_pzr_attribute8                 in  varchar2  default null
31   ,p_pzr_attribute9                 in  varchar2  default null
32   ,p_pzr_attribute10                in  varchar2  default null
33   ,p_pzr_attribute11                in  varchar2  default null
34   ,p_pzr_attribute12                in  varchar2  default null
35   ,p_pzr_attribute13                in  varchar2  default null
36   ,p_pzr_attribute14                in  varchar2  default null
37   ,p_pzr_attribute15                in  varchar2  default null
38   ,p_pzr_attribute16                in  varchar2  default null
39   ,p_pzr_attribute17                in  varchar2  default null
40   ,p_pzr_attribute18                in  varchar2  default null
41   ,p_pzr_attribute19                in  varchar2  default null
42   ,p_pzr_attribute20                in  varchar2  default null
43   ,p_pzr_attribute21                in  varchar2  default null
44   ,p_pzr_attribute22                in  varchar2  default null
45   ,p_pzr_attribute23                in  varchar2  default null
46   ,p_pzr_attribute24                in  varchar2  default null
47   ,p_pzr_attribute25                in  varchar2  default null
48   ,p_pzr_attribute26                in  varchar2  default null
49   ,p_pzr_attribute27                in  varchar2  default null
50   ,p_pzr_attribute28                in  varchar2  default null
51   ,p_pzr_attribute29                in  varchar2  default null
52   ,p_pzr_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_pstl_zip_rt_id ben_pstl_zip_rt_f.pstl_zip_rt_id%TYPE;
60   l_effective_start_date ben_pstl_zip_rt_f.effective_start_date%TYPE;
61   l_effective_end_date ben_pstl_zip_rt_f.effective_end_date%TYPE;
62   l_proc varchar2(72) := g_package||'create_POSTAL_ZIP_RATE';
63   l_object_version_number ben_pstl_zip_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_POSTAL_ZIP_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_POSTAL_ZIP_RATE
80     --
81     ben_POSTAL_ZIP_RATE_bk1.create_POSTAL_ZIP_RATE_b
82       (
83        p_excld_flag                     =>  p_excld_flag
84       ,p_ordr_num                       =>  p_ordr_num
85       ,p_pstl_zip_rng_id                =>  p_pstl_zip_rng_id
86       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
87       ,p_business_group_id              =>  p_business_group_id
88       ,p_pzr_attribute_category         =>  p_pzr_attribute_category
89       ,p_pzr_attribute1                 =>  p_pzr_attribute1
90       ,p_pzr_attribute2                 =>  p_pzr_attribute2
91       ,p_pzr_attribute3                 =>  p_pzr_attribute3
92       ,p_pzr_attribute4                 =>  p_pzr_attribute4
93       ,p_pzr_attribute5                 =>  p_pzr_attribute5
94       ,p_pzr_attribute6                 =>  p_pzr_attribute6
95       ,p_pzr_attribute7                 =>  p_pzr_attribute7
96       ,p_pzr_attribute8                 =>  p_pzr_attribute8
97       ,p_pzr_attribute9                 =>  p_pzr_attribute9
98       ,p_pzr_attribute10                =>  p_pzr_attribute10
99       ,p_pzr_attribute11                =>  p_pzr_attribute11
100       ,p_pzr_attribute12                =>  p_pzr_attribute12
101       ,p_pzr_attribute13                =>  p_pzr_attribute13
102       ,p_pzr_attribute14                =>  p_pzr_attribute14
103       ,p_pzr_attribute15                =>  p_pzr_attribute15
104       ,p_pzr_attribute16                =>  p_pzr_attribute16
105       ,p_pzr_attribute17                =>  p_pzr_attribute17
106       ,p_pzr_attribute18                =>  p_pzr_attribute18
107       ,p_pzr_attribute19                =>  p_pzr_attribute19
108       ,p_pzr_attribute20                =>  p_pzr_attribute20
109       ,p_pzr_attribute21                =>  p_pzr_attribute21
110       ,p_pzr_attribute22                =>  p_pzr_attribute22
111       ,p_pzr_attribute23                =>  p_pzr_attribute23
112       ,p_pzr_attribute24                =>  p_pzr_attribute24
113       ,p_pzr_attribute25                =>  p_pzr_attribute25
114       ,p_pzr_attribute26                =>  p_pzr_attribute26
115       ,p_pzr_attribute27                =>  p_pzr_attribute27
116       ,p_pzr_attribute28                =>  p_pzr_attribute28
117       ,p_pzr_attribute29                =>  p_pzr_attribute29
118       ,p_pzr_attribute30                =>  p_pzr_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_POSTAL_ZIP_RATE'
126         ,p_hook_type   => 'BP'
127         );
128     --
129     -- End of API User Hook for the before hook of create_POSTAL_ZIP_RATE
130     --
131   end;
132   --
133   ben_pzr_ins.ins
134     (
135      p_pstl_zip_rt_id                => l_pstl_zip_rt_id
136     ,p_effective_start_date          => l_effective_start_date
137     ,p_effective_end_date            => l_effective_end_date
138     ,p_excld_flag                    => p_excld_flag
139     ,p_ordr_num                      => p_ordr_num
140     ,p_pstl_zip_rng_id               => p_pstl_zip_rng_id
141     ,p_vrbl_rt_prfl_id               => p_vrbl_rt_prfl_id
142     ,p_business_group_id             => p_business_group_id
143     ,p_pzr_attribute_category        => p_pzr_attribute_category
144     ,p_pzr_attribute1                => p_pzr_attribute1
145     ,p_pzr_attribute2                => p_pzr_attribute2
146     ,p_pzr_attribute3                => p_pzr_attribute3
147     ,p_pzr_attribute4                => p_pzr_attribute4
148     ,p_pzr_attribute5                => p_pzr_attribute5
149     ,p_pzr_attribute6                => p_pzr_attribute6
150     ,p_pzr_attribute7                => p_pzr_attribute7
151     ,p_pzr_attribute8                => p_pzr_attribute8
152     ,p_pzr_attribute9                => p_pzr_attribute9
153     ,p_pzr_attribute10               => p_pzr_attribute10
154     ,p_pzr_attribute11               => p_pzr_attribute11
155     ,p_pzr_attribute12               => p_pzr_attribute12
156     ,p_pzr_attribute13               => p_pzr_attribute13
157     ,p_pzr_attribute14               => p_pzr_attribute14
158     ,p_pzr_attribute15               => p_pzr_attribute15
159     ,p_pzr_attribute16               => p_pzr_attribute16
160     ,p_pzr_attribute17               => p_pzr_attribute17
161     ,p_pzr_attribute18               => p_pzr_attribute18
162     ,p_pzr_attribute19               => p_pzr_attribute19
163     ,p_pzr_attribute20               => p_pzr_attribute20
164     ,p_pzr_attribute21               => p_pzr_attribute21
165     ,p_pzr_attribute22               => p_pzr_attribute22
166     ,p_pzr_attribute23               => p_pzr_attribute23
167     ,p_pzr_attribute24               => p_pzr_attribute24
168     ,p_pzr_attribute25               => p_pzr_attribute25
169     ,p_pzr_attribute26               => p_pzr_attribute26
170     ,p_pzr_attribute27               => p_pzr_attribute27
171     ,p_pzr_attribute28               => p_pzr_attribute28
172     ,p_pzr_attribute29               => p_pzr_attribute29
173     ,p_pzr_attribute30               => p_pzr_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_POSTAL_ZIP_RATE
181     --
182     ben_POSTAL_ZIP_RATE_bk1.create_POSTAL_ZIP_RATE_a
183       (
184        p_pstl_zip_rt_id                 =>  l_pstl_zip_rt_id
185       ,p_effective_start_date           =>  l_effective_start_date
186       ,p_effective_end_date             =>  l_effective_end_date
187       ,p_excld_flag                     =>  p_excld_flag
188       ,p_ordr_num                       =>  p_ordr_num
189       ,p_pstl_zip_rng_id                =>  p_pstl_zip_rng_id
190       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
191       ,p_business_group_id              =>  p_business_group_id
192       ,p_pzr_attribute_category         =>  p_pzr_attribute_category
193       ,p_pzr_attribute1                 =>  p_pzr_attribute1
194       ,p_pzr_attribute2                 =>  p_pzr_attribute2
195       ,p_pzr_attribute3                 =>  p_pzr_attribute3
196       ,p_pzr_attribute4                 =>  p_pzr_attribute4
197       ,p_pzr_attribute5                 =>  p_pzr_attribute5
198       ,p_pzr_attribute6                 =>  p_pzr_attribute6
199       ,p_pzr_attribute7                 =>  p_pzr_attribute7
200       ,p_pzr_attribute8                 =>  p_pzr_attribute8
201       ,p_pzr_attribute9                 =>  p_pzr_attribute9
202       ,p_pzr_attribute10                =>  p_pzr_attribute10
203       ,p_pzr_attribute11                =>  p_pzr_attribute11
204       ,p_pzr_attribute12                =>  p_pzr_attribute12
205       ,p_pzr_attribute13                =>  p_pzr_attribute13
206       ,p_pzr_attribute14                =>  p_pzr_attribute14
207       ,p_pzr_attribute15                =>  p_pzr_attribute15
208       ,p_pzr_attribute16                =>  p_pzr_attribute16
209       ,p_pzr_attribute17                =>  p_pzr_attribute17
210       ,p_pzr_attribute18                =>  p_pzr_attribute18
211       ,p_pzr_attribute19                =>  p_pzr_attribute19
212       ,p_pzr_attribute20                =>  p_pzr_attribute20
213       ,p_pzr_attribute21                =>  p_pzr_attribute21
214       ,p_pzr_attribute22                =>  p_pzr_attribute22
215       ,p_pzr_attribute23                =>  p_pzr_attribute23
216       ,p_pzr_attribute24                =>  p_pzr_attribute24
217       ,p_pzr_attribute25                =>  p_pzr_attribute25
218       ,p_pzr_attribute26                =>  p_pzr_attribute26
219       ,p_pzr_attribute27                =>  p_pzr_attribute27
220       ,p_pzr_attribute28                =>  p_pzr_attribute28
221       ,p_pzr_attribute29                =>  p_pzr_attribute29
222       ,p_pzr_attribute30                =>  p_pzr_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_POSTAL_ZIP_RATE'
230         ,p_hook_type   => 'AP'
231         );
232     --
233     -- End of API User Hook for the after hook of create_POSTAL_ZIP_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_PSTL_CD_FLAG',
243      p_reference_table             => 'BEN_PSTl_ZIP_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_pstl_zip_rt_id := l_pstl_zip_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_POSTAL_ZIP_RATE;
271     --
272     -- Only set output warning arguments
276     p_pstl_zip_rt_id := null;
273     -- (Any key or derived arguments must be set to null
274     -- when validation only mode is being used.)
275     --
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_POSTAL_ZIP_RATE;
287 	-- NOCOPY Changes
288     p_pstl_zip_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 
294     raise;
295     --
296 end create_POSTAL_ZIP_RATE;
297 -- ----------------------------------------------------------------------------
298 -- |------------------------< update_POSTAL_ZIP_RATE >--- ------------------|
299 -- ----------------------------------------------------------------------------
300 --
301 procedure update_POSTAL_ZIP_RATE
302   (p_validate                       in  boolean   default false
303   ,p_pstl_zip_rt_id                 in  number
304   ,p_effective_start_date           out nocopy date
305   ,p_effective_end_date             out nocopy date
306   ,p_excld_flag                     in  varchar2  default hr_api.g_varchar2
307   ,p_ordr_num                       in  number    default hr_api.g_number
308   ,p_pstl_zip_rng_id                in  number    default hr_api.g_number
309   ,p_vrbl_rt_prfl_id                in  number    default hr_api.g_number
310   ,p_business_group_id              in  number    default hr_api.g_number
311   ,p_pzr_attribute_category         in  varchar2  default hr_api.g_varchar2
312   ,p_pzr_attribute1                 in  varchar2  default hr_api.g_varchar2
313   ,p_pzr_attribute2                 in  varchar2  default hr_api.g_varchar2
314   ,p_pzr_attribute3                 in  varchar2  default hr_api.g_varchar2
315   ,p_pzr_attribute4                 in  varchar2  default hr_api.g_varchar2
316   ,p_pzr_attribute5                 in  varchar2  default hr_api.g_varchar2
317   ,p_pzr_attribute6                 in  varchar2  default hr_api.g_varchar2
318   ,p_pzr_attribute7                 in  varchar2  default hr_api.g_varchar2
319   ,p_pzr_attribute8                 in  varchar2  default hr_api.g_varchar2
320   ,p_pzr_attribute9                 in  varchar2  default hr_api.g_varchar2
321   ,p_pzr_attribute10                in  varchar2  default hr_api.g_varchar2
322   ,p_pzr_attribute11                in  varchar2  default hr_api.g_varchar2
323   ,p_pzr_attribute12                in  varchar2  default hr_api.g_varchar2
324   ,p_pzr_attribute13                in  varchar2  default hr_api.g_varchar2
325   ,p_pzr_attribute14                in  varchar2  default hr_api.g_varchar2
326   ,p_pzr_attribute15                in  varchar2  default hr_api.g_varchar2
327   ,p_pzr_attribute16                in  varchar2  default hr_api.g_varchar2
328   ,p_pzr_attribute17                in  varchar2  default hr_api.g_varchar2
329   ,p_pzr_attribute18                in  varchar2  default hr_api.g_varchar2
330   ,p_pzr_attribute19                in  varchar2  default hr_api.g_varchar2
331   ,p_pzr_attribute20                in  varchar2  default hr_api.g_varchar2
332   ,p_pzr_attribute21                in  varchar2  default hr_api.g_varchar2
333   ,p_pzr_attribute22                in  varchar2  default hr_api.g_varchar2
334   ,p_pzr_attribute23                in  varchar2  default hr_api.g_varchar2
335   ,p_pzr_attribute24                in  varchar2  default hr_api.g_varchar2
336   ,p_pzr_attribute25                in  varchar2  default hr_api.g_varchar2
337   ,p_pzr_attribute26                in  varchar2  default hr_api.g_varchar2
338   ,p_pzr_attribute27                in  varchar2  default hr_api.g_varchar2
339   ,p_pzr_attribute28                in  varchar2  default hr_api.g_varchar2
340   ,p_pzr_attribute29                in  varchar2  default hr_api.g_varchar2
341   ,p_pzr_attribute30                in  varchar2  default hr_api.g_varchar2
342   ,p_object_version_number          in out nocopy number
343   ,p_effective_date                 in  date
344   ,p_datetrack_mode                 in  varchar2
345   ) is
346   --
347   -- Declare cursors and local variables
348   --
349   l_proc varchar2(72) := g_package||'update_POSTAL_ZIP_RATE';
350   l_object_version_number ben_pstl_zip_rt_f.object_version_number%TYPE;
351   l_effective_start_date ben_pstl_zip_rt_f.effective_start_date%TYPE;
352   l_effective_end_date ben_pstl_zip_rt_f.effective_end_date%TYPE;
353   --
354 begin
355   --
356   hr_utility.set_location('Entering:'|| l_proc, 10);
357   --
358   -- Issue a savepoint if operating in validation only mode
359   --
360   savepoint update_POSTAL_ZIP_RATE;
361   --
362   hr_utility.set_location(l_proc, 20);
363   --
364   -- Process Logic
365   --
366   l_object_version_number := p_object_version_number;
367   --
368   begin
369     --
370     -- Start of API User Hook for the before hook of update_POSTAL_ZIP_RATE
371     --
372     ben_POSTAL_ZIP_RATE_bk2.update_POSTAL_ZIP_RATE_b
373       (
374        p_pstl_zip_rt_id                 =>  p_pstl_zip_rt_id
375       ,p_excld_flag                     =>  p_excld_flag
376       ,p_ordr_num                       =>  p_ordr_num
377       ,p_pstl_zip_rng_id                =>  p_pstl_zip_rng_id
378       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
379       ,p_business_group_id              =>  p_business_group_id
380       ,p_pzr_attribute_category         =>  p_pzr_attribute_category
384       ,p_pzr_attribute4                 =>  p_pzr_attribute4
381       ,p_pzr_attribute1                 =>  p_pzr_attribute1
382       ,p_pzr_attribute2                 =>  p_pzr_attribute2
383       ,p_pzr_attribute3                 =>  p_pzr_attribute3
385       ,p_pzr_attribute5                 =>  p_pzr_attribute5
386       ,p_pzr_attribute6                 =>  p_pzr_attribute6
387       ,p_pzr_attribute7                 =>  p_pzr_attribute7
388       ,p_pzr_attribute8                 =>  p_pzr_attribute8
389       ,p_pzr_attribute9                 =>  p_pzr_attribute9
390       ,p_pzr_attribute10                =>  p_pzr_attribute10
391       ,p_pzr_attribute11                =>  p_pzr_attribute11
392       ,p_pzr_attribute12                =>  p_pzr_attribute12
393       ,p_pzr_attribute13                =>  p_pzr_attribute13
394       ,p_pzr_attribute14                =>  p_pzr_attribute14
395       ,p_pzr_attribute15                =>  p_pzr_attribute15
396       ,p_pzr_attribute16                =>  p_pzr_attribute16
397       ,p_pzr_attribute17                =>  p_pzr_attribute17
398       ,p_pzr_attribute18                =>  p_pzr_attribute18
399       ,p_pzr_attribute19                =>  p_pzr_attribute19
400       ,p_pzr_attribute20                =>  p_pzr_attribute20
401       ,p_pzr_attribute21                =>  p_pzr_attribute21
402       ,p_pzr_attribute22                =>  p_pzr_attribute22
403       ,p_pzr_attribute23                =>  p_pzr_attribute23
404       ,p_pzr_attribute24                =>  p_pzr_attribute24
405       ,p_pzr_attribute25                =>  p_pzr_attribute25
406       ,p_pzr_attribute26                =>  p_pzr_attribute26
407       ,p_pzr_attribute27                =>  p_pzr_attribute27
408       ,p_pzr_attribute28                =>  p_pzr_attribute28
409       ,p_pzr_attribute29                =>  p_pzr_attribute29
410       ,p_pzr_attribute30                =>  p_pzr_attribute30
411       ,p_object_version_number          =>  p_object_version_number
412     ,p_effective_date                      => trunc(p_effective_date)
413     ,p_datetrack_mode                      => p_datetrack_mode
414       );
415   exception
416     when hr_api.cannot_find_prog_unit then
417       hr_api.cannot_find_prog_unit_error
418         (p_module_name => 'UPDATE_POSTAL_ZIP_RATE'
419         ,p_hook_type   => 'BP'
420         );
421     --
422     -- End of API User Hook for the before hook of update_POSTAL_ZIP_RATE
423     --
424   end;
425   --
426   ben_pzr_upd.upd
427     (
428      p_pstl_zip_rt_id                => p_pstl_zip_rt_id
429     ,p_effective_start_date          => l_effective_start_date
430     ,p_effective_end_date            => l_effective_end_date
431     ,p_excld_flag                    => p_excld_flag
432     ,p_ordr_num                      => p_ordr_num
433     ,p_pstl_zip_rng_id               => p_pstl_zip_rng_id
434     ,p_vrbl_rt_prfl_id               => p_vrbl_rt_prfl_id
435     ,p_business_group_id             => p_business_group_id
436     ,p_pzr_attribute_category        => p_pzr_attribute_category
437     ,p_pzr_attribute1                => p_pzr_attribute1
438     ,p_pzr_attribute2                => p_pzr_attribute2
439     ,p_pzr_attribute3                => p_pzr_attribute3
440     ,p_pzr_attribute4                => p_pzr_attribute4
441     ,p_pzr_attribute5                => p_pzr_attribute5
442     ,p_pzr_attribute6                => p_pzr_attribute6
443     ,p_pzr_attribute7                => p_pzr_attribute7
444     ,p_pzr_attribute8                => p_pzr_attribute8
445     ,p_pzr_attribute9                => p_pzr_attribute9
446     ,p_pzr_attribute10               => p_pzr_attribute10
447     ,p_pzr_attribute11               => p_pzr_attribute11
448     ,p_pzr_attribute12               => p_pzr_attribute12
449     ,p_pzr_attribute13               => p_pzr_attribute13
450     ,p_pzr_attribute14               => p_pzr_attribute14
451     ,p_pzr_attribute15               => p_pzr_attribute15
452     ,p_pzr_attribute16               => p_pzr_attribute16
453     ,p_pzr_attribute17               => p_pzr_attribute17
454     ,p_pzr_attribute18               => p_pzr_attribute18
455     ,p_pzr_attribute19               => p_pzr_attribute19
456     ,p_pzr_attribute20               => p_pzr_attribute20
457     ,p_pzr_attribute21               => p_pzr_attribute21
458     ,p_pzr_attribute22               => p_pzr_attribute22
459     ,p_pzr_attribute23               => p_pzr_attribute23
460     ,p_pzr_attribute24               => p_pzr_attribute24
461     ,p_pzr_attribute25               => p_pzr_attribute25
462     ,p_pzr_attribute26               => p_pzr_attribute26
463     ,p_pzr_attribute27               => p_pzr_attribute27
464     ,p_pzr_attribute28               => p_pzr_attribute28
465     ,p_pzr_attribute29               => p_pzr_attribute29
466     ,p_pzr_attribute30               => p_pzr_attribute30
467     ,p_object_version_number         => l_object_version_number
468     ,p_effective_date                => trunc(p_effective_date)
469     ,p_datetrack_mode                => p_datetrack_mode
470     );
471   --
472   begin
473     --
474     -- Start of API User Hook for the after hook of update_POSTAL_ZIP_RATE
475     --
476     ben_POSTAL_ZIP_RATE_bk2.update_POSTAL_ZIP_RATE_a
477       (
478        p_pstl_zip_rt_id                 =>  p_pstl_zip_rt_id
479       ,p_effective_start_date           =>  l_effective_start_date
480       ,p_effective_end_date             =>  l_effective_end_date
481       ,p_excld_flag                     =>  p_excld_flag
485       ,p_business_group_id              =>  p_business_group_id
482       ,p_ordr_num                       =>  p_ordr_num
483       ,p_pstl_zip_rng_id                =>  p_pstl_zip_rng_id
484       ,p_vrbl_rt_prfl_id                =>  p_vrbl_rt_prfl_id
486       ,p_pzr_attribute_category         =>  p_pzr_attribute_category
487       ,p_pzr_attribute1                 =>  p_pzr_attribute1
488       ,p_pzr_attribute2                 =>  p_pzr_attribute2
489       ,p_pzr_attribute3                 =>  p_pzr_attribute3
490       ,p_pzr_attribute4                 =>  p_pzr_attribute4
491       ,p_pzr_attribute5                 =>  p_pzr_attribute5
492       ,p_pzr_attribute6                 =>  p_pzr_attribute6
493       ,p_pzr_attribute7                 =>  p_pzr_attribute7
494       ,p_pzr_attribute8                 =>  p_pzr_attribute8
495       ,p_pzr_attribute9                 =>  p_pzr_attribute9
496       ,p_pzr_attribute10                =>  p_pzr_attribute10
497       ,p_pzr_attribute11                =>  p_pzr_attribute11
498       ,p_pzr_attribute12                =>  p_pzr_attribute12
499       ,p_pzr_attribute13                =>  p_pzr_attribute13
500       ,p_pzr_attribute14                =>  p_pzr_attribute14
501       ,p_pzr_attribute15                =>  p_pzr_attribute15
502       ,p_pzr_attribute16                =>  p_pzr_attribute16
503       ,p_pzr_attribute17                =>  p_pzr_attribute17
504       ,p_pzr_attribute18                =>  p_pzr_attribute18
505       ,p_pzr_attribute19                =>  p_pzr_attribute19
506       ,p_pzr_attribute20                =>  p_pzr_attribute20
507       ,p_pzr_attribute21                =>  p_pzr_attribute21
508       ,p_pzr_attribute22                =>  p_pzr_attribute22
509       ,p_pzr_attribute23                =>  p_pzr_attribute23
510       ,p_pzr_attribute24                =>  p_pzr_attribute24
511       ,p_pzr_attribute25                =>  p_pzr_attribute25
512       ,p_pzr_attribute26                =>  p_pzr_attribute26
513       ,p_pzr_attribute27                =>  p_pzr_attribute27
514       ,p_pzr_attribute28                =>  p_pzr_attribute28
515       ,p_pzr_attribute29                =>  p_pzr_attribute29
516       ,p_pzr_attribute30                =>  p_pzr_attribute30
517       ,p_object_version_number          =>  l_object_version_number
518       ,p_effective_date                     => trunc(p_effective_date)
519       ,p_datetrack_mode                     => p_datetrack_mode
520       );
521   exception
522     when hr_api.cannot_find_prog_unit then
523       hr_api.cannot_find_prog_unit_error
524         (p_module_name => 'UPDATE_POSTAL_ZIP_RATE'
525         ,p_hook_type   => 'AP'
526         );
527     --
528     -- End of API User Hook for the after hook of update_POSTAL_ZIP_RATE
529     --
530   end;
531   --
532   hr_utility.set_location(l_proc, 60);
533   --
534   -- When in validation only mode raise the Validate_Enabled exception
535   --
536   if p_validate then
537     raise hr_api.validate_enabled;
538   end if;
539   --
540   -- Set all output arguments
541   --
542   p_object_version_number := l_object_version_number;
543   p_effective_start_date := l_effective_start_date;
544   p_effective_end_date := l_effective_end_date;
545   --
546   hr_utility.set_location(' Leaving:'||l_proc, 70);
547   --
548 exception
549   --
550   when hr_api.validate_enabled then
551     --
552     -- As the Validate_Enabled exception has been raised
553     -- we must rollback to the savepoint
554     --
555     ROLLBACK TO update_POSTAL_ZIP_RATE;
556     --
557 	-- NOCOPY Changes
558     p_effective_start_date := null;
559     p_effective_end_date := null;
560     -- NOCOPY Changes
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_POSTAL_ZIP_RATE;
572 	-- NOCOPY Changes
573     p_effective_start_date := null;
574     p_effective_end_date := null;
575     -- NOCOPY Changes
576 
577     raise;
578     --
579 end update_POSTAL_ZIP_RATE;
580 -- ----------------------------------------------------------------------------
581 -- |------------------------< delete_POSTAL_ZIP_RATE >----------------------|
582 -- ----------------------------------------------------------------------------
583 --
584 procedure delete_POSTAL_ZIP_RATE
585   (p_validate                       in  boolean  default false
586   ,p_pstl_zip_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_POSTAL_ZIP_RATE';
597   l_object_version_number ben_pstl_zip_rt_f.object_version_number%TYPE;
598   l_effective_start_date ben_pstl_zip_rt_f.effective_start_date%TYPE;
599   l_effective_end_date ben_pstl_zip_rt_f.effective_end_date%TYPE;
600   --
601 begin
602   --
603   hr_utility.set_location('Entering:'|| l_proc, 10);
604   --
608   --
605   -- Issue a savepoint if operating in validation only mode
606   --
607   savepoint delete_POSTAL_ZIP_RATE;
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_POSTAL_ZIP_RATE
619     --
620     ben_POSTAL_ZIP_RATE_bk3.delete_POSTAL_ZIP_RATE_b
621       (
622        p_pstl_zip_rt_id                 =>  p_pstl_zip_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_POSTAL_ZIP_RATE'
631         ,p_hook_type   => 'BP'
632         );
633     --
634     -- End of API User Hook for the before hook of delete_POSTAL_ZIP_RATE
635     --
636   end;
637   --
638   ben_pzr_del.del
639     (
640      p_pstl_zip_rt_id                => p_pstl_zip_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_POSTAL_ZIP_RATE
651     --
652     ben_POSTAL_ZIP_RATE_bk3.delete_POSTAL_ZIP_RATE_a
653       (
654        p_pstl_zip_rt_id                 =>  p_pstl_zip_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
664         (p_module_name => 'DELETE_POSTAL_ZIP_RATE'
665         ,p_hook_type   => 'AP'
666         );
667     --
668     -- End of API User Hook for the after hook of delete_POSTAL_ZIP_RATE
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_pzr_shd.g_old_rec.vrbl_rt_prfl_id,
677      p_base_table_reference_column => 'RT_PSTL_CD_FLAG',
678      p_reference_table             => 'BEN_PSTl_ZIP_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   --
689   hr_utility.set_location(' Leaving:'||l_proc, 70);
690   --
691 exception
692   --
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_POSTAL_ZIP_RATE;
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     --
712 	-- NOCOPY Changes
709     -- A validation or unexpected error has occured
710     --
711     ROLLBACK TO delete_POSTAL_ZIP_RATE;
713     p_effective_start_date := null;
714     p_effective_end_date := null;
715     -- NOCOPY Changes
716     raise;
717     --
718 end delete_POSTAL_ZIP_RATE;
719 --
720 -- ----------------------------------------------------------------------------
721 -- |-------------------------------< lck >------------------------------------|
722 -- ----------------------------------------------------------------------------
723 --
724 procedure lck
725   (
726    p_pstl_zip_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_pzr_shd.lck
746     (
747       p_pstl_zip_rt_id                 => p_pstl_zip_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_POSTAL_ZIP_RATE_api;