5433: l_length := l_length - l_amount;
5434: l_offset := l_offset + l_amount;
5435: end loop;
5436:
5437: dbms_xmlgen.closeContext(l_qryCtx);
5438:
5439: -- Write the event log to fnd log file
5440:
5441: if(l_eventLog) then
5715: -- create new context
5716:
5717: l_stmt_num := 20;
5718:
5719: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5720: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5721: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5722:
5723: l_stmt_num := 30;
5716:
5717: l_stmt_num := 20;
5718:
5719: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5720: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5721: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5722:
5723: l_stmt_num := 30;
5724:
5717: l_stmt_num := 20;
5718:
5719: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
5720: dbms_xmlgen.setRowSetTag (l_qryCtx,'PARAMETERS');
5721: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
5722:
5723: l_stmt_num := 30;
5724:
5725: -- get XML into the temporary clob variable
5723: l_stmt_num := 30;
5724:
5725: -- get XML into the temporary clob variable
5726:
5727: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
5728:
5729: -- remove the header (21 characters) and append the rest to xml output
5730:
5731: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
5727: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
5728:
5729: -- remove the header (21 characters) and append the rest to xml output
5730:
5731: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
5732: dbms_lob.erase (l_xml_temp, l_offset,1);
5733: dbms_lob.append (x_xml_doc, l_xml_temp);
5734: end if;
5735:
5734: end if;
5735:
5736: -- close context and free memory
5737:
5738: dbms_xmlgen.closeContext(l_qryCtx);
5739: close l_ref_cur;
5740:
5741: dbms_lob.freetemporary(l_xml_temp);
5742:
6339: -- create new context
6340:
6341: l_stmt_num := 20;
6342:
6343: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6344: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6345: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6346:
6347: -- get XML into the temporary clob variable
6340:
6341: l_stmt_num := 20;
6342:
6343: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6344: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6345: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6346:
6347: -- get XML into the temporary clob variable
6348:
6341: l_stmt_num := 20;
6342:
6343: l_qryCtx := dbms_xmlgen.newContext(l_ref_cur);
6344: dbms_xmlgen.setRowSetTag(l_qryCtx,'DEF_COGS_DATA');
6345: dbms_xmlgen.setRowTag(l_qryCtx,'DEF_COGS');
6346:
6347: -- get XML into the temporary clob variable
6348:
6349: l_stmt_num := 70;
6347: -- get XML into the temporary clob variable
6348:
6349: l_stmt_num := 70;
6350:
6351: dbms_xmlgen.getXML(l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6352:
6353: -- remove the header (21 characters) and append the rest to xml output
6354:
6355: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6351: dbms_xmlgen.getXML(l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6352:
6353: -- remove the header (21 characters) and append the rest to xml output
6354:
6355: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6356:
6357: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
6358: dbms_lob.erase(l_xml_temp, l_offset,1);
6359: dbms_lob.append(x_xml_doc, l_xml_temp);
6353: -- remove the header (21 characters) and append the rest to xml output
6354:
6355: l_count := dbms_xmlgen.getNumRowsProcessed(l_qryCtx);
6356:
6357: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0) then
6358: dbms_lob.erase(l_xml_temp, l_offset,1);
6359: dbms_lob.append(x_xml_doc, l_xml_temp);
6360: end if;
6361:
6360: end if;
6361:
6362: -- close context and free memory
6363:
6364: dbms_xmlgen.closeContext(l_qryCtx);
6365: close l_ref_cur;
6366: dbms_lob.freetemporary(l_xml_temp);
6367:
6368: -- to add number of rows processed
6380: -- create new context
6381:
6382: l_stmt_num := 90;
6383:
6384: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6385: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6386: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6387:
6388: -- get XML to add the number of rows processed
6381:
6382: l_stmt_num := 90;
6383:
6384: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6385: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6386: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6387:
6388: -- get XML to add the number of rows processed
6389:
6382: l_stmt_num := 90;
6383:
6384: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
6385: dbms_xmlgen.setRowSetTag (l_qryCtx,'RECORD_NUM');
6386: dbms_xmlgen.setRowTag (l_qryCtx,NULL);
6387:
6388: -- get XML to add the number of rows processed
6389:
6390: l_stmt_num := 100;
6388: -- get XML to add the number of rows processed
6389:
6390: l_stmt_num := 100;
6391:
6392: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6393:
6394: -- remove the header (21 characters) and append the rest to xml output
6395:
6396: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0 ) then
6392: dbms_xmlgen.getXML (l_qryCtx, l_xml_temp, dbms_xmlgen.none);
6393:
6394: -- remove the header (21 characters) and append the rest to xml output
6395:
6396: if(dbms_xmlgen.getNumRowsProcessed(l_qryCtx) > 0 ) then
6397: dbms_lob.erase (l_xml_temp, l_offset,1);
6398: dbms_lob.append (x_xml_doc, l_xml_temp);
6399: end if;
6400:
6399: end if;
6400:
6401: -- close context and free memory
6402:
6403: dbms_xmlgen.closeContext(l_qryCtx);
6404: close l_ref_cur;
6405: dbms_lob.freetemporary(l_xml_temp);
6406:
6407: -- Standard call to get message count and if count is 1, get message info.