DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_TPP_BUS

Source


1 Package Body hr_tpp_bus as
2 /* $Header: hrtpprhi.pkb 120.1 2011/04/28 10:41:35 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  hr_tpp_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_tab_page_property_id        number         default null;
15 --
16 --  ---------------------------------------------------------------------------
17 --  |----------------------< set_security_group_id >--------------------------|
18 --  ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21   (p_tab_page_property_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_tab_page_property_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           ,hr_template_windows_b twn
53           ,hr_template_canvases_b tcn
54           ,hr_template_tab_pages_b ttp
55           ,hr_tab_page_properties_b tpp
56      where tmp.form_template_id = twn.form_template_id
57        and twn.template_window_id = tcn.template_window_id
58        and tcn.template_canvas_id = ttp.template_canvas_id
59        and ttp.template_tab_page_id = tpp.template_tab_page_id
60        and tpp.tab_page_property_id = p_tab_page_property_id;
61   --
62   -- Declare local variables
63   --
64   l_legislation_code  varchar2(150);
65   l_proc              varchar2(72)  :=  g_package||'return_legislation_code';
66   --
67 Begin
68   --
69   hr_utility.set_location('Entering:'|| l_proc, 10);
70   --
71   -- Ensure that all the mandatory parameter are not null
72   --
73   hr_api.mandatory_arg_error
74     (p_api_name           => l_proc
75     ,p_argument           => 'tab_page_property_id'
76     ,p_argument_value     => p_tab_page_property_id
77     );
78   --
79   if ( nvl(hr_tpp_bus.g_tab_page_property_id, hr_api.g_number)
80        = p_tab_page_property_id) then
81     --
82     -- The legislation code has already been found with a previous
83     -- call to this function. Just return the value in the global
84     -- variable.
85     --
86     l_legislation_code := hr_tpp_bus.g_legislation_code;
87     hr_utility.set_location(l_proc, 20);
88   else
89     --
90     -- The ID is different to the last call to this function
91     -- or this is the first call to this function.
92     --
93     open csr_leg_code;
94     fetch csr_leg_code into l_legislation_code;
95     --
96     if csr_leg_code%notfound then
97       --
98       -- Legislation code not found, which may be correct for certain tab page
99       -- properties
100       --
101       l_legislation_code := null;
102     end if;
103     hr_utility.set_location(l_proc,30);
104     --
105     -- Set the global variables so the values are
106     -- available for the next call to this function.
107     --
108     close csr_leg_code;
109     hr_tpp_bus.g_tab_page_property_id := p_tab_page_property_id;
110     hr_tpp_bus.g_legislation_code := l_legislation_code;
111   end if;
112   hr_utility.set_location(' Leaving:'|| l_proc, 40);
113   return l_legislation_code;
114 end return_legislation_code;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |-----------------------------< chk_ddf >----------------------------------|
118 -- ----------------------------------------------------------------------------
119 --
120 -- Description:
121 --   Validates all the Developer Descriptive Flexfield values.
122 --
123 -- Prerequisites:
124 --   All other columns have been validated.  Must be called as the
125 --   last step from insert_validate and update_validate.
126 --
127 -- In Arguments:
128 --   p_rec
129 --
130 -- Post Success:
131 --   If the Developer Descriptive Flexfield structure column and data values
132 --   are all valid this procedure will end normally and processing will
133 --   continue.
134 --
135 -- Post Failure:
136 --   If the Developer Descriptive Flexfield structure column value or any of
137 --   the data values are invalid then an application error is raised as
138 --   a PL/SQL exception.
139 --
140 -- Access Status:
141 --   Internal Row Handler Use Only.
142 --
143 -- ----------------------------------------------------------------------------
144 procedure chk_ddf
145   (p_rec in hr_tpp_shd.g_rec_type
146   ) is
147 --
148   l_proc   varchar2(72) := g_package || 'chk_ddf';
149 --
150 begin
151   hr_utility.set_location('Entering:'||l_proc,10);
152   --
153   if ((p_rec.tab_page_property_id is not null)  and (
154     nvl(hr_tpp_shd.g_old_rec.information_category, hr_api.g_varchar2) <>
155     nvl(p_rec.information_category, hr_api.g_varchar2)  or
156     nvl(hr_tpp_shd.g_old_rec.information1, hr_api.g_varchar2) <>
157     nvl(p_rec.information1, hr_api.g_varchar2)  or
158     nvl(hr_tpp_shd.g_old_rec.information2, hr_api.g_varchar2) <>
159     nvl(p_rec.information2, hr_api.g_varchar2)  or
160     nvl(hr_tpp_shd.g_old_rec.information3, hr_api.g_varchar2) <>
161     nvl(p_rec.information3, hr_api.g_varchar2)  or
162     nvl(hr_tpp_shd.g_old_rec.information4, hr_api.g_varchar2) <>
163     nvl(p_rec.information4, hr_api.g_varchar2)  or
164     nvl(hr_tpp_shd.g_old_rec.information5, hr_api.g_varchar2) <>
165     nvl(p_rec.information5, hr_api.g_varchar2)  or
166     nvl(hr_tpp_shd.g_old_rec.information6, hr_api.g_varchar2) <>
167     nvl(p_rec.information6, hr_api.g_varchar2)  or
168     nvl(hr_tpp_shd.g_old_rec.information7, hr_api.g_varchar2) <>
169     nvl(p_rec.information7, hr_api.g_varchar2)  or
170     nvl(hr_tpp_shd.g_old_rec.information8, hr_api.g_varchar2) <>
171     nvl(p_rec.information8, hr_api.g_varchar2)  or
172     nvl(hr_tpp_shd.g_old_rec.information9, hr_api.g_varchar2) <>
173     nvl(p_rec.information9, hr_api.g_varchar2)  or
174     nvl(hr_tpp_shd.g_old_rec.information10, hr_api.g_varchar2) <>
175     nvl(p_rec.information10, hr_api.g_varchar2)  or
176     nvl(hr_tpp_shd.g_old_rec.information11, hr_api.g_varchar2) <>
177     nvl(p_rec.information11, hr_api.g_varchar2)  or
178     nvl(hr_tpp_shd.g_old_rec.information12, hr_api.g_varchar2) <>
179     nvl(p_rec.information12, hr_api.g_varchar2)  or
180     nvl(hr_tpp_shd.g_old_rec.information13, hr_api.g_varchar2) <>
181     nvl(p_rec.information13, hr_api.g_varchar2)  or
182     nvl(hr_tpp_shd.g_old_rec.information14, hr_api.g_varchar2) <>
183     nvl(p_rec.information14, hr_api.g_varchar2)  or
184     nvl(hr_tpp_shd.g_old_rec.information15, hr_api.g_varchar2) <>
185     nvl(p_rec.information15, hr_api.g_varchar2)  or
186     nvl(hr_tpp_shd.g_old_rec.information16, hr_api.g_varchar2) <>
187     nvl(p_rec.information16, hr_api.g_varchar2)  or
188     nvl(hr_tpp_shd.g_old_rec.information17, hr_api.g_varchar2) <>
189     nvl(p_rec.information17, hr_api.g_varchar2)  or
190     nvl(hr_tpp_shd.g_old_rec.information18, hr_api.g_varchar2) <>
191     nvl(p_rec.information18, hr_api.g_varchar2)  or
192     nvl(hr_tpp_shd.g_old_rec.information19, hr_api.g_varchar2) <>
193     nvl(p_rec.information19, hr_api.g_varchar2)  or
194     nvl(hr_tpp_shd.g_old_rec.information20, hr_api.g_varchar2) <>
195     nvl(p_rec.information20, hr_api.g_varchar2)  or
196     nvl(hr_tpp_shd.g_old_rec.information21, hr_api.g_varchar2) <>
197     nvl(p_rec.information21, hr_api.g_varchar2)  or
198     nvl(hr_tpp_shd.g_old_rec.information22, hr_api.g_varchar2) <>
199     nvl(p_rec.information22, hr_api.g_varchar2)  or
200     nvl(hr_tpp_shd.g_old_rec.information23, hr_api.g_varchar2) <>
201     nvl(p_rec.information23, hr_api.g_varchar2)  or
202     nvl(hr_tpp_shd.g_old_rec.information24, hr_api.g_varchar2) <>
203     nvl(p_rec.information24, hr_api.g_varchar2)  or
204     nvl(hr_tpp_shd.g_old_rec.information25, hr_api.g_varchar2) <>
205     nvl(p_rec.information25, hr_api.g_varchar2)  or
206     nvl(hr_tpp_shd.g_old_rec.information26, hr_api.g_varchar2) <>
207     nvl(p_rec.information26, hr_api.g_varchar2)  or
208     nvl(hr_tpp_shd.g_old_rec.information27, hr_api.g_varchar2) <>
209     nvl(p_rec.information27, hr_api.g_varchar2)  or
210     nvl(hr_tpp_shd.g_old_rec.information28, hr_api.g_varchar2) <>
211     nvl(p_rec.information28, hr_api.g_varchar2)  or
212     nvl(hr_tpp_shd.g_old_rec.information29, hr_api.g_varchar2) <>
213     nvl(p_rec.information29, hr_api.g_varchar2)  or
214     nvl(hr_tpp_shd.g_old_rec.information30, hr_api.g_varchar2) <>
215     nvl(p_rec.information30, hr_api.g_varchar2) )
216     or (p_rec.tab_page_property_id is null) ) then
217     --
218     -- Only execute the validation if absolutely necessary:
219     -- a) During update, the structure column value or any
220     --    of the attribute values have actually changed.
221     -- b) During insert.
222     --
223     hr_dflex_utility.ins_or_upd_descflex_attribs
224       (p_appl_short_name                 => 'PER'
225       ,p_descflex_name                   => 'HR_TAB_PAGE_PROPERTIES'
226       ,p_attribute_category              => p_rec.information_category
227       ,p_attribute1_name                 => 'INFORMATION1'
228       ,p_attribute1_value                => p_rec.information1
229       ,p_attribute2_name                 => 'INFORMATION2'
230       ,p_attribute2_value                => p_rec.information2
231       ,p_attribute3_name                 => 'INFORMATION3'
232       ,p_attribute3_value                => p_rec.information3
233       ,p_attribute4_name                 => 'INFORMATION4'
234       ,p_attribute4_value                => p_rec.information4
235       ,p_attribute5_name                 => 'INFORMATION5'
236       ,p_attribute5_value                => p_rec.information5
237       ,p_attribute6_name                 => 'INFORMATION6'
238       ,p_attribute6_value                => p_rec.information6
239       ,p_attribute7_name                 => 'INFORMATION7'
240       ,p_attribute7_value                => p_rec.information7
241       ,p_attribute8_name                 => 'INFORMATION8'
242       ,p_attribute8_value                => p_rec.information8
243       ,p_attribute9_name                 => 'INFORMATION9'
244       ,p_attribute9_value                => p_rec.information9
245       ,p_attribute10_name                => 'INFORMATION10'
246       ,p_attribute10_value               => p_rec.information10
247       ,p_attribute11_name                => 'INFORMATION11'
248       ,p_attribute11_value               => p_rec.information11
249       ,p_attribute12_name                => 'INFORMATION12'
250       ,p_attribute12_value               => p_rec.information12
251       ,p_attribute13_name                => 'INFORMATION13'
252       ,p_attribute13_value               => p_rec.information13
253       ,p_attribute14_name                => 'INFORMATION14'
254       ,p_attribute14_value               => p_rec.information14
255       ,p_attribute15_name                => 'INFORMATION15'
256       ,p_attribute15_value               => p_rec.information15
257       ,p_attribute16_name                => 'INFORMATION16'
258       ,p_attribute16_value               => p_rec.information16
259       ,p_attribute17_name                => 'INFORMATION17'
260       ,p_attribute17_value               => p_rec.information17
261       ,p_attribute18_name                => 'INFORMATION18'
262       ,p_attribute18_value               => p_rec.information18
263       ,p_attribute19_name                => 'INFORMATION19'
264       ,p_attribute19_value               => p_rec.information19
265       ,p_attribute20_name                => 'INFORMATION20'
266       ,p_attribute20_value               => p_rec.information20
267       ,p_attribute21_name                => 'INFORMATION21'
268       ,p_attribute21_value               => p_rec.information21
269       ,p_attribute22_name                => 'INFORMATION22'
270       ,p_attribute22_value               => p_rec.information22
271       ,p_attribute23_name                => 'INFORMATION23'
272       ,p_attribute23_value               => p_rec.information23
273       ,p_attribute24_name                => 'INFORMATION24'
274       ,p_attribute24_value               => p_rec.information24
275       ,p_attribute25_name                => 'INFORMATION25'
276       ,p_attribute25_value               => p_rec.information25
277       ,p_attribute26_name                => 'INFORMATION26'
278       ,p_attribute26_value               => p_rec.information26
279       ,p_attribute27_name                => 'INFORMATION27'
280       ,p_attribute27_value               => p_rec.information27
281       ,p_attribute28_name                => 'INFORMATION28'
282       ,p_attribute28_value               => p_rec.information28
283       ,p_attribute29_name                => 'INFORMATION29'
284       ,p_attribute29_value               => p_rec.information29
285       ,p_attribute30_name                => 'INFORMATION30'
286       ,p_attribute30_value               => p_rec.information30
287       );
288   end if;
289   --
290   hr_utility.set_location(' Leaving:'||l_proc,20);
291 end chk_ddf;
292 --
293 -- ----------------------------------------------------------------------------
294 -- |-----------------------< chk_non_updateable_args >------------------------|
295 -- ----------------------------------------------------------------------------
296 -- {Start Of Comments}
297 --
298 -- Description:
299 --   This procedure is used to ensure that non updateable attributes have
300 --   not been updated. If an attribute has been updated an error is generated.
301 --
302 -- Pre Conditions:
303 --   g_old_rec has been populated with details of the values currently in
304 --   the database.
305 --
306 -- In Arguments:
307 --   p_rec has been populated with the updated values the user would like the
308 --   record set to.
309 --
310 -- Post Success:
311 --   Processing continues if all the non updateable attributes have not
312 --   changed.
313 --
314 -- Post Failure:
315 --   An application error is raised if any of the non updatable attributes
316 --   have been altered.
317 --
318 -- {End Of Comments}
319 -- ----------------------------------------------------------------------------
320 Procedure chk_non_updateable_args
321   (p_effective_date               in date
322   ,p_rec in hr_tpp_shd.g_rec_type
323   ) IS
324 --
325   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
326   l_error    EXCEPTION;
327   l_argument varchar2(30);
328 --
329 Begin
330   --
331   -- Only proceed with the validation if a row exists for the current
332   -- record in the HR Schema.
333   --
334   IF NOT hr_tpp_shd.api_updating
335       (p_tab_page_property_id                 => p_rec.tab_page_property_id
336       ,p_object_version_number                => p_rec.object_version_number
337       ) THEN
338      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
339      fnd_message.set_token('PROCEDURE ', l_proc);
340      fnd_message.set_token('STEP ', '5');
341      fnd_message.raise_error;
342   END IF;
343   --
344   IF (nvl(p_rec.form_tab_page_id,hr_api.g_number) <>
345       nvl(hr_tpp_shd.g_old_rec.form_tab_page_id,hr_api.g_number)
346      ) THEN
347      l_argument := 'form_tab_page_id';
348      RAISE l_error;
349   END IF;
350   --
351   IF (nvl(p_rec.template_tab_page_id,hr_api.g_number) <>
352       nvl(hr_tpp_shd.g_old_rec.template_tab_page_id,hr_api.g_number)
353      ) THEN
354      l_argument := 'template_tab_page_id';
355      RAISE l_error;
356   END IF;
357   --
358   EXCEPTION
359     WHEN l_error THEN
360        hr_api.argument_changed_error
361          (p_api_name => l_proc
362          ,p_argument => l_argument);
363     WHEN OTHERS THEN
364        RAISE;
365 End chk_non_updateable_args;
366 --
367 -- ----------------------------------------------------------------------------
368 -- |--------------------< chk_form_and_template_tab_page >--------------------|
369 -- ----------------------------------------------------------------------------
370 Procedure chk_form_and_template_tab_page
371   (p_effective_date               in date
372   ,p_tab_page_property_id         in number
373   ,p_form_tab_page_id             in number
374   ,p_template_tab_page_id         in number
375   ) is
376   --
377   l_proc                         varchar2(72) := g_package || 'chk_form_and_template_tab_page';
378   l_api_updating                 boolean;
379   --
380 Begin
381   hr_utility.set_location('Entering:'||l_proc, 10);
382   --
383   -- One and only one of form_tab_page_id and template_tab_page_id must be given
384   --
385   if not (  (   p_form_tab_page_id is not null
386             and p_template_tab_page_id is null)
387          or (   p_form_tab_page_id is null
388             and p_template_tab_page_id is not null)) then
389     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
390     fnd_message.set_token('PROCEDURE', l_proc);
391     fnd_message.set_token('STEP','10');
392     fnd_message.raise_error;
393   end if;
394   --
395   hr_utility.set_location('Leaving:'||l_proc, 100);
396 End chk_form_and_template_tab_page;
397 --
398 -- ----------------------------------------------------------------------------
399 -- |-------------------------< chk_form_tab_page_id >-------------------------|
400 -- ----------------------------------------------------------------------------
401 Procedure chk_form_tab_page_id
402   (p_effective_date               in date
403   ,p_tab_page_property_id         in number
404   ,p_form_tab_page_id             in number
405   ) is
406   --
407   l_proc                         varchar2(72) := g_package || 'chk_form_tab_page_id';
408   l_api_updating                 boolean;
409   l_canvas_type                  varchar2(30);
410   --
411 Begin
412   hr_utility.set_location('Entering:'||l_proc, 10);
413   --
414   -- No additional validation required
415   --
416   null;
417   --
418   hr_utility.set_location('Leaving:'||l_proc, 100);
419 End chk_form_tab_page_id;
420 --
421 -- ----------------------------------------------------------------------------
422 -- |-----------------------< chk_template_tab_page_id >-----------------------|
423 -- ----------------------------------------------------------------------------
424 Procedure chk_template_tab_page_id
425   (p_effective_date               in date
426   ,p_tab_page_property_id         in number
427   ,p_template_tab_page_id         in number
428   ) is
429   --
430   l_proc                         varchar2(72) := g_package || 'chk_template_tab_page_id';
431   l_api_updating                 boolean;
432   --
433 Begin
434   hr_utility.set_location('Entering:'||l_proc, 10);
435   --
436   -- No additional validation required
437   --
438   null;
439   --
440   hr_utility.set_location('Leaving:'||l_proc, 100);
441 End chk_template_tab_page_id;
442 --
443 -- ----------------------------------------------------------------------------
444 -- |-----------------------< chk_navigation_direction >-----------------------|
445 -- ----------------------------------------------------------------------------
446 Procedure chk_navigation_direction
447   (p_effective_date               in date
448   ,p_object_version_number        in number
449   ,p_tab_page_property_id         in number
450   ,p_navigation_direction         in varchar2
451   ) is
452   --
453   l_proc                         varchar2(72) := g_package || 'chk_navigation_direction';
454   l_api_updating                 boolean;
455   --
456 Begin
457   hr_utility.set_location('Entering:'||l_proc, 10);
458   --
459   -- Check mandatory arguments have been set
460   --
461   hr_api.mandatory_arg_error
462     (p_api_name                     => l_proc
463     ,p_argument                     => 'effective_date'
464     ,p_argument_value               => p_effective_date
465     );
466   --
467   l_api_updating := hr_tpp_shd.api_updating
468     (p_tab_page_property_id        => p_tab_page_property_id
469     ,p_object_version_number       => p_object_version_number
470     );
471   hr_utility.set_location(l_proc,20);
472   --
473   -- Only proceed with SQL validation if absolutely necessary
474   --
475   if (  (   l_api_updating
476         and nvl(hr_tpp_shd.g_old_rec.navigation_direction,hr_api.g_varchar2) <>
477             nvl(p_navigation_direction,hr_api.g_varchar2))
478      or (NOT l_api_updating)) then
479     --
480     hr_utility.set_location(l_proc,30);
481     --
482     if (p_navigation_direction is not null) then
483       --
484       hr_utility.set_location(l_proc,40);
485       --
486       -- Must exist in hr_standard_lookups where lookup_type is
487       -- NAVIGATION_DIRECTION
488       --
489       if hr_api.not_exists_in_hrstanlookups
490         (p_effective_date               => p_effective_date
491         ,p_lookup_type                  => 'NAVIGATION_DIRECTION'
492         ,p_lookup_code                  => p_navigation_direction
493         ) then
494         fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
495         fnd_message.set_token('PROCEDURE', l_proc);
496         fnd_message.set_token('STEP','10');
497         fnd_message.raise_error;
498       end if;
499       --
500     end if;
501     --
502   end if;
503   --
504   hr_utility.set_location('Leaving:'||l_proc, 100);
505 End chk_navigation_direction;
506 --
507 -- ----------------------------------------------------------------------------
508 -- |-----------------------------< chk_visible >------------------------------|
509 -- ----------------------------------------------------------------------------
510 Procedure chk_visible
511   (p_effective_date               in date
512   ,p_object_version_number        in number
513   ,p_tab_page_property_id         in number
514   ,p_visible                      in number
515   ) is
516   --
517   l_proc                         varchar2(72) := g_package || 'chk_visible';
518   l_api_updating                 boolean;
519   --
520 Begin
521   hr_utility.set_location('Entering:'||l_proc, 10);
522   --
523   -- Check mandatory arguments have been set
524   --
525   hr_api.mandatory_arg_error
526     (p_api_name                     => l_proc
527     ,p_argument                     => 'effective_date'
528     ,p_argument_value               => p_effective_date
529     );
530   --
531   l_api_updating := hr_tpp_shd.api_updating
532     (p_tab_page_property_id           => p_tab_page_property_id
533     ,p_object_version_number          => p_object_version_number
534     );
535   hr_utility.set_location(l_proc,20);
536   --
537   -- Only proceed with SQL validation if absolutely necessary
538   --
539   if (  (   l_api_updating
540         and nvl(hr_tpp_shd.g_old_rec.visible,hr_api.g_number) <>
541             nvl(p_visible,hr_api.g_number))
542      or (NOT l_api_updating)) then
543     --
544     hr_utility.set_location(l_proc,30);
545     --
546     if (p_visible is not null) then
547       --
548       hr_utility.set_location(l_proc,40);
549       --
550       -- Must exist in hr_standard_lookups where lookup_type is
551       -- PROPERTY_TRUE_OR_FALSE
552       --
553       if hr_api.not_exists_in_hrstanlookups
554         (p_effective_date               => p_effective_date
555         ,p_lookup_type                  => 'PROPERTY_TRUE_OR_FALSE'
556         ,p_lookup_code                  => p_visible
557         ) then
558         fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
559         fnd_message.set_token('PROCEDURE', l_proc);
560         fnd_message.set_token('STEP','10');
561         fnd_message.raise_error;
562       end if;
563       --
564     end if;
565     --
566   end if;
567   --
568   hr_utility.set_location('Leaving:'||l_proc, 100);
569 End chk_visible;
570 --
571 -- ----------------------------------------------------------------------------
572 -- |------------------------------< chk_delete >------------------------------|
573 -- ----------------------------------------------------------------------------
574 Procedure chk_delete
575   (p_rec                          in hr_tpp_shd.g_rec_type
576   ) is
577 --
578   l_proc  varchar2(72) := g_package||'chk_delete';
579 --
580 Begin
581   hr_utility.set_location('Entering:'||l_proc, 5);
582   --
583   -- No additional validation required
584   --
585   null;
586   --
587   hr_utility.set_location(' Leaving:'||l_proc, 10);
588 End chk_delete;
589 --
590 -- ----------------------------------------------------------------------------
591 -- |---------------------------< insert_validate >----------------------------|
592 -- ----------------------------------------------------------------------------
593 Procedure insert_validate
594   (p_effective_date               in date
595   ,p_rec                          in hr_tpp_shd.g_rec_type
596   ) is
597 --
598   l_proc  varchar2(72) := g_package||'insert_validate';
599 --
600 Begin
601   hr_utility.set_location('Entering:'||l_proc, 5);
602   --
603   -- Check mandatory arguments have been set
604   --
605   hr_api.mandatory_arg_error
606     (p_api_name                     => l_proc
607     ,p_argument                     => 'effective_date'
608     ,p_argument_value               => p_effective_date
609     );
610   --
611   -- Call all supporting business operations
612   -- No business group context.  HR_STANDARD_LOOKUPS used for validation.
613   --
614   chk_form_and_template_tab_page
615     (p_effective_date               => p_effective_date
616     ,p_tab_page_property_id         => p_rec.tab_page_property_id
617     ,p_form_tab_page_id             => p_rec.form_tab_page_id
618     ,p_template_tab_page_id         => p_rec.template_tab_page_id
619     );
620   --
621   chk_form_tab_page_id
622     (p_effective_date               => p_effective_date
623     ,p_tab_page_property_id         => p_rec.tab_page_property_id
624     ,p_form_tab_page_id             => p_rec.form_tab_page_id
625     );
626   --
627   chk_template_tab_page_id
628     (p_effective_date               => p_effective_date
629     ,p_tab_page_property_id         => p_rec.tab_page_property_id
630     ,p_template_tab_page_id         => p_rec.template_tab_page_id
631     );
632   --
633   chk_navigation_direction
634     (p_effective_date               => p_effective_date
635     ,p_object_version_number        => p_rec.object_version_number
636     ,p_tab_page_property_id         => p_rec.tab_page_property_id
637     ,p_navigation_direction         => p_rec.navigation_direction
638     );
639   --
640   chk_visible
641     (p_effective_date               => p_effective_date
642     ,p_object_version_number        => p_rec.object_version_number
643     ,p_tab_page_property_id         => p_rec.tab_page_property_id
644     ,p_visible                      => p_rec.visible
645     );
646   --
647   chk_ddf
648     (p_rec                          => p_rec
649     );
650   --
651   hr_utility.set_location(' Leaving:'||l_proc, 10);
652 End insert_validate;
653 --
654 -- ----------------------------------------------------------------------------
655 -- |---------------------------< update_validate >----------------------------|
656 -- ----------------------------------------------------------------------------
657 Procedure update_validate
658   (p_effective_date               in date
659   ,p_rec                          in hr_tpp_shd.g_rec_type
660   ) is
661 --
662   l_proc  varchar2(72) := g_package||'update_validate';
663 --
664 Begin
665   hr_utility.set_location('Entering:'||l_proc, 5);
666   --
667   -- Check mandatory arguments have been set
668   --
669   hr_api.mandatory_arg_error
670     (p_api_name                     => l_proc
671     ,p_argument                     => 'effective_date'
672     ,p_argument_value               => p_effective_date
673     );
674   --
675   -- Call all supporting business operations
676   -- No business group context.  HR_STANDARD_LOOKUPS used for validation.
677   --
678   chk_non_updateable_args
679     (p_effective_date               => p_effective_date
680     ,p_rec                          => p_rec
681     );
682   --
683   chk_form_and_template_tab_page
684     (p_effective_date               => p_effective_date
685     ,p_tab_page_property_id         => p_rec.tab_page_property_id
686     ,p_form_tab_page_id             => p_rec.form_tab_page_id
687     ,p_template_tab_page_id         => p_rec.template_tab_page_id
688     );
689   --
690   chk_form_tab_page_id
691     (p_effective_date               => p_effective_date
692     ,p_tab_page_property_id         => p_rec.tab_page_property_id
693     ,p_form_tab_page_id             => p_rec.form_tab_page_id
694     );
695   --
696   chk_template_tab_page_id
697     (p_effective_date               => p_effective_date
698     ,p_tab_page_property_id         => p_rec.tab_page_property_id
699     ,p_template_tab_page_id         => p_rec.template_tab_page_id
700     );
701   --
702   chk_navigation_direction
703     (p_effective_date               => p_effective_date
704     ,p_object_version_number        => p_rec.object_version_number
705     ,p_tab_page_property_id         => p_rec.tab_page_property_id
706     ,p_navigation_direction         => p_rec.navigation_direction
707     );
708   --
709   chk_visible
710     (p_effective_date               => p_effective_date
711     ,p_object_version_number        => p_rec.object_version_number
712     ,p_tab_page_property_id         => p_rec.tab_page_property_id
713     ,p_visible                      => p_rec.visible
714     );
715   --
716   chk_ddf
717     (p_rec                          => p_rec
718     );
719   --
720   hr_utility.set_location(' Leaving:'||l_proc, 10);
721 End update_validate;
722 --
723 -- ----------------------------------------------------------------------------
724 -- |---------------------------< delete_validate >----------------------------|
725 -- ----------------------------------------------------------------------------
726 Procedure delete_validate
727   (p_rec                          in hr_tpp_shd.g_rec_type
728   ) is
729 --
730   l_proc  varchar2(72) := g_package||'delete_validate';
731 --
732 Begin
733   hr_utility.set_location('Entering:'||l_proc, 5);
734   --
735   -- Call all supporting business operations
736   --
737   chk_delete
738     (p_rec                          => p_rec
739     );
740   --
741   hr_utility.set_location(' Leaving:'||l_proc, 10);
742 End delete_validate;
743 --
744 end hr_tpp_bus;