231: l_length := l_length - l_amount;
232: l_offset := l_offset + l_amount;
233: END LOOP;
234:
235: DBMS_XMLGEN.closeContext(l_qryCtx);
236:
237:
238: -- Write the event log to fnd log file
239:
504: -- create new context
505:
506: l_stmt_num := 60;
507:
508: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
509: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
510: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
511:
512: -- get XML into the temporary clob variable
505:
506: l_stmt_num := 60;
507:
508: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
509: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
510: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
511:
512: -- get XML into the temporary clob variable
513:
506: l_stmt_num := 60;
507:
508: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
509: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
510: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
511:
512: -- get XML into the temporary clob variable
513:
514: l_stmt_num := 70;
512: -- get XML into the temporary clob variable
513:
514: l_stmt_num := 70;
515:
516: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
517:
518: -- remove the header (21 characters) and append the rest to xml output
519:
520: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
516: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
517:
518: -- remove the header (21 characters) and append the rest to xml output
519:
520: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
521: DBMS_LOB.erase (l_xml_temp, l_offset,1);
522: DBMS_LOB.append (x_xml_doc, l_xml_temp);
523: END IF;
524:
523: END IF;
524:
525: -- close context and free memory
526:
527: DBMS_XMLGEN.closeContext(l_qryCtx);
528: CLOSE l_ref_cur;
529: DBMS_LOB.FREETEMPORARY (l_xml_temp);
530:
531: -- Standard call to get message count and if count is 1, get message info.
912: -- create new context
913:
914: l_stmt_num := 50;
915:
916: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
917: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'MISC_DATA');
918: DBMS_XMLGEN.setRowTag (l_qryCtx,'MISC');
919:
920: -- get XML into the temporary clob variable
913:
914: l_stmt_num := 50;
915:
916: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
917: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'MISC_DATA');
918: DBMS_XMLGEN.setRowTag (l_qryCtx,'MISC');
919:
920: -- get XML into the temporary clob variable
921:
914: l_stmt_num := 50;
915:
916: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
917: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'MISC_DATA');
918: DBMS_XMLGEN.setRowTag (l_qryCtx,'MISC');
919:
920: -- get XML into the temporary clob variable
921:
922: l_stmt_num := 60;
920: -- get XML into the temporary clob variable
921:
922: l_stmt_num := 60;
923:
924: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
925:
926: -- remove the header (21 characters) and append the rest to xml output
927:
928: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
924: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
925:
926: -- remove the header (21 characters) and append the rest to xml output
927:
928: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
929:
930: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
931: DBMS_LOB.erase (l_xml_temp, l_offset,1);
932: DBMS_LOB.append (x_xml_doc, l_xml_temp);
926: -- remove the header (21 characters) and append the rest to xml output
927:
928: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
929:
930: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
931: DBMS_LOB.erase (l_xml_temp, l_offset,1);
932: DBMS_LOB.append (x_xml_doc, l_xml_temp);
933: END IF;
934:
934:
935:
936: -- close context and free memory
937:
938: DBMS_XMLGEN.closeContext(l_qryCtx);
939: CLOSE l_ref_cur;
940: DBMS_LOB.FREETEMPORARY (l_xml_temp);
941:
942: -- to add number of rows processed
952: -- create new context
953:
954: l_stmt_num := 80;
955:
956: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
957: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
958: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
959:
960: -- get XML to add the number of rows processed
953:
954: l_stmt_num := 80;
955:
956: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
957: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
958: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
959:
960: -- get XML to add the number of rows processed
961:
954: l_stmt_num := 80;
955:
956: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
957: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
958: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
959:
960: -- get XML to add the number of rows processed
961:
962: l_stmt_num := 90;
960: -- get XML to add the number of rows processed
961:
962: l_stmt_num := 90;
963:
964: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
965:
966: -- remove the header (21 characters) and append the rest to xml output
967:
968: IF ( DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0 ) THEN
964: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
965:
966: -- remove the header (21 characters) and append the rest to xml output
967:
968: IF ( DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0 ) THEN
969: DBMS_LOB.erase (l_xml_temp, l_offset,1);
970: DBMS_LOB.append (x_xml_doc, l_xml_temp);
971: END IF;
972:
971: END IF;
972:
973: -- close context and free memory
974:
975: DBMS_XMLGEN.closeContext(l_qryCtx);
976: CLOSE l_ref_cur;
977: DBMS_LOB.FREETEMPORARY (l_xml_temp);
978:
979: