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