DBA Data[Home] [Help]

APPS.DDR_WEBSERVICES_PUB dependencies on DBMS_SQL

Line 1280: l_dtbl DBMS_SQL.desc_tab;

1276: x_msg_count OUT NOCOPY NUMBER,
1277: x_msg_data OUT NOCOPY VARCHAR2)
1278: IS
1279: l_cur NUMBER:=null;
1280: l_dtbl DBMS_SQL.desc_tab;
1281: l_cnt NUMBER;
1282: l_status NUMBER;
1283: l_val VARCHAR2(200);
1284: l_col_name VARCHAR2(200);

Line 1314: l_cur := dbms_sql.open_cursor;

1310: l_xml_file := UTL_FILE.fopen(l_dir_name,l_file_name,ddr_webservices_constants.g_file_write_mode);
1311: --write xml header data in the xml file
1312: UTL_FILE.put_line(l_xml_file, '');
1313: --open cursor
1314: l_cur := dbms_sql.open_cursor;
1315: dbms_sql.parse(l_cur,p_query,dbms_sql.native);
1316: l_status := dbms_sql.execute(l_cur);
1317: --to column defination from the cursor
1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);

Line 1315: dbms_sql.parse(l_cur,p_query,dbms_sql.native);

1311: --write xml header data in the xml file
1312: UTL_FILE.put_line(l_xml_file, '');
1313: --open cursor
1314: l_cur := dbms_sql.open_cursor;
1315: dbms_sql.parse(l_cur,p_query,dbms_sql.native);
1316: l_status := dbms_sql.execute(l_cur);
1317: --to column defination from the cursor
1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);
1319: FOR i in 1..l_cnt LOOP

Line 1316: l_status := dbms_sql.execute(l_cur);

1312: UTL_FILE.put_line(l_xml_file, '');
1313: --open cursor
1314: l_cur := dbms_sql.open_cursor;
1315: dbms_sql.parse(l_cur,p_query,dbms_sql.native);
1316: l_status := dbms_sql.execute(l_cur);
1317: --to column defination from the cursor
1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);
1319: FOR i in 1..l_cnt LOOP
1320: dbms_sql.define_column(l_cur,i,l_val,30);

Line 1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);

1314: l_cur := dbms_sql.open_cursor;
1315: dbms_sql.parse(l_cur,p_query,dbms_sql.native);
1316: l_status := dbms_sql.execute(l_cur);
1317: --to column defination from the cursor
1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);
1319: FOR i in 1..l_cnt LOOP
1320: dbms_sql.define_column(l_cur,i,l_val,30);
1321: END LOOP;
1322: UTL_FILE.put_line(l_xml_file, '');

Line 1320: dbms_sql.define_column(l_cur,i,l_val,30);

1316: l_status := dbms_sql.execute(l_cur);
1317: --to column defination from the cursor
1318: dbms_sql.describe_columns(l_cur,l_cnt,l_dtbl);
1319: FOR i in 1..l_cnt LOOP
1320: dbms_sql.define_column(l_cur,i,l_val,30);
1321: END LOOP;
1322: UTL_FILE.put_line(l_xml_file, '');
1323: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);
1324: WHILE ( l_fetch_rows > 0 ) LOOP

Line 1323: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);

1319: FOR i in 1..l_cnt LOOP
1320: dbms_sql.define_column(l_cur,i,l_val,30);
1321: END LOOP;
1322: UTL_FILE.put_line(l_xml_file, '');
1323: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);
1324: WHILE ( l_fetch_rows > 0 ) LOOP
1325: l_fetch_ctn:=l_fetch_ctn+l_fetch_rows;
1326: UTL_FILE.put_line(l_xml_file, '');
1327: l_fact:=null;

Line 1331: dbms_sql.column_value(l_cur,i,l_val);

