2: /* $Header: pecnlhoi.pkb 120.12 2012/03/08 13:10:49 jmarupil 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 --
106: l_procedure := g_package || 'check_record_exists';
107: g_debug := hr_utility.debug_enabled;
108: g_debug := TRUE;
109:
110: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
111:
112: IF p_org_info_type_code = 'PER_CONT_AREA_CONT_BASE_CN' THEN
113:
114: IF g_debug THEN
169: END IF;
170:
171: END IF;
172:
173: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
174:
175: END check_record_exists;
176: --------------------------------------------------------------------------
177: -- Name : check_term_stat_info --
234: OPEN c_fut_term_info_setup;
235: FETCH c_fut_term_info_setup INTO l_fut_date;
236: CLOSE c_fut_term_info_setup;
237:
238: hr_cn_api.set_location(g_debug,' l_rec_count : '|| l_rec_count, 20);
239:
240: IF l_rec_count > 0 THEN
241: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
242: hr_utility.raise_error;
247: END IF;
248:
249: END IF;
250:
251: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
252:
253: END check_term_stat_info;
254:
255: -------------------------------------------------------------------------
289: l_procedure := g_package || 'check_single_record';
290: g_debug := hr_utility.debug_enabled;
291: g_debug := TRUE;
292:
293: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
294:
295: IF p_org_info_type_code = 'PER_PHF_STAT_INFO_CN' THEN
296: IF g_debug THEN
297: hr_utility.trace(' =======================================================');
304:
305: OPEN c_phf_high_limit_exempt_setup;
306: FETCH c_phf_high_limit_exempt_setup INTO l_rec_count;
307: CLOSE c_phf_high_limit_exempt_setup;
308: hr_cn_api.set_location(g_debug,' l_rec_count : '|| l_rec_count, 20);
309: END IF;
310:
311: IF l_rec_count > 0 THEN
312: IF g_debug THEN
317: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
318: hr_utility.raise_error;
319: END IF;
320:
321: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
322:
323: END check_single_record;
324:
325:
359: l_procedure := g_package || 'check_single_record_ea';
360: g_debug := hr_utility.debug_enabled;
361: g_debug := TRUE;
362:
363: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
364:
365: IF p_org_info_type_code = 'PER_ENN_ANN_TAX_CN' THEN
366: IF g_debug THEN
367: hr_utility.trace(' =======================================================');
373:
374: OPEN c_phf_high_limit_exempt_setup;
375: FETCH c_phf_high_limit_exempt_setup INTO l_rec_count;
376: CLOSE c_phf_high_limit_exempt_setup;
377: hr_cn_api.set_location(g_debug,' l_rec_count : '|| l_rec_count, 20);
378: END IF;
379:
380: IF l_rec_count > 0 THEN
381: IF g_debug THEN
386: hr_utility.set_message(800,'PER_7901_SYS_DUPLICATE_RECORDS');
387: hr_utility.raise_error;
388: END IF;
389:
390: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
391:
392: END check_single_record_ea;
393:
394: -------------------------------------------------------------------------
411:
412: l_procedure := g_package || 'validate_date';
413: g_debug := hr_utility.debug_enabled;
414:
415: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
416:
417: IF p_effective_end_date IS NOT NULL THEN
418: hr_cn_api.set_location(g_debug,l_procedure,20);
419:
414:
415: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
416:
417: IF p_effective_end_date IS NOT NULL THEN
418: hr_cn_api.set_location(g_debug,l_procedure,20);
419:
420: IF p_effective_end_date < p_effective_start_date THEN
421: RAISE E_INVALID_FORMAT_ERR;
422: END IF;
420: IF p_effective_end_date < p_effective_start_date THEN
421: RAISE E_INVALID_FORMAT_ERR;
422: END IF;
423:
424: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
425:
426: END IF;
427:
428: EXCEPTION
427:
428: EXCEPTION
429: WHEN E_INVALID_FORMAT_ERR THEN
430: hr_utility.set_message(800,'PER_CN_INCORRECT_DATES');
431: hr_cn_api.set_location(g_debug,l_procedure,40);
432: hr_utility.raise_error;
433:
434: END validate_date;
435:
469: ,p_org_information18 IN VARCHAR2
470: ,p_org_information19 IN VARCHAR2
471: ,p_org_information20 IN VARCHAR2
472: ,p_message_name OUT NOCOPY VARCHAR2
473: ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
474: ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
475: )
476: IS
477:
470: ,p_org_information19 IN VARCHAR2
471: ,p_org_information20 IN VARCHAR2
472: ,p_message_name OUT NOCOPY VARCHAR2
473: ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
474: ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
475: )
476: IS
477:
478: l_procedure VARCHAR2(100);
483:
484: l_procedure := g_package || 'check_cn_org_internal';
485: g_debug := hr_utility.debug_enabled;
486:
487: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
488:
489:
490: -- commented the code for bug 6828199
491: /* IF p_org_info_type_code = 'PER_PHF_STAT_INFO_CN' THEN
655: ,p_token_value => g_token_value
656: );
657:
658: END IF;
659: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,10);
660:
661: END check_cn_org_internal;
662:
663: --------------------------------------------------------------------------
702: BEGIN
703: l_procedure := g_package || 'check_cn_org_info_type_create';
704: g_debug := hr_utility.debug_enabled;
705:
706: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
707:
708: -- Call check_cn_org_internal
709: check_cn_org_internal
710: (p_org_info_type_code => p_org_info_type_code
734: ,p_token_name => g_token_name
735: ,p_token_value => g_token_value
736: );
737:
738: hr_cn_api.set_location(g_debug,l_procedure,20);
739:
740: IF g_debug THEN
741: hr_utility.trace('Message => ' || g_message_name);
742: END IF;
740: IF g_debug THEN
741: hr_utility.trace('Message => ' || g_message_name);
742: END IF;
743:
744: hr_cn_api.raise_message(800
745: ,g_message_name
746: ,g_token_name
747: ,g_token_value);
748:
745: ,g_message_name
746: ,g_token_name
747: ,g_token_value);
748:
749: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,10);
750:
751: END CHECK_CN_ORG_INFO_TYPE_CREATE;
752:
753: --------------------------------------------------------------------------
839:
840: l_procedure := g_package || 'check_cn_org_info_type_update';
841: g_debug := hr_utility.debug_enabled;
842:
843: hr_cn_api.set_location(g_debug,'Entering ' || l_procedure,10);
844:
845: OPEN csr_org_info;
846: FETCH csr_org_info
847: INTO l_organization_id
957: ,p_token_name => g_token_name
958: ,p_token_value => g_token_value
959: );
960:
961: hr_cn_api.set_location(g_debug,l_procedure,20);
962:
963: hr_cn_api.raise_message(800
964: ,g_message_name
965: ,g_token_name
959: );
960:
961: hr_cn_api.set_location(g_debug,l_procedure,20);
962:
963: hr_cn_api.raise_message(800
964: ,g_message_name
965: ,g_token_name
966: ,g_token_value);
967:
964: ,g_message_name
965: ,g_token_name
966: ,g_token_value);
967:
968: hr_cn_api.set_location(g_debug,'Leaving ' || l_procedure,30);
969:
970: END CHECK_CN_ORG_INFO_TYPE_UPDATE;
971:
972: BEGIN