220: TO_CHAR(p_bg_id) || '.hdr';
221: p_dat_file := 'GLCC_' || REPLACE(SUBSTR(p_bg_name,1,30),' ','_') ||
222: TO_CHAR(p_bg_id) || '.txt';
223: hr_utility.set_message(800,'PER_50174_HDR_FILE_NAME');
224: fnd_message.set_token('HDR_FILE_NAME',p_hdr_file);
225: fnd_message.set_token('FILE_DIR',g_export_dir);
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
221: p_dat_file := 'GLCC_' || REPLACE(SUBSTR(p_bg_name,1,30),' ','_') ||
222: TO_CHAR(p_bg_id) || '.txt';
223: hr_utility.set_message(800,'PER_50174_HDR_FILE_NAME');
224: fnd_message.set_token('HDR_FILE_NAME',p_hdr_file);
225: fnd_message.set_token('FILE_DIR',g_export_dir);
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
229: fnd_message.set_token('FILE_DIR',g_export_dir);
222: TO_CHAR(p_bg_id) || '.txt';
223: hr_utility.set_message(800,'PER_50174_HDR_FILE_NAME');
224: fnd_message.set_token('HDR_FILE_NAME',p_hdr_file);
225: fnd_message.set_token('FILE_DIR',g_export_dir);
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
229: fnd_message.set_token('FILE_DIR',g_export_dir);
230: writelog(fnd_message.get(),'N');
224: fnd_message.set_token('HDR_FILE_NAME',p_hdr_file);
225: fnd_message.set_token('FILE_DIR',g_export_dir);
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
229: fnd_message.set_token('FILE_DIR',g_export_dir);
230: writelog(fnd_message.get(),'N');
231:
232: -- Open export header file
225: fnd_message.set_token('FILE_DIR',g_export_dir);
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
229: fnd_message.set_token('FILE_DIR',g_export_dir);
230: writelog(fnd_message.get(),'N');
231:
232: -- Open export header file
233: BEGIN
226: writelog(fnd_message.get(),'N');
227: hr_utility.set_message(800,'PER_50175_DAT_FILE_NAME');
228: fnd_message.set_token('DAT_FILE_NAME',p_dat_file);
229: fnd_message.set_token('FILE_DIR',g_export_dir);
230: writelog(fnd_message.get(),'N');
231:
232: -- Open export header file
233: BEGIN
234: hr_utility.set_location(l_proc, 20);
258:
259: WHEN e_invalid_dir THEN
260: hr_utility.set_location('Leaving: '||l_proc, 70);
261: hr_utility.set_message(801,'HR_289426_INV_EXC_DIR');
262: writelog(fnd_message.get(),'N');
263: l_retcode := 2;
264: RETURN l_retcode;
265:
266: WHEN OTHERS THEN
601: hr_utility.set_location(l_proc, 60);
602:
603: -- Report missing flexfield details
604: hr_utility.set_message(800,'PER_289604_WRN_CHRT_ACC_ID');
605: fnd_message.set_token('ID',p_coa_id);
606: writelog(fnd_message.get(),'N');
607:
608: IF p_co_seg IS NULL THEN
609: hr_utility.set_location(l_proc, 70);
602:
603: -- Report missing flexfield details
604: hr_utility.set_message(800,'PER_289604_WRN_CHRT_ACC_ID');
605: fnd_message.set_token('ID',p_coa_id);
606: writelog(fnd_message.get(),'N');
607:
608: IF p_co_seg IS NULL THEN
609: hr_utility.set_location(l_proc, 70);
610: writelog(fnd_message.get_string(800,'PER_289605_WRN_COMP_SEG'),'N');
606: writelog(fnd_message.get(),'N');
607:
608: IF p_co_seg IS NULL THEN
609: hr_utility.set_location(l_proc, 70);
610: writelog(fnd_message.get_string(800,'PER_289605_WRN_COMP_SEG'),'N');
611: END IF;
612:
613: IF p_cc_seg IS NULL THEN
614: hr_utility.set_location(l_proc, 80);
611: END IF;
612:
613: IF p_cc_seg IS NULL THEN
614: hr_utility.set_location(l_proc, 80);
615: writelog(fnd_message.get_string(800,'PER_289606_WRN_CC_SEG'),'N');
616: END IF;
617:
618: IF p_co_vs_id = -1 THEN
619: hr_utility.set_location(l_proc, 90);
616: END IF;
617:
618: IF p_co_vs_id = -1 THEN
619: hr_utility.set_location(l_proc, 90);
620: writelog(fnd_message.get_string(800,'PER_289607_WRN_COMP_VS'),'N');
621: END IF;
622:
623: IF p_cc_vs_id = -1 THEN
624: hr_utility.set_location(l_proc, 100);
621: END IF;
622:
623: IF p_cc_vs_id = -1 THEN
624: hr_utility.set_location(l_proc, 100);
625: writelog(fnd_message.get_string(800,'PER_289608_WRN_CC_VS'),'N');
626: END IF;
627:
628: l_retcode := 1;
629: END IF; -- if values not fetched
681: -- This company exists in more than one business group
682: hr_utility.set_location(l_proc, 30);
683: p_bg_id := -1;
684: l_retcode := 2;
685: writelog(fnd_message.get_string('PER','HR_289491_CO_MULT_BG'),'N');
686: ELSIF (lt_bg_id_tab.COUNT = 0) THEN
687: -- The company does not exist in any business group.
688: hr_utility.set_location(l_proc, 40);
689: p_bg_id := -1;
687: -- The company does not exist in any business group.
688: hr_utility.set_location(l_proc, 40);
689: p_bg_id := -1;
690: l_retcode := 2;
691: writelog(fnd_message.get_string('PER','HR_289601_CO_NO_BG'),'N');
692: ELSIF (lt_bg_id_tab.COUNT = 1) THEN
693: hr_utility.set_location(l_proc, 50);
694: p_bg_id := lt_bg_id_tab(1);
695: hr_utility.set_location('Business Group Id:'||p_bg_id, 50);
977: , p_object_version_number => l_orig_ovn
978: );
979:
980: hr_utility.set_message(800,'PER_50167_CREATED_CO_CC_INFO');
981: fnd_message.set_token('CO_CC_CLASS_INFO_ID',l_orig_info_id);
982: writelog(fnd_message.get(),'N');
983: hr_utility.set_location(l_proc, 40);
984:
985: -- If classification was disabled, re-disable it.
978: );
979:
980: hr_utility.set_message(800,'PER_50167_CREATED_CO_CC_INFO');
981: fnd_message.set_token('CO_CC_CLASS_INFO_ID',l_orig_info_id);
982: writelog(fnd_message.get(),'N');
983: hr_utility.set_location(l_proc, 40);
984:
985: -- If classification was disabled, re-disable it.
986: IF p_enabled_flag = 'N' THEN
1004: writelog(SQLCODE||' - '||SQLERRM,'N');
1005: hr_utility.set_location('Leaving: '|| l_proc, 70);
1006: hr_utility.set_location(SQLERRM, 75);
1007: hr_utility.set_message(800,'PER_50168_ERR_CRE_CO_CC_INFO');
1008: fnd_message.set_token('ORG_NAME',p_org_name);
1009: writelog(fnd_message.get(),'N');
1010: l_retcode := 2;
1011: RETURN l_retcode;
1012:
1005: hr_utility.set_location('Leaving: '|| l_proc, 70);
1006: hr_utility.set_location(SQLERRM, 75);
1007: hr_utility.set_message(800,'PER_50168_ERR_CRE_CO_CC_INFO');
1008: fnd_message.set_token('ORG_NAME',p_org_name);
1009: writelog(fnd_message.get(),'N');
1010: l_retcode := 2;
1011: RETURN l_retcode;
1012:
1013: END create_co_cc_org_info_type;
1041: , p_object_version_number => l_class_ovn
1042: );
1043:
1044: hr_utility.set_message(800,'PER_50165_CREATED_HR_ORG');
1045: fnd_message.set_token('HR_ORG_CLASS_ID',l_class_id);
1046: writelog(fnd_message.get(),'N');
1047: END IF; -- class profile check
1048:
1049: hr_utility.set_location('Leaving: '|| l_proc, 30);
1042: );
1043:
1044: hr_utility.set_message(800,'PER_50165_CREATED_HR_ORG');
1045: fnd_message.set_token('HR_ORG_CLASS_ID',l_class_id);
1046: writelog(fnd_message.get(),'N');
1047: END IF; -- class profile check
1048:
1049: hr_utility.set_location('Leaving: '|| l_proc, 30);
1050:
1056: writelog(SQLCODE||' - '||SQLERRM,'N');
1057: hr_utility.set_location('Leaving: '|| l_proc, 40);
1058: hr_utility.set_location(SQLERRM, 45);
1059: hr_utility.set_message(800,'PER_50166_ERR_CRE_HR_ORG');
1060: fnd_message.set_token('ORG_NAME',p_org_name);
1061: writelog(fnd_message.get(),'N');
1062: l_retcode := 2;
1063: RETURN l_retcode;
1064:
1057: hr_utility.set_location('Leaving: '|| l_proc, 40);
1058: hr_utility.set_location(SQLERRM, 45);
1059: hr_utility.set_message(800,'PER_50166_ERR_CRE_HR_ORG');
1060: fnd_message.set_token('ORG_NAME',p_org_name);
1061: writelog(fnd_message.get(),'N');
1062: l_retcode := 2;
1063: RETURN l_retcode;
1064:
1065: END create_hr_org_class;
1104: , p_object_version_number => l_class_ovn
1105: );
1106:
1107: hr_utility.set_message(800,'PER_50159_COMP_CODE');
1108: fnd_message.set_token('COMP_CODE',p_co);
1109: writelog(fnd_message.get(),'N');
1110: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1105: );
1106:
1107: hr_utility.set_message(800,'PER_50159_COMP_CODE');
1108: fnd_message.set_token('COMP_CODE',p_co);
1109: writelog(fnd_message.get(),'N');
1110: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1113: hr_utility.set_message(800,'PER_50163_CREATED_CO_CC');
1107: hr_utility.set_message(800,'PER_50159_COMP_CODE');
1108: fnd_message.set_token('COMP_CODE',p_co);
1109: writelog(fnd_message.get(),'N');
1110: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1113: hr_utility.set_message(800,'PER_50163_CREATED_CO_CC');
1114: fnd_message.set_token('CO_CC_CLASS_ID',l_orig_info_id||' ('||l_class_info_id||')');
1115: writelog(fnd_message.get(),'N');
1108: fnd_message.set_token('COMP_CODE',p_co);
1109: writelog(fnd_message.get(),'N');
1110: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1113: hr_utility.set_message(800,'PER_50163_CREATED_CO_CC');
1114: fnd_message.set_token('CO_CC_CLASS_ID',l_orig_info_id||' ('||l_class_info_id||')');
1115: writelog(fnd_message.get(),'N');
1116: END IF; -- class profile check
1110: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1113: hr_utility.set_message(800,'PER_50163_CREATED_CO_CC');
1114: fnd_message.set_token('CO_CC_CLASS_ID',l_orig_info_id||' ('||l_class_info_id||')');
1115: writelog(fnd_message.get(),'N');
1116: END IF; -- class profile check
1117:
1118: hr_utility.set_location('Leaving: '|| l_proc, 30);
1111: fnd_message.set_token('COST_CENTER_CODE',p_cc);
1112: writelog(fnd_message.get(),'N');
1113: hr_utility.set_message(800,'PER_50163_CREATED_CO_CC');
1114: fnd_message.set_token('CO_CC_CLASS_ID',l_orig_info_id||' ('||l_class_info_id||')');
1115: writelog(fnd_message.get(),'N');
1116: END IF; -- class profile check
1117:
1118: hr_utility.set_location('Leaving: '|| l_proc, 30);
1119:
1125: writelog(SQLCODE||' - '||SQLERRM,'N');
1126: hr_utility.set_location('Leaving: '|| l_proc, 40);
1127: hr_utility.set_location(SQLERRM, 45);
1128: hr_utility.set_message(800,'PER_50164_ERR_CRE_CO_CC');
1129: fnd_message.set_token('ORG_NAME',p_org_name);
1130: writelog(fnd_message.get(),'N');
1131: l_retcode := 2;
1132: RETURN l_retcode;
1133:
1126: hr_utility.set_location('Leaving: '|| l_proc, 40);
1127: hr_utility.set_location(SQLERRM, 45);
1128: hr_utility.set_message(800,'PER_50164_ERR_CRE_CO_CC');
1129: fnd_message.set_token('ORG_NAME',p_org_name);
1130: writelog(fnd_message.get(),'N');
1131: l_retcode := 2;
1132: RETURN l_retcode;
1133:
1134: END create_co_cc_class;
1163: , p_object_version_number => l_org_ovn
1164: );
1165:
1166: hr_utility.set_message(800,'PER_50161_CREATED_ORG');
1167: fnd_message.set_token('ORG_ID',p_org_id);
1168: writelog(fnd_message.get(),'N');
1169:
1170: hr_utility.set_location('Leaving: '|| l_proc, 20);
1171:
1164: );
1165:
1166: hr_utility.set_message(800,'PER_50161_CREATED_ORG');
1167: fnd_message.set_token('ORG_ID',p_org_id);
1168: writelog(fnd_message.get(),'N');
1169:
1170: hr_utility.set_location('Leaving: '|| l_proc, 20);
1171:
1172: RETURN l_retcode;
1177: writelog(SQLCODE||' - '||SQLERRM,'N');
1178: hr_utility.set_location('Leaving: '|| l_proc, 30);
1179: hr_utility.set_location(SQLERRM, 35);
1180: hr_utility.set_message(800,'PER_50162_ERR_CRE_ORG');
1181: fnd_message.set_token('ORG_NAME',p_org_name);
1182: writelog(fnd_message.get(),'N');
1183: l_retcode := 2;
1184: RETURN l_retcode;
1185:
1178: hr_utility.set_location('Leaving: '|| l_proc, 30);
1179: hr_utility.set_location(SQLERRM, 35);
1180: hr_utility.set_message(800,'PER_50162_ERR_CRE_ORG');
1181: fnd_message.set_token('ORG_NAME',p_org_name);
1182: writelog(fnd_message.get(),'N');
1183: l_retcode := 2;
1184: RETURN l_retcode;
1185:
1186: END create_org;
1281:
1282: IF NOT l_unique THEN
1283: -- Failed to get a unique ORG Name
1284: hr_utility.set_message(800,'PER_50171_NO_UNIQUE_NAME');
1285: fnd_message.set_token('ORG_NAME',p_org_name);
1286: writelog(fnd_message.get(),'N');
1287: p_new_org_name := NULL;
1288: l_retcode := 1;
1289: END IF;
1282: IF NOT l_unique THEN
1283: -- Failed to get a unique ORG Name
1284: hr_utility.set_message(800,'PER_50171_NO_UNIQUE_NAME');
1285: fnd_message.set_token('ORG_NAME',p_org_name);
1286: writelog(fnd_message.get(),'N');
1287: p_new_org_name := NULL;
1288: l_retcode := 1;
1289: END IF;
1290:
1414:
1415: -- Write the generated name to the LOG file
1416: IF p_mode IN ('CREATE_MAINTAIN','SINGLE_ORG') THEN
1417: hr_utility.set_message(800,'PER_50158_ORG_NAME');
1418: fnd_message.set_token('ORG_NAME',p_org_name);
1419: fnd_message.set_token('ORG_START_DATE',p_org_start_date);
1420: fnd_message.set_token('ORG_END_DATE',p_org_end_date);
1421: writelog(fnd_message.get(),'N');
1422: END IF;
1415: -- Write the generated name to the LOG file
1416: IF p_mode IN ('CREATE_MAINTAIN','SINGLE_ORG') THEN
1417: hr_utility.set_message(800,'PER_50158_ORG_NAME');
1418: fnd_message.set_token('ORG_NAME',p_org_name);
1419: fnd_message.set_token('ORG_START_DATE',p_org_start_date);
1420: fnd_message.set_token('ORG_END_DATE',p_org_end_date);
1421: writelog(fnd_message.get(),'N');
1422: END IF;
1423: END IF; -- retcode check
1416: IF p_mode IN ('CREATE_MAINTAIN','SINGLE_ORG') THEN
1417: hr_utility.set_message(800,'PER_50158_ORG_NAME');
1418: fnd_message.set_token('ORG_NAME',p_org_name);
1419: fnd_message.set_token('ORG_START_DATE',p_org_start_date);
1420: fnd_message.set_token('ORG_END_DATE',p_org_end_date);
1421: writelog(fnd_message.get(),'N');
1422: END IF;
1423: END IF; -- retcode check
1424:
1417: hr_utility.set_message(800,'PER_50158_ORG_NAME');
1418: fnd_message.set_token('ORG_NAME',p_org_name);
1419: fnd_message.set_token('ORG_START_DATE',p_org_start_date);
1420: fnd_message.set_token('ORG_END_DATE',p_org_end_date);
1421: writelog(fnd_message.get(),'N');
1422: END IF;
1423: END IF; -- retcode check
1424:
1425: hr_utility.set_location('Leaving: '|| l_proc, 70);
2089: -- Loop for company codes within the business group
2090: for cr_company in c_companies(p_co, p_business_group_id, l_co_vs_id) loop
2091: --
2092: hr_utility.set_message(800, 'PER_50159_COMP_CODE');
2093: fnd_message.set_token('COMP_CODE', cr_company.company_code);
2094: writelog(fnd_message.get(), 'Y');
2095: --
2096: for cr_cost_center in c_cost_centers(l_cc_vs_id) loop
2097: --
2090: for cr_company in c_companies(p_co, p_business_group_id, l_co_vs_id) loop
2091: --
2092: hr_utility.set_message(800, 'PER_50159_COMP_CODE');
2093: fnd_message.set_token('COMP_CODE', cr_company.company_code);
2094: writelog(fnd_message.get(), 'Y');
2095: --
2096: for cr_cost_center in c_cost_centers(l_cc_vs_id) loop
2097: --
2098: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2095: --
2096: for cr_cost_center in c_cost_centers(l_cc_vs_id) loop
2097: --
2098: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2099: fnd_message.set_token('COST_CENTER_CODE',cr_cost_center.cost_center_code);
2100: writelog(fnd_message.get(),'Y');
2101: -- Insert record into temp table
2102: execute immediate 'insert into '||g_temp_table_name||
2103: ' ( coa_id'||
2096: for cr_cost_center in c_cost_centers(l_cc_vs_id) loop
2097: --
2098: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2099: fnd_message.set_token('COST_CENTER_CODE',cr_cost_center.cost_center_code);
2100: writelog(fnd_message.get(),'Y');
2101: -- Insert record into temp table
2102: execute immediate 'insert into '||g_temp_table_name||
2103: ' ( coa_id'||
2104: ' , co'||
2205: when e_no_records_to_process then
2206: --
2207: hr_utility.set_location('Leaving: '|| l_proc, 999);
2208: hr_utility.set_message(800, 'PER_50154_NO_CO_CC_COMBS');
2209: writelog(fnd_message.get(), 'N');
2210: l_retcode := 1;
2211: return l_retcode;
2212: --
2213: when others then
2341: EXCEPTION
2342: WHEN e_no_records_to_process THEN
2343: hr_utility.set_location('Leaving: '|| l_proc, 130);
2344: hr_utility.set_message(800,'PER_50154_NO_CO_CC_COMBS');
2345: writelog(fnd_message.get(),'N');
2346: l_retcode := 1;
2347: RETURN l_retcode;
2348: WHEN OTHERS THEN
2349: hr_utility.set_location('Leaving: '|| l_proc, 140);
2479:
2480: -- Loop for company codes within the business group
2481: FOR cr_company IN c_companies(p_co, p_business_group_id, l_co_vs_id) LOOP
2482: hr_utility.set_message(800,'PER_50159_COMP_CODE');
2483: fnd_message.set_token('COMP_CODE',cr_company.company_code);
2484: writelog(fnd_message.get(),'Y');
2485:
2486: FOR cr_cost_center IN c_cost_centers(l_cc_vs_id) LOOP
2487: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2480: -- Loop for company codes within the business group
2481: FOR cr_company IN c_companies(p_co, p_business_group_id, l_co_vs_id) LOOP
2482: hr_utility.set_message(800,'PER_50159_COMP_CODE');
2483: fnd_message.set_token('COMP_CODE',cr_company.company_code);
2484: writelog(fnd_message.get(),'Y');
2485:
2486: FOR cr_cost_center IN c_cost_centers(l_cc_vs_id) LOOP
2487: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2488: fnd_message.set_token('COST_CENTER_CODE',cr_cost_center.cost_center_code);
2484: writelog(fnd_message.get(),'Y');
2485:
2486: FOR cr_cost_center IN c_cost_centers(l_cc_vs_id) LOOP
2487: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2488: fnd_message.set_token('COST_CENTER_CODE',cr_cost_center.cost_center_code);
2489: writelog(fnd_message.get(),'Y');
2490:
2491: -- Insert record into temp table
2492: EXECUTE IMMEDIATE 'INSERT INTO '||g_temp_table_name||
2485:
2486: FOR cr_cost_center IN c_cost_centers(l_cc_vs_id) LOOP
2487: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
2488: fnd_message.set_token('COST_CENTER_CODE',cr_cost_center.cost_center_code);
2489: writelog(fnd_message.get(),'Y');
2490:
2491: -- Insert record into temp table
2492: EXECUTE IMMEDIATE 'INSERT INTO '||g_temp_table_name||
2493: ' ( coa_id'||
2778:
2779: WHEN e_no_records_to_process THEN
2780: hr_utility.set_location('Leaving: '|| l_proc, 120);
2781: hr_utility.set_message(800,'PER_50154_NO_CO_CC_COMBS');
2782: writelog(fnd_message.get(),'N');
2783: l_retcode := 1;
2784: RETURN l_retcode;
2785:
2786: WHEN OTHERS THEN
2982:
2983: WHEN e_no_records_to_process THEN
2984: hr_utility.set_location('Leaving: '|| l_proc, 90);
2985: hr_utility.set_message(800,'PER_50154_NO_CO_CC_COMBS');
2986: writelog(fnd_message.get(),'N');
2987: l_retcode := 1;
2988: RETURN l_retcode;
2989:
2990: WHEN OTHERS THEN
3284: );
3285: IF l_retcode = 0 THEN
3286: hr_utility.set_location(l_proc, 30);
3287: hr_utility.set_message(800,'PER_50172_PROC_CCID');
3288: fnd_message.set_token('CCID',p_ccid);
3289: fnd_message.set_token('COA_ID',l_coa_id);
3290: writelog(fnd_message.get(),'N');
3291: ELSE
3292: hr_utility.set_location(l_proc, 40);
3285: IF l_retcode = 0 THEN
3286: hr_utility.set_location(l_proc, 30);
3287: hr_utility.set_message(800,'PER_50172_PROC_CCID');
3288: fnd_message.set_token('CCID',p_ccid);
3289: fnd_message.set_token('COA_ID',l_coa_id);
3290: writelog(fnd_message.get(),'N');
3291: ELSE
3292: hr_utility.set_location(l_proc, 40);
3293: RAISE e_invalid_ccid;
3286: hr_utility.set_location(l_proc, 30);
3287: hr_utility.set_message(800,'PER_50172_PROC_CCID');
3288: fnd_message.set_token('CCID',p_ccid);
3289: fnd_message.set_token('COA_ID',l_coa_id);
3290: writelog(fnd_message.get(),'N');
3291: ELSE
3292: hr_utility.set_location(l_proc, 40);
3293: RAISE e_invalid_ccid;
3294: END IF;
3317: FETCH c_list INTO l_co, l_cc;
3318: CLOSE c_list;
3319:
3320: hr_utility.set_message(800,'PER_50159_COMP_CODE');
3321: fnd_message.set_token('COMP_CODE',l_co);
3322: writelog(fnd_message.get(),'N');
3323: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
3324: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3325: writelog(fnd_message.get(),'N');
3318: CLOSE c_list;
3319:
3320: hr_utility.set_message(800,'PER_50159_COMP_CODE');
3321: fnd_message.set_token('COMP_CODE',l_co);
3322: writelog(fnd_message.get(),'N');
3323: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
3324: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3325: writelog(fnd_message.get(),'N');
3326: END IF; -- retocde
3320: hr_utility.set_message(800,'PER_50159_COMP_CODE');
3321: fnd_message.set_token('COMP_CODE',l_co);
3322: writelog(fnd_message.get(),'N');
3323: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
3324: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3325: writelog(fnd_message.get(),'N');
3326: END IF; -- retocde
3327:
3328: -- Check if Organization already exists
3321: fnd_message.set_token('COMP_CODE',l_co);
3322: writelog(fnd_message.get(),'N');
3323: hr_utility.set_message(800,'PER_50160_COST_CENTER_CODE');
3324: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3325: writelog(fnd_message.get(),'N');
3326: END IF; -- retocde
3327:
3328: -- Check if Organization already exists
3329: IF l_retcode = 0 THEN
3382: ELSE -- retcode is not 0
3383: hr_utility.set_location(l_proc, 130);
3384: -- Write warning to LOG
3385: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3386: fnd_message.set_token('COMP_CODE',l_co);
3387: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3388: writelog(fnd_message.get(),'N');
3389: -- Close transaction for ORG.
3390: ROLLBACK;
3383: hr_utility.set_location(l_proc, 130);
3384: -- Write warning to LOG
3385: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3386: fnd_message.set_token('COMP_CODE',l_co);
3387: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3388: writelog(fnd_message.get(),'N');
3389: -- Close transaction for ORG.
3390: ROLLBACK;
3391: l_retcode := 2;
3384: -- Write warning to LOG
3385: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3386: fnd_message.set_token('COMP_CODE',l_co);
3387: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3388: writelog(fnd_message.get(),'N');
3389: -- Close transaction for ORG.
3390: ROLLBACK;
3391: l_retcode := 2;
3392: l_org_id := -1;
3416:
3417: WHEN e_invalid_ccid THEN
3418: hr_utility.set_location('Leaving: '|| l_proc, 170);
3419: hr_utility.set_message(800,'PER_50173_INVALID_CCID');
3420: fnd_message.set_token('CCID',p_ccid);
3421: writelog(fnd_message.get(),'N');
3422: l_retcode := 2;
3423: RETURN l_retcode;
3424:
3417: WHEN e_invalid_ccid THEN
3418: hr_utility.set_location('Leaving: '|| l_proc, 170);
3419: hr_utility.set_message(800,'PER_50173_INVALID_CCID');
3420: fnd_message.set_token('CCID',p_ccid);
3421: writelog(fnd_message.get(),'N');
3422: l_retcode := 2;
3423: RETURN l_retcode;
3424:
3425: WHEN OTHERS THEN
3609: FETCH c_list INTO l_ccid, l_co, l_cc, l_org_id;
3610: EXIT WHEN c_list%NOTFOUND;
3611:
3612: hr_utility.set_message(800,'PER_50169_SYNC_REC_DETAILS');
3613: fnd_message.set_token('CCID',l_ccid);
3614: fnd_message.set_token('COMP_CODE',l_co);
3615: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3616: fnd_message.set_token('ORG_ID',l_org_id);
3617: writelog(fnd_message.get(),'N');
3610: EXIT WHEN c_list%NOTFOUND;
3611:
3612: hr_utility.set_message(800,'PER_50169_SYNC_REC_DETAILS');
3613: fnd_message.set_token('CCID',l_ccid);
3614: fnd_message.set_token('COMP_CODE',l_co);
3615: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3616: fnd_message.set_token('ORG_ID',l_org_id);
3617: writelog(fnd_message.get(),'N');
3618: END LOOP; -- records in temp table
3611:
3612: hr_utility.set_message(800,'PER_50169_SYNC_REC_DETAILS');
3613: fnd_message.set_token('CCID',l_ccid);
3614: fnd_message.set_token('COMP_CODE',l_co);
3615: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3616: fnd_message.set_token('ORG_ID',l_org_id);
3617: writelog(fnd_message.get(),'N');
3618: END LOOP; -- records in temp table
3619: CLOSE c_list;
3612: hr_utility.set_message(800,'PER_50169_SYNC_REC_DETAILS');
3613: fnd_message.set_token('CCID',l_ccid);
3614: fnd_message.set_token('COMP_CODE',l_co);
3615: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3616: fnd_message.set_token('ORG_ID',l_org_id);
3617: writelog(fnd_message.get(),'N');
3618: END LOOP; -- records in temp table
3619: CLOSE c_list;
3620: END IF; -- retcode is 0
3613: fnd_message.set_token('CCID',l_ccid);
3614: fnd_message.set_token('COMP_CODE',l_co);
3615: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3616: fnd_message.set_token('ORG_ID',l_org_id);
3617: writelog(fnd_message.get(),'N');
3618: END LOOP; -- records in temp table
3619: CLOSE c_list;
3620: END IF; -- retcode is 0
3621:
3623: -- getting records to synchronize by exiting with warnings.
3624: IF l_retcode = 0 AND l_duplicate_orgs_found THEN
3625: hr_utility.set_location(l_proc, 70);
3626: hr_utility.set_message(800,'PER_50176_DUPL_CO_CC_ORGS');
3627: writelog(fnd_message.get(),'N');
3628: l_retcode := 1;
3629: END IF; -- retcode is 0
3630:
3631: hr_utility.set_location('Leaving: '|| l_proc, 80);
3636:
3637: WHEN e_no_records_to_process THEN
3638: hr_utility.set_location('Leaving: '|| l_proc, 90);
3639: hr_utility.set_message(800,'PER_50154_NO_CO_CC_COMBS');
3640: writelog(fnd_message.get(),'N');
3641: l_retcode := 1;
3642: RETURN l_retcode;
3643:
3644: WHEN OTHERS THEN
3785: ', P_CC: '||l_cc||
3786: ', P_CC_VS_ID: '||l_cc_vs_id,'Y');
3787: -- Write warning to LOG
3788: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3789: fnd_message.set_token('COMP_CODE',l_co);
3790: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3791: writelog(fnd_message.get(),'N');
3792: -- Close transaction for ORG.
3793: ROLLBACK;
3786: ', P_CC_VS_ID: '||l_cc_vs_id,'Y');
3787: -- Write warning to LOG
3788: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3789: fnd_message.set_token('COMP_CODE',l_co);
3790: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3791: writelog(fnd_message.get(),'N');
3792: -- Close transaction for ORG.
3793: ROLLBACK;
3794: -- Reset return code to continue processing next ORG.
3787: -- Write warning to LOG
3788: hr_utility.set_message(800,'PER_50170_ERR_PROC_CO_CC');
3789: fnd_message.set_token('COMP_CODE',l_co);
3790: fnd_message.set_token('COST_CENTER_CODE',l_cc);
3791: writelog(fnd_message.get(),'N');
3792: -- Close transaction for ORG.
3793: ROLLBACK;
3794: -- Reset return code to continue processing next ORG.
3795: l_retcode := 0;
3824:
3825: WHEN e_no_records_to_process THEN
3826: hr_utility.set_location('Leaving: '|| l_proc, 50);
3827: hr_utility.set_message(800,'PER_50154_NO_CO_CC_COMBS');
3828: writelog(fnd_message.get(),'N');
3829: IF c_list%ISOPEN THEN
3830: CLOSE c_list;
3831: END IF;
3832: l_retcode := 1;
3989:
3990: WHEN e_class_profile THEN
3991: hr_utility.set_location('Leaving: '|| l_proc, 220);
3992: hr_utility.set_message(800,'PER_50155_ORG_CLASS_PROF_WARN');
3993: writelog(fnd_message.get(),'N');
3994: l_retcode := 2;
3995: RETURN l_retcode;
3996:
3997: WHEN e_org_name_format THEN
3996:
3997: WHEN e_org_name_format THEN
3998: hr_utility.set_location('Leaving: '|| l_proc, 230);
3999: hr_utility.set_message(800,'HR_289489_NO_NAME_FORMAT');
4000: writelog(fnd_message.get(),'N');
4001: l_retcode := 2;
4002: RETURN l_retcode;
4003:
4004: WHEN e_export_dir THEN
4003:
4004: WHEN e_export_dir THEN
4005: hr_utility.set_location('Leaving: '|| l_proc, 240);
4006: hr_utility.set_message(800,'HR_289427_NO_EXC_DIR');
4007: writelog(fnd_message.get(),'N');
4008: l_retcode := 2;
4009: RETURN l_retcode;
4010:
4011: WHEN OTHERS THEN
4100:
4101: WHEN e_invalid_mode THEN
4102: hr_utility.set_location('Leaving: '|| l_proc, 120);
4103: hr_utility.set_message(800,'PER_50150_INVAL_SYNC_ORG_MODE');
4104: fnd_message.set_token('MODE',p_mode);
4105: writelog(fnd_message.get(),'N');
4106: l_retcode := 2;
4107: RETURN l_retcode;
4108:
4101: WHEN e_invalid_mode THEN
4102: hr_utility.set_location('Leaving: '|| l_proc, 120);
4103: hr_utility.set_message(800,'PER_50150_INVAL_SYNC_ORG_MODE');
4104: fnd_message.set_token('MODE',p_mode);
4105: writelog(fnd_message.get(),'N');
4106: l_retcode := 2;
4107: RETURN l_retcode;
4108:
4109: WHEN e_no_coaid THEN
4108:
4109: WHEN e_no_coaid THEN
4110: hr_utility.set_location('Leaving: '|| l_proc, 130);
4111: hr_utility.set_message(800,'PER_50151_NO_COAID');
4112: writelog(fnd_message.get(),'N');
4113: l_retcode := 2;
4114: RETURN l_retcode;
4115:
4116: WHEN e_no_ccid THEN
4115:
4116: WHEN e_no_ccid THEN
4117: hr_utility.set_location('Leaving: '|| l_proc, 140);
4118: hr_utility.set_message(800,'PER_50152_NO_CCID');
4119: writelog(fnd_message.get(),'N');
4120: l_retcode := 2;
4121: RETURN l_retcode;
4122:
4123: WHEN e_no_bgid THEN
4122:
4123: WHEN e_no_bgid THEN
4124: hr_utility.set_location('Leaving: '|| l_proc, 150);
4125: hr_utility.set_message(800,'PER_50153_NO_BGID');
4126: writelog(fnd_message.get(),'N');
4127: l_retcode := 2;
4128: RETURN l_retcode;
4129:
4130: WHEN e_invalid_source THEN
4129:
4130: WHEN e_invalid_source THEN
4131: hr_utility.set_location('Leaving: '|| l_proc, 160);
4132: hr_utility.set_message(800,'PER_50156_INVAL_CO_CC_SOURCE');
4133: fnd_message.set_token('SOURCE',p_source);
4134: writelog(fnd_message.get(),'N');
4135: l_retcode := 2;
4136: RETURN l_retcode;
4137:
4130: WHEN e_invalid_source THEN
4131: hr_utility.set_location('Leaving: '|| l_proc, 160);
4132: hr_utility.set_message(800,'PER_50156_INVAL_CO_CC_SOURCE');
4133: fnd_message.set_token('SOURCE',p_source);
4134: writelog(fnd_message.get(),'N');
4135: l_retcode := 2;
4136: RETURN l_retcode;
4137:
4138: WHEN OTHERS THEN
4225: writelog('==========================================','Y');
4226: writelog('Starting Synchronize Organizations Program','Y');
4227: writelog('==========================================','Y');
4228: hr_utility.set_message(800,'PER_50157_BUS_GRP_NAME');
4229: fnd_message.set_token('BUS_GRP_NAME',l_bg_name);
4230: fnd_message.set_token('BUS_GRP_ID',p_business_group_id);
4231: writelog(fnd_message.get(),'N');
4232: writelog('----------','Y');
4233: writelog('Parameters','Y');
4226: writelog('Starting Synchronize Organizations Program','Y');
4227: writelog('==========================================','Y');
4228: hr_utility.set_message(800,'PER_50157_BUS_GRP_NAME');
4229: fnd_message.set_token('BUS_GRP_NAME',l_bg_name);
4230: fnd_message.set_token('BUS_GRP_ID',p_business_group_id);
4231: writelog(fnd_message.get(),'N');
4232: writelog('----------','Y');
4233: writelog('Parameters','Y');
4234: writelog('----------','Y');
4227: writelog('==========================================','Y');
4228: hr_utility.set_message(800,'PER_50157_BUS_GRP_NAME');
4229: fnd_message.set_token('BUS_GRP_NAME',l_bg_name);
4230: fnd_message.set_token('BUS_GRP_ID',p_business_group_id);
4231: writelog(fnd_message.get(),'N');
4232: writelog('----------','Y');
4233: writelog('Parameters','Y');
4234: writelog('----------','Y');
4235: writelog('P_MODE: '||p_mode,'Y');