DBA Data[Home] [Help]

APPS.FTE_BULK_DTT_PKG dependencies on UTL_FILE

Line 254: -- should be readable by UTL_FILE --

250: -- the DTT data. --
251: -- 3. p_src_filedir: The directory containing the DTT --
252: -- data file. There should be no --
253: -- trailing '/', and this directory --
254: -- should be readable by UTL_FILE --
255: -- 4. p_user_debug: turns the debugger on --
256: -- --
257: -- PARAMETERS (OUT): p_errbuf: A buffer of error messages --
258: -- p_retcode: The return code. A return code of '2' --

Line 474: l_dtt_file UTL_FILE.file_type;

470:
471:
472:
473: l_upload_date DATE;
474: l_dtt_file UTL_FILE.file_type;
475: l_line VARCHAR2(2000);
476: l_load_ctr PLS_INTEGER;
477: l_cur_date DATE;
478: l_line_ctr PLS_INTEGER;

Line 1260: WSH_DEBUG_SV.logmsg(l_module_name,'Open the file Set the full file name for utl_file');

1256: --
1257: BEGIN
1258:
1259: IF l_debug_on THEN
1260: WSH_DEBUG_SV.logmsg(l_module_name,'Open the file Set the full file name for utl_file');
1261: END IF;
1262: --
1263: -- Set the full file name for utl_file
1264: --

Line 1263: -- Set the full file name for utl_file

1259: IF l_debug_on THEN
1260: WSH_DEBUG_SV.logmsg(l_module_name,'Open the file Set the full file name for utl_file');
1261: END IF;
1262: --
1263: -- Set the full file name for utl_file
1264: --
1265: l_dtt_file := utl_file.fopen(p_source_file_directory, p_source_file_name, 'R');
1266:
1267:

Line 1265: l_dtt_file := utl_file.fopen(p_source_file_directory, p_source_file_name, 'R');

1261: END IF;
1262: --
1263: -- Set the full file name for utl_file
1264: --
1265: l_dtt_file := utl_file.fopen(p_source_file_directory, p_source_file_name, 'R');
1266:
1267:
1268: --
1269: -- Reset the line and loader counters

Line 1290: utl_file.get_line(l_dtt_file, l_line);

