DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_SOLUTIONS_SELECTED_API

Source


4 -- Package Variables
1 Package Body per_solutions_selected_api as
2 /* $Header: pesosapi.pkb 115.2 2003/01/04 00:38:14 ndorai noship $ */
3 --
5 --
6 g_package  varchar2(33) := 'PER_SOLUTIONS_SELECTED_API.';
7 --
8 -- ----------------------------------------------------------------------------
12 procedure create_solutions_selected
9 -- |---------------------< CREATE_SOLUTIONS_SELECTED >------------------------|
10 -- ----------------------------------------------------------------------------
11 --
13   (p_validate                      in     boolean  default false
14   ,p_solution_id                   in     number
15   ,p_solution_set_name             in     varchar2
16   ,p_user_id                       in     number
17   ,p_object_version_number            out nocopy number
18   ) is
19   --
20   -- Declare cursors and local variables
21   --
22   l_proc                varchar2(72) := g_package||'CREATE_SOLUTIONS_SELECTED';
23   l_effective_date      date;
24   l_solution_id         PER_SOLUTIONS_SELECTED.SOLUTION_ID%TYPE;
25   l_solution_set_name   PER_SOLUTIONS_SELECTED.SOLUTION_SET_NAME%TYPE;
26   l_user_id             PER_SOLUTIONS_SELECTED.USER_ID%TYPE;
27   l_object_version_number PER_SOLUTIONS_SELECTED.OBJECT_VERSION_NUMBER%TYPE;
28   --
29 begin
30   hr_utility.set_location('Entering:'|| l_proc, 10);
31   --
32   savepoint CREATE_SOLUTIONS_SELECTED;
33   --
34   -- Register user key values
35   --
36   per_sos_ins.set_base_key_value
37     (p_solution_id       => p_solution_id
38     ,p_solution_set_name => p_solution_set_name
39     ,p_user_id           => p_user_id
40     );
41   --
42   -- Truncate the time portion from all IN date parameters
43   --
44   -- Call Before Process User Hook
45   --
46   begin
47     PER_SOLUTIONS_SELECTED_BK1.CREATE_SOLUTIONS_SELECTED_b
48     (p_solution_id               => p_solution_id
49     ,p_solution_set_name         => p_solution_set_name
50     ,p_user_id                   => p_user_id
51     );
52   exception
53     when hr_api.cannot_find_prog_unit then
54       hr_api.cannot_find_prog_unit_error
55         (p_module_name => 'CREATE_SOLUTIONS_SELECTED_b'
56         ,p_hook_type   => 'BP'
57         );
58   end;
59   --
60   --
61   per_sos_ins.ins
62     (p_solution_id               => l_solution_id
63     ,p_solution_set_name         => l_solution_set_name
64     ,p_user_id                   => l_user_id
65     ,p_object_version_number     => l_object_version_number
66   );
67   --
68   -- Call After Process User Hook
69   --
70   begin
71     PER_SOLUTIONS_SELECTED_BK1.CREATE_SOLUTIONS_SELECTED_a
72       (p_solution_id               => p_solution_id
73       ,p_solution_set_name         => p_solution_set_name
74       ,p_user_id                   => p_user_id
75       ,p_object_version_number     => p_object_version_number
76       );
77   exception
78     when hr_api.cannot_find_prog_unit then
79       hr_api.cannot_find_prog_unit_error
80         (p_module_name => 'CREATE_SOLUTIONS_SELECTED_a'
81         ,p_hook_type   => 'AP'
82         );
83   end;
84    --
85   -- When in validation only mode raise the Validate_Enabled exception
86   --
87   if p_validate then
88     raise hr_api.validate_enabled;
89   end if;
90   --
91   -- Set all output arguments
92   --
93   p_object_version_number  := l_object_version_number;
94   --
95   hr_utility.set_location(' Leaving:'||l_proc, 70);
96 exception
97   when hr_api.validate_enabled then
98     --
99     -- As the Validate_Enabled exception has been raised
100     -- we must rollback to the savepoint
101     --
102     rollback to CREATE_SOLUTIONS_SELECTED;
103     --
104     -- Only set output warning arguments
105     -- (Any key or derived arguments must be set to null
106     -- when validation only mode is being used.)
107     --
108     p_object_version_number  := null;
109 --
110     hr_utility.set_location(' Leaving:'||l_proc, 80);
111   when others then
112     --
113     -- A validation or unexpected error has occured
114     --
115     rollback to CREATE_SOLUTIONS_SELECTED;
116     hr_utility.set_location(' Leaving:'||l_proc, 90);
117     raise;
118 end CREATE_SOLUTIONS_SELECTED;
119 --
120 
121 
122 -- ----------------------------------------------------------------------------
123 -- |--------------------< UPDATE_SOLUTIONS_SELECTED >-------------------------|
124 -- ----------------------------------------------------------------------------
125 --
126 procedure update_solutions_selected
127   (p_validate                      in     boolean  default false
128   ,p_solution_id                   in     number
129   ,p_solution_set_name             in     varchar2
130   ,p_user_id                       in     number
131   ,p_object_version_number         in out nocopy number
132   ) is
133   --
134   -- Declare cursors and local variables
135   --
136   l_proc                  varchar2(72) := g_package||'UPDATE_SOLUTIONS_SELECTED';
137   l_effective_date        date;
138   l_object_version_number PER_SOLUTIONS_SELECTED.OBJECT_VERSION_NUMBER%TYPE;
139   --
140 begin
141   hr_utility.set_location('Entering:'|| l_proc, 10);
142   --
143   savepoint UPDATE_SOLUTIONS_SELECTED;
144   --
145   -- Store initial value for OVN in out parameter.
146   --
147   l_object_version_number := p_object_version_number;
148   --
149   -- Truncate the time portion from all IN date parameters
150   --
151   -- Call Before Process User Hook
152   --
153   begin
154     PER_SOLUTIONS_SELECTED_BK2.UPDATE_SOLUTIONS_SELECTED_b
155       (p_object_version_number     => p_object_version_number
159     );
156       ,p_solution_id               => p_solution_id
157       ,p_solution_set_name         => p_solution_set_name
158       ,p_user_id                   => p_user_id
160   exception
161     when hr_api.cannot_find_prog_unit then
162       hr_api.cannot_find_prog_unit_error
163         (p_module_name => 'UPDATE_SOLUTIONS_SELECTED_b'
164         ,p_hook_type   => 'BP'
165         );
166   end;
167   --
168   --
169   per_sos_upd.upd
170       (p_object_version_number     => l_object_version_number
171       ,p_solution_id               => p_solution_id
172       ,p_solution_set_name         => p_solution_set_name
173       ,p_user_id                   => p_user_id
174   );
175   --
176   -- Call After Process User Hook
177   --
178   begin
179     PER_SOLUTIONS_SELECTED_BK2.UPDATE_SOLUTIONS_SELECTED_a
180       (p_object_version_number     => p_object_version_number
181       ,p_solution_id               => p_solution_id
182       ,p_solution_set_name         => p_solution_set_name
183       ,p_user_id                   => p_user_id
184       );
185   exception
186     when hr_api.cannot_find_prog_unit then
187       hr_api.cannot_find_prog_unit_error
188         (p_module_name => 'UPDATE_SOLUTIONS_SELECTED_a'
189         ,p_hook_type   => 'AP'
190         );
191   end;
192   --
193   -- When in validation only mode raise the Validate_Enabled exception
194   --
195   if p_validate then
196     raise hr_api.validate_enabled;
197   end if;
198   --
199   --
200   -- Set all output arguments
201   --
202   p_object_version_number  := l_object_version_number;
203   --
204   hr_utility.set_location(' Leaving:'||l_proc, 70);
205 exception
206   when hr_api.validate_enabled then
207     --
208     -- As the Validate_Enabled exception has been raised
209     -- we must rollback to the savepoint
210     --
211     rollback to UPDATE_SOLUTIONS_SELECTED;
212     --
213     -- Only set output warning arguments
214     -- (Any key or derived arguments must be set to null
215     -- when validation only mode is being used.)
216     --
217     hr_utility.set_location(' Leaving:'||l_proc, 80);
218   when others then
219     --
220     -- A validation or unexpected error has occured
221     --
222     rollback to UPDATE_SOLUTIONS_SELECTED;
223     hr_utility.set_location(' Leaving:'||l_proc, 90);
224     raise;
225 end UPDATE_SOLUTIONS_SELECTED;
226 
227 
228 -- ----------------------------------------------------------------------------
229 -- |--------------------< DELETE_SOLUTIONS_SELECTED >-------------------------|
230 -- ----------------------------------------------------------------------------
231 --
232 procedure delete_solutions_selected
233   (p_validate                      in     boolean  default false
234   ,p_solution_id                   in     number
235   ,p_solution_set_name             in     varchar2
236   ,p_user_id                       in     number
237   ,p_object_version_number         in     number
238   ) is
239   --
240   -- Declare cursors and local variables
241   --
242   l_proc                  varchar2(72) := g_package||'DELETE_SOLUTIONS_SELECTED';
243   --
244 begin
245   hr_utility.set_location('Entering:'|| l_proc, 10);
246   --
247   savepoint DELETE_SOLUTIONS_SELECTED;
248   --
249   -- Call Before Process User Hook
250   --
251   begin
252     PER_SOLUTIONS_SELECTED_BK3.DELETE_SOLUTIONS_SELECTED_b
253     (p_solution_id              => p_solution_id
254     ,p_solution_set_name        => p_solution_set_name
255     ,p_user_id                  => p_user_id
256     ,p_object_version_number    => p_object_version_number
257     );
258   exception
259     when hr_api.cannot_find_prog_unit then
260       hr_api.cannot_find_prog_unit_error
261         (p_module_name => 'DELETE_SOLUTIONS_SELECTED_b'
262         ,p_hook_type   => 'BP'
263         );
264   end;
265   --
266   per_sos_del.del
267    (p_solution_id               => p_solution_id
268    ,p_solution_set_name         => p_solution_set_name
269    ,p_user_id                   => p_user_id
270    ,p_object_version_number     => p_object_version_number
271   );
272   --
273   begin
274     PER_SOLUTIONS_SELECTED_BK3.DELETE_SOLUTIONS_SELECTED_a
275       (p_solution_id              => p_solution_id
276       ,p_solution_set_name        => p_solution_set_name
277       ,p_user_id                  => p_user_id
278       ,p_object_version_number    => p_object_version_number
279        );
280     exception
281       when hr_api.cannot_find_prog_unit then
282         hr_api.cannot_find_prog_unit_error
283           (p_module_name => 'DELETE_SOLUTIONS_SELECTED_a'
284           ,p_hook_type   => 'AP'
285           );
286   end;
287   --
288   -- When in validation only mode raise the Validate_Enabled exception
289   --
290   if p_validate then
291     raise hr_api.validate_enabled;
292   end if;
293   --
294   hr_utility.set_location(' Leaving:'||l_proc, 70);
295 exception
296   when hr_api.validate_enabled then
297     --
298     -- As the Validate_Enabled exception has been raised
299     -- we must rollback to the savepoint
300     --
301     rollback to DELETE_SOLUTIONS_SELECTED;
302     --
303     hr_utility.set_location(' Leaving:'||l_proc, 80);
304   when others then
305     --
306    rollback to DELETE_SOLUTIONS_SELECTED;
307    --
308    hr_utility.set_location(' Leaving:'||l_proc, 90);
309    --
310    raise;
311    --
315 end per_solutions_selected_api;
312 end DELETE_SOLUTIONS_SELECTED;
313 
314 --