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