DBA Data[Home] [Help]

APPS.FA_ASSET_TRACE_PVT dependencies on UTL_FILE

Line 47: if ((nvl(g_use_utl_file, 'N')='Y') and (l_app_short_name is null)) then

43: END IF;
44:
45: -- Get schema
46: l_app_short_name := FND_GLOBAL.APPLICATION_SHORT_NAME;
47: if ((nvl(g_use_utl_file, 'N')='Y') and (l_app_short_name is null)) then
48: l_app_short_name :='OFA';
49: end if;
50: if not (fnd_installation.get_app_info (
51: application_short_name => l_app_short_name,

Line 634: if (nvl(g_use_utl_file, 'Y')='N') then

630: l_appid := FND_GLOBAL.resp_appl_id; log(l_calling_fn, 'l_appid: '||l_appid);
631: l_userid := fnd_global.user_id; log(l_calling_fn, 'l_userid: '||l_userid);
632: l_respid := Fnd_Global.Resp_Id; log(l_calling_fn, 'l_respid: '||l_respid);
633:
634: if (nvl(g_use_utl_file, 'Y')='N') then
635: l_stmt :=fafsc('fpon.profile_option_name')||fafsc('site_pov.profile_option_value');
636: l_stmt :=l_stmt||fafsc('appl_pov.profile_option_value')||fafsc('resp_pov.profile_option_value');
637: l_stmt :=l_stmt||fafsc('user_pov.profile_option_value');
638: l_stmt :=substr(l_stmt, 1, length(l_stmt) -6)||'||'||''''||''||'''';

Line 1047: p_use_utl_file IN VARCHAR2,

1043: --
1044: -- writes output to out file.
1045: --
1046: PROCEDURE save_output(p_calling_prog IN VARCHAR2,
1047: p_use_utl_file IN VARCHAR2,
1048: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
1049:
1050: utl_file_dir VARCHAR2(2000);
1051: outfile UTL_FILE.FILE_TYPE;

Line 1050: utl_file_dir VARCHAR2(2000);

1046: PROCEDURE save_output(p_calling_prog IN VARCHAR2,
1047: p_use_utl_file IN VARCHAR2,
1048: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
1049:
1050: utl_file_dir VARCHAR2(2000);
1051: outfile UTL_FILE.FILE_TYPE;
1052: l_filename VARCHAR2(30);
1053: l_position NUMBER(10);
1054: l_length NUMBER(10);

Line 1051: outfile UTL_FILE.FILE_TYPE;

1047: p_use_utl_file IN VARCHAR2,
1048: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) IS
1049:
1050: utl_file_dir VARCHAR2(2000);
1051: outfile UTL_FILE.FILE_TYPE;
1052: l_filename VARCHAR2(30);
1053: l_position NUMBER(10);
1054: l_length NUMBER(10);
1055: l_cursor c_stmt;

Line 1092: if (p_use_utl_file = 'Y') then

1088:

Web Analytics Made Easy -StatCounter

1089:

'||l_title||'



1090: ';
1091:
1092: if (p_use_utl_file = 'Y') then
1093: if (substr(p_calling_prog,1,7)='FATRACE') then
1094: --this is being called by the sla subrequest
1095: --if p_calling_prog is changed, change above condition
1096: l_filename := 'GTUSLA_'||replace(ltrim(rtrim(l_primary_col)),' ','_') || '_' || replace(l_sec_col,' ','_') ||'.html';

Line 1107: if (p_use_utl_file = 'Y') then

1103: end if;
1104:
1105: l_header := l_header||g_temp_head; --add banner area content.
1106:
1107: if (p_use_utl_file = 'Y') then
1108: UTL_FILE.PUT_LINE(g_outfile, l_header);
1109: else
1110: fnd_file.put(FND_FILE.OUTPUT, l_header);
1111: end if;

Line 1108: UTL_FILE.PUT_LINE(g_outfile, l_header);

1104:
1105: l_header := l_header||g_temp_head; --add banner area content.
1106:
1107: if (p_use_utl_file = 'Y') then
1108: UTL_FILE.PUT_LINE(g_outfile, l_header);
1109: else
1110: fnd_file.put(FND_FILE.OUTPUT, l_header);
1111: end if;
1112:

Line 1117: if (p_use_utl_file = 'Y') then

1113: build_anchors(g_anchor_tbl);
1114:
1115: l_cnt := g_output_tbl.first + 1; --do this to control the spot for table anchors
1116:
1117: if (p_use_utl_file = 'Y') then
1118: UTL_FILE.PUT_LINE(g_outfile,g_anchor);
1119: FOR i IN g_output_tbl.first .. g_output_tbl.last LOOP
1120: UTL_FILE.PUT_LINE(g_outfile,g_output_tbl(i));
1121: --UTL_FILE.NEW_LINE(g_outfile,1);

Line 1118: UTL_FILE.PUT_LINE(g_outfile,g_anchor);

1114:
1115: l_cnt := g_output_tbl.first + 1; --do this to control the spot for table anchors
1116:
1117: if (p_use_utl_file = 'Y') then
1118: UTL_FILE.PUT_LINE(g_outfile,g_anchor);
1119: FOR i IN g_output_tbl.first .. g_output_tbl.last LOOP
1120: UTL_FILE.PUT_LINE(g_outfile,g_output_tbl(i));
1121: --UTL_FILE.NEW_LINE(g_outfile,1);
1122: END LOOP;

Line 1120: UTL_FILE.PUT_LINE(g_outfile,g_output_tbl(i));

1116:
1117: if (p_use_utl_file = 'Y') then
1118: UTL_FILE.PUT_LINE(g_outfile,g_anchor);
1119: FOR i IN g_output_tbl.first .. g_output_tbl.last LOOP
1120: UTL_FILE.PUT_LINE(g_outfile,g_output_tbl(i));
1121: --UTL_FILE.NEW_LINE(g_outfile,1);
1122: END LOOP;
1123: else
1124: fnd_file.put(FND_FILE.OUTPUT,g_anchor);

Line 1121: --UTL_FILE.NEW_LINE(g_outfile,1);

1117: if (p_use_utl_file = 'Y') then
1118: UTL_FILE.PUT_LINE(g_outfile,g_anchor);
1119: FOR i IN g_output_tbl.first .. g_output_tbl.last LOOP
1120: UTL_FILE.PUT_LINE(g_outfile,g_output_tbl(i));
1121: --UTL_FILE.NEW_LINE(g_outfile,1);
1122: END LOOP;
1123: else
1124: fnd_file.put(FND_FILE.OUTPUT,g_anchor);
1125: FOR i IN g_output_tbl.first .. g_output_tbl.last LOOP

Line 1140: if p_use_utl_file = 'Y' then

1136: l_tmp_tbl:=g_no_rec_tbl(i);
1137: END IF;
1138: END LOOP;
1139: l_no_rec := substr(l_no_rec, 1, length(l_no_rec) -4)||'

';
1140: if p_use_utl_file = 'Y' then
1141: UTL_FILE.PUT_LINE(g_outfile,l_no_rec);
1142: else
1143: fnd_file.put(FND_FILE.OUTPUT,l_no_rec);
1144: end if;

Line 1141: UTL_FILE.PUT_LINE(g_outfile,l_no_rec);

1137: END IF;
1138: END LOOP;
1139: l_no_rec := substr(l_no_rec, 1, length(l_no_rec) -4)||'';
1140: if p_use_utl_file = 'Y' then
1141: UTL_FILE.PUT_LINE(g_outfile,l_no_rec);
1142: else
1143: fnd_file.put(FND_FILE.OUTPUT,l_no_rec);
1144: end if;
1145:

Line 1148: if (p_use_utl_file = 'Y') then

1144: end if;
1145:
1146: END IF;
1147:
1148: if (p_use_utl_file = 'Y') then
1149: UTL_FILE.PUT_LINE(g_outfile,' ');
1150: log(l_calling_fn, 'Trying to close out file');
1151: ocfile (g_outfile, null,'C');
1152: --g_use_utl_file := 'N'; /* have no clue why resetting this generates an error; so, leaving alone for now. */

Line 1149: UTL_FILE.PUT_LINE(g_outfile,' ');

1145:
1146: END IF;
1147:
1148: if (p_use_utl_file = 'Y') then
1149: UTL_FILE.PUT_LINE(g_outfile,' ');
1150: log(l_calling_fn, 'Trying to close out file');
1151: ocfile (g_outfile, null,'C');
1152: --g_use_utl_file := 'N'; /* have no clue why resetting this generates an error; so, leaving alone for now. */
1153: else

Line 1152: --g_use_utl_file := 'N'; /* have no clue why resetting this generates an error; so, leaving alone for now. */

1148: if (p_use_utl_file = 'Y') then
1149: UTL_FILE.PUT_LINE(g_outfile,' ');
1150: log(l_calling_fn, 'Trying to close out file');
1151: ocfile (g_outfile, null,'C');
1152: --g_use_utl_file := 'N'; /* have no clue why resetting this generates an error; so, leaving alone for now. */
1153: else
1154: fnd_file.put(FND_FILE.OUTPUT,' ');
1155: end if;
1156: g_output_tbl.delete; g_no_rec_tbl.delete;

Line 1160: WHEN UTL_FILE.WRITE_ERROR then

1156: g_output_tbl.delete; g_no_rec_tbl.delete;
1157: log(l_calling_fn, 'Successfully leaving save_output');
1158:
1159: EXCEPTION
1160: WHEN UTL_FILE.WRITE_ERROR then
1161: -- RAISE_APPLICATION_ERROR(-20104,'Write Error');
1162: log(l_calling_fn, 'Write Error.');
1163: WHEN UTL_FILE.READ_ERROR then
1164: --RAISE_APPLICATION_ERROR(-20105,'Read Error');

Line 1163: WHEN UTL_FILE.READ_ERROR then

1159: EXCEPTION
1160: WHEN UTL_FILE.WRITE_ERROR then
1161: -- RAISE_APPLICATION_ERROR(-20104,'Write Error');
1162: log(l_calling_fn, 'Write Error.');
1163: WHEN UTL_FILE.READ_ERROR then
1164: --RAISE_APPLICATION_ERROR(-20105,'Read Error');
1165: log(l_calling_fn, 'Read Error.');
1166: WHEN UTL_FILE.INTERNAL_ERROR then
1167: --RAISE_APPLICATION_ERROR(-20106,'Internal Error');

Line 1166: WHEN UTL_FILE.INTERNAL_ERROR then

1162: log(l_calling_fn, 'Write Error.');
1163: WHEN UTL_FILE.READ_ERROR then
1164: --RAISE_APPLICATION_ERROR(-20105,'Read Error');
1165: log(l_calling_fn, 'Read Error.');
1166: WHEN UTL_FILE.INTERNAL_ERROR then
1167: --RAISE_APPLICATION_ERROR(-20106,'Internal Error');
1168: log(l_calling_fn, 'Internal Error.');
1169: WHEN OTHERS THEN
1170: log(l_calling_fn, 'Unexpected error.');

Line 1185: if ((g_use_utl_file = 'Y') and (utl_file.is_open(g_logfile) = TRUE)) then

1181: l_module varchar2(150);
1182:
1183: BEGIN
1184:
1185: if ((g_use_utl_file = 'Y') and (utl_file.is_open(g_logfile) = TRUE)) then
1186: UTL_FILE.PUT_LINE(g_logfile,p_calling_fn|| ': '||p_msg);
1187: else
1188: Fnd_File.Put_Line (Fnd_File.Log, p_calling_fn|| ': '||p_msg);
1189: end if;

Line 1186: UTL_FILE.PUT_LINE(g_logfile,p_calling_fn|| ': '||p_msg);

1182:
1183: BEGIN
1184:
1185: if ((g_use_utl_file = 'Y') and (utl_file.is_open(g_logfile) = TRUE)) then
1186: UTL_FILE.PUT_LINE(g_logfile,p_calling_fn|| ': '||p_msg);
1187: else
1188: Fnd_File.Put_Line (Fnd_File.Log, p_calling_fn|| ': '||p_msg);
1189: end if;
1190: --

Line 1197: when utl_file.invalid_path then

1193: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, l_module, p_msg);
1194: END IF;
1195:
1196: EXCEPTION
1197: when utl_file.invalid_path then
1198: ocfile (g_logfile, null,'C');
1199: when utl_file.write_error then
1200: ocfile (g_logfile, null,'C');
1201: when utl_file.invalid_operation then

Line 1199: when utl_file.write_error then

1195:
1196: EXCEPTION
1197: when utl_file.invalid_path then
1198: ocfile (g_logfile, null,'C');
1199: when utl_file.write_error then
1200: ocfile (g_logfile, null,'C');
1201: when utl_file.invalid_operation then
1202: ocfile (g_logfile, null,'C');
1203: when others then

Line 1201: when utl_file.invalid_operation then

1197: when utl_file.invalid_path then
1198: ocfile (g_logfile, null,'C');
1199: when utl_file.write_error then
1200: ocfile (g_logfile, null,'C');
1201: when utl_file.invalid_operation then
1202: ocfile (g_logfile, null,'C');
1203: when others then
1204: ocfile (g_logfile, null,'C');
1205:

Line 1208: PROCEDURE ocfile (p_handle IN OUT NOCOPY utl_file.file_type,

1204: ocfile (g_logfile, null,'C');
1205:
1206: END log;
1207: --
1208: PROCEDURE ocfile (p_handle IN OUT NOCOPY utl_file.file_type,
1209: p_file IN VARCHAR2,
1210: p_mode IN VARCHAR2) IS
1211:
1212: l_calling_fn varchar2(80) := 'fa_asset_trace_pvt.ocfile';

Line 1216: if (utl_file.is_open(p_handle) = TRUE) then

1212: l_calling_fn varchar2(80) := 'fa_asset_trace_pvt.ocfile';
1213: BEGIN
1214:
1215: if (p_mode = 'C') then
1216: if (utl_file.is_open(p_handle) = TRUE) then
1217: log(l_calling_fn, 'About to close file');
1218: utl_file.fclose(p_handle);
1219: end if;
1220: elsif (p_mode = 'O') then

Line 1218: utl_file.fclose(p_handle);

1214:
1215: if (p_mode = 'C') then
1216: if (utl_file.is_open(p_handle) = TRUE) then
1217: log(l_calling_fn, 'About to close file');
1218: utl_file.fclose(p_handle);
1219: end if;
1220: elsif (p_mode = 'O') then
1221: if (utl_file.is_open(p_handle) = FALSE) then
1222: p_handle := UTL_FILE.FOPEN(location => 'GTU_DIR',

Line 1221: if (utl_file.is_open(p_handle) = FALSE) then

1217: log(l_calling_fn, 'About to close file');
1218: utl_file.fclose(p_handle);
1219: end if;
1220: elsif (p_mode = 'O') then
1221: if (utl_file.is_open(p_handle) = FALSE) then
1222: p_handle := UTL_FILE.FOPEN(location => 'GTU_DIR',
1223: filename => p_file,
1224: open_mode => 'w',
1225: max_linesize =>32767);

Line 1222: p_handle := UTL_FILE.FOPEN(location => 'GTU_DIR',

1218: utl_file.fclose(p_handle);
1219: end if;
1220: elsif (p_mode = 'O') then
1221: if (utl_file.is_open(p_handle) = FALSE) then
1222: p_handle := UTL_FILE.FOPEN(location => 'GTU_DIR',
1223: filename => p_file,
1224: open_mode => 'w',
1225: max_linesize =>32767);
1226: end if;

Line 1229: WHEN UTL_FILE.INVALID_PATH THEN

1225: max_linesize =>32767);
1226: end if;
1227: end if;
1228: EXCEPTION
1229: WHEN UTL_FILE.INVALID_PATH THEN
1230: --RAISE_APPLICATION_ERROR(-20100,'Invalid Path');
1231: log(l_calling_fn, 'Invalid Path.');
1232: WHEN UTL_FILE.INVALID_MODE THEN
1233: --RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');

Line 1232: WHEN UTL_FILE.INVALID_MODE THEN

1228: EXCEPTION
1229: WHEN UTL_FILE.INVALID_PATH THEN
1230: --RAISE_APPLICATION_ERROR(-20100,'Invalid Path');
1231: log(l_calling_fn, 'Invalid Path.');
1232: WHEN UTL_FILE.INVALID_MODE THEN
1233: --RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');
1234: log(l_calling_fn, 'Invalid Mode.');
1235: WHEN UTL_FILE.INVALID_OPERATION then
1236: --RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');

Line 1235: WHEN UTL_FILE.INVALID_OPERATION then

1231: log(l_calling_fn, 'Invalid Path.');
1232: WHEN UTL_FILE.INVALID_MODE THEN
1233: --RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');
1234: log(l_calling_fn, 'Invalid Mode.');
1235: WHEN UTL_FILE.INVALID_OPERATION then
1236: --RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');
1237: log(l_calling_fn, 'Invalid Operation.');
1238: WHEN UTL_FILE.INVALID_FILEHANDLE then
1239: --RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');

Line 1238: WHEN UTL_FILE.INVALID_FILEHANDLE then

1234: log(l_calling_fn, 'Invalid Mode.');
1235: WHEN UTL_FILE.INVALID_OPERATION then
1236: --RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');
1237: log(l_calling_fn, 'Invalid Operation.');
1238: WHEN UTL_FILE.INVALID_FILEHANDLE then
1239: --RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');
1240: log(l_calling_fn, 'Invalid Filehandle.');
1241: WHEN UTL_FILE.INTERNAL_ERROR then
1242: --RAISE_APPLICATION_ERROR(-20106,'Internal Error');

Line 1241: WHEN UTL_FILE.INTERNAL_ERROR then

1237: log(l_calling_fn, 'Invalid Operation.');
1238: WHEN UTL_FILE.INVALID_FILEHANDLE then
1239: --RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');
1240: log(l_calling_fn, 'Invalid Filehandle.');
1241: WHEN UTL_FILE.INTERNAL_ERROR then
1242: --RAISE_APPLICATION_ERROR(-20106,'Internal Error');
1243: log(l_calling_fn, 'Internal Error.');
1244: WHEN OTHERS THEN
1245: log(l_calling_fn, 'Unexpected error in file operation.');