DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_PLAN_REGULATORY_BODY_API

Source


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