[Home] [Help]
PACKAGE BODY: APPS.PQP_PCV_BUS
Source
1 Package Body pqp_pcv_bus as
2 /* $Header: pqpcvrhi.pkb 120.0 2005/05/29 01:55:22 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqp_pcv_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_configuration_value_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_configuration_value_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 , pqp_configuration_values pcv
32 where pcv.configuration_value_id = p_configuration_value_id
33 and pbg.business_group_id = pcv.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 => 'configuration_value_id'
50 ,p_argument_value => p_configuration_value_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,'CONFIGURATION_VALUE_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_configuration_value_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 , pqp_configuration_values pcv
102 where pcv.configuration_value_id = p_configuration_value_id
103 and pbg.business_group_id (+) = pcv.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 => 'configuration_value_id'
119 ,p_argument_value => p_configuration_value_id
120 );
121 --
122 if ( nvl(pqp_pcv_bus.g_configuration_value_id, hr_api.g_number)
123 = p_configuration_value_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 := pqp_pcv_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 pqp_pcv_bus.g_configuration_value_id := p_configuration_value_id;
154 pqp_pcv_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 pqp_pcv_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.configuration_value_id is not null) and (
198 nvl(pqp_pcv_shd.g_old_rec.pcv_information_category, hr_api.g_varchar2) <>
199 nvl(p_rec.pcv_information_category, hr_api.g_varchar2) or
200 nvl(pqp_pcv_shd.g_old_rec.pcv_information1, hr_api.g_varchar2) <>
201 nvl(p_rec.pcv_information1, hr_api.g_varchar2) or
202 nvl(pqp_pcv_shd.g_old_rec.pcv_information2, hr_api.g_varchar2) <>
203 nvl(p_rec.pcv_information2, hr_api.g_varchar2) or
204 nvl(pqp_pcv_shd.g_old_rec.pcv_information3, hr_api.g_varchar2) <>
205 nvl(p_rec.pcv_information3, hr_api.g_varchar2) or
206 nvl(pqp_pcv_shd.g_old_rec.pcv_information4, hr_api.g_varchar2) <>
207 nvl(p_rec.pcv_information4, hr_api.g_varchar2) or
208 nvl(pqp_pcv_shd.g_old_rec.pcv_information5, hr_api.g_varchar2) <>
209 nvl(p_rec.pcv_information5, hr_api.g_varchar2) or
210 nvl(pqp_pcv_shd.g_old_rec.pcv_information6, hr_api.g_varchar2) <>
211 nvl(p_rec.pcv_information6, hr_api.g_varchar2) or
212 nvl(pqp_pcv_shd.g_old_rec.pcv_information7, hr_api.g_varchar2) <>
213 nvl(p_rec.pcv_information7, hr_api.g_varchar2) or
214 nvl(pqp_pcv_shd.g_old_rec.pcv_information8, hr_api.g_varchar2) <>
215 nvl(p_rec.pcv_information8, hr_api.g_varchar2) or
216 nvl(pqp_pcv_shd.g_old_rec.pcv_information9, hr_api.g_varchar2) <>
217 nvl(p_rec.pcv_information9, hr_api.g_varchar2) or
218 nvl(pqp_pcv_shd.g_old_rec.pcv_information10, hr_api.g_varchar2) <>
219 nvl(p_rec.pcv_information10, hr_api.g_varchar2) or
220 nvl(pqp_pcv_shd.g_old_rec.pcv_information11, hr_api.g_varchar2) <>
221 nvl(p_rec.pcv_information11, hr_api.g_varchar2) or
222 nvl(pqp_pcv_shd.g_old_rec.pcv_information12, hr_api.g_varchar2) <>
223 nvl(p_rec.pcv_information12, hr_api.g_varchar2) or
224 nvl(pqp_pcv_shd.g_old_rec.pcv_information13, hr_api.g_varchar2) <>
225 nvl(p_rec.pcv_information13, hr_api.g_varchar2) or
226 nvl(pqp_pcv_shd.g_old_rec.pcv_information14, hr_api.g_varchar2) <>
227 nvl(p_rec.pcv_information14, hr_api.g_varchar2) or
228 nvl(pqp_pcv_shd.g_old_rec.pcv_information15, hr_api.g_varchar2) <>
229 nvl(p_rec.pcv_information15, hr_api.g_varchar2) or
230 nvl(pqp_pcv_shd.g_old_rec.pcv_information16, hr_api.g_varchar2) <>
231 nvl(p_rec.pcv_information16, hr_api.g_varchar2) or
232 nvl(pqp_pcv_shd.g_old_rec.pcv_information17, hr_api.g_varchar2) <>
233 nvl(p_rec.pcv_information17, hr_api.g_varchar2) or
234 nvl(pqp_pcv_shd.g_old_rec.pcv_information18, hr_api.g_varchar2) <>
235 nvl(p_rec.pcv_information18, hr_api.g_varchar2) or
236 nvl(pqp_pcv_shd.g_old_rec.pcv_information19, hr_api.g_varchar2) <>
237 nvl(p_rec.pcv_information19, hr_api.g_varchar2) or
238 nvl(pqp_pcv_shd.g_old_rec.pcv_information20, hr_api.g_varchar2) <>
239 nvl(p_rec.pcv_information20, hr_api.g_varchar2) ))
240 or (p_rec.configuration_value_id is null) then
241 --
242 -- Only execute the validation if absolutely necessary:
243 -- a) During update, the structure column value or any
244 -- of the attribute values have actually changed.
245 -- b) During insert.
246 --
247 hr_dflex_utility.ins_or_upd_descflex_attribs
248 (p_appl_short_name => 'PQP'
249 ,p_descflex_name => 'EDIT_HERE: Enter descflex name'
250 ,p_attribute_category => 'PCV_INFORMATION_CATEGORY'
251 ,p_attribute1_name => 'PCV_INFORMATION1'
252 ,p_attribute1_value => p_rec.pcv_information1
253 ,p_attribute2_name => 'PCV_INFORMATION2'
254 ,p_attribute2_value => p_rec.pcv_information2
255 ,p_attribute3_name => 'PCV_INFORMATION3'
256 ,p_attribute3_value => p_rec.pcv_information3
257 ,p_attribute4_name => 'PCV_INFORMATION4'
258 ,p_attribute4_value => p_rec.pcv_information4
259 ,p_attribute5_name => 'PCV_INFORMATION5'
260 ,p_attribute5_value => p_rec.pcv_information5
261 ,p_attribute6_name => 'PCV_INFORMATION6'
262 ,p_attribute6_value => p_rec.pcv_information6
263 ,p_attribute7_name => 'PCV_INFORMATION7'
264 ,p_attribute7_value => p_rec.pcv_information7
265 ,p_attribute8_name => 'PCV_INFORMATION8'
266 ,p_attribute8_value => p_rec.pcv_information8
267 ,p_attribute9_name => 'PCV_INFORMATION9'
268 ,p_attribute9_value => p_rec.pcv_information9
269 ,p_attribute10_name => 'PCV_INFORMATION10'
270 ,p_attribute10_value => p_rec.pcv_information10
271 ,p_attribute11_name => 'PCV_INFORMATION11'
272 ,p_attribute11_value => p_rec.pcv_information11
273 ,p_attribute12_name => 'PCV_INFORMATION12'
274 ,p_attribute12_value => p_rec.pcv_information12
275 ,p_attribute13_name => 'PCV_INFORMATION13'
276 ,p_attribute13_value => p_rec.pcv_information13
277 ,p_attribute14_name => 'PCV_INFORMATION14'
278 ,p_attribute14_value => p_rec.pcv_information14
279 ,p_attribute15_name => 'PCV_INFORMATION15'
280 ,p_attribute15_value => p_rec.pcv_information15
281 ,p_attribute16_name => 'PCV_INFORMATION16'
282 ,p_attribute16_value => p_rec.pcv_information16
283 ,p_attribute17_name => 'PCV_INFORMATION17'
284 ,p_attribute17_value => p_rec.pcv_information17
285 ,p_attribute18_name => 'PCV_INFORMATION18'
286 ,p_attribute18_value => p_rec.pcv_information18
287 ,p_attribute19_name => 'PCV_INFORMATION19'
288 ,p_attribute19_value => p_rec.pcv_information19
289 ,p_attribute20_name => 'PCV_INFORMATION20'
290 ,p_attribute20_value => p_rec.pcv_information20
291 );
292 end if;
293 --
294 hr_utility.set_location(' Leaving:'||l_proc,20);
295 end chk_ddf;
296 --
297 -- ----------------------------------------------------------------------------
298 -- |------------------------------< chk_df >----------------------------------|
299 -- ----------------------------------------------------------------------------
300 --
301 -- Description:
302 -- Validates all the Descriptive Flexfield values.
303 --
304 -- Prerequisites:
305 -- All other columns have been validated. Must be called as the
306 -- last step from insert_validate and update_validate.
307 --
308 -- In Arguments:
309 -- p_rec
310 --
311 -- Post Success:
312 -- If the Descriptive Flexfield structure column and data values are
313 -- all valid this procedure will end normally and processing will
314 -- continue.
315 --
316 -- Post Failure:
317 -- If the Descriptive Flexfield structure column value or any of
318 -- the data values are invalid then an application error is raised as
319 -- a PL/SQL exception.
320 --
321 -- Access Status:
322 -- Internal Row Handler Use Only.
323 --
324 -- ----------------------------------------------------------------------------
325 procedure chk_df
326 (p_rec in pqp_pcv_shd.g_rec_type
327 ) is
328 --
329 l_proc varchar2(72) := g_package || 'chk_df';
330 --
331 begin
332 hr_utility.set_location('Entering:'||l_proc,10);
333 --
334 if ((p_rec.configuration_value_id is not null) and (
335 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute_category, hr_api.g_varchar2) <>
336 nvl(p_rec.pcv_attribute_category, hr_api.g_varchar2) or
337 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute1, hr_api.g_varchar2) <>
338 nvl(p_rec.pcv_attribute1, hr_api.g_varchar2) or
339 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute2, hr_api.g_varchar2) <>
340 nvl(p_rec.pcv_attribute2, hr_api.g_varchar2) or
341 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute3, hr_api.g_varchar2) <>
342 nvl(p_rec.pcv_attribute3, hr_api.g_varchar2) or
343 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute4, hr_api.g_varchar2) <>
344 nvl(p_rec.pcv_attribute4, hr_api.g_varchar2) or
345 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute5, hr_api.g_varchar2) <>
346 nvl(p_rec.pcv_attribute5, hr_api.g_varchar2) or
347 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute6, hr_api.g_varchar2) <>
348 nvl(p_rec.pcv_attribute6, hr_api.g_varchar2) or
349 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute7, hr_api.g_varchar2) <>
350 nvl(p_rec.pcv_attribute7, hr_api.g_varchar2) or
351 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute8, hr_api.g_varchar2) <>
352 nvl(p_rec.pcv_attribute8, hr_api.g_varchar2) or
353 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute9, hr_api.g_varchar2) <>
354 nvl(p_rec.pcv_attribute9, hr_api.g_varchar2) or
355 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute10, hr_api.g_varchar2) <>
356 nvl(p_rec.pcv_attribute10, hr_api.g_varchar2) or
357 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute11, hr_api.g_varchar2) <>
358 nvl(p_rec.pcv_attribute11, hr_api.g_varchar2) or
362 nvl(p_rec.pcv_attribute13, hr_api.g_varchar2) or
359 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute12, hr_api.g_varchar2) <>
360 nvl(p_rec.pcv_attribute12, hr_api.g_varchar2) or
361 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute13, hr_api.g_varchar2) <>
363 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute14, hr_api.g_varchar2) <>
364 nvl(p_rec.pcv_attribute14, hr_api.g_varchar2) or
365 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute15, hr_api.g_varchar2) <>
366 nvl(p_rec.pcv_attribute15, hr_api.g_varchar2) or
367 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute16, hr_api.g_varchar2) <>
368 nvl(p_rec.pcv_attribute16, hr_api.g_varchar2) or
369 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute17, hr_api.g_varchar2) <>
370 nvl(p_rec.pcv_attribute17, hr_api.g_varchar2) or
371 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute18, hr_api.g_varchar2) <>
372 nvl(p_rec.pcv_attribute18, hr_api.g_varchar2) or
373 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute19, hr_api.g_varchar2) <>
374 nvl(p_rec.pcv_attribute19, hr_api.g_varchar2) or
375 nvl(pqp_pcv_shd.g_old_rec.pcv_attribute20, hr_api.g_varchar2) <>
376 nvl(p_rec.pcv_attribute20, hr_api.g_varchar2) ))
377 or (p_rec.configuration_value_id is null) then
378 --
379 -- Only execute the validation if absolutely necessary:
380 -- a) During update, the structure column value or any
381 -- of the attribute values have actually changed.
382 -- b) During insert.
383 --
384 hr_dflex_utility.ins_or_upd_descflex_attribs
385 (p_appl_short_name => 'PQP'
386 ,p_descflex_name => 'EDIT_HERE: Enter descflex name'
387 ,p_attribute_category => 'PCV_ATTRIBUTE_CATEGORY'
388 ,p_attribute1_name => 'PCV_ATTRIBUTE1'
389 ,p_attribute1_value => p_rec.pcv_attribute1
390 ,p_attribute2_name => 'PCV_ATTRIBUTE2'
391 ,p_attribute2_value => p_rec.pcv_attribute2
392 ,p_attribute3_name => 'PCV_ATTRIBUTE3'
393 ,p_attribute3_value => p_rec.pcv_attribute3
394 ,p_attribute4_name => 'PCV_ATTRIBUTE4'
395 ,p_attribute4_value => p_rec.pcv_attribute4
396 ,p_attribute5_name => 'PCV_ATTRIBUTE5'
397 ,p_attribute5_value => p_rec.pcv_attribute5
398 ,p_attribute6_name => 'PCV_ATTRIBUTE6'
399 ,p_attribute6_value => p_rec.pcv_attribute6
400 ,p_attribute7_name => 'PCV_ATTRIBUTE7'
401 ,p_attribute7_value => p_rec.pcv_attribute7
402 ,p_attribute8_name => 'PCV_ATTRIBUTE8'
403 ,p_attribute8_value => p_rec.pcv_attribute8
404 ,p_attribute9_name => 'PCV_ATTRIBUTE9'
405 ,p_attribute9_value => p_rec.pcv_attribute9
406 ,p_attribute10_name => 'PCV_ATTRIBUTE10'
407 ,p_attribute10_value => p_rec.pcv_attribute10
408 ,p_attribute11_name => 'PCV_ATTRIBUTE11'
409 ,p_attribute11_value => p_rec.pcv_attribute11
410 ,p_attribute12_name => 'PCV_ATTRIBUTE12'
411 ,p_attribute12_value => p_rec.pcv_attribute12
412 ,p_attribute13_name => 'PCV_ATTRIBUTE13'
413 ,p_attribute13_value => p_rec.pcv_attribute13
414 ,p_attribute14_name => 'PCV_ATTRIBUTE14'
415 ,p_attribute14_value => p_rec.pcv_attribute14
416 ,p_attribute15_name => 'PCV_ATTRIBUTE15'
417 ,p_attribute15_value => p_rec.pcv_attribute15
418 ,p_attribute16_name => 'PCV_ATTRIBUTE16'
419 ,p_attribute16_value => p_rec.pcv_attribute16
420 ,p_attribute17_name => 'PCV_ATTRIBUTE17'
421 ,p_attribute17_value => p_rec.pcv_attribute17
422 ,p_attribute18_name => 'PCV_ATTRIBUTE18'
423 ,p_attribute18_value => p_rec.pcv_attribute18
424 ,p_attribute19_name => 'PCV_ATTRIBUTE19'
425 ,p_attribute19_value => p_rec.pcv_attribute19
426 ,p_attribute20_name => 'PCV_ATTRIBUTE20'
427 ,p_attribute20_value => p_rec.pcv_attribute20
428 );
429 end if;
430 --
431 hr_utility.set_location(' Leaving:'||l_proc,20);
432 end chk_df;
433 --
434 -- ----------------------------------------------------------------------------
435 -- |-----------------------< chk_non_updateable_args >------------------------|
436 -- ----------------------------------------------------------------------------
437 -- {Start Of Comments}
438 --
439 -- Description:
440 -- This procedure is used to ensure that non updateable attributes have
441 -- not been updated. If an attribute has been updated an error is generated.
442 --
443 -- Pre Conditions:
444 -- g_old_rec has been populated with details of the values currently in
445 -- the database.
446 --
447 -- In Arguments:
448 -- p_rec has been populated with the updated values the user would like the
449 -- record set to.
450 --
451 -- Post Success:
452 -- Processing continues if all the non updateable attributes have not
453 -- changed.
454 --
455 -- Post Failure:
456 -- An application error is raised if any of the non updatable attributes
457 -- have been altered.
458 --
459 -- {End Of Comments}
460 -- ----------------------------------------------------------------------------
461 Procedure chk_non_updateable_args
462 (p_effective_date in date
466 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
463 ,p_rec in pqp_pcv_shd.g_rec_type
464 ) IS
465 --
467 --
468 Begin
469 --
470 -- Only proceed with the validation if a row exists for the current
471 -- record in the HR Schema.
472 --
473 IF NOT pqp_pcv_shd.api_updating
474 (p_configuration_value_id => p_rec.configuration_value_id
475 ,p_object_version_number => p_rec.object_version_number
476 ) THEN
477 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
478 fnd_message.set_token('PROCEDURE ', l_proc);
479 fnd_message.set_token('STEP ', '5');
480 fnd_message.raise_error;
481 END IF;
482 --
483 -- EDIT_HERE: Add checks to ensure non-updateable args have
484 -- not been updated.
485 --
486 End chk_non_updateable_args;
487 --
488 -- ----------------------------------------------------------------------------
489 -- |----------------------< chk_startup_action >------------------------------|
490 -- ----------------------------------------------------------------------------
491 --
492 -- Description:
493 -- This procedure will check that the current action is allowed according
494 -- to the current startup mode.
495 --
496 -- ----------------------------------------------------------------------------
497 PROCEDURE chk_startup_action
498 (p_insert IN boolean
499 ,p_business_group_id IN number
500 ,p_legislation_code IN varchar2
501 ,p_legislation_subgroup IN varchar2 DEFAULT NULL) IS
502 --
503 BEGIN
504 --
505 -- Call the supporting procedure to check startup mode
506 -- EDIT_HERE: The following call should be edited if certain types of rows
507 -- are not permitted.
508 IF (p_insert) THEN
509 hr_startup_data_api_support.chk_startup_action
510 (p_generic_allowed => TRUE
511 ,p_startup_allowed => TRUE
512 ,p_user_allowed => TRUE
513 ,p_business_group_id => p_business_group_id
514 ,p_legislation_code => p_legislation_code
515 ,p_legislation_subgroup => p_legislation_subgroup
516 );
517 ELSE
518 hr_startup_data_api_support.chk_upd_del_startup_action
519 (p_generic_allowed => TRUE
520 ,p_startup_allowed => TRUE
521 ,p_user_allowed => TRUE
522 ,p_business_group_id => p_business_group_id
523 ,p_legislation_code => p_legislation_code
524 ,p_legislation_subgroup => p_legislation_subgroup
525 );
526 END IF;
527 --
528 END chk_startup_action;
529
530 -----------------------------------------------------------------------------
531 -----------------------Get the legistionId for BusinessGroupId---------------
532 -----------------------------------------------------------------------------
533 FUNCTION get_legislation_code
534 (p_business_group_id IN NUMBER
535 ) RETURN VARCHAR2 IS
536 --declare local variables
537 l_legislation_code per_business_groups.legislation_code%TYPE;
538
539 CURSOR c_get_leg_code IS
540 SELECT legislation_code
541 FROM per_business_groups_perf
542 WHERE business_group_id =p_business_group_id;
543
544 BEGIN
545 OPEN c_get_leg_code;
546 LOOP
547 FETCH c_get_leg_code INTO l_legislation_code;
548 EXIT WHEN c_get_leg_code%NOTFOUND;
549 END LOOP;
550 CLOSE c_get_leg_code;
551 RETURN (l_legislation_code);
552 EXCEPTION
553 ---------
554 WHEN OTHERS THEN
555 RETURN(NULL);
556 END;
557 --
558 --
559 -- ----------------------------------------------------------------------------
560 -- |------------------------< chk_mandatory_fields >------------------------|
561 -- ----------------------------------------------------------------------------
562 --Checking each segment value sequencialy based on total_unique_columns count in
563 -- pqp_configuration_types table
564 PROCEDURE chk_mandatory_fields
565 (p_rec IN pqp_pcv_shd.g_rec_type
566 ,p_flag IN VARCHAR2
567 ) IS
568
569 --Declare the cursor to get the registration number count
570 CURSOR config_unique_col_cursor IS
571 Select total_unique_columns
572 from pqp_configuration_types
573 where configuration_type =p_rec.pcv_information_category;
574
575 --Declare local variable
576 l_count number;
577 l_column_count number;
578 l_where_clause VARCHAR2(10000);
579 l_temp_str VARCHAR2(10000);
580 TYPE ref_csr_typ IS REF CURSOR;
581 c_column_cursor ref_csr_typ;
582 l_legislation_code varchar2(150);
583
584 BEGIN
585 hr_utility.set_location('Entering: chk_mandatory_fields', 5);
586 OPEN config_unique_col_cursor;
587 FETCH config_unique_col_cursor INTO l_count;
588 CLOSE config_unique_col_cursor;
589 hr_utility.set_location('l_count :'||l_count, 5);
590 IF l_count = 1 THEN
591 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||'';
592 ELSIF l_count = 2 THEN
593 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
594 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||'';
595 ELSIF l_count = 3 THEN
596 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
597 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
598 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||'';
599 ELSIF l_count = 4 THEN
600 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
601 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
602 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
603 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||'';
604 ELSIF l_count = 5 THEN
605 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
606 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
607 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
608 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
609 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||'';
610 ELSIF l_count = 6 THEN
611 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
612 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
613 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
614 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
615 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
616 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||'';
617 ELSIF l_count = 7 THEN
618 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
619 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
620 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
621 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
622 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
623 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
624 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||'';
625 ELSIF l_count = 8 THEN
626 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
627 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
628 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
629 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
630 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
631 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
632 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
633 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||'';
634
635 ELSIF l_count = 9 THEN
636 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
637 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
638 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
639 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
640 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
641 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
642 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
643 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
644 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||'';
645 ELSIF l_count = 10 THEN
646 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
647 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
648 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
649 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
650 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
651 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
652 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
653 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
654 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
655 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?') ||''''||'';
656 ELSIF l_count = 11 THEN
657 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
658 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
659 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
660 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
661 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
662 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
663 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
664 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
665 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
666 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?') ||''''||''||
667 ' AND pcv_information11 = '||''''||nvl(p_rec.pcv_information11,'?') ||''''||'';
668 ELSIF l_count = 12 THEN
669 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
670 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
671 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
672 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
673 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
674 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
675 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
676 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
677 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
678 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?') ||''''||''||
679 ' AND pcv_information11 = '||''''||nvl(p_rec.pcv_information11,'?') ||''''||''||
680 ' AND pcv_information12 = '||''''||nvl(p_rec.pcv_information12,'?') ||''''||'';
681 ELSIF l_count = 13 THEN
682 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
683 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
684 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
685 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
686 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
687 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
688 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
689 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
690 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
691 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?')||''''||''||
695 ELSIF l_count = 14 THEN
692 ' AND pcv_information11 = '||''''||nvl(p_rec.pcv_information11,'?') ||''''||''||
693 ' AND pcv_information12 = '||''''||nvl(p_rec.pcv_information12,'?') ||''''||''||
694 ' AND pcv_information13 = '||''''||nvl(p_rec.pcv_information13,'?') ||''''||'';
696 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
697 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
698 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
699 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
700 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
701 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
702 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
703 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
704 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
705 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?') ||''''||''||
706 ' AND pcv_information11 = '||''''||nvl(p_rec.pcv_information11,'?') ||''''||''||
707 ' AND pcv_information12 = '||''''||nvl(p_rec.pcv_information12,'?') ||''''||''||
708 ' AND pcv_information13 = '||''''||nvl(p_rec.pcv_information13,'?') ||''''||''||
709 ' AND pcv_information14 = '||''''||nvl(p_rec.pcv_information14,'?') ||''''||'';
710 ELSIF l_count = 15 THEN
711 l_where_clause := ' AND pcv_information1 = '||''''||nvl(p_rec.pcv_information1,'?') ||''''||''||
712 ' AND pcv_information2 = '||''''||nvl(p_rec.pcv_information2,'?') ||''''||''||
713 ' AND pcv_information3 = '||''''||nvl(p_rec.pcv_information3,'?') ||''''||''||
714 ' AND pcv_information4 = '||''''||nvl(p_rec.pcv_information4,'?') ||''''||''||
715 ' AND pcv_information5 = '||''''||nvl(p_rec.pcv_information5,'?') ||''''||''||
716 ' AND pcv_information6 = '||''''||nvl(p_rec.pcv_information6,'?') ||''''||''||
717 ' AND pcv_information7 = '||''''||nvl(p_rec.pcv_information7,'?') ||''''||''||
718 ' AND pcv_information8 = '||''''||nvl(p_rec.pcv_information8,'?') ||''''||''||
719 ' AND pcv_information9 = '||''''||nvl(p_rec.pcv_information9,'?') ||''''||''||
720 ' AND pcv_information10 = '||''''||nvl(p_rec.pcv_information10,'?') ||''''||''||
721 ' AND pcv_information11 = '||''''||nvl(p_rec.pcv_information11,'?') ||''''||''||
722 ' AND pcv_information12 = '||''''||nvl(p_rec.pcv_information12,'?') ||''''||''||
723 ' AND pcv_information13 = '||''''||nvl(p_rec.pcv_information13,'?') ||''''||''||
724 ' AND pcv_information14 = '||''''||nvl(p_rec.pcv_information14,'?') ||''''||''||
725 ' AND pcv_information15 = '||''''||nvl(p_rec.pcv_information15,'?') ||''''||'';
726
727 END IF;
728 --Getting the legislationId for business groupId
729 -- Get legislation code
730
731 IF l_where_clause is not null then
732 hr_utility.set_location('Inside If', 5);
733 l_temp_str := 'SELECT count(CONFIGURATION_VALUE_ID)
734 FROM pqp_configuration_values
735 WHERE NVL(business_group_id,'||''''||hr_api.g_number||''''||') =
736 NVL('||''''||p_rec.business_group_id||''''||','||''''||hr_api.g_number||''''||')
737 AND NVL(legislation_code, '||''''||hr_api.g_varchar2||''''||')=
738 NVL('||''''||p_rec.legislation_code||''''||','||''''||hr_api.g_varchar2||''''||')
739 AND configuration_value_id <> NVL( '||''''||p_rec.configuration_value_id||''''||
740 ','||''''||hr_api.g_number||''''||')
741 AND PCV_INFORMATION_CATEGORY =
742 '|| ''''||p_rec.pcv_information_category ||''''||'
743 '||l_where_clause ||'';
744
745 OPEN c_column_cursor FOR l_temp_str;
746 FETCH c_column_cursor INTO l_column_count;
747 CLOSE c_column_cursor;
748 hr_utility.set_location('l_column_count :'||l_column_count, 5);
749 END IF;
750 hr_utility.set_location('Leaving: chk_mandatory_fields', 5);
751 IF l_column_count>0 THEN
752 -- IF p_flag = 'U' THEN
753 -- fnd_message.set_name('PQP','PQP_230751_NO_CHGS_TO_SAVE');
754 -- fnd_message.raise_error;
755 -- ELSE
756 fnd_message.set_name('PQP','PQP_230184_CONFIG_ROW_EXISTS');
757 fnd_message.raise_error;
758 -- END IF;
759 END IF;
760
761 EXCEPTION
762 --------
763 WHEN no_data_found THEN
764 NULL;
765 End;
766
767 -- Bug 4150124
768 -- New procedure to check rows based on configuration type occurrence type
769 --
770 -- ----------------------------------------------------------------------------
771 -- |---------------------------< chk_mult_occurrence >------------------------|
772 -- ----------------------------------------------------------------------------
773 Procedure chk_mult_occurrence
774 (p_rec in pqp_pcv_shd.g_rec_type
775 ) is
776 --
777 l_proc varchar2(72) := g_package||'chk_mult_occurrence';
778
779 -- Cursor to retrieve the occurrence type
780 -- for this configuration type
781 CURSOR csr_get_occurrence_type
782 (c_config_type VARCHAR2
783 ,c_legislation_code VARCHAR2
784 )
785 IS
786 SELECT multiple_occurences_flag
787 ,description
791 AND (
788 ,total_unique_columns
789 FROM pqp_configuration_types
790 WHERE configuration_type = c_config_type
792 (legislation_code IS NOT NULL AND
793 legislation_code = c_legislation_code
794 )
795 OR
796 legislation_code IS NULL
797 );
798
799 -- Cursor to check multiple rows in configuration values table
800
801 CURSOR csr_chk_config_val
802 (c_config_val_id NUMBER
803 ,c_config_type VARCHAR2
804 ,c_business_group_id NUMBER
805 ,c_legislation_code VARCHAR2
806 )
807 IS
808 SELECT 1
809 FROM pqp_configuration_values
810 WHERE pcv_information_category = c_config_type
811 AND configuration_value_id <> NVL(c_config_val_id, hr_api.g_number)
812 AND NVL(business_group_id, hr_api.g_number) = NVL(c_business_group_id, hr_api.g_number)
813 AND NVL(legislation_code, hr_api.g_varchar2) = NVL(c_legislation_code, hr_api.g_varchar2);
814
815 l_legislation_code per_business_groups.legislation_code%TYPE;
816 l_mult_occurrence pqp_configuration_types.multiple_occurences_flag%TYPE;
817 l_exists NUMBER;
818 l_config_desc pqp_configuration_types.description%TYPE;
819 l_total_uniq_cols NUMBER;
820
821 --
822 Begin
823 hr_utility.set_location('Entering:'||l_proc, 5);
824
825 -- Get legislation code
826 IF p_rec.business_group_id IS NULL THEN
827 l_legislation_code := p_rec.legislation_code;
828 ELSE
829 l_legislation_code := get_legislation_code(p_rec.business_group_id);
830 END IF; -- End if of business_group_id is null check...
831
832 hr_utility.set_location(l_proc, 10);
833
834 l_mult_occurrence := NULL;
835
836 OPEN csr_get_occurrence_type
837 (p_rec.pcv_information_category
838 ,l_legislation_code
839 );
840 FETCH csr_get_occurrence_type INTO l_mult_occurrence
841 ,l_config_desc
842 ,l_total_uniq_cols;
843 CLOSE csr_get_occurrence_type;
844
845 -- Check whether multiple occurrence allowed
846
847 hr_utility.set_location(l_proc, 20);
848
849 IF l_mult_occurrence = 'N' THEN
850
851 hr_utility.set_location(l_proc, 30);
852
853 -- Check for row existence in pqp_configuration_values
854 OPEN csr_chk_config_val
855 (p_rec.configuration_value_id
856 ,p_rec.pcv_information_category
857 ,p_rec.business_group_id
858 ,p_rec.legislation_code
859 );
860 FETCH csr_chk_config_val INTO l_exists;
861
862 IF csr_chk_config_val%FOUND THEN
863
864 -- Raise an error
865 CLOSE csr_chk_config_val;
866 fnd_message.set_name('PQP','PQP_230173_PCV_MULT_NOT_ALLOW');
867 fnd_message.set_token('CONFIGURATION_TYPE', l_config_desc);
868 fnd_message.raise_error;
869
870 END IF; -- End if of config val not found check ...
871 CLOSE csr_chk_config_val;
872
873 ELSE -- multiple occurrence exist
874
875 -- Added check for total_unique_columns
876 hr_utility.set_location(l_proc, 40);
877
878 IF l_total_uniq_cols IS NULL THEN
879
880 -- Raise an error
881 fnd_message.set_name('PQP','PQP_230220_PCV_UNIQ_COLS_REQ');
882 fnd_message.raise_error;
883
884 END IF; -- End if of total unique columns is null check ...
885
886 END IF; -- End if of multiple occurrence flag check ...
887
888 hr_utility.set_location('Leaving '||l_proc, 50);
889 --
890 End chk_mult_occurrence;
891 --
892 --
893 -- ----------------------------------------------------------------------------
894 -- |---------------------------< insert_validate >----------------------------|
895 -- ----------------------------------------------------------------------------
896 Procedure insert_validate
897 (p_effective_date in date
898 ,p_rec in pqp_pcv_shd.g_rec_type
899 ) is
900 --
901 l_proc varchar2(72) := g_package||'insert_validate';
902 --
903 Begin
904 hr_utility.set_location('Entering:'||l_proc, 5);
905 --
906 -- Call all supporting business operations
907 --
908 --
909 -- commented by skutteti as LD wanted to seed data with null bg and leg
910 -- chk_startup_action(true
911 -- ,p_rec.business_group_id
912 -- ,p_rec.legislation_code
913 -- );
914 IF hr_startup_data_api_support.g_startup_mode
915 NOT IN ('GENERIC','STARTUP') THEN
916 --
917 -- Validate Important Attributes
918 --
919 -- commented by skutteti as LD wanted to seed data with null bg and leg
920 --hr_api.validate_bus_grp_id
921 -- (p_business_group_id => p_rec.business_group_id
922 -- ,p_associated_column1 => pqp_pcv_shd.g_tab_nam
923 -- || '.BUSINESS_GROUP_ID');
924 --
925 -- Checking mandatory segment values
926 --
927 chk_mandatory_fields( p_rec => p_rec
928 ,p_flag =>'I');
929
930 -- Checking multiple occurrences
931 -- Bug 4150124
932
933 hr_utility.set_location(l_proc, 10);
934
935 chk_mult_occurrence (p_rec => p_rec);
936
937 --
938 -- after validating the set of important attributes,
939 -- if Multiple Message Detection is enabled and at least
940 -- one error has been found then abort further validation.
941 --
942 hr_multi_message.end_validation_set;
943 END IF;
944 --
945 --
946 -- Validate Dependent Attributes
947 --
948 --
949 --pqp_pcv_bus.chk_ddf(p_rec);
950 --
951 --pqp_pcv_bus.chk_df(p_rec);
952 --
953 hr_utility.set_location(' Leaving:'||l_proc, 10);
954 End insert_validate;
955 --
956 -- ----------------------------------------------------------------------------
957 -- |---------------------------< update_validate >----------------------------|
958 -- ----------------------------------------------------------------------------
959 Procedure update_validate
960 (p_effective_date in date
961 ,p_rec in pqp_pcv_shd.g_rec_type
962 ) is
963 --
964 l_proc varchar2(72) := g_package||'update_validate';
965 --
966 Begin
967 hr_utility.set_location('Entering:'||l_proc, 5);
968 --
969 -- Call all supporting business operations
970 --
971 --
972 --chk_startup_action(false
973 -- ,p_rec.business_group_id
974 -- ,p_rec.legislation_code
975 -- );
976 IF hr_startup_data_api_support.g_startup_mode
977 NOT IN ('GENERIC','STARTUP') THEN
978 --
979 -- Validate Important Attributes
980 --
981 -- hr_api.validate_bus_grp_id
982 -- (p_business_group_id => p_rec.business_group_id
983 -- ,p_associated_column1 => pqp_pcv_shd.g_tab_nam
984 -- || '.BUSINESS_GROUP_ID');
985
986 --
987 -- Checking mandatory segment values
988 --
989 chk_mandatory_fields( p_rec => p_rec
990 ,p_flag =>'U');
991
992 -- Checking multiple occurrences
993 -- Bug 4150124
994
995 hr_utility.set_location(l_proc, 10);
996
997 chk_mult_occurrence (p_rec => p_rec);
998
999 --
1000 -- After validating the set of important attributes,
1001 -- if Multiple Message Detection is enabled and at least
1002 -- one error has been found then abort further validation.
1003 --
1004 hr_multi_message.end_validation_set;
1005 END IF;
1006 --
1007 --
1008 -- Validate Dependent Attributes
1009 --
1010 chk_non_updateable_args
1011 (p_effective_date => p_effective_date
1012 ,p_rec => p_rec
1013 );
1014 --
1015 --
1016 --pqp_pcv_bus.chk_ddf(p_rec);
1017 --
1018 --pqp_pcv_bus.chk_df(p_rec);
1019 --
1020 hr_utility.set_location(' Leaving:'||l_proc, 10);
1021 End update_validate;
1022 --
1023 -- ----------------------------------------------------------------------------
1024 -- |---------------------------< delete_validate >----------------------------|
1025 -- ----------------------------------------------------------------------------
1026 Procedure delete_validate
1027 (p_rec in pqp_pcv_shd.g_rec_type
1028 ) is
1029 --
1030 l_proc varchar2(72) := g_package||'delete_validate';
1031 --
1032 Begin
1033 hr_utility.set_location('Entering:'||l_proc, 5);
1034 --
1035 --
1036 chk_startup_action(false
1037 ,pqp_pcv_shd.g_old_rec.business_group_id
1038 ,pqp_pcv_shd.g_old_rec.legislation_code
1039 );
1040 IF hr_startup_data_api_support.g_startup_mode
1041 NOT IN ('GENERIC','STARTUP') THEN
1042 --
1043 -- Validate Important Attributes
1044 --
1045 --
1046 -- After validating the set of important attributes,
1047 -- if Multiple Message Detection is enabled and at least
1048 -- one error has been found then abort further validation.
1049 --
1050 hr_multi_message.end_validation_set;
1051 END IF;
1052 --
1053 -- Call all supporting business operations
1054 --
1055 hr_utility.set_location(' Leaving:'||l_proc, 10);
1056 End delete_validate;
1057 end pqp_pcv_bus;