1286: END IF;
1287: --
1288: -- Get the next line out of the file
1289: --
1290: utl_file.get_line(l_dtt_file, l_line);
1291:
1292:
1293: --
1294: -- [AAB][01/22/04][BUG# 3381771]

Line 1600: utl_file.fclose(l_dtt_file);

1596: END IF;
1597: --
1598: -- End of reading the file - close it out
1599: --
1600: utl_file.fclose(l_dtt_file);
1601:
1602:
1603: EXCEPTION
1604: WHEN FTE_DIST_INV_TIME_FORMAT THEN

Line 1608: IF (utl_file.is_open(l_dtt_file)) THEN

1604: WHEN FTE_DIST_INV_TIME_FORMAT THEN
1605: --
1606: -- Close the file
1607: --
1608: IF (utl_file.is_open(l_dtt_file)) THEN
1609: utl_file.fclose(l_dtt_file);
1610: END IF;
1611: FND_MESSAGE.SET_NAME('FTE','FTE_DIST_INV_TIME_FORMAT');
1612: x_return_status := 2;

Line 1609: utl_file.fclose(l_dtt_file);

1605: --
1606: -- Close the file
1607: --
1608: IF (utl_file.is_open(l_dtt_file)) THEN
1609: utl_file.fclose(l_dtt_file);
1610: END IF;
1611: FND_MESSAGE.SET_NAME('FTE','FTE_DIST_INV_TIME_FORMAT');
1612: x_return_status := 2;
1613: x_return_message := FND_MESSAGE.GET;

Line 1668: IF (utl_file.is_open(l_dtt_file)) THEN

1664: WHEN FTE_DIST_INV_LINE_LENGTH THEN
1665: --
1666: -- Close the file
1667: --
1668: IF (utl_file.is_open(l_dtt_file)) THEN
1669: utl_file.fclose(l_dtt_file);
1670: END IF;
1671: FND_MESSAGE.SET_NAME('FTE','FTE_DIST_INV_LINE_LENGTH');
1672: x_return_status := 2;

Line 1669: utl_file.fclose(l_dtt_file);

1665: --
1666: -- Close the file
1667: --
1668: IF (utl_file.is_open(l_dtt_file)) THEN
1669: utl_file.fclose(l_dtt_file);
1670: END IF;
1671: FND_MESSAGE.SET_NAME('FTE','FTE_DIST_INV_LINE_LENGTH');
1672: x_return_status := 2;
1673: x_return_message := FND_MESSAGE.GET;

Line 1729: IF (utl_file.is_open(l_dtt_file)) THEN

1725: --
1726: -- Occurs when the entire file has been read, this is OK
1727: -- Close the file
1728: --
1729: IF (utl_file.is_open(l_dtt_file)) THEN
1730: utl_file.fclose(l_dtt_file);
1731: END IF;
1732: IF l_debug_on THEN
1733: WSH_DEBUG_SV.logmsg(l_module_name,'Finished reading file');

Line 1730: utl_file.fclose(l_dtt_file);

1726: -- Occurs when the entire file has been read, this is OK
1727: -- Close the file
1728: --
1729: IF (utl_file.is_open(l_dtt_file)) THEN
1730: utl_file.fclose(l_dtt_file);
1731: END IF;
1732: IF l_debug_on THEN
1733: WSH_DEBUG_SV.logmsg(l_module_name,'Finished reading file');
1734: END IF;

Line 1740: WHEN UTL_FILE.INVALID_PATH THEN

1736: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Finished Reading File.');
1737: x_return_status := -1;
1738:
1739:
1740: WHEN UTL_FILE.INVALID_PATH THEN
1741: --
1742: -- Close the file
1743: --
1744: IF (utl_file.is_open(l_dtt_file)) THEN

Line 1744: IF (utl_file.is_open(l_dtt_file)) THEN

1740: WHEN UTL_FILE.INVALID_PATH THEN
1741: --
1742: -- Close the file
1743: --
1744: IF (utl_file.is_open(l_dtt_file)) THEN
1745: utl_file.fclose(l_dtt_file);
1746: END IF;
1747: x_return_message := 'FILE ' || p_source_file_directory || '/' || p_source_file_name || ' NOT ACCESSIBLE';
1748: x_return_message := x_return_message||' Also please make sure that the directory is accessible to UTL_FILE.';

Line 1745: utl_file.fclose(l_dtt_file);

1741: --
1742: -- Close the file
1743: --
1744: IF (utl_file.is_open(l_dtt_file)) THEN
1745: utl_file.fclose(l_dtt_file);
1746: END IF;
1747: x_return_message := 'FILE ' || p_source_file_directory || '/' || p_source_file_name || ' NOT ACCESSIBLE';
1748: x_return_message := x_return_message||' Also please make sure that the directory is accessible to UTL_FILE.';
1749: fnd_file.put_line(FND_FILE.log, x_return_message);

Line 1748: x_return_message := x_return_message||' Also please make sure that the directory is accessible to UTL_FILE.';

1744: IF (utl_file.is_open(l_dtt_file)) THEN
1745: utl_file.fclose(l_dtt_file);
1746: END IF;
1747: x_return_message := 'FILE ' || p_source_file_directory || '/' || p_source_file_name || ' NOT ACCESSIBLE';
1748: x_return_message := x_return_message||' Also please make sure that the directory is accessible to UTL_FILE.';
1749: fnd_file.put_line(FND_FILE.log, x_return_message);
1750: x_return_status := 2;
1751: --
1752: --

Line 1788: WSH_DEBUG_SV.logmsg(l_module_name,'ERROR UTL_FILE.INVALID_PATH FTE_BULK_DTT_PKG.READ_DTT_FILE ' ||x_return_message);

1784: CLOSE c_get_distance_uom;
1785: END IF;
1786:
1787: IF l_debug_on THEN
1788: WSH_DEBUG_SV.logmsg(l_module_name,'ERROR UTL_FILE.INVALID_PATH FTE_BULK_DTT_PKG.READ_DTT_FILE ' ||x_return_message);
1789: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UTL_FILE.INVALID_PATH');
1790: WSH_DEBUG_SV.pop(l_module_name);
1791: END IF;
1792: --

Line 1789: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UTL_FILE.INVALID_PATH');

1785: END IF;
1786:
1787: IF l_debug_on THEN
1788: WSH_DEBUG_SV.logmsg(l_module_name,'ERROR UTL_FILE.INVALID_PATH FTE_BULK_DTT_PKG.READ_DTT_FILE ' ||x_return_message);
1789: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UTL_FILE.INVALID_PATH');
1790: WSH_DEBUG_SV.pop(l_module_name);
1791: END IF;
1792: --
1793: RETURN;

Line 1800: IF (utl_file.is_open(l_dtt_file)) THEN

1796: WHEN OTHERS THEN
1797: --
1798: -- Close the file
1799: --
1800: IF (utl_file.is_open(l_dtt_file)) THEN
1801: utl_file.fclose(l_dtt_file);
1802: END IF;
1803:
1804: FND_FILE.PUT_LINE(FND_FILE.log, 'UNEXPECTED ERROR IN PROCEDURE READ_DTT_FILE.'||sqlerrm);

Line 1801: utl_file.fclose(l_dtt_file);

1797: --
1798: -- Close the file
1799: --
1800: IF (utl_file.is_open(l_dtt_file)) THEN
1801: utl_file.fclose(l_dtt_file);
1802: END IF;
1803:
1804: FND_FILE.PUT_LINE(FND_FILE.log, 'UNEXPECTED ERROR IN PROCEDURE READ_DTT_FILE.'||sqlerrm);
1805: FND_FILE.PUT_LINE(FND_FILE.log, 'OFFENDING_LINE: ' || l_line);

Line 2485: IF (utl_file.is_open(l_dtt_file)) THEN

2481: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - INV TEMP TIME UOM. '||x_return_message);
2482: --
2483: -- Close the file
2484: --
2485: IF (utl_file.is_open(l_dtt_file)) THEN
2486: utl_file.fclose(l_dtt_file);
2487: END IF;
2488:
2489: --

Line 2486: utl_file.fclose(l_dtt_file);

2482: --
2483: -- Close the file
2484: --
2485: IF (utl_file.is_open(l_dtt_file)) THEN
2486: utl_file.fclose(l_dtt_file);
2487: END IF;
2488:
2489: --
2490: -- Close the cursors

Line 2545: IF (utl_file.is_open(l_dtt_file)) THEN

2541: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO TIME UOM. '||x_return_message);
2542: --
2543: -- Close the file
2544: --
2545: IF (utl_file.is_open(l_dtt_file)) THEN
2546: utl_file.fclose(l_dtt_file);
2547: END IF;
2548:
2549: --

Line 2546: utl_file.fclose(l_dtt_file);

2542: --
2543: -- Close the file
2544: --
2545: IF (utl_file.is_open(l_dtt_file)) THEN
2546: utl_file.fclose(l_dtt_file);
2547: END IF;
2548:
2549: --
2550: -- Close the cursors

Line 2605: IF (utl_file.is_open(l_dtt_file)) THEN

2601: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - INV TEMP DIST UOM. '||x_return_message);
2602: --
2603: -- Close the file
2604: --
2605: IF (utl_file.is_open(l_dtt_file)) THEN
2606: utl_file.fclose(l_dtt_file);
2607: END IF;
2608:
2609: --

Line 2606: utl_file.fclose(l_dtt_file);

2602: --
2603: -- Close the file
2604: --
2605: IF (utl_file.is_open(l_dtt_file)) THEN
2606: utl_file.fclose(l_dtt_file);
2607: END IF;
2608:
2609: --
2610: -- Close the cursors

Line 2666: IF (utl_file.is_open(l_dtt_file)) THEN

2662: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO DISTANCE UOM. '||x_return_message);
2663: --
2664: -- Close the file
2665: --
2666: IF (utl_file.is_open(l_dtt_file)) THEN
2667: utl_file.fclose(l_dtt_file);
2668: END IF;
2669:
2670: --

Line 2667: utl_file.fclose(l_dtt_file);

2663: --
2664: -- Close the file
2665: --
2666: IF (utl_file.is_open(l_dtt_file)) THEN
2667: utl_file.fclose(l_dtt_file);
2668: END IF;
2669:
2670: --
2671: -- Close the cursors

Line 2727: IF (utl_file.is_open(l_dtt_file)) THEN

2723: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - ORIG DEST LOAD ERR. '||x_return_message);
2724: --
2725: -- Close the file
2726: --
2727: IF (utl_file.is_open(l_dtt_file)) THEN
2728: utl_file.fclose(l_dtt_file);
2729: END IF;
2730:
2731: --

Line 2728: utl_file.fclose(l_dtt_file);

2724: --
2725: -- Close the file
2726: --
2727: IF (utl_file.is_open(l_dtt_file)) THEN
2728: utl_file.fclose(l_dtt_file);
2729: END IF;
2730:
2731: --
2732: -- Close the cursors

Line 2788: IF (utl_file.is_open(l_dtt_file)) THEN

2784: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - LESS FILE LINES. '||x_return_message);
2785: --
2786: -- Close the file
2787: --
2788: IF (utl_file.is_open(l_dtt_file)) THEN
2789: utl_file.fclose(l_dtt_file);
2790: END IF;
2791:
2792: --

Line 2789: utl_file.fclose(l_dtt_file);

2785: --
2786: -- Close the file
2787: --
2788: IF (utl_file.is_open(l_dtt_file)) THEN
2789: utl_file.fclose(l_dtt_file);
2790: END IF;
2791:
2792: --
2793: -- Close the cursors

Line 2848: IF (utl_file.is_open(l_dtt_file)) THEN

2844: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - TOO MANY FILE LINES. '||x_return_message);
2845: --
2846: -- Close the file
2847: --
2848: IF (utl_file.is_open(l_dtt_file)) THEN
2849: utl_file.fclose(l_dtt_file);
2850: END IF;
2851:
2852: --

Line 2849: utl_file.fclose(l_dtt_file);

2845: --
2846: -- Close the file
2847: --
2848: IF (utl_file.is_open(l_dtt_file)) THEN
2849: utl_file.fclose(l_dtt_file);
2850: END IF;
2851:
2852: --
2853: -- Close the cursors

Line 2909: IF (utl_file.is_open(l_dtt_file)) THEN

2905: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NULL FILE NAME. '||x_return_message);
2906: --
2907: -- Close the file
2908: --
2909: IF (utl_file.is_open(l_dtt_file)) THEN
2910: utl_file.fclose(l_dtt_file);
2911: END IF;
2912:
2913: --

Line 2910: utl_file.fclose(l_dtt_file);

2906: --
2907: -- Close the file
2908: --
2909: IF (utl_file.is_open(l_dtt_file)) THEN
2910: utl_file.fclose(l_dtt_file);
2911: END IF;
2912:
2913: --
2914: -- Close the cursors

Line 2970: IF (utl_file.is_open(l_dtt_file)) THEN

2966: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - INVALID FILE LENGTH. '||x_return_message);
2967: --
2968: -- Close the file
2969: --
2970: IF (utl_file.is_open(l_dtt_file)) THEN
2971: utl_file.fclose(l_dtt_file);
2972: END IF;
2973:
2974: --

Line 2971: utl_file.fclose(l_dtt_file);

2967: --
2968: -- Close the file
2969: --
2970: IF (utl_file.is_open(l_dtt_file)) THEN
2971: utl_file.fclose(l_dtt_file);
2972: END IF;
2973:
2974: --
2975: -- Close the cursors

Line 3029: IF (utl_file.is_open(l_dtt_file)) THEN

3025: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO FILE DOWNLOAD. '||x_return_message);
3026: --
3027: -- Close the file
3028: --
3029: IF (utl_file.is_open(l_dtt_file)) THEN
3030: utl_file.fclose(l_dtt_file);
3031: END IF;
3032:
3033: --

Line 3030: utl_file.fclose(l_dtt_file);

3026: --
3027: -- Close the file
3028: --
3029: IF (utl_file.is_open(l_dtt_file)) THEN
3030: utl_file.fclose(l_dtt_file);
3031: END IF;
3032:
3033: --
3034: -- Close the cursors

Line 3088: IF (utl_file.is_open(l_dtt_file)) THEN

3084: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO FILE TEMPLATE. '||x_return_message);
3085: --
3086: -- Close the file
3087: --
3088: IF (utl_file.is_open(l_dtt_file)) THEN
3089: utl_file.fclose(l_dtt_file);
3090: END IF;
3091: --
3092: -- Close the cursors

Line 3089: utl_file.fclose(l_dtt_file);

3085: --
3086: -- Close the file
3087: --
3088: IF (utl_file.is_open(l_dtt_file)) THEN
3089: utl_file.fclose(l_dtt_file);
3090: END IF;
3091: --
3092: -- Close the cursors
3093: --

Line 3147: IF (utl_file.is_open(l_dtt_file)) THEN

3143: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO FILE DOWNLOAD_DATE. '||x_return_message);
3144: --
3145: -- Close the file
3146: --
3147: IF (utl_file.is_open(l_dtt_file)) THEN
3148: utl_file.fclose(l_dtt_file);
3149: END IF;
3150: --
3151: -- Close the cursors

Line 3148: utl_file.fclose(l_dtt_file);

3144: --
3145: -- Close the file
3146: --
3147: IF (utl_file.is_open(l_dtt_file)) THEN
3148: utl_file.fclose(l_dtt_file);
3149: END IF;
3150: --
3151: -- Close the cursors
3152: --

Line 3205: IF (utl_file.is_open(l_dtt_file)) THEN

3201: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - PREVIOUS FILE UPLOAD EXISTS. '||x_return_message);
3202: --
3203: -- Close the file
3204: --
3205: IF (utl_file.is_open(l_dtt_file)) THEN
3206: utl_file.fclose(l_dtt_file);
3207: END IF;
3208: --
3209: -- Close the cursors

Line 3206: utl_file.fclose(l_dtt_file);

3202: --
3203: -- Close the file
3204: --
3205: IF (utl_file.is_open(l_dtt_file)) THEN
3206: utl_file.fclose(l_dtt_file);
3207: END IF;
3208: --
3209: -- Close the cursors
3210: --

Line 3263: IF (utl_file.is_open(l_dtt_file)) THEN

3259: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO DOWNLOAD LINES. '||x_return_message);
3260: --
3261: -- Close the file
3262: --
3263: IF (utl_file.is_open(l_dtt_file)) THEN
3264: utl_file.fclose(l_dtt_file);
3265: END IF;
3266: --
3267: -- Close the cursors

Line 3264: utl_file.fclose(l_dtt_file);

3260: --
3261: -- Close the file
3262: --
3263: IF (utl_file.is_open(l_dtt_file)) THEN
3264: utl_file.fclose(l_dtt_file);
3265: END IF;
3266: --
3267: -- Close the cursors
3268: --

Line 3321: IF (utl_file.is_open(l_dtt_file)) THEN

3317: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO RETURN DISTANCE COLUMN DATA. '||x_return_message);
3318: --
3319: -- Close the file
3320: --
3321: IF (utl_file.is_open(l_dtt_file)) THEN
3322: utl_file.fclose(l_dtt_file);
3323: END IF;
3324: --
3325: -- Close the cursors

Line 3322: utl_file.fclose(l_dtt_file);

3318: --
3319: -- Close the file
3320: --
3321: IF (utl_file.is_open(l_dtt_file)) THEN
3322: utl_file.fclose(l_dtt_file);
3323: END IF;
3324: --
3325: -- Close the cursors
3326: --

Line 3378: IF (utl_file.is_open(l_dtt_file)) THEN

3374: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO RETURN TIME COLUMN DATA. '||x_return_message);
3375: --
3376: -- Close the file
3377: --
3378: IF (utl_file.is_open(l_dtt_file)) THEN
3379: utl_file.fclose(l_dtt_file);
3380: END IF;
3381: --
3382: -- Close the cursors

Line 3379: utl_file.fclose(l_dtt_file);

3375: --
3376: -- Close the file
3377: --
3378: IF (utl_file.is_open(l_dtt_file)) THEN
3379: utl_file.fclose(l_dtt_file);
3380: END IF;
3381: --
3382: -- Close the cursors
3383: --

Line 3436: IF (utl_file.is_open(l_dtt_file)) THEN

3432: FND_FILE.PUT_LINE(FND_FILE.log, 'ERROR IN PROCEDURE READ_DTT_FILE - NO RETURN COLUMNS ENABLED. '||x_return_message);
3433: --
3434: -- Close the file
3435: --
3436: IF (utl_file.is_open(l_dtt_file)) THEN
3437: utl_file.fclose(l_dtt_file);
3438: END IF;
3439: --
3440: -- Close the cursors

Line 3437: utl_file.fclose(l_dtt_file);

3433: --
3434: -- Close the file
3435: --
3436: IF (utl_file.is_open(l_dtt_file)) THEN
3437: utl_file.fclose(l_dtt_file);
3438: END IF;
3439: --
3440: -- Close the cursors
3441: --