[Home] [Help]
PACKAGE BODY: APPS.PQH_DFLT_BUDGET_SETS_API
Source
1 Package Body pqh_dflt_budget_sets_api as
2 /* $Header: pqdstapi.pkb 115.4 2002/12/05 19:31:55 rpasapul ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' pqh_dflt_budget_sets_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_dflt_budget_set >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_dflt_budget_set
13 (p_validate in boolean default false
14 ,p_dflt_budget_set_id out nocopy number
15 ,p_dflt_budget_set_name in varchar2 default null
16 ,p_business_group_id in number default null
17 ,p_object_version_number out nocopy number
18 ) is
19 --
20 -- Declare cursors and local variables
21 --
22 l_dflt_budget_set_id pqh_dflt_budget_sets.dflt_budget_set_id%TYPE;
23 l_proc varchar2(72) := g_package||'create_dflt_budget_set';
24 l_object_version_number pqh_dflt_budget_sets.object_version_number%TYPE;
25 --
26 begin
27 --
28 hr_utility.set_location('Entering:'|| l_proc, 10);
29 --
30 -- Issue a savepoint if operating in validation only mode
31 --
32 savepoint create_dflt_budget_set;
33 --
34 hr_utility.set_location(l_proc, 20);
35 --
36 -- Process Logic
37 --
38 begin
39 --
40 -- Start of API User Hook for the before hook of create_dflt_budget_set
41 --
42 pqh_dflt_budget_sets_bk1.create_dflt_budget_set_b
43 (
44 p_dflt_budget_set_name => p_dflt_budget_set_name
45 ,p_business_group_id => p_business_group_id
46 );
47 exception
48 when hr_api.cannot_find_prog_unit then
49 hr_api.cannot_find_prog_unit_error
50 (
51 p_module_name => 'create_dflt_budget_set'
52 ,p_hook_type => 'BP'
53 );
54 --
55 -- End of API User Hook for the before hook of create_dflt_budget_set
56 --
57 end;
58 --
59 pqh_dst_ins.ins
60 (
61 p_dflt_budget_set_id => l_dflt_budget_set_id
62 ,p_dflt_budget_set_name => p_dflt_budget_set_name
63 ,p_business_group_id => p_business_group_id
64 ,p_object_version_number => l_object_version_number
65 );
66 --
67 begin
68 --
69 -- Start of API User Hook for the after hook of create_dflt_budget_set
70 --
71 pqh_dflt_budget_sets_bk1.create_dflt_budget_set_a
72 (
73 p_dflt_budget_set_id => l_dflt_budget_set_id
74 ,p_dflt_budget_set_name => p_dflt_budget_set_name
75 ,p_business_group_id => p_business_group_id
76 ,p_object_version_number => l_object_version_number
77 );
78 exception
79 when hr_api.cannot_find_prog_unit then
80 hr_api.cannot_find_prog_unit_error
81 (p_module_name => 'create_dflt_budget_set'
82 ,p_hook_type => 'AP'
83 );
84 --
85 -- End of API User Hook for the after hook of create_dflt_budget_set
86 --
87 end;
88 --
89 hr_utility.set_location(l_proc, 60);
90 --
91 -- When in validation only mode raise the Validate_Enabled exception
92 --
93 if p_validate then
94 raise hr_api.validate_enabled;
95 end if;
96 --
97 -- Set all output arguments
98 --
99 p_dflt_budget_set_id := l_dflt_budget_set_id;
100 p_object_version_number := l_object_version_number;
101 --
102 hr_utility.set_location(' Leaving:'||l_proc, 70);
103 --
104 exception
105 --
106 when hr_api.validate_enabled then
107 --
108 -- As the Validate_Enabled exception has been raised
109 -- we must rollback to the savepoint
110 --
111 ROLLBACK TO create_dflt_budget_set;
112 --
113 -- Only set output warning arguments
114 -- (Any key or derived arguments must be set to null
115 -- when validation only mode is being used.)
116 --
117 p_dflt_budget_set_id := null;
118 p_object_version_number := null;
119 hr_utility.set_location(' Leaving:'||l_proc, 80);
120 --
121 when others then
122 p_dflt_budget_set_id := null;
123 p_object_version_number := null;
124 --
125 -- A validation or unexpected error has occured
126 --
127 ROLLBACK TO create_dflt_budget_set;
128 raise;
129 --
130 end create_dflt_budget_set;
131 -- ----------------------------------------------------------------------------
132 -- |------------------------< update_dflt_budget_set >--- ------------------|
133 -- ----------------------------------------------------------------------------
134 --
135 procedure update_dflt_budget_set
136 (p_validate in boolean default false
137 ,p_dflt_budget_set_id in number
138 ,p_dflt_budget_set_name in varchar2 default hr_api.g_varchar2
139 ,p_business_group_id in number default hr_api.g_number
140 ,p_object_version_number in out nocopy number
141 ) is
142 --
143 -- Declare cursors and local variables
144 --
145 l_proc varchar2(72) := g_package||'update_dflt_budget_set';
146 l_object_version_number pqh_dflt_budget_sets.object_version_number%TYPE;
147 --
148 begin
149 --
150 hr_utility.set_location('Entering:'|| l_proc, 10);
151 --
152 -- Issue a savepoint if operating in validation only mode
153 --
154 savepoint update_dflt_budget_set;
155 --
156 hr_utility.set_location(l_proc, 20);
157 --
158 -- Process Logic
159 --
160 l_object_version_number := p_object_version_number;
161 --
162 begin
163 --
164 -- Start of API User Hook for the before hook of update_dflt_budget_set
165 --
166 pqh_dflt_budget_sets_bk2.update_dflt_budget_set_b
167 (
168 p_dflt_budget_set_id => p_dflt_budget_set_id
169 ,p_dflt_budget_set_name => p_dflt_budget_set_name
170 ,p_business_group_id => p_business_group_id
171 ,p_object_version_number => p_object_version_number
172 );
173 exception
174 when hr_api.cannot_find_prog_unit then
175 hr_api.cannot_find_prog_unit_error
176 (p_module_name => 'update_dflt_budget_set'
177 ,p_hook_type => 'BP'
178 );
179 --
180 -- End of API User Hook for the before hook of update_dflt_budget_set
181 --
182 end;
183 --
184 pqh_dst_upd.upd
185 (
186 p_dflt_budget_set_id => p_dflt_budget_set_id
187 ,p_dflt_budget_set_name => p_dflt_budget_set_name
188 ,p_business_group_id => p_business_group_id
189 ,p_object_version_number => l_object_version_number
190 );
191 --
192 begin
193 --
194 -- Start of API User Hook for the after hook of update_dflt_budget_set
195 --
196 pqh_dflt_budget_sets_bk2.update_dflt_budget_set_a
197 (
198 p_dflt_budget_set_id => p_dflt_budget_set_id
199 ,p_dflt_budget_set_name => p_dflt_budget_set_name
200 ,p_business_group_id => p_business_group_id
201 ,p_object_version_number => l_object_version_number
202 );
203 exception
204 when hr_api.cannot_find_prog_unit then
205 hr_api.cannot_find_prog_unit_error
206 (p_module_name => 'update_dflt_budget_set'
207 ,p_hook_type => 'AP'
208 );
209 --
210 -- End of API User Hook for the after hook of update_dflt_budget_set
211 --
212 end;
213 --
214 hr_utility.set_location(l_proc, 60);
215 --
216 -- When in validation only mode raise the Validate_Enabled exception
217 --
218 if p_validate then
219 raise hr_api.validate_enabled;
220 end if;
221 --
222 -- Set all output arguments
223 --
224 p_object_version_number := l_object_version_number;
225 --
226 hr_utility.set_location(' Leaving:'||l_proc, 70);
227 --
228 exception
229 --
230 when hr_api.validate_enabled then
231 --
232 -- As the Validate_Enabled exception has been raised
233 -- we must rollback to the savepoint
234 --
235 ROLLBACK TO update_dflt_budget_set;
236 --
237 -- Only set output warning arguments
238 -- (Any key or derived arguments must be set to null
239 -- when validation only mode is being used.)
240 --
241 hr_utility.set_location(' Leaving:'||l_proc, 80);
242 --
243 when others then
244 p_object_version_number := l_object_version_number;
245 --
246 -- A validation or unexpected error has occured
247 --
248 ROLLBACK TO update_dflt_budget_set;
249 raise;
250 --
251 end update_dflt_budget_set;
252 -- ----------------------------------------------------------------------------
253 -- |------------------------< delete_dflt_budget_set >----------------------|
254 -- ----------------------------------------------------------------------------
255 --
256 procedure delete_dflt_budget_set
257 (p_validate in boolean default false
258 ,p_dflt_budget_set_id in number
259 ,p_object_version_number in number
260 ) is
261 --
262 -- Declare cursors and local variables
263 --
264 l_proc varchar2(72) := g_package||'delete_dflt_budget_set';
265 l_object_version_number pqh_dflt_budget_sets.object_version_number%TYPE;
266 --
267 begin
268 --
269 hr_utility.set_location('Entering:'|| l_proc, 10);
270 --
271 -- Issue a savepoint if operating in validation only mode
272 --
273 savepoint delete_dflt_budget_set;
274 --
275 hr_utility.set_location(l_proc, 20);
276 --
277 -- Process Logic
278 --
279 l_object_version_number := p_object_version_number;
280 --
281 --
282 begin
283 --
284 -- Start of API User Hook for the before hook of delete_dflt_budget_set
285 --
286 pqh_dflt_budget_sets_bk3.delete_dflt_budget_set_b
287 (
288 p_dflt_budget_set_id => p_dflt_budget_set_id
289 ,p_object_version_number => p_object_version_number
290 );
291 exception
292 when hr_api.cannot_find_prog_unit then
293 hr_api.cannot_find_prog_unit_error
294 (p_module_name => 'delete_dflt_budget_set'
295 ,p_hook_type => 'BP'
296 );
297 --
298 -- End of API User Hook for the before hook of delete_dflt_budget_set
299 --
300 end;
301 --
302 pqh_dst_del.del
303 (
304 p_dflt_budget_set_id => p_dflt_budget_set_id
305 ,p_object_version_number => l_object_version_number
306 );
307 --
308 begin
309 --
310 -- Start of API User Hook for the after hook of delete_dflt_budget_set
311 --
312 pqh_dflt_budget_sets_bk3.delete_dflt_budget_set_a
313 (
314 p_dflt_budget_set_id => p_dflt_budget_set_id
315 ,p_object_version_number => l_object_version_number
316 );
317 exception
318 when hr_api.cannot_find_prog_unit then
319 hr_api.cannot_find_prog_unit_error
320 (p_module_name => 'delete_dflt_budget_set'
321 ,p_hook_type => 'AP'
322 );
323 --
324 -- End of API User Hook for the after hook of delete_dflt_budget_set
325 --
326 end;
327 --
328 hr_utility.set_location(l_proc, 60);
329 --
330 -- When in validation only mode raise the Validate_Enabled exception
331 --
332 if p_validate then
333 raise hr_api.validate_enabled;
334 end if;
335 --
336 hr_utility.set_location(' Leaving:'||l_proc, 70);
337 --
338 exception
339 --
340 when hr_api.validate_enabled then
341 --
342 -- As the Validate_Enabled exception has been raised
343 -- we must rollback to the savepoint
344 --
345 ROLLBACK TO delete_dflt_budget_set;
346 --
347 -- Only set output warning arguments
348 -- (Any key or derived arguments must be set to null
349 -- when validation only mode is being used.)
350 --
351 --
352 when others then
353 --
354 -- A validation or unexpected error has occured
355 --
356 ROLLBACK TO delete_dflt_budget_set;
357 raise;
358 --
359 end delete_dflt_budget_set;
360 --
361 -- ----------------------------------------------------------------------------
362 -- |-------------------------------< lck >------------------------------------|
363 -- ----------------------------------------------------------------------------
364 --
365 /*
366 procedure lck
367 (
368 p_dflt_budget_set_id in number
369 ,p_object_version_number in number
370 ) is
371 --
372 --
373 -- Declare cursors and local variables
374 --
375 l_proc varchar2(72) := g_package||'lck';
376 --
377 begin
378 --
379 hr_utility.set_location('Entering:'|| l_proc, 10);
380 --
381 pqh_dst_shd.lck
382 (
383 p_dflt_budget_set_id => p_dflt_budget_set_id
384 ,p_object_version_number => p_object_version_number
385 );
386 --
387 hr_utility.set_location(' Leaving:'||l_proc, 70);
388 --
389 end lck;
390 */
391 --
392 end pqh_dflt_budget_sets_api;