DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_REGULATORY_PURPOSE_API

Source


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