5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' per_ckl_bus.'; -- Global package name
9: g_debug boolean := hr_utility.debug_enabled;
10: --
11: -- The following two global variables are only to be
12: -- used by the return_legislation_code function.
13: --
40: l_legislation_code varchar2(150);
41: --
42: begin
43: --
44: hr_utility.set_location('Entering:'|| l_proc, 10);
45: --
46: -- Ensure that all the mandatory parameter are not null
47: --
48: hr_api.mandatory_arg_error
80: --
81: hr_api.set_legislation_context(l_legislation_code);
82: end if;
83: --
84: hr_utility.set_location(' Leaving:'|| l_proc, 20);
85: --
86: end set_security_group_id;
87: --
88: -- ---------------------------------------------------------------------------
109: l_proc varchar2(72) := g_package||'return_legislation_code';
110: --
111: Begin
112: --
113: hr_utility.set_location('Entering:'|| l_proc, 10);
114: --
115: -- Ensure that all the mandatory parameter are not null
116: --
117: hr_api.mandatory_arg_error
127: -- call to this function. Just return the value in the global
128: -- variable.
129: --
130: l_legislation_code := per_ckl_bus.g_legislation_code;
131: hr_utility.set_location(l_proc, 20);
132: else
133: --
134: -- The ID is different to the last call to this function
135: -- or this is the first call to this function.
144: close csr_leg_code;
145: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
146: fnd_message.raise_error;
147: end if;
148: hr_utility.set_location(l_proc,30);
149: --
150: -- Set the global variables so the values are
151: -- available for the next call to this function.
152: --
153: close csr_leg_code;
154: per_ckl_bus.g_checklist_id := p_checklist_id;
155: per_ckl_bus.g_legislation_code := l_legislation_code;
156: end if;
157: hr_utility.set_location(' Leaving:'|| l_proc, 40);
158: return l_legislation_code;
159: end return_legislation_code;
160: --
161: -- --------------------------------------------------------------------------
186: l_proc varchar2(72) := g_package||'chk_name';
187: l_api_updating boolean;
188: --
189: begin
190: if g_debug then hr_utility.set_location('Entering:'||l_proc, 1); end if;
191: --
192: -- Only proceed with validation if:
193: -- a) The current g_old_rec is current and
194: -- b) The checklist name value has changed
205: THEN
206: RETURN;
207: END IF;
208: --
209: if g_debug then hr_utility.set_location(l_proc, 40); end if;
210: --
211: hr_utility.set_location('Entering: '||l_proc,10);
212: --
213: if p_name is not null then
207: END IF;
208: --
209: if g_debug then hr_utility.set_location(l_proc, 40); end if;
210: --
211: hr_utility.set_location('Entering: '||l_proc,10);
212: --
213: if p_name is not null then
214: -- Check that name is unique
215: open csr_unique_name;
232: fnd_message.raise_error;
233: end if;
234: --
235:
236: if g_debug then hr_utility.set_location('Entering:'||l_proc, 50); end if;
237: --
238: exception when app_exception.application_exception then
239: if hr_multi_message.exception_add
240: (p_associated_column1 => 'PER_CHECKLISTS.NAME'
238: exception when app_exception.application_exception then
239: if hr_multi_message.exception_add
240: (p_associated_column1 => 'PER_CHECKLISTS.NAME'
241: ) then
242: hr_utility.set_location(' Leaving:'|| l_proc, 60);
243: raise;
244: end if;
245: hr_utility.set_location(' Leaving:'|| l_proc, 70);
246: end chk_name;
241: ) then
242: hr_utility.set_location(' Leaving:'|| l_proc, 60);
243: raise;
244: end if;
245: hr_utility.set_location(' Leaving:'|| l_proc, 70);
246: end chk_name;
247: --
248: -- ---------------------------------------------------------------------------
249: -- |-------------------------------< chk_ler_id >----------------------------|
297: and p_effective_date between ler.effective_start_date
298: and ler.effective_end_date;
299: --
300: begin
301: hr_utility.set_location('Entering:'||l_proc, 1);
302: --
303: -- Check mandatory ler_id exists if not null
304: --
305: if p_ler_id is not null then
313: close csr_ler_id;
314:
315: end if;
316: --
317: hr_utility.set_location(l_proc, 5);
318: --
319: exception when app_exception.application_exception then
320: if hr_multi_message.exception_add
321: (p_associated_column1 => 'PER_CHECKLISTS.EVENT_REASON_ID'
319: exception when app_exception.application_exception then
320: if hr_multi_message.exception_add
321: (p_associated_column1 => 'PER_CHECKLISTS.EVENT_REASON_ID'
322: ) then
323: hr_utility.set_location(' Leaving:'|| l_proc, 60);
324: raise;
325: end if;
326: hr_utility.set_location(' Leaving:'|| l_proc, 70);
327: end chk_ler_id;
322: ) then
323: hr_utility.set_location(' Leaving:'|| l_proc, 60);
324: raise;
325: end if;
326: hr_utility.set_location(' Leaving:'|| l_proc, 70);
327: end chk_ler_id;
328: --
329: --
330: -- ---------------------------------------------------------------------------
340: --
341: l_proc varchar2(72) := g_package||'chk_ckl_category';
342: --
343: begin
344: hr_utility.set_location('Entering:'|| l_proc, 1);
345: --
346: -- Check mandatory parameters have been set
347: --
348: hr_api.mandatory_arg_error
352: );
353: --
354: if p_ckl_category is not null then
355: --
356: hr_utility.set_location(l_proc, 5);
357: --
358: -- Only proceed with validation if :
359: -- a) Inserting or
360: -- b) The value for category has changed
376: end if;
377: end if;
378: end if;
379: --
380: hr_utility.set_location(' Leaving:'|| l_proc, 20);
381:
382: exception when app_exception.application_exception then
383: if hr_multi_message.exception_add
384: (p_associated_column1 => 'PER_CHECKLISTS.CHECKLIST_CATEGORY'
382: exception when app_exception.application_exception then
383: if hr_multi_message.exception_add
384: (p_associated_column1 => 'PER_CHECKLISTS.CHECKLIST_CATEGORY'
385: ) then
386: hr_utility.set_location(' Leaving:'|| l_proc, 60);
387: raise;
388: end if;
389: hr_utility.set_location(' Leaving:'|| l_proc, 70);
390: --
385: ) then
386: hr_utility.set_location(' Leaving:'|| l_proc, 60);
387: raise;
388: end if;
389: hr_utility.set_location(' Leaving:'|| l_proc, 70);
390: --
391: end chk_ckl_category;
392: --
393: -- ----------------------------------------------------------------------------
424: --
425: l_proc varchar2(72) := g_package || 'chk_ddf';
426: --
427: begin
428: hr_utility.set_location('Entering:'||l_proc,10);
429: --
430: if ((p_rec.checklist_id is not null) and (
431: nvl(per_ckl_shd.g_old_rec.information_category, hr_api.g_varchar2) <>
432: nvl(p_rec.information_category, hr_api.g_varchar2) or
523: ,p_attribute20_value => p_rec.information20
524: );
525: end if;
526: --
527: hr_utility.set_location(' Leaving:'||l_proc,20);
528: end chk_ddf;
529: --
530: -- ----------------------------------------------------------------------------
531: -- |------------------------------< chk_df >----------------------------------|
561: --
562: l_proc varchar2(72) := g_package || 'chk_df';
563: --
564: begin
565: hr_utility.set_location('Entering:'||l_proc,10);
566: --
567: if ((p_rec.checklist_id is not null) and (
568: nvl(per_ckl_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
569: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
660: ,p_attribute20_value => p_rec.attribute20
661: );
662: end if;
663: --
664: hr_utility.set_location(' Leaving:'||l_proc,20);
665: end chk_df;
666: --
667: -- ----------------------------------------------------------------------------
668: -- |-----------------------< chk_non_updateable_args >------------------------|
728: --
729: l_proc varchar2(72) := g_package||'insert_validate';
730: --
731: Begin
732: hr_utility.set_location('Entering:'||l_proc, 5);
733: --
734: -- Call all supporting business operations
735: --
736: hr_api.validate_bus_grp_id
770: /* per_ckl_bus.chk_ddf(p_rec);
771: --
772: per_ckl_bus.chk_df(p_rec);
773: */ --
774: hr_utility.set_location(' Leaving:'||l_proc, 10);
775: End insert_validate;
776: --
777: -- ----------------------------------------------------------------------------
778: -- |---------------------------< update_validate >----------------------------|
784: --
785: l_proc varchar2(72) := g_package||'update_validate';
786: --
787: Begin
788: hr_utility.set_location('Entering:'||l_proc, 5);
789: --
790: -- Call all supporting business operations
791: --
792: hr_api.validate_bus_grp_id
834: --
835: per_ckl_bus.chk_df(p_rec);
836: */
837: --
838: hr_utility.set_location(' Leaving:'||l_proc, 10);
839: End update_validate;
840: --
841: -- ----------------------------------------------------------------------------
842: -- |---------------------------< delete_validate >----------------------------|
847: --
848: l_proc varchar2(72) := g_package||'delete_validate';
849: --
850: Begin
851: hr_utility.set_location('Entering:'||l_proc, 5);
852: --
853: -- Call all supporting business operations
854: --
855: hr_utility.set_location(' Leaving:'||l_proc, 10);
851: hr_utility.set_location('Entering:'||l_proc, 5);
852: --
853: -- Call all supporting business operations
854: --
855: hr_utility.set_location(' Leaving:'||l_proc, 10);
856: End delete_validate;
857: --
858: end per_ckl_bus;