2: /* $Header: pecnlhoi.pkb 120.4.12010000.5 2008/08/06 09:07:14 ubhat ship $ */
3:
4: g_package VARCHAR2(25);
5: g_debug BOOLEAN;
6: g_token_name hr_cn_api.char_tab_type;
7: g_token_value hr_cn_api.char_tab_type;
8: g_message_name VARCHAR2(30);
9:
10: --------------------------------------------------------------------------
3:
4: g_package VARCHAR2(25);
5: g_debug BOOLEAN;
6: g_token_name hr_cn_api.char_tab_type;
7: g_token_value hr_cn_api.char_tab_type;
8: g_message_name VARCHAR2(30);
9:
10: --------------------------------------------------------------------------
11: -- Name : CHECK_RECORD_EXISTS --
105: l_procedure := g_package || 'check_record_exists';
106: g_debug := hr_utility.debug_enabled;
107: g_debug := TRUE;
108:
109: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
110:
111: IF p_org_info_type_code = 'PER_CONT_AREA_CONT_BASE_CN' THEN
112:
113: IF g_debug THEN
167: END IF;
168: hr_utility.raise_error;
169: END IF;
170:
171: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
172:
173: END check_record_exists;
174: --------------------------------------------------------------------------
175: -- Name : check_term_stat_info --
232: OPEN c_fut_term_info_setup;
233: FETCH c_fut_term_info_setup INTO l_fut_date;
234: CLOSE c_fut_term_info_setup;
235:
236: hr_cn_api.set_location(g_debug,' l_rec_count : '|| l_rec_count, 20);
237:
238: IF l_rec_count > 0 THEN
239: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
240: hr_utility.raise_error;
245: END IF;
246:
247: END IF;
248:
249: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
250:
251: END check_term_stat_info;
252:
253: -------------------------------------------------------------------------
287: l_procedure := g_package || 'check_single_record';
288: g_debug := hr_utility.debug_enabled;
289: g_debug := TRUE;
290:
291: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
292:
293: IF p_org_info_type_code = 'PER_PHF_STAT_INFO_CN' THEN
294: IF g_debug THEN
295: hr_utility.trace(' =======================================================');
302:
303: OPEN c_phf_high_limit_exempt_setup;
304: FETCH c_phf_high_limit_exempt_setup INTO l_rec_count;
305: CLOSE c_phf_high_limit_exempt_setup;
306: hr_cn_api.set_location(g_debug,' l_rec_count : '|| l_rec_count, 20);
307: END IF;
308:
309: IF l_rec_count > 0 THEN
310: IF g_debug THEN
315: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
316: hr_utility.raise_error;
317: END IF;
318:
319: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
320:
321: END check_single_record;
322:
323:
342:
343: l_procedure := g_package || 'validate_date';
344: g_debug := hr_utility.debug_enabled;
345:
346: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
347:
348: IF p_effective_end_date IS NOT NULL THEN
349: hr_cn_api.set_location(g_debug,l_procedure,20);
350:
345:
346: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
347:
348: IF p_effective_end_date IS NOT NULL THEN
349: hr_cn_api.set_location(g_debug,l_procedure,20);
350:
351: IF p_effective_end_date < p_effective_start_date THEN
352: RAISE E_INVALID_FORMAT_ERR;
353: END IF;
351: IF p_effective_end_date < p_effective_start_date THEN
352: RAISE E_INVALID_FORMAT_ERR;
353: END IF;
354:
355: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
356:
357: END IF;
358:
359: EXCEPTION
358:
359: EXCEPTION
360: WHEN E_INVALID_FORMAT_ERR THEN
361: hr_utility.set_message(800,'PER_CN_INCORRECT_DATES');
362: hr_cn_api.set_location(g_debug,l_procedure,40);
363: hr_utility.raise_error;
364:
365: END validate_date;
366:
400: ,p_org_information18 IN VARCHAR2
401: ,p_org_information19 IN VARCHAR2
402: ,p_org_information20 IN VARCHAR2
403: ,p_message_name OUT NOCOPY VARCHAR2
404: ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
405: ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
406: )
407: IS
408:
401: ,p_org_information19 IN VARCHAR2
402: ,p_org_information20 IN VARCHAR2
403: ,p_message_name OUT NOCOPY VARCHAR2
404: ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
405: ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
406: )
407: IS
408:
409: l_procedure VARCHAR2(100);
414:
415: l_procedure := g_package || 'check_cn_org_internal';
416: g_debug := hr_utility.debug_enabled;
417:
418: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
419:
420:
421: -- commented the code for bug 6828199
422: /* IF p_org_info_type_code = 'PER_PHF_STAT_INFO_CN' THEN
561: ,p_token_value => g_token_value
562: );
563:
564: END IF;
565: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,10);
566:
567: END check_cn_org_internal;
568:
569: --------------------------------------------------------------------------
608: BEGIN
609: l_procedure := g_package || 'check_cn_org_info_type_create';
610: g_debug := hr_utility.debug_enabled;
611:
612: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
613:
614: -- Call check_cn_org_internal
615: check_cn_org_internal
616: (p_org_info_type_code => p_org_info_type_code
640: ,p_token_name => g_token_name
641: ,p_token_value => g_token_value
642: );
643:
644: hr_cn_api.set_location(g_debug,l_procedure,20);
645:
646: IF g_debug THEN
647: hr_utility.trace('Message => ' || g_message_name);
648: END IF;
646: IF g_debug THEN
647: hr_utility.trace('Message => ' || g_message_name);
648: END IF;
649:
650: hr_cn_api.raise_message(800
651: ,g_message_name
652: ,g_token_name
653: ,g_token_value);
654:
651: ,g_message_name
652: ,g_token_name
653: ,g_token_value);
654:
655: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,10);
656:
657: END CHECK_CN_ORG_INFO_TYPE_CREATE;
658:
659: --------------------------------------------------------------------------
745:
746: l_procedure := g_package || 'check_cn_org_info_type_update';
747: g_debug := hr_utility.debug_enabled;
748:
749: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
750:
751: OPEN csr_org_info;
752: FETCH csr_org_info
753: INTO l_organization_id
863: ,p_token_name => g_token_name
864: ,p_token_value => g_token_value
865: );
866:
867: hr_cn_api.set_location(g_debug,l_procedure,20);
868:
869: hr_cn_api.raise_message(800
870: ,g_message_name
871: ,g_token_name
865: );
866:
867: hr_cn_api.set_location(g_debug,l_procedure,20);
868:
869: hr_cn_api.raise_message(800
870: ,g_message_name
871: ,g_token_name
872: ,g_token_value);
873:
870: ,g_message_name
871: ,g_token_name
872: ,g_token_value);
873:
874: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
875:
876: END CHECK_CN_ORG_INFO_TYPE_UPDATE;
877:
878: BEGIN