1: PACKAGE BODY hr_du_di_insert AS
2: /* $Header: perduext.pkb 120.1 2005/06/27 02:51:04 mroberts noship $ */
3:
4:
5: -- --------------------- VALIDATE_SHEET_DESCRIPTORS -------------------------
35:
36: BEGIN
37: --
38: hr_du_utility.message('ROUT',
39: 'entry:hr_du_di_insert.validate_sheet_descriptors', 5);
40: hr_du_utility.message('PARA', '(p_upload_id - ' || p_upload_id ||
41: ')(p_upload_header_id - ' || p_upload_header_id || ')' , 10);
42: --
43: OPEN csr_total_desc;
70: END IF;
71:
72: --
73: hr_du_utility.message('ROUT',
74: 'exit:hr_du_di_insert.validate_sheet_descriptors', 15);
75: --
76: EXCEPTION
77: WHEN e_fatal_error THEN
78: hr_du_utility.error(SQLCODE,
75: --
76: EXCEPTION
77: WHEN e_fatal_error THEN
78: hr_du_utility.error(SQLCODE,
79: 'hr_du_di_insert.validate_sheet_descriptors',
80: l_fatal_error_message, 'R');
81: RAISE;
82: WHEN OTHERS THEN
83: hr_du_utility.error(SQLCODE,'hr_du_di_insert.validate_sheet_descriptors'
79: 'hr_du_di_insert.validate_sheet_descriptors',
80: l_fatal_error_message, 'R');
81: RAISE;
82: WHEN OTHERS THEN
83: hr_du_utility.error(SQLCODE,'hr_du_di_insert.validate_sheet_descriptors'
84: ,'(none)', 'R');
85: RAISE;
86: --
87: END VALIDATE_SHEET_DESCRIPTORS;
119:
120: BEGIN
121: --
122: hr_du_utility.message('ROUT',
123: 'entry:hr_du_di_insert.validate_header_descriptors', 5);
124: hr_du_utility.message('PARA',
125: '(p_upload_id - ' || p_upload_id || ')' , 10);
126:
127: --
150: END IF;
151:
152: --
153: hr_du_utility.message('ROUT',
154: 'exit:hr_du_di_insert.validate_header_descriptors', 15);
155: --
156: EXCEPTION
157: WHEN e_fatal_error THEN
158: hr_du_utility.error(SQLCODE,
155: --
156: EXCEPTION
157: WHEN e_fatal_error THEN
158: hr_du_utility.error(SQLCODE,
159: 'hr_du_di_insert.validate_header_descriptors',
160: l_fatal_error_message, 'R');
161: RAISE;
162: WHEN OTHERS THEN
163: hr_du_utility.error(SQLCODE,
160: l_fatal_error_message, 'R');
161: RAISE;
162: WHEN OTHERS THEN
163: hr_du_utility.error(SQLCODE,
164: 'hr_du_di_insert.validate_header_descriptors',
165: '(none)', 'R');
166: RAISE;
167: --
168: END VALIDATE_HEADER_DESCRIPTORS;
197:
198: BEGIN
199: --
200: hr_du_utility.message('ROUT',
201: 'entry:hr_du_di_insert.parse_line_to_table', 5);
202: hr_du_utility.message('PARA', '(p_data_line - ' || p_data_line ||
203: ')(p_upload_header_id - ' || p_upload_header_id ||
204: ')(p_line_type - ' || p_line_type || ')' , 10);
205: --
268: END LOOP;
269:
270: --
271: hr_du_utility.message('ROUT',
272: 'exit:hr_du_di_insert.parse_line_to_table', 15);
273: --
274: EXCEPTION
275: WHEN e_fatal_error THEN
276: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.parse_line_to_table',
272: 'exit:hr_du_di_insert.parse_line_to_table', 15);
273: --
274: EXCEPTION
275: WHEN e_fatal_error THEN
276: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.parse_line_to_table',
277: l_fatal_error_message, 'R');
278: RAISE;
279: WHEN OTHERS THEN
280: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.parse_line_to_table',
276: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.parse_line_to_table',
277: l_fatal_error_message, 'R');
278: RAISE;
279: WHEN OTHERS THEN
280: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.parse_line_to_table',
281: '(none)', 'R');
282: RAISE;
283: --
284: END PARSE_LINE_TO_TABLE;
315:
316: BEGIN
317: --
318: hr_du_utility.message('ROUT',
319: 'entry:hr_du_di_insert.check_unique_files', 5);
320: --
321:
322: OPEN csr_total_count;
323: FETCH csr_total_count INTO l_counter_1;
344: END IF;
345:
346: --
347: hr_du_utility.message('ROUT',
348: 'exit:hr_du_di_insert.check_unique_files', 15);
349: --
350: EXCEPTION
351: WHEN e_fatal_error THEN
352: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
348: 'exit:hr_du_di_insert.check_unique_files', 15);
349: --
350: EXCEPTION
351: WHEN e_fatal_error THEN
352: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
353: l_fatal_error_message, 'R');
354: RAISE;
355: WHEN OTHERS THEN
356: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.check_unique_files',
352: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
353: l_fatal_error_message, 'R');
354: RAISE;
355: WHEN OTHERS THEN
356: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.check_unique_files',
357: '(none)', 'R');
358: RAISE;
359: --
360: END CHECK_UNIQUE_FILES;
372:
373: BEGIN
374: --
375: hr_du_utility.message('ROUT',
376: 'entry:hr_du_di_insert.populate_dynamic_table', 5);
377: --
378:
379: --Loop around the upper case letters
380: FOR i IN 65..90 LOOP
389: END LOOP;
390:
391: --
392: hr_du_utility.message('ROUT',
393: 'exit:hr_du_di_insert.populate_dynamic_table', 15);
394: --
395: EXCEPTION
396: WHEN OTHERS THEN
397: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.populate_dynamic_table',
393: 'exit:hr_du_di_insert.populate_dynamic_table', 15);
394: --
395: EXCEPTION
396: WHEN OTHERS THEN
397: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.populate_dynamic_table',
398: '(none)', 'R');
399: RAISE;
400: --
401: END POPULATE_DYNAMIC_TABLE;
454:
455: BEGIN
456: --
457: hr_du_utility.message('ROUT',
458: 'entry:hr_du_di_insert.validate_api_ids', 5);
459: hr_du_utility.message('PARA',
460: '(p_upload_header_id - ' || p_upload_header_id || ')' , 10);
461: --
462:
520: RAISE e_fatal_error;
521: END IF;
522:
523: --
524: hr_du_utility.message('ROUT','exit:hr_du_di_insert.validate_api_ids', 15);
525: --
526: EXCEPTION
527: WHEN e_fatal_error THEN
528: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
524: hr_du_utility.message('ROUT','exit:hr_du_di_insert.validate_api_ids', 15);
525: --
526: EXCEPTION
527: WHEN e_fatal_error THEN
528: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
529: l_fatal_error_message, 'R');
530: RAISE;
531: WHEN OTHERS THEN
532: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
528: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
529: l_fatal_error_message, 'R');
530: RAISE;
531: WHEN OTHERS THEN
532: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate_api_ids',
533: '(none)', 'R');
534: RAISE;
535: --
536: END VALIDATE_API_IDS;
557: END IF;
558:
559: EXCEPTION
560: WHEN OTHERS THEN
561: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.set_delimiter_string',
562: '(none)', 'R');
563: RAISE;
564: --
565: END SET_DElIMITER_STRING;
605:
606: --error handling
607: EXCEPTION
608: WHEN OTHERS THEN
609: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.num_delimiters',
610: '(none)', 'R');
611: RAISE;
612: --
613: END NUM_DELIMITERS;
643:
644: --error handling
645: EXCEPTION
646: WHEN OTHERS THEN
647: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.words_on_line','(none)',
648: 'R');
649: RAISE;
650: END WORDS_ON_LINE;
651:
669: l_new_data_line VARCHAR2(32767);
670:
671: BEGIN
672: --
673: hr_du_utility.message('ROUT','entry:hr_du_di_insert.remove_garbage', 5);
674: hr_du_utility.message('PARA', '(p_line - ' || p_line || ')' , 10);
675: --
676:
677: --this loop handles removing i.e carrage returns from the line
683: l_new_data_line := l_new_data_line || l_temp_line;
684: END LOOP;
685: END IF;
686: --
687: hr_du_utility.message('ROUT','exit:hr_du_di_insert.remove_garbage', 15);
688: hr_du_utility.message('PARA', '(l_new_data_line - ' || l_new_data_line
689: || ')' , 20);
690: --
691: RETURN l_new_data_line;
692:
693: --error handling
694: EXCEPTION
695: WHEN OTHERS THEN
696: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.remove_garbage','(none)',
697: 'R');
698: RAISE;
699:
700: END REMOVE_GARBAGE;
730: AND head.api_module_id = api.api_module_id;
731:
732: BEGIN
733: --
734: hr_du_utility.message('ROUT','entry:hr_du_di_insert.next_line', 5);
735: hr_du_utility.message('PARA', '(p_filehandle - Record type )' , 10);
736: --
737: g_counter := g_counter + 1;
738: utl_file.get_line(p_filehandle,l_data_line);
766: SET_DElIMITER_STRING;
767: g_delimiter_count := Num_Delimiters(l_data_line);
768:
769: --
770: hr_du_utility.message('ROUT','exit:hr_du_di_insert.next_line', 20);
771: hr_du_utility.message('PARA', '(l_data_line - ' || l_data_line || ')' ,
772: 25);
773: --
774:
785: l_api_name,'(none)', 'R');
786: RAISE;
787: WHEN OTHERS THEN
788: hr_du_utility.error(SQLCODE,
789: 'hr_du_di_insert.next_line','(none)', 'R');
790: RAISE;
791: END NEXT_LINE;
792:
793:
836:
837: --catches first word with no delimiter before the word
838: ELSIF p_word_num = 1 then
839: l_position := 0;
840: l_next := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, p_word_num);
841: l_difference := (l_next - 1) - (l_position + 1);
842: l_section := SUBSTRB(p_line, (l_position + 1) , (l_difference + 1));
843:
844:
844:
845: ELSIF p_word_num >= (l_number_del + 1) THEN
846: --catches last word with no delimiter after the word
847: IF p_word_num = (l_number_del + 1) THEN
848: l_position := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, (p_word_num - 1));
849: l_next := l_length;
850: l_difference := l_next - (l_position + 1);
851: l_section := SUBSTRB(p_line, (l_position + 1) , (l_difference + 1));
852:
858: END IF;
859:
860: --normal case
861: ELSE
862: l_position := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, (p_word_num - 1));
863: l_next := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, p_word_num);
864: l_difference := (l_next - 1) - (l_position + 1);
865: l_section := SUBSTRB(p_line, (l_position + 1) , (l_difference + 1));
866: END IF;
859:
860: --normal case
861: ELSE
862: l_position := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, (p_word_num - 1));
863: l_next := INSTRB(p_line, hr_du_di_insert.g_current_delimiter, 1, p_word_num);
864: l_difference := (l_next - 1) - (l_position + 1);
865: l_section := SUBSTRB(p_line, (l_position + 1) , (l_difference + 1));
866: END IF;
867:
870:
871: --error handling
872: EXCEPTION
873: WHEN e_fatal_error THEN
874: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.return_word',
875: l_fatal_error_message, 'R');
876: RAISE;
877: WHEN OTHERS THEN
878: hr_du_utility.error(SQLCODE,
875: l_fatal_error_message, 'R');
876: RAISE;
877: WHEN OTHERS THEN
878: hr_du_utility.error(SQLCODE,
879: 'hr_du_di_insert.return_word','(none)', 'R');
880: RAISE;
881: END RETURN_WORD;
882:
883:
912: l_file_name VARCHAR2(2000);
913:
914: BEGIN
915: --
916: hr_du_utility.message('ROUT','entry:hr_du_di_insert.general_extract', 5);
917: hr_du_utility.message('PARA', '(p_filehandle - Record Type)' ||
918: '(p_upload_id - ' || p_upload_id ||
919: ')(p_upload_header_id - ' || p_upload_header_id ||
920: ')(p_string - ' || p_string ||
1013: RAISE e_fatal_error;
1014: END;
1015: END LOOP;
1016: --
1017: hr_du_utility.message('ROUT','exit:hr_du_di_insert.general_extract', 30);
1018: --
1019:
1020: --error handling
1021: EXCEPTION
1019:
1020: --error handling
1021: EXCEPTION
1022: WHEN e_fatal_error THEN
1023: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.general_extract',
1024: l_fatal_error_message, 'R');
1025: RAISE;
1026: WHEN OTHERS THEN
1027: hr_du_utility.error(SQLCODE,
1024: l_fatal_error_message, 'R');
1025: RAISE;
1026: WHEN OTHERS THEN
1027: hr_du_utility.error(SQLCODE,
1028: 'hr_du_di_insert.general_extract','(none)', 'R');
1029: RAISE;
1030:
1031: END GENERAL_EXTRACT;
1032:
1050: l_upload_header_id NUMBER := null;
1051:
1052: BEGIN
1053: --
1054: hr_du_utility.message('ROUT','entry:hr_du_di_insert.extract_api_locations'
1055: , 5);
1056: --
1057: GENERAL_Extract (p_filehandle, p_upload_id, l_upload_header_id,
1058: l_Column_one_header, l_file_descriptor);
1056: --
1057: GENERAL_Extract (p_filehandle, p_upload_id, l_upload_header_id,
1058: l_Column_one_header, l_file_descriptor);
1059: --
1060: hr_du_utility.message('ROUT','exit:hr_du_di_insert.extract_api_locations'
1061: , 10);
1062: --
1063:
1064: --error handling
1063:
1064: --error handling
1065: EXCEPTION
1066: WHEN OTHERS THEN
1067: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.extract_api_locations'
1068: ,'(none)', 'R');
1069: RAISE;
1070:
1071: END EXTRACT_API_LOCATIONS;
1089: l_upload_header_id NUMBER := null;
1090:
1091: BEGIN
1092: --
1093: hr_du_utility.message('ROUT','entry:hr_du_di_insert.extract_headers', 5);
1094: --
1095: GENERAL_Extract(p_filehandle, p_upload_id, l_upload_header_id,
1096: l_Column_one_header, l_file_descriptor);
1097: VALIDATE_HEADER_DESCRIPTORS(p_upload_id);
1095: GENERAL_Extract(p_filehandle, p_upload_id, l_upload_header_id,
1096: l_Column_one_header, l_file_descriptor);
1097: VALIDATE_HEADER_DESCRIPTORS(p_upload_id);
1098: --
1099: hr_du_utility.message('ROUT','exit:hr_du_di_insert.extract_headers', 10);
1100: --
1101:
1102: --error handling
1103: EXCEPTION
1101:
1102: --error handling
1103: EXCEPTION
1104: WHEN OTHERS THEN
1105: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.extract_headers',
1106: '(none)', 'R');
1107: RAISE;
1108:
1109: END EXTRACT_HEADERS;
1132: l_reference_type VARCHAR2(100);
1133:
1134: BEGIN
1135: --
1136: hr_du_utility.message('ROUT','entry:hr_du_di_insert.extract_descriptors',
1137: 5);
1138: --
1139: GENERAL_Extract(p_filehandle, p_upload_id, p_upload_header_id,
1140: l_Column_one_header, l_file_descriptor);
1150: (p_upload_header_id);
1151: HR_DU_RULES.API_PRESENT_AND_CORRECT
1152: (p_upload_header_id, p_upload_id);
1153: --
1154: hr_du_utility.message('ROUT','exit:hr_du_di_insert.extract_descriptors',
1155: 10);
1156: hr_du_utility.message('PARA', '(l_reference_type - ' || l_reference_type
1157: || ')' , 15);
1158: --
1161:
1162: --error handling
1163: EXCEPTION
1164: WHEN OTHERS THEN
1165: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.extract_descriptors',
1166: '(none)', 'R');
1167: RAISE;
1168:
1169: END EXTRACT_DESCRIPTORS;
1227:
1228:
1229: BEGIN
1230: --
1231: hr_du_utility.message('ROUT','entry:hr_du_di_insert.handle_api_files', 5);
1232: hr_du_utility.message('PARA', '(p_Location - ' || p_Location ||
1233: ')(p_upload_id - ' || p_upload_id || ')' , 10);
1234: --
1235: g_header_table.delete;
1328: END LOOP;
1329: CLOSE csr_files;
1330:
1331: --
1332: hr_du_utility.message('ROUT','exit:hr_du_di_insert.handle_api_files', 30);
1333: --
1334:
1335: --error handling
1336: EXCEPTION
1334:
1335: --error handling
1336: EXCEPTION
1337: WHEN e_fatal_error THEN
1338: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.handle_api_files',
1339: l_fatal_error_message, 'R');
1340: RAISE;
1341: WHEN OTHERS THEN
1342: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.handle_api_files',
1338: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.handle_api_files',
1339: l_fatal_error_message, 'R');
1340: RAISE;
1341: WHEN OTHERS THEN
1342: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.handle_api_files',
1343: '(none)', 'R');
1344: RAISE;
1345:
1346: END HANDLE_API_FILES;
1395:
1396: BEGIN
1397: --
1398: hr_du_utility.message('ROUT',
1399: 'entry:hr_du_di_insert.update_upload_table', 5);
1400: hr_du_utility.message('PARA',
1401: '(p_upload_id - ' || p_upload_id || ')' , 10);
1402: --
1403:
1485: END IF;
1486:
1487: --
1488: hr_du_utility.message('ROUT',
1489: 'exit:hr_du_di_insert.update_upload_table', 25);
1490: --
1491:
1492: --error handling
1493: EXCEPTION
1491:
1492: --error handling
1493: EXCEPTION
1494: WHEN e_fatal_error THEN
1495: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.update_upload_table',
1496: l_fatal_error_message, 'R');
1497: RAISE;
1498: WHEN OTHERS THEN
1499: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.update_upload_table',
1495: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.update_upload_table',
1496: l_fatal_error_message, 'R');
1497: RAISE;
1498: WHEN OTHERS THEN
1499: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.update_upload_table',
1500: '(none)', 'R');
1501: RAISE;
1502:
1503: END UPDATE_UPLOAD_TABLE;
1525: l_source_name VARCHAR2(50);
1526:
1527: BEGIN
1528: --
1529: hr_du_utility.message('ROUT','entry:hr_du_di_insert.return_file_name', 5);
1530: hr_du_utility.message('PARA',
1531: '(p_upload_id - ' || p_upload_id || ')' , 10);
1532: --
1533: OPEN csr_source;
1538: RAISE e_fatal_error;
1539: END IF;
1540: CLOSE csr_source;
1541: --
1542: hr_du_utility.message('ROUT','exit:hr_du_di_insert.return_file_name', 15);
1543: hr_du_utility.message('PARA', '(l_source_name - ' || l_source_name ||
1544: ')' , 20);
1545: --
1546: RETURN l_source_name;
1547:
1548: --error handling
1549: EXCEPTION
1550: WHEN e_fatal_error THEN
1551: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.return_file_name',
1552: l_fatal_error_message, 'R');
1553: RAISE;
1554: WHEN OTHERS THEN
1555: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.return_file_name',
1551: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.return_file_name',
1552: l_fatal_error_message, 'R');
1553: RAISE;
1554: WHEN OTHERS THEN
1555: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.return_file_name',
1556: '(none)', 'R');
1557: RAISE;
1558:
1559: END RETURN_FILE_NAME;
1585: l_valid_profile VARCHAR2(2000);
1586: --
1587: BEGIN
1588: --
1589: hr_du_utility.message('ROUT','entry:hr_du_di_insert.open_file', 5);
1590: hr_du_utility.message('PARA', '(p_file_location - ' || p_file_location ||
1591: ')(p_file_name - ' || p_file_name || ')' , 10);
1592: --
1593: OPEN csr_valid_profile;
1604: --
1605: l_filehandle := utl_file.fopen(p_file_location, p_file_name, 'r', 32767);
1606: g_counter := 0;
1607: --
1608: hr_du_utility.message('ROUT','exit:hr_du_di_insert.open_file', 15);
1609: hr_du_utility.message('PARA', '(l_filehandle - File Type )' , 20);
1610: --
1611: RETURN l_filehandle;
1612: --error handling
1611: RETURN l_filehandle;
1612: --error handling
1613: EXCEPTION
1614: WHEN OTHERS THEN
1615: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.Open_file',
1616: ' ERROR Opening - ' || p_file_name ||
1617: '. File may not exist or spelt incorrectly', 'R');
1618: RAISE;
1619:
1665: l_header_file VARCHAR2(200);
1666:
1667: BEGIN
1668: --
1669: hr_du_utility.message('ROUT','entry:hr_du_di_insert.extract_lines', 5);
1670: hr_du_utility.message('ROUT', '(p_filehandle - File Type )' ||
1671: '(p_upload_id - ' || p_upload_id ||
1672: ')(p_original_upload_header_id - ' || p_original_upload_header_id ||
1673: ')(p_reference_type - ' || p_reference_type ||
1945: END LOOP;
1946: --commit to make sure everything has been committed
1947: COMMIT;
1948: --
1949: hr_du_utility.message('ROUT','exit:hr_du_di_insert.extract_lines', 35);
1950: --
1951:
1952: --error handling
1953: EXCEPTION
1952: --error handling
1953: EXCEPTION
1954: WHEN e_fatal_error THEN
1955: hr_du_utility.error(SQLCODE,
1956: 'hr_du_di_insert.extract_lines',l_fatal_error_message, 'R');
1957: RAISE;
1958: WHEN OTHERS THEN
1959: hr_du_utility.error(SQLCODE,
1960: 'hr_du_di_insert.extract_lines','(none)', 'R');
1956: 'hr_du_di_insert.extract_lines',l_fatal_error_message, 'R');
1957: RAISE;
1958: WHEN OTHERS THEN
1959: hr_du_utility.error(SQLCODE,
1960: 'hr_du_di_insert.extract_lines','(none)', 'R');
1961: RAISE;
1962:
1963: END Extract_lines;
1964:
1983: l_file_name VARCHAR2(2000);
1984:
1985: BEGIN
1986: --
1987: hr_du_utility.message('ROUT','entry:hr_du_di_insert.ordered_sequence', 5);
1988: hr_du_utility.message('PARA', '(p_upload_id - ' || p_upload_id || ')',10);
1989: --
1990:
1991: g_flat_file_delimiter := g_tab_delimiter;
2005:
2006: Handle_API_Files (l_location, p_upload_id);
2007:
2008: --
2009: hr_du_utility.message('ROUT','exit:hr_du_di_insert.ordered_sequence', 15);
2010: --
2011:
2012: --error handling
2013: EXCEPTION
2012: --error handling
2013: EXCEPTION
2014: WHEN OTHERS THEN
2015: hr_du_utility.error(SQLCODE,
2016: 'hr_du_di_insert.ordered_sequence','(none)', 'R');
2017: RAISE;
2018:
2019: END ORDERED_SEQUENCE;
2020:
2031: l_temp VARCHAR2(20);
2032:
2033: BEGIN
2034: --
2035: hr_du_utility.message('ROUT','entry:hr_du_di_insert.validate', 5);
2036: hr_du_utility.message('PARA', '(p_upload_id - ' || p_upload_id || ')',
2037: 10);
2038: --
2039: l_temp := null;
2037: 10);
2038: --
2039: l_temp := null;
2040: --
2041: hr_du_utility.message('ROUT','exit:hr_du_di_insert.validate', 15);
2042: --
2043:
2044: --
2045: EXCEPTION
2043:
2044: --
2045: EXCEPTION
2046: WHEN OTHERS THEN
2047: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.validate',
2048: '(none)', 'R');
2049: RAISE;
2050: --
2051: END VALIDATE;
2063: PROCEDURE ROLLBACK(p_upload_id IN NUMBER) IS
2064:
2065: BEGIN
2066: --
2067: hr_du_utility.message('ROUT','entry:hr_du_di_insert.rollback', 5);
2068: hr_du_utility.message('PARA', '(p_upload_id - ' || p_upload_id || ')',
2069: 10);
2070: --
2071:
2083: WHERE UPLOAD_ID = p_upload_id;
2084: COMMIT;
2085:
2086: --
2087: hr_du_utility.message('ROUT','exit:hr_du_di_insert.rollback', 15);
2088: --
2089:
2090: --
2091: EXCEPTION
2089:
2090: --
2091: EXCEPTION
2092: WHEN OTHERS THEN
2093: hr_du_utility.error(SQLCODE, 'hr_du_di_insert.rollback',
2094: '(none)', 'R');
2095: RAISE;
2096: --
2097: END ROLLBACK;
2096: --
2097: END ROLLBACK;
2098:
2099:
2100: END HR_DU_DI_INSERT;