DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PRF_BUS

Source


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