1327: l_fact:=null;
1328: --write individual row in the xml file
1329: FOR i in 1..l_cnt loop
1330: l_col_name:= l_dtbl(i).col_name;
1331: dbms_sql.column_value(l_cur,i,l_val);
1332: -- l_fact:=l_fact||'<'||l_col_name||'>'||l_val||''||chr(10);
1333: -- Use of chr function not allowed by GSCC. The new line character is introduced using line edit
1334: l_fact:=l_fact||'<'||l_col_name||'>'||l_val||''||'
1335: '||NULL;

Line 1352: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);

1348: last_update_date, last_update_login)
1349: VALUES (l_file_id, p_job_id, l_file_name, ddr_webservices_constants.g_ret_sts_success, 'N','ABC', SYSDATE, 'ABC', 'ABC',101, SYSDATE, 101,
1350: SYSDATE, 101);
1351: END;
1352: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);
1353: IF(l_fetch_rows > 0) THEN
1354: IF l_total_row_count >=l_max_row_count THEN
1355: RAISE l_max_rows;
1356: END IF;

Line 1365: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);

1361: UTL_FILE.put_line(l_xml_file, '');
1362: l_fetch_ctn:=0;
1363: END IF;
1364: ELSE
1365: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);
1366: END IF;
1367: l_total_row_count:=l_total_row_count+1;
1368: END LOOP;
1369: -- DBMS_OUTPUT.PUT_LINE('l_total_row_count='||l_total_row_count);

Line 1370: dbms_sql.close_cursor(l_cur);

1366: END IF;
1367: l_total_row_count:=l_total_row_count+1;
1368: END LOOP;
1369: -- DBMS_OUTPUT.PUT_LINE('l_total_row_count='||l_total_row_count);
1370: dbms_sql.close_cursor(l_cur);
1371: IF l_fetch_ctn <> l_pagination_row_count THEN
1372: UTL_FILE.put_line(l_xml_file, '');
1373: UTL_FILE.FCLOSE(l_xml_file);
1374: BEGIN

Line 1390: IF dbms_sql.is_open(l_cur) THEN

1386: END IF;
1387: x_return_status:=ddr_webservices_constants.g_ret_sts_success;
1388: EXCEPTION
1389: WHEN l_max_rows THEN
1390: IF dbms_sql.is_open(l_cur) THEN
1391: dbms_sql.close_cursor(l_cur);
1392: END IF;
1393: IF UTL_FILE.is_open(l_xml_file) THEN
1394: UTL_FILE.fclose(l_xml_file);

Line 1391: dbms_sql.close_cursor(l_cur);

1387: x_return_status:=ddr_webservices_constants.g_ret_sts_success;
1388: EXCEPTION
1389: WHEN l_max_rows THEN
1390: IF dbms_sql.is_open(l_cur) THEN
1391: dbms_sql.close_cursor(l_cur);
1392: END IF;
1393: IF UTL_FILE.is_open(l_xml_file) THEN
1394: UTL_FILE.fclose(l_xml_file);
1395: END IF;

Line 1400: IF dbms_sql.is_open(l_cur) THEN

1396: x_return_status:=ddr_webservices_constants.g_ret_sts_error;
1397: x_msg_count:=1;
1398: x_msg_data:='Program exceeded maximum row OUT NOCOPY put';
1399: WHEN UTL_FILE.INTERNAL_ERROR THEN
1400: IF dbms_sql.is_open(l_cur) THEN
1401: dbms_sql.close_cursor(l_cur);
1402: END IF;
1403: IF UTL_FILE.is_open(l_xml_file) THEN
1404: UTL_FILE.fclose(l_xml_file);

Line 1401: dbms_sql.close_cursor(l_cur);

1397: x_msg_count:=1;
1398: x_msg_data:='Program exceeded maximum row OUT NOCOPY put';
1399: WHEN UTL_FILE.INTERNAL_ERROR THEN
1400: IF dbms_sql.is_open(l_cur) THEN
1401: dbms_sql.close_cursor(l_cur);
1402: END IF;
1403: IF UTL_FILE.is_open(l_xml_file) THEN
1404: UTL_FILE.fclose(l_xml_file);
1405: END IF;

Line 1410: IF dbms_sql.is_open(l_cur) THEN

1406: x_return_status:=ddr_webservices_constants.g_ret_sts_unexp_error;
1407: x_msg_count:=1;
1408: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1409: WHEN UTL_FILE.INVALID_OPERATION THEN
1410: IF dbms_sql.is_open(l_cur) THEN
1411: dbms_sql.close_cursor(l_cur);
1412: END IF;
1413: IF UTL_FILE.is_open(l_xml_file) THEN
1414: UTL_FILE.fclose(l_xml_file);

Line 1411: dbms_sql.close_cursor(l_cur);

1407: x_msg_count:=1;
1408: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1409: WHEN UTL_FILE.INVALID_OPERATION THEN
1410: IF dbms_sql.is_open(l_cur) THEN
1411: dbms_sql.close_cursor(l_cur);
1412: END IF;
1413: IF UTL_FILE.is_open(l_xml_file) THEN
1414: UTL_FILE.fclose(l_xml_file);
1415: END IF;

Line 1420: IF dbms_sql.is_open(l_cur) THEN

1416: x_return_status:=ddr_webservices_constants.g_ret_sts_unexp_error;
1417: x_msg_count:=1;
1418: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1419: WHEN UTL_FILE.INVALID_PATH THEN
1420: IF dbms_sql.is_open(l_cur) THEN
1421: dbms_sql.close_cursor(l_cur);
1422: END IF;
1423: IF UTL_FILE.is_open(l_xml_file) THEN
1424: UTL_FILE.fclose(l_xml_file);

Line 1421: dbms_sql.close_cursor(l_cur);

1417: x_msg_count:=1;
1418: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1419: WHEN UTL_FILE.INVALID_PATH THEN
1420: IF dbms_sql.is_open(l_cur) THEN
1421: dbms_sql.close_cursor(l_cur);
1422: END IF;
1423: IF UTL_FILE.is_open(l_xml_file) THEN
1424: UTL_FILE.fclose(l_xml_file);
1425: END IF;

Line 1430: IF dbms_sql.is_open(l_cur) THEN

1426: x_return_status:=ddr_webservices_constants.g_ret_sts_unexp_error;
1427: x_msg_count:=1;
1428: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1429: WHEN UTL_FILE.WRITE_ERROR THEN
1430: IF dbms_sql.is_open(l_cur) THEN
1431: dbms_sql.close_cursor(l_cur);
1432: END IF;
1433: IF UTL_FILE.is_open(l_xml_file) THEN
1434: UTL_FILE.fclose(l_xml_file);

Line 1431: dbms_sql.close_cursor(l_cur);

1427: x_msg_count:=1;
1428: x_msg_data:='Cannot open file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1429: WHEN UTL_FILE.WRITE_ERROR THEN
1430: IF dbms_sql.is_open(l_cur) THEN
1431: dbms_sql.close_cursor(l_cur);
1432: END IF;
1433: IF UTL_FILE.is_open(l_xml_file) THEN
1434: UTL_FILE.fclose(l_xml_file);
1435: END IF;

Line 1440: IF dbms_sql.is_open(l_cur) THEN

1436: x_return_status:=ddr_webservices_constants.g_ret_sts_unexp_error;
1437: x_msg_count:=1;
1438: x_msg_data:='Cannot write to file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1439: WHEN OTHERS THEN
1440: IF dbms_sql.is_open(l_cur) THEN
1441: dbms_sql.close_cursor(l_cur);
1442: END IF;
1443: IF UTL_FILE.is_open(l_xml_file) THEN
1444: UTL_FILE.fclose(l_xml_file);

Line 1441: dbms_sql.close_cursor(l_cur);

1437: x_msg_count:=1;
1438: x_msg_data:='Cannot write to file :' || l_file_name ||', write error; code:' || sqlcode ||',message:' || sqlerrm;
1439: WHEN OTHERS THEN
1440: IF dbms_sql.is_open(l_cur) THEN
1441: dbms_sql.close_cursor(l_cur);
1442: END IF;
1443: IF UTL_FILE.is_open(l_xml_file) THEN
1444: UTL_FILE.fclose(l_xml_file);
1445: END IF;