DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_DTT_BUS

Source


1 Package Body hr_dtt_bus as
2 /* $Header: hrdttrhi.pkb 120.0 2005/05/30 23:52:36 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  hr_dtt_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_document_type_id            number         default null;
15 g_language                    varchar2(4)    default null;
16 --
17 -- ----------------------------------------------------------------------------
18 -- |-----------------------< chk_non_updateable_args >------------------------|
19 -- ----------------------------------------------------------------------------
20 -- {Start Of Comments}
21 --
22 -- Description:
23 --   This procedure is used to ensure that non updateable attributes have
24 --   not been updated. If an attribute has been updated an error is generated.
25 --
26 -- Pre Conditions:
27 --   g_old_rec has been populated with details of the values currently in
28 --   the database.
29 --
30 -- In Arguments:
31 --   p_rec has been populated with the updated values the user would like the
32 --   record set to.
33 --
34 -- Post Success:
35 --   Processing continues if all the non updateable attributes have not
36 --   changed.
37 --
38 -- Post Failure:
39 --   An application error is raised if any of the non updatable attributes
40 --   have been altered.
41 --
42 -- {End Of Comments}
43 -- ----------------------------------------------------------------------------
44 Procedure chk_non_updateable_args
45   (p_rec in hr_dtt_shd.g_rec_type
46   ) IS
47 --
48   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
49 --
50 Begin
51   --
52   -- Only proceed with the validation if a row exists for the current
53   -- record in the HR Schema.
54   --
55   IF NOT hr_dtt_shd.api_updating
56       (p_document_type_id                  => p_rec.document_type_id
57       ,p_language                          => p_rec.language
58       ) THEN
59      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
60      fnd_message.set_token('PROCEDURE ', l_proc);
61      fnd_message.set_token('STEP ', '5');
62      fnd_message.raise_error;
63   END IF;
64   --
65 End chk_non_updateable_args;
66 --
67 -- ----------------------------------------------------------------------------
68 -- |---------------------------< insert_validate >----------------------------|
69 -- ----------------------------------------------------------------------------
70 Procedure insert_validate
71   (p_rec                          in hr_dtt_shd.g_rec_type
72   ) is
73 --
74   l_proc  varchar2(72) := g_package||'insert_validate';
75 --
76 Begin
77   hr_utility.set_location('Entering:'||l_proc, 5);
78   --
79   -- Call all supporting business operations
80   --
81   --
82   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
83   --
84   -- Validate Dependent Attributes
85   --
86   --
87   hr_utility.set_location(' Leaving:'||l_proc, 10);
88 End insert_validate;
89 --
90 -- ----------------------------------------------------------------------------
91 -- |---------------------------< update_validate >----------------------------|
92 -- ----------------------------------------------------------------------------
93 Procedure update_validate
94   (p_rec                          in hr_dtt_shd.g_rec_type
95   ) is
96 --
97   l_proc  varchar2(72) := g_package||'update_validate';
98 --
99 Begin
100   hr_utility.set_location('Entering:'||l_proc, 5);
101   --
102   -- Call all supporting business operations
103   --
104   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
105   --
106   -- Validate Dependent Attributes
107   --
108   chk_non_updateable_args
109     (p_rec              => p_rec
110     );
111   --
112   --
113   hr_utility.set_location(' Leaving:'||l_proc, 10);
114 End update_validate;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |---------------------------< delete_validate >----------------------------|
118 -- ----------------------------------------------------------------------------
119 Procedure delete_validate
120   (p_rec                          in hr_dtt_shd.g_rec_type
121   ) is
122 --
123   l_proc  varchar2(72) := g_package||'delete_validate';
124 --
125 Begin
126   hr_utility.set_location('Entering:'||l_proc, 5);
127   --
128   -- Call all supporting business operations
129   --
130   hr_utility.set_location(' Leaving:'||l_proc, 10);
131 End delete_validate;
132 --
133 end hr_dtt_bus;