DBA Data[Home] [Help]

APPS.INV_PRINT_REQUEST dependencies on UTL_FILE

Line 38: l_file_handler UTL_FILE.FILE_TYPE;

34: l_output_file_prefix VARCHAR2(50);
35: l_output_file_name VARCHAR2(50);
36:
37: l_file_end CONSTANT VARCHAR2(10) := '.xml';
38: l_file_handler UTL_FILE.FILE_TYPE;
39:
40: --l_substr VARCHAR2(254);
41: --i NUMBER;
42: --l_last_index NUMBER;

Line 74: l_file_handler := UTL_FILE.fopen(rtrim(l_output_dir,l_dir_seperator), l_output_file_name, 'w');

70: l_dir_seperator := '\';
71: END IF;
72:
73: -- Open the file
74: l_file_handler := UTL_FILE.fopen(rtrim(l_output_dir,l_dir_seperator), l_output_file_name, 'w');
75:
76: -- Write into the file
77: /*l_last_index :=1;
78: l_cur_index := instr(p_xml_content, '>', l_last_index);

Line 82: utl_file.put_line(l_file_handler, l_substr);

78: l_cur_index := instr(p_xml_content, '>', l_last_index);
79:
80: WHILE l_cur_index <> 0 LOOP
81: l_substr := substr(p_xml_content, l_last_index, l_cur_index-l_last_index+1);
82: utl_file.put_line(l_file_handler, l_substr);
83: l_last_index := l_cur_index + 1;
84: IF(substr(p_xml_content, l_last_index+1,1) = 'v') THEN
85: l_cur_index := instr(p_xml_content, '>', l_last_index, 2);
86: ELSE

Line 93: utl_file.put_line(l_file_handler, p_xml_content);

89: END LOOP; */
90:
91: -- Because of the change that line break will be included in p_xml_content,
92: -- can just use one put_line to write all the data into file
93: utl_file.put_line(l_file_handler, p_xml_content);
94: utl_file.fflush(l_file_handler);
95: utl_file.fclose(l_file_handler);
96: IF (l_debug = 1) THEN
97: trace(length(p_xml_content) ||' characters of xml string writtten into '||l_output_dir||l_dir_seperator||l_output_file_name);

Line 94: utl_file.fflush(l_file_handler);

90:
91: -- Because of the change that line break will be included in p_xml_content,
92: -- can just use one put_line to write all the data into file
93: utl_file.put_line(l_file_handler, p_xml_content);
94: utl_file.fflush(l_file_handler);
95: utl_file.fclose(l_file_handler);
96: IF (l_debug = 1) THEN
97: trace(length(p_xml_content) ||' characters of xml string writtten into '||l_output_dir||l_dir_seperator||l_output_file_name);
98: END IF;

Line 95: utl_file.fclose(l_file_handler);

91: -- Because of the change that line break will be included in p_xml_content,
92: -- can just use one put_line to write all the data into file
93: utl_file.put_line(l_file_handler, p_xml_content);
94: utl_file.fflush(l_file_handler);
95: utl_file.fclose(l_file_handler);
96: IF (l_debug = 1) THEN
97: trace(length(p_xml_content) ||' characters of xml string writtten into '||l_output_dir||l_dir_seperator||l_output_file_name);
98: END IF;
99:

Line 101: WHEN utl_file.invalid_path THEN

97: trace(length(p_xml_content) ||' characters of xml string writtten into '||l_output_dir||l_dir_seperator||l_output_file_name);
98: END IF;
99:
100: EXCEPTION
101: WHEN utl_file.invalid_path THEN
102: IF (l_debug = 1) THEN
103: trace(' Invalid Path error in '|| G_PKG_NAME||'.write_xml, can not write xml file');
104: trace('ERROR CODE = ' || SQLCODE);
105: trace('ERROR MESSAGE = ' || SQLERRM);

Line 107: utl_file.fclose(l_file_handler);

103: trace(' Invalid Path error in '|| G_PKG_NAME||'.write_xml, can not write xml file');
104: trace('ERROR CODE = ' || SQLCODE);
105: trace('ERROR MESSAGE = ' || SQLERRM);
106: END IF;
107: utl_file.fclose(l_file_handler);
108: x_return_status := FND_API.G_RET_STS_ERROR;
109: x_msg_data := SQLERRM;
110: WHEN fnd_api.g_exc_error THEN
111: IF (l_debug = 1) THEN

Line 116: utl_file.fclose(l_file_handler);

112: trace(' Expected Error In '|| G_PKG_NAME||'.write_xml');
113: trace('ERROR CODE = ' || SQLCODE);
114: trace('ERROR MESSAGE = ' || SQLERRM);
115: END IF;
116: utl_file.fclose(l_file_handler);
117: x_return_status := FND_API.G_RET_STS_ERROR;
118: x_msg_data := SQLERRM;
119: WHEN fnd_api.g_exc_unexpected_error THEN
120: IF (l_debug = 1) THEN

Line 125: utl_file.fclose(l_file_handler);

121: trace(' Unexpected Error In '|| G_PKG_NAME||'.write_xml');
122: trace('ERROR CODE = ' || SQLCODE);
123: trace('ERROR MESSAGE = ' || SQLERRM);
124: END IF;
125: utl_file.fclose(l_file_handler);
126: x_return_status := FND_API.G_RET_STS_ERROR;
127: x_msg_data := SQLERRM;
128: WHEN others THEN
129: IF (l_debug = 1) THEN

Line 134: utl_file.fclose(l_file_handler);

130: trace(' Other Error In '|| G_PKG_NAME||'.write_xml');
131: trace('ERROR CODE = ' || SQLCODE);
132: trace('ERROR MESSAGE = ' || SQLERRM);
133: END IF;
134: utl_file.fclose(l_file_handler);
135: x_return_status := FND_API.G_RET_STS_ERROR;
136: x_msg_data := SQLERRM;
137: END WRITE_XML;
138: