5554: l_length := l_length - l_amount;
5555: l_offset := l_offset + l_amount;
5556: end loop;
5557:
5558: dbms_xmlgen.closeContext(l_qryCtx);
5559:
5560: -- Write the event log to fnd log file
5561:
5562: debug(l_stmt_num||'-Completed writing to output file');
5832: -- create new context
5833:
5834: l_stmt_num := 20;
5835:
5836: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5837: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5838: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5839:
5840: l_stmt_num := 30;
5833:
5834: l_stmt_num := 20;
5835:
5836: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5837: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5838: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5839:
5840: l_stmt_num := 30;
5841:
5834: l_stmt_num := 20;
5835:
5836: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5837: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5838: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5839:
5840: l_stmt_num := 30;
5841:
5842: -- get XML into the temporary clob variable
5840: l_stmt_num := 30;
5841:
5842: -- get XML into the temporary clob variable
5843:
5844: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
5845:
5846: -- remove the header (21 characters) and append the rest to xml output
5847:
5848: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
5844: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
5845:
5846: -- remove the header (21 characters) and append the rest to xml output
5847:
5848: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
5849: dbms_lob.erase (l_xml_temp, l_offset,1);
5850: dbms_lob.append (x_xml_doc, l_xml_temp);
5851: end if;
5852:
5851: end if;
5852:
5853: -- close context and free memory
5854:
5855: dbms_xmlgen.closeContext(l_qryCtx);
5856: close l_ref_cur;
5857:
5858: dbms_lob.freetemporary(l_xml_temp);
5859:
6676: -- create new context
6677:
6678: l_stmt_num := 20;
6679:
6680: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6681: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6682: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6683:
6684: -- get XML into the temporary clob variable
6677:
6678: l_stmt_num := 20;
6679:
6680: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6681: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6682: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6683:
6684: -- get XML into the temporary clob variable
6685:
6678: l_stmt_num := 20;
6679:
6680: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6681: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6682: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6683:
6684: -- get XML into the temporary clob variable
6685:
6686: l_stmt_num := 70;
6684: -- get XML into the temporary clob variable
6685:
6686: l_stmt_num := 70;
6687:
6688: dbms_xmlgen.getXML(l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6689:
6690: -- remove the header (21 characters) and append the rest to xml output
6691:
6692: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6688: dbms_xmlgen.getXML(l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6689:
6690: -- remove the header (21 characters) and append the rest to xml output
6691:
6692: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6693:
6694: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
6695: dbms_lob.erase(l_xml_temp, l_offset,1);
6696: dbms_lob.append(x_xml_doc, l_xml_temp);
6690: -- remove the header (21 characters) and append the rest to xml output
6691:
6692: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6693:
6694: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
6695: dbms_lob.erase(l_xml_temp, l_offset,1);
6696: dbms_lob.append(x_xml_doc, l_xml_temp);
6697: end if;
6698:
6697: end if;
6698:
6699: -- close context and free memory
6700:
6701: dbms_xmlgen.closeContext(l_qryCtx);
6702: close l_ref_cur;
6703: dbms_lob.freetemporary(l_xml_temp);
6704:
6705: -- to add number of rows processed
6717: -- create new context
6718:
6719: l_stmt_num := 90;
6720:
6721: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6722: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6723: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6724:
6725: -- get XML to add the number of rows processed
6718:
6719: l_stmt_num := 90;
6720:
6721: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6722: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6723: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6724:
6725: -- get XML to add the number of rows processed
6726:
6719: l_stmt_num := 90;
6720:
6721: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6722: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6723: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6724:
6725: -- get XML to add the number of rows processed
6726:
6727: l_stmt_num := 100;
6725: -- get XML to add the number of rows processed
6726:
6727: l_stmt_num := 100;
6728:
6729: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6730:
6731: -- remove the header (21 characters) and append the rest to xml output
6732:
6733: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0 ) then
6729: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6730:
6731: -- remove the header (21 characters) and append the rest to xml output
6732:
6733: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0 ) then
6734: dbms_lob.erase (l_xml_temp, l_offset,1);
6735: dbms_lob.append (x_xml_doc, l_xml_temp);
6736: end if;
6737:
6736: end if;
6737:
6738: -- close context and free memory
6739:
6740: dbms_xmlgen.closeContext(l_qryCtx);
6741: close l_ref_cur;
6742: dbms_lob.freetemporary(l_xml_temp);
6743:
6744: -- Standard call to get message count and if count is 1, get message info.