DBA Data[Home] [Help]

APPS.DDR_WEBSERVICES_PUB dependencies on DBMS_SQL

Line 1283: l_dtbl DBMS_SQL.desc_tab;

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

Line 1317: l_cur := dbms_sql.open_cursor;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1351: last_update_date, last_update_login)
1352: 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,
1353: SYSDATE, 101);
1354: END;
1355: l_fetch_rows:=dbms_sql.fetch_rows(l_cur);
1356: IF(l_fetch_rows > 0) THEN
1357: IF l_total_row_count >=l_max_row_count THEN
1358: RAISE l_max_rows;
1359: END IF;

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

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

Line 1373: dbms_sql.close_cursor(l_cur);

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

Line 1393: IF dbms_sql.is_open(l_cur) THEN

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

Line 1394: dbms_sql.close_cursor(l_cur);

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

Line 1403: IF dbms_sql.is_open(l_cur) THEN

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

Line 1404: dbms_sql.close_cursor(l_cur);

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

Line 1413: IF dbms_sql.is_open(l_cur) THEN

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

Line 1414: dbms_sql.close_cursor(l_cur);

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

Line 1423: IF dbms_sql.is_open(l_cur) THEN

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

Line 1424: dbms_sql.close_cursor(l_cur);

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

Line 1433: IF dbms_sql.is_open(l_cur) THEN

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

Line 1434: dbms_sql.close_cursor(l_cur);

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

Line 1443: IF dbms_sql.is_open(l_cur) THEN

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

Line 1444: dbms_sql.close_cursor(l_cur);

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