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