[Home] [Help]
PACKAGE BODY: APPS.PER_COT_BUS
Source
1 Package Body per_cot_bus as
2 /* $Header: pecotrhi.pkb 115.0 2004/03/17 10:57 ynegoro noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_cot_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_outcome_id number default null;
15 g_language varchar2(4) default null;
16 --
17 -- ---------------------------------------------------------------------------
18 -- |----------------------< set_security_group_id >--------------------------|
19 -- ---------------------------------------------------------------------------
20 --
21 Procedure set_security_group_id
22 (p_outcome_id in number
23 ,p_associated_column1 in varchar2 default null
24 ) is
25 --
26 l_security_group_id number;
27 l_proc varchar2(72) := g_package||'set_security_group_id';
28 l_legislation_code varchar2(150);
29 --
30 begin
31 --
32 hr_utility.set_location('Entering:'|| l_proc, 10);
33 --
34 --
35 per_cpo_bus.set_security_group_id(
36 p_outcome_id => p_outcome_id
37 ,p_associated_column1 => p_associated_column1
38 );
39 --
40 hr_utility.set_location(' Leaving:'|| l_proc, 20);
41 --
42 end set_security_group_id;
43 --
44 -- ----------------------------------------------------------------------------
45 -- |-----------------------< chk_non_updateable_args >------------------------|
46 -- ----------------------------------------------------------------------------
47 -- {Start Of Comments}
48 --
49 -- Description:
50 -- This procedure is used to ensure that non updateable attributes have
51 -- not been updated. If an attribute has been updated an error is generated.
52 --
53 -- Pre Conditions:
54 -- g_old_rec has been populated with details of the values currently in
55 -- the database.
56 --
57 -- In Arguments:
58 -- p_rec has been populated with the updated values the user would like the
59 -- record set to.
60 --
61 -- Post Success:
62 -- Processing continues if all the non updateable attributes have not
63 -- changed.
64 --
65 -- Post Failure:
66 -- An application error is raised if any of the non updatable attributes
67 -- have been altered.
68 --
69 -- {End Of Comments}
70 -- ----------------------------------------------------------------------------
71 Procedure chk_non_updateable_args
72 (p_rec in per_cot_shd.g_rec_type
73 ) IS
74 --
75 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
76 --
77 Begin
78 --
79 -- Only proceed with the validation if a row exists for the current
80 -- record in the HR Schema.
81 --
82 IF NOT per_cot_shd.api_updating
83 (p_outcome_id => p_rec.outcome_id
84 ,p_language => p_rec.language
85 ) THEN
86 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
87 fnd_message.set_token('PROCEDURE ', l_proc);
88 fnd_message.set_token('STEP ', '5');
89 fnd_message.raise_error;
90 END IF;
91 --
92 --
93 End chk_non_updateable_args;
94 --
95 -- ----------------------------------------------------------------------------
96 -- |---------------------------< insert_validate >----------------------------|
97 -- ----------------------------------------------------------------------------
98 Procedure insert_validate
99 (p_rec in per_cot_shd.g_rec_type
100 ) is
101 --
102 l_proc varchar2(72) := g_package||'insert_validate';
103 --
104 Begin
105 hr_utility.set_location('Entering:'||l_proc, 5);
106 --
107 -- Call all supporting business operations
108 --
109 --
110 -- Validate Dependent Attributes
111 --
112 --
113 hr_utility.set_location(' Leaving:'||l_proc, 10);
114 End insert_validate;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |---------------------------< update_validate >----------------------------|
118 -- ----------------------------------------------------------------------------
119 Procedure update_validate
120 (p_rec in per_cot_shd.g_rec_type
121 ) is
122 --
123 l_proc varchar2(72) := g_package||'update_validate';
124 --
125 Begin
126 hr_utility.set_location('Entering:'||l_proc, 5);
127 --
128 -- Call all supporting business operations
129 --
130 --
131 -- Validate Dependent Attributes
132 --
133 chk_non_updateable_args
134 (p_rec => p_rec
135 );
136 --
137 --
138 hr_utility.set_location(' Leaving:'||l_proc, 10);
139 End update_validate;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |---------------------------< delete_validate >----------------------------|
143 -- ----------------------------------------------------------------------------
144 Procedure delete_validate
145 (p_rec in per_cot_shd.g_rec_type
146 ) is
147 --
148 l_proc varchar2(72) := g_package||'delete_validate';
149 --
150 Begin
151 hr_utility.set_location('Entering:'||l_proc, 5);
152 --
153 -- Call all supporting business operations
154 --
155 hr_utility.set_location(' Leaving:'||l_proc, 10);
156 End delete_validate;
157 --
158 end per_cot_bus;