[Home] [Help]
PACKAGE BODY: APPS.HR_TMP_BUS
Source
1 Package Body hr_tmp_bus as
2 /* $Header: hrtmprhi.pkb 115.6 2002/12/03 11:31:46 raranjan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_tmp_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code varchar2(150) default null;
14 g_form_template_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_form_template_id in number
22 ) is
23 --
24 l_proc varchar2(72) := g_package||'set_security_group_id';
25 --
26 begin
27 --
28 hr_utility.set_location('Entering:'|| l_proc, 10);
29 --
30 -- No business group context. Security group is not applicable.
31 --
32 null;
33 --
34 hr_utility.set_location(' Leaving:'|| l_proc, 20);
35 --
36 end set_security_group_id;
37 --
38 -- ---------------------------------------------------------------------------
39 -- |---------------------< return_legislation_code >-------------------------|
40 -- ---------------------------------------------------------------------------
41 --
42 Function return_legislation_code
43 (p_form_template_id in number
44 )
45 Return Varchar2 Is
46 --
47 -- Declare cursor
48 --
49 cursor csr_leg_code is
50 select tmp.legislation_code
51 from hr_form_templates_b tmp
52 where tmp.form_template_id = p_form_template_id;
53 --
54 -- Declare local variables
55 --
56 l_legislation_code varchar2(150);
57 l_proc varchar2(72) := g_package||'return_legislation_code';
58 --
59 Begin
60 --
61 hr_utility.set_location('Entering:'|| l_proc, 10);
62 --
63 -- Ensure that all the mandatory parameter are not null
64 --
65 hr_api.mandatory_arg_error
66 (p_api_name => l_proc
67 ,p_argument => 'form_template_id'
68 ,p_argument_value => p_form_template_id
69 );
70 --
71 if ( nvl(hr_tmp_bus.g_form_template_id, hr_api.g_number)
72 = p_form_template_id) then
73 --
74 -- The legislation code has already been found with a previous
75 -- call to this function. Just return the value in the global
76 -- variable.
77 --
78 l_legislation_code := hr_tmp_bus.g_legislation_code;
79 hr_utility.set_location(l_proc, 20);
80 else
81 --
82 -- The ID is different to the last call to this function
83 -- or this is the first call to this function.
84 --
85 open csr_leg_code;
86 fetch csr_leg_code into l_legislation_code;
87 --
88 if csr_leg_code%notfound then
89 --
90 -- The primary key is invalid therefore we must error
91 --
92 close csr_leg_code;
93 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
94 fnd_message.raise_error;
95 end if;
96 hr_utility.set_location(l_proc,30);
97 --
98 -- Set the global variables so the values are
99 -- available for the next call to this function.
100 --
101 close csr_leg_code;
102 hr_tmp_bus.g_form_template_id := p_form_template_id;
103 hr_tmp_bus.g_legislation_code := l_legislation_code;
104 end if;
105 hr_utility.set_location(' Leaving:'|| l_proc, 40);
106 return l_legislation_code;
107 end return_legislation_code;
108 --
109 -- ----------------------------------------------------------------------------
110 -- |------------------------------< chk_df >----------------------------------|
111 -- ----------------------------------------------------------------------------
112 --
113 -- Description:
114 -- Validates all the Descriptive Flexfield values.
115 --
116 -- Prerequisites:
117 -- All other columns have been validated. Must be called as the
118 -- last step from insert_validate and update_validate.
119 --
120 -- In Arguments:
121 -- p_rec
122 --
123 -- Post Success:
124 -- If the Descriptive Flexfield structure column and data values are
125 -- all valid this procedure will end normally and processing will
126 -- continue.
127 --
128 -- Post Failure:
129 -- If the Descriptive Flexfield structure column value or any of
130 -- the data values are invalid then an application error is raised as
131 -- a PL/SQL exception.
132 --
133 -- Access Status:
134 -- Internal Row Handler Use Only.
135 --
136 -- ----------------------------------------------------------------------------
137 procedure chk_df
138 (p_rec in hr_tmp_shd.g_rec_type
139 ) is
140 --
141 l_proc varchar2(72) := g_package || 'chk_df';
142 --
143 begin
144 hr_utility.set_location('Entering:'||l_proc,10);
145 --
146 if ((p_rec.form_template_id is not null) and (
147 nvl(hr_tmp_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
148 nvl(p_rec.attribute_category, hr_api.g_varchar2) or
149 nvl(hr_tmp_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
150 nvl(p_rec.attribute1, hr_api.g_varchar2) or
151 nvl(hr_tmp_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
152 nvl(p_rec.attribute2, hr_api.g_varchar2) or
153 nvl(hr_tmp_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
154 nvl(p_rec.attribute3, hr_api.g_varchar2) or
155 nvl(hr_tmp_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
156 nvl(p_rec.attribute4, hr_api.g_varchar2) or
157 nvl(hr_tmp_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
158 nvl(p_rec.attribute5, hr_api.g_varchar2) or
159 nvl(hr_tmp_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
160 nvl(p_rec.attribute6, hr_api.g_varchar2) or
161 nvl(hr_tmp_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
162 nvl(p_rec.attribute7, hr_api.g_varchar2) or
163 nvl(hr_tmp_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
164 nvl(p_rec.attribute8, hr_api.g_varchar2) or
165 nvl(hr_tmp_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
166 nvl(p_rec.attribute9, hr_api.g_varchar2) or
167 nvl(hr_tmp_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
168 nvl(p_rec.attribute10, hr_api.g_varchar2) or
169 nvl(hr_tmp_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
170 nvl(p_rec.attribute11, hr_api.g_varchar2) or
171 nvl(hr_tmp_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
172 nvl(p_rec.attribute12, hr_api.g_varchar2) or
173 nvl(hr_tmp_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
174 nvl(p_rec.attribute13, hr_api.g_varchar2) or
175 nvl(hr_tmp_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
176 nvl(p_rec.attribute14, hr_api.g_varchar2) or
177 nvl(hr_tmp_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
178 nvl(p_rec.attribute15, hr_api.g_varchar2) or
179 nvl(hr_tmp_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
180 nvl(p_rec.attribute16, hr_api.g_varchar2) or
181 nvl(hr_tmp_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
182 nvl(p_rec.attribute17, hr_api.g_varchar2) or
183 nvl(hr_tmp_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
184 nvl(p_rec.attribute18, hr_api.g_varchar2) or
185 nvl(hr_tmp_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
186 nvl(p_rec.attribute19, hr_api.g_varchar2) or
187 nvl(hr_tmp_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
188 nvl(p_rec.attribute20, hr_api.g_varchar2) or
189 nvl(hr_tmp_shd.g_old_rec.attribute21, hr_api.g_varchar2) <>
190 nvl(p_rec.attribute21, hr_api.g_varchar2) or
191 nvl(hr_tmp_shd.g_old_rec.attribute22, hr_api.g_varchar2) <>
192 nvl(p_rec.attribute22, hr_api.g_varchar2) or
193 nvl(hr_tmp_shd.g_old_rec.attribute23, hr_api.g_varchar2) <>
194 nvl(p_rec.attribute23, hr_api.g_varchar2) or
195 nvl(hr_tmp_shd.g_old_rec.attribute24, hr_api.g_varchar2) <>
196 nvl(p_rec.attribute24, hr_api.g_varchar2) or
197 nvl(hr_tmp_shd.g_old_rec.attribute25, hr_api.g_varchar2) <>
198 nvl(p_rec.attribute25, hr_api.g_varchar2) or
199 nvl(hr_tmp_shd.g_old_rec.attribute26, hr_api.g_varchar2) <>
200 nvl(p_rec.attribute26, hr_api.g_varchar2) or
201 nvl(hr_tmp_shd.g_old_rec.attribute27, hr_api.g_varchar2) <>
202 nvl(p_rec.attribute27, hr_api.g_varchar2) or
203 nvl(hr_tmp_shd.g_old_rec.attribute28, hr_api.g_varchar2) <>
204 nvl(p_rec.attribute28, hr_api.g_varchar2) or
205 nvl(hr_tmp_shd.g_old_rec.attribute29, hr_api.g_varchar2) <>
206 nvl(p_rec.attribute29, hr_api.g_varchar2) or
207 nvl(hr_tmp_shd.g_old_rec.attribute30, hr_api.g_varchar2) <>
208 nvl(p_rec.attribute30, hr_api.g_varchar2) )
209 or (p_rec.form_template_id is null) ) then
210 --
211 -- Only execute the validation if absolutely necessary:
212 -- a) During update, the structure column value or any
213 -- of the attribute values have actually changed.
214 -- b) During insert.
215 --
216 hr_dflex_utility.ins_or_upd_descflex_attribs
217 (p_appl_short_name => 'PER'
218 ,p_descflex_name => 'HR_FORM_TEMPLATES'
219 ,p_attribute_category => p_rec.attribute_category
220 ,p_attribute1_name => 'ATTRIBUTE1'
221 ,p_attribute1_value => p_rec.attribute1
222 ,p_attribute2_name => 'ATTRIBUTE2'
223 ,p_attribute2_value => p_rec.attribute2
224 ,p_attribute3_name => 'ATTRIBUTE3'
225 ,p_attribute3_value => p_rec.attribute3
226 ,p_attribute4_name => 'ATTRIBUTE4'
227 ,p_attribute4_value => p_rec.attribute4
228 ,p_attribute5_name => 'ATTRIBUTE5'
229 ,p_attribute5_value => p_rec.attribute5
230 ,p_attribute6_name => 'ATTRIBUTE6'
231 ,p_attribute6_value => p_rec.attribute6
232 ,p_attribute7_name => 'ATTRIBUTE7'
233 ,p_attribute7_value => p_rec.attribute7
234 ,p_attribute8_name => 'ATTRIBUTE8'
235 ,p_attribute8_value => p_rec.attribute8
236 ,p_attribute9_name => 'ATTRIBUTE9'
237 ,p_attribute9_value => p_rec.attribute9
238 ,p_attribute10_name => 'ATTRIBUTE10'
239 ,p_attribute10_value => p_rec.attribute10
240 ,p_attribute11_name => 'ATTRIBUTE11'
241 ,p_attribute11_value => p_rec.attribute11
242 ,p_attribute12_name => 'ATTRIBUTE12'
243 ,p_attribute12_value => p_rec.attribute12
244 ,p_attribute13_name => 'ATTRIBUTE13'
245 ,p_attribute13_value => p_rec.attribute13
246 ,p_attribute14_name => 'ATTRIBUTE14'
247 ,p_attribute14_value => p_rec.attribute14
248 ,p_attribute15_name => 'ATTRIBUTE15'
249 ,p_attribute15_value => p_rec.attribute15
250 ,p_attribute16_name => 'ATTRIBUTE16'
251 ,p_attribute16_value => p_rec.attribute16
252 ,p_attribute17_name => 'ATTRIBUTE17'
253 ,p_attribute17_value => p_rec.attribute17
254 ,p_attribute18_name => 'ATTRIBUTE18'
255 ,p_attribute18_value => p_rec.attribute18
256 ,p_attribute19_name => 'ATTRIBUTE19'
257 ,p_attribute19_value => p_rec.attribute19
258 ,p_attribute20_name => 'ATTRIBUTE20'
259 ,p_attribute20_value => p_rec.attribute20
260 ,p_attribute21_name => 'ATTRIBUTE21'
261 ,p_attribute21_value => p_rec.attribute21
262 ,p_attribute22_name => 'ATTRIBUTE22'
263 ,p_attribute22_value => p_rec.attribute22
264 ,p_attribute23_name => 'ATTRIBUTE23'
265 ,p_attribute23_value => p_rec.attribute23
266 ,p_attribute24_name => 'ATTRIBUTE24'
267 ,p_attribute24_value => p_rec.attribute24
268 ,p_attribute25_name => 'ATTRIBUTE25'
269 ,p_attribute25_value => p_rec.attribute25
270 ,p_attribute26_name => 'ATTRIBUTE26'
271 ,p_attribute26_value => p_rec.attribute26
272 ,p_attribute27_name => 'ATTRIBUTE27'
273 ,p_attribute27_value => p_rec.attribute27
274 ,p_attribute28_name => 'ATTRIBUTE28'
275 ,p_attribute28_value => p_rec.attribute28
276 ,p_attribute29_name => 'ATTRIBUTE29'
277 ,p_attribute29_value => p_rec.attribute29
278 ,p_attribute30_name => 'ATTRIBUTE30'
279 ,p_attribute30_value => p_rec.attribute30
280 );
281 end if;
282 --
283 hr_utility.set_location(' Leaving:'||l_proc,20);
284 end chk_df;
285 --
286 -- ----------------------------------------------------------------------------
287 -- |-----------------------< chk_non_updateable_args >------------------------|
288 -- ----------------------------------------------------------------------------
289 -- {Start Of Comments}
290 --
291 -- Description:
292 -- This procedure is used to ensure that non updateable attributes have
293 -- not been updated. If an attribute has been updated an error is generated.
294 --
295 -- Pre Conditions:
296 -- g_old_rec has been populated with details of the values currently in
297 -- the database.
298 --
299 -- In Arguments:
300 -- p_rec has been populated with the updated values the user would like the
301 -- record set to.
302 --
303 -- Post Success:
304 -- Processing continues if all the non updateable attributes have not
305 -- changed.
306 --
307 -- Post Failure:
308 -- An application error is raised if any of the non updatable attributes
309 -- have been altered.
310 --
311 -- {End Of Comments}
312 -- ----------------------------------------------------------------------------
313 Procedure chk_non_updateable_args
314 (p_effective_date in date
315 ,p_rec in hr_tmp_shd.g_rec_type
316 ) IS
317 --
318 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
319 l_error EXCEPTION;
320 l_argument varchar2(30);
321 --
322 Begin
323 --
324 -- Only proceed with the validation if a row exists for the current
325 -- record in the HR Schema.
326 --
327 IF NOT hr_tmp_shd.api_updating
328 (p_form_template_id => p_rec.form_template_id
329 ,p_object_version_number => p_rec.object_version_number
330 ) THEN
331 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
332 fnd_message.set_token('PROCEDURE ', l_proc);
333 fnd_message.set_token('STEP ', '5');
334 fnd_message.raise_error;
335 END IF;
336 --
337 IF (nvl(p_rec.application_id,hr_api.g_number) <>
338 nvl(hr_tmp_shd.g_old_rec.application_id,hr_api.g_number)
339 ) THEN
340 l_argument := 'application_id';
341 RAISE l_error;
342 END IF;
343 --
344 IF (nvl(p_rec.form_id,hr_api.g_number) <>
345 nvl(hr_tmp_shd.g_old_rec.form_id,hr_api.g_number)
346 ) THEN
347 l_argument := 'form_id';
348 RAISE l_error;
349 END IF;
350 --
351 EXCEPTION
352 WHEN l_error THEN
353 hr_api.argument_changed_error
354 (p_api_name => l_proc
355 ,p_argument => l_argument);
356 WHEN OTHERS THEN
357 RAISE;
358 End chk_non_updateable_args;
359 --
360 -- ----------------------------------------------------------------------------
361 -- |--------------------------< chk_application_id >--------------------------|
362 -- ----------------------------------------------------------------------------
363 Procedure chk_application_id
364 (p_effective_date in date
365 ,p_form_template_id in number
366 ,p_object_version_number in number
367 ,p_application_id in number
368 ) is
369 --
370 l_check number;
371 CURSOR cur_chk_app_id
372 IS
373 SELECT 1
374 FROM fnd_application
375 WHERE application_id = p_application_id;
376
377 l_proc varchar2(72) := g_package || 'chk_application_id';
378 l_api_updating boolean;
379 --
380 Begin
381 hr_utility.set_location('Entering:'||l_proc, 10);
382 --
383 -- Check value has been passed
384 --
385 hr_api.mandatory_arg_error
386 (p_api_name => l_proc
387 ,p_argument => 'application_id'
388 ,p_argument_value => p_application_id
389 );
390 --
391 --
392 OPEN cur_chk_app_id;
393 FETCH cur_chk_app_id INTO l_check;
394 IF cur_chk_app_id%NOTFOUND THEN
395 CLOSE cur_chk_app_id;
396 fnd_message.set_name('PER', 'HR_NEW_MESSAGE');
397 fnd_message.set_token('PROCEDURE', l_proc);
398 fnd_message.set_token('STEP','10');
399 fnd_message.raise_error;
400 END IF;
401 CLOSE cur_chk_app_id;
402
403 hr_utility.set_location('Leaving:'||l_proc, 100);
404 End chk_application_id;
405 --
406 -- ----------------------------------------------------------------------------
407 -- |-----------------------------< chk_form_id >------------------------------|
408 -- ----------------------------------------------------------------------------
409 Procedure chk_form_id
410 (p_effective_date in date
411 ,p_form_template_id in number
412 ,p_object_version_number in number
413 ,p_form_id in number
414 ,p_application_id in number
415 ) is
416 l_check number;
417 CURSOR cur_chk_form_id
418 IS
419 SELECT 1
420 FROM fnd_form
421 WHERE form_id = p_form_id
422 AND application_id = p_application_id;
423 --
424 l_proc varchar2(72) := g_package || 'chk_form_id';
425 l_api_updating boolean;
426 --
427 Begin
428 hr_utility.set_location('Entering:'||l_proc, 10);
429 --
430 -- Check value has been passed
431 --
432 hr_api.mandatory_arg_error
433 (p_api_name => l_proc
434 ,p_argument => 'form_id'
435 ,p_argument_value => p_form_id
436 );
437 --
438 OPEN cur_chk_form_id;
439 FETCH cur_chk_form_id INTO l_check;
440 IF cur_chk_form_id%NOTFOUND THEN
441 CLOSE cur_chk_form_id;
442 fnd_message.set_name('PER', 'HR_NEW_MESSAGE');
443 fnd_message.set_token('PROCEDURE', l_proc);
444 fnd_message.set_token('STEP','10');
445 fnd_message.raise_error;
446 END IF;
447 CLOSE cur_chk_form_id;
448 --
449 hr_utility.set_location('Leaving:'||l_proc, 100);
450 End chk_form_id;
451 --
452 -- ----------------------------------------------------------------------------
453 -- |-------------------------< chk_legislation_code >-------------------------|
454 -- ----------------------------------------------------------------------------
455 Procedure chk_legislation_code
456 (p_effective_date in date
457 ,p_form_template_id in number
458 ,p_object_version_number in number
459 ,p_legislation_code in varchar2
460 ) is
461 --
462 l_check number;
463 CURSOR cur_chk_leg_code
464 IS
465 SELECT 1
466 FROM fnd_territories
467 WHERE territory_code = p_legislation_code;
468 --
469 l_proc varchar2(72) := g_package || 'chk_legislation_code';
470 l_api_updating boolean;
471 --
472 Begin
473 hr_utility.set_location('Entering:'||l_proc, 10);
474 --
475 -- additional validation
476 --
477 IF (p_legislation_code IS NOT NULL)
478 THEN
479 --
480 OPEN cur_chk_leg_code;
481 FETCH cur_chk_leg_code INTO l_check;
482 IF cur_chk_leg_code%NOTFOUND THEN
483 CLOSE cur_chk_leg_code;
484 fnd_message.set_name('PER', 'HR_NEW_MESSAGE');
485 fnd_message.set_token('PROCEDURE', l_proc);
486 fnd_message.set_token('STEP','10');
487 fnd_message.raise_error;
488 END IF;
489 CLOSE cur_chk_leg_code ;
490 --
491 END IF;
492 --
493 hr_utility.set_location('Leaving:'||l_proc, 100);
494 End chk_legislation_code;
495 --
496 -- ----------------------------------------------------------------------------
497 -- |---------------------------< chk_template_name >--------------------------|
498 -- ----------------------------------------------------------------------------
499 Procedure chk_template_name
500 (p_effective_date in date
501 ,p_form_template_id in number
502 ,p_object_version_number in number
503 ,p_template_name in varchar2
504 ) is
505 --
506 l_proc varchar2(72) := g_package || 'chk_template_name';
507 l_api_updating boolean;
508 --
509 Begin
510 hr_utility.set_location('Entering:'||l_proc, 10);
511 --
512 -- Check value has been passed
513 --
514 hr_api.mandatory_arg_error
515 (p_api_name => l_proc
516 ,p_argument => 'template_name'
517 ,p_argument_value => p_template_name
518 );
519 --
520 -- Check value is in uppercase
521 --
522 if p_template_name <> upper(p_template_name) then
523 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
524 fnd_message.set_token('PROCEDURE', l_proc);
525 fnd_message.set_token('STEP','10');
526 fnd_message.raise_error;
527 end if;
528 --
529 hr_utility.set_location('Leaving:'||l_proc, 100);
530 End chk_template_name;
531 --
532 -- ----------------------------------------------------------------------------
533 -- |---------------------------< chk_enabled_flag >---------------------------|
534 -- ----------------------------------------------------------------------------
535 Procedure chk_enabled_flag
536 (p_effective_date in date
537 ,p_form_template_id in number
538 ,p_object_version_number in number
539 ,p_enabled_flag in varchar2
540 ) is
541 --
542 l_proc varchar2(72) := g_package || 'chk_enabled_flag';
543 l_api_updating boolean;
544 --
545 Begin
546 hr_utility.set_location('Entering:'||l_proc, 10);
547 --
548 -- Check mandatory arguments have been set
549 --
550 hr_api.mandatory_arg_error
551 (p_api_name => l_proc
552 ,p_argument => 'effective_date'
553 ,p_argument_value => p_effective_date
554 );
555 --
556 l_api_updating := hr_tmp_shd.api_updating
557 (p_form_template_id => p_form_template_id
558 ,p_object_version_number => p_object_version_number
559 );
560 hr_utility.set_location(l_proc,20);
561 --
562 -- Only proceed with SQL validation if absolutely necessary
563 --
564 if ( ( l_api_updating
565 and nvl(hr_tmp_shd.g_old_rec.enabled_flag,hr_api.g_varchar2) <>
566 nvl(p_enabled_flag,hr_api.g_varchar2))
567 or (NOT l_api_updating)) then
568 --
569 hr_utility.set_location(l_proc,30);
570 --
571 -- Check value has been passed
572 --
573 hr_api.mandatory_arg_error
574 (p_api_name => l_proc
575 ,p_argument => 'enabled_flag'
576 ,p_argument_value => p_enabled_flag
577 );
578 --
579 -- Must exist in hr_standard_lookups where lookup_type is YES_NO
580 --
581 if hr_api.not_exists_in_hrstanlookups
582 (p_effective_date => p_effective_date
583 ,p_lookup_type => 'YES_NO'
584 ,p_lookup_code => p_enabled_flag
585 ) then
586 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
587 fnd_message.set_token('PROCEDURE', l_proc);
588 fnd_message.set_token('STEP','10');
589 fnd_message.raise_error;
590 end if;
591 --
592 end if;
593 --
594 hr_utility.set_location('Leaving:'||l_proc, 100);
595 End chk_enabled_flag;
596 --
597 -- ----------------------------------------------------------------------------
598 -- |------------------------------< chk_delete >------------------------------|
599 -- ----------------------------------------------------------------------------
600 Procedure chk_delete
601 (p_rec in hr_tmp_shd.g_rec_type
602 ) is
603 --
604 l_proc varchar2(72) := g_package||'chk_delete';
605 --
606 Begin
607 hr_utility.set_location('Entering:'||l_proc, 5);
608 --
609 -- No additional validation required
610 --
611 null;
612 --
613 hr_utility.set_location(' Leaving:'||l_proc, 10);
614 End chk_delete;
615 --
616 -- ----------------------------------------------------------------------------
617 -- |---------------------------< insert_validate >----------------------------|
618 -- ----------------------------------------------------------------------------
619 Procedure insert_validate
620 (p_effective_date in date
621 ,p_rec in hr_tmp_shd.g_rec_type
622 ) is
623 --
624 l_proc varchar2(72) := g_package||'insert_validate';
625 --
626 Begin
627 hr_utility.set_location('Entering:'||l_proc, 5);
628 --
629 -- Check mandatory arguments have been set
630 --
631 hr_api.mandatory_arg_error
632 (p_api_name => l_proc
633 ,p_argument => 'effective_date'
634 ,p_argument_value => p_effective_date
635 );
636 --
637 -- Call all supporting business operations
638 -- No business group context. HR_STANDARD_LOOKUPS used for validation.
639 --
640 chk_application_id
641 (p_effective_date => p_effective_date
642 ,p_form_template_id => p_rec.form_template_id
643 ,p_object_version_number => p_rec.object_version_number
644 ,p_application_id => p_rec.application_id
645 );
646 --
647 chk_form_id
648 (p_effective_date => p_effective_date
649 ,p_form_template_id => p_rec.form_template_id
650 ,p_object_version_number => p_rec.object_version_number
651 ,p_form_id => p_rec.form_id
652 ,p_application_id => p_rec.application_id
653 );
654 --
655 chk_legislation_code
656 (p_effective_date => p_effective_date
657 ,p_form_template_id => p_rec.form_template_id
658 ,p_object_version_number => p_rec.object_version_number
659 ,p_legislation_code => p_rec.legislation_code
660 );
661 --
662 chk_template_name
663 (p_effective_date => p_effective_date
664 ,p_form_template_id => p_rec.form_template_id
665 ,p_object_version_number => p_rec.object_version_number
666 ,p_template_name => p_rec.template_name
667 );
668 --
669 chk_enabled_flag
670 (p_effective_date => p_effective_date
671 ,p_form_template_id => p_rec.form_template_id
672 ,p_object_version_number => p_rec.object_version_number
673 ,p_enabled_flag => p_rec.enabled_flag
674 );
675 --
676 chk_df
677 (p_rec => p_rec
678 );
679 --
680 hr_utility.set_location(' Leaving:'||l_proc, 10);
681 End insert_validate;
682 --
683 -- ----------------------------------------------------------------------------
684 -- |---------------------------< update_validate >----------------------------|
685 -- ----------------------------------------------------------------------------
686 Procedure update_validate
687 (p_effective_date in date
688 ,p_rec in hr_tmp_shd.g_rec_type
689 ) is
690 --
691 l_proc varchar2(72) := g_package||'update_validate';
692 --
693 Begin
694 hr_utility.set_location('Entering:'||l_proc, 5);
695 --
696 -- Check mandatory arguments have been set
697 --
698 hr_api.mandatory_arg_error
699 (p_api_name => l_proc
700 ,p_argument => 'effective_date'
701 ,p_argument_value => p_effective_date
702 );
703 --
704 -- Call all supporting business operations
705 -- No business group context. HR_STANDARD_LOOKUPS used for validation.
706 --
707 chk_non_updateable_args
708 (p_effective_date => p_effective_date
709 ,p_rec => p_rec
710 );
711
712 chk_application_id
713 (p_effective_date => p_effective_date
714 ,p_form_template_id => p_rec.form_template_id
715 ,p_object_version_number => p_rec.object_version_number
716 ,p_application_id => p_rec.application_id
717 );
718
719 chk_form_id
720 (p_effective_date => p_effective_date
721 ,p_form_template_id => p_rec.form_template_id
722 ,p_object_version_number => p_rec.object_version_number
723 ,p_form_id => p_rec.form_id
724 ,p_application_id => p_rec.application_id
725 );
726
727 chk_legislation_code
728 (p_effective_date => p_effective_date
729 ,p_form_template_id => p_rec.form_template_id
730 ,p_object_version_number => p_rec.object_version_number
731 ,p_legislation_code => p_rec.legislation_code
732 );
733 --
734 chk_template_name
735 (p_effective_date => p_effective_date
736 ,p_form_template_id => p_rec.form_template_id
737 ,p_object_version_number => p_rec.object_version_number
738 ,p_template_name => p_rec.template_name
739 );
740 --
741 chk_enabled_flag
742 (p_effective_date => p_effective_date
743 ,p_form_template_id => p_rec.form_template_id
744 ,p_object_version_number => p_rec.object_version_number
745 ,p_enabled_flag => p_rec.enabled_flag
746 );
747 --
748 chk_df
749 (p_rec => p_rec
750 );
751 --
752 hr_utility.set_location(' Leaving:'||l_proc, 10);
753 End update_validate;
754 --
755 -- ----------------------------------------------------------------------------
756 -- |---------------------------< delete_validate >----------------------------|
757 -- ----------------------------------------------------------------------------
758 Procedure delete_validate
759 (p_rec in hr_tmp_shd.g_rec_type
760 ) is
761 --
762 l_proc varchar2(72) := g_package||'delete_validate';
763 --
764 Begin
765 hr_utility.set_location('Entering:'||l_proc, 5);
766 --
767 -- Call all supporting business operations
768 --
769 chk_delete
770 (p_rec => p_rec
771 );
772 --
773 hr_utility.set_location(' Leaving:'||l_proc, 10);
774 End delete_validate;
775 --
776 end hr_tmp_bus;