1 Package Body ben_psg_bus as
2 /* $Header: bepsgrhi.pkb 120.0 2005/09/29 06:19:33 ssarkar noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_psg_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-----------------------< chk_non_updateable_args >------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure is used to ensure that non updateable attributes have
17 -- not been updated. If an attribute has been updated an error is generated.
18 --
19 -- Pre Conditions:
20 -- g_old_rec has been populated with details of the values currently in
21 -- the database.
22 --
23 -- In Arguments:
24 -- p_rec has been populated with the updated values the user would like the
25 -- record set to.
26 --
27 -- Post Success:
28 -- Processing continues if all the non updateable attributes have not
29 -- changed.
30 --
31 -- Post Failure:
32 -- An application error is raised if any of the non updatable attributes
33 -- have been altered.
34 --
35 -- {End Of Comments}
36 -- ----------------------------------------------------------------------------
37 Procedure chk_non_updateable_args
38 (p_rec in ben_psg_shd.g_rec_type
39 ) IS
40 --
41 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
42 --
43 Begin
44 --
45 -- Only proceed with the validation if a row exists for the current
46 -- record in the HR Schema.
47 --
48 IF NOT ben_psg_shd.api_updating
49 (p_pil_assignment_id => p_rec.pil_assignment_id
50 ,p_object_version_number => p_rec.object_version_number
51 ) THEN
52 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
53 fnd_message.set_token('PROCEDURE ', l_proc);
54 fnd_message.set_token('STEP ', '5');
55 fnd_message.raise_error;
56 END IF;
57 --
58 -- EDIT_HERE: Add checks to ensure non-updateable args have
59 -- not been updated.
60 --
61 End chk_non_updateable_args;
62 --
63 -- ----------------------------------------------------------------------------
64 -- |---------------------------< insert_validate >----------------------------|
65 -- ----------------------------------------------------------------------------
66 Procedure insert_validate
67 (p_rec in ben_psg_shd.g_rec_type
68 ) is
69 --
70 l_proc varchar2(72) := g_package||'insert_validate';
71 --
72 Begin
73 hr_utility.set_location('Entering:'||l_proc, 5);
74 --
75 -- Call all supporting business operations
76 --
77 --
78 -- EDIT_HERE: As this table does not have a mandatory business_group_id
79 -- column, ensure client_info is populated by calling a suitable
80 -- ???_???_bus.set_security_group_id procedure, or add one of the following
81 -- comments:
82 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
83 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
84 --
85 -- Validate Dependent Attributes
86 --
87 --
88 hr_utility.set_location(' Leaving:'||l_proc, 10);
89 End insert_validate;
90 --
91 -- ----------------------------------------------------------------------------
92 -- |---------------------------< update_validate >----------------------------|
93 -- ----------------------------------------------------------------------------
94 Procedure update_validate
95 (p_rec in ben_psg_shd.g_rec_type
96 ) is
97 --
98 l_proc varchar2(72) := g_package||'update_validate';
99 --
100 Begin
101 hr_utility.set_location('Entering:'||l_proc, 5);
102 --
103 -- Call all supporting business operations
104 --
105 --
106 -- EDIT_HERE: As this table does not have a mandatory business_group_id
107 -- column, ensure client_info is populated by calling a suitable
108 -- ???_???_bus.set_security_group_id procedure, or add one of the following
109 -- comments:
110 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
111 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
112 --
113 -- Validate Dependent Attributes
114 --
115 chk_non_updateable_args
116 (p_rec => p_rec
117 );
118 --
119 --
120 hr_utility.set_location(' Leaving:'||l_proc, 10);
121 End update_validate;
122 --
123 -- ----------------------------------------------------------------------------
124 -- |---------------------------< delete_validate >----------------------------|
125 -- ----------------------------------------------------------------------------
126 Procedure delete_validate
127 (p_rec in ben_psg_shd.g_rec_type
128 ) is
129 --
130 l_proc varchar2(72) := g_package||'delete_validate';
131 --
132 Begin
133 hr_utility.set_location('Entering:'||l_proc, 5);
134 --
135 -- Call all supporting business operations
136 --
137 hr_utility.set_location(' Leaving:'||l_proc, 10);
138 End delete_validate;
139 --
140 end ben_psg_bus;