163: END IF;
164:
165: -- free temporary memory
166:
167: DBMS_XMLGEN.closeContext(l_qryCtx);
168: DBMS_LOB.FREETEMPORARY (l_xml_doc);
169:
170: l_success := FND_CONCURRENT.SET_COMPLETION_STATUS('NORMAL', 'Request Completed Successfully');
171:
358: -- create new context
359:
360: l_stmt_num := 50;
361:
362: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
363: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
364: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
365:
366: -- get XML into the temporary clob variable
359:
360: l_stmt_num := 50;
361:
362: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
363: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
364: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
365:
366: -- get XML into the temporary clob variable
367:
360: l_stmt_num := 50;
361:
362: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
363: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'PARAMETERS');
364: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
365:
366: -- get XML into the temporary clob variable
367:
368: l_stmt_num := 60;
366: -- get XML into the temporary clob variable
367:
368: l_stmt_num := 60;
369:
370: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
371:
372: -- remove the header (21 characters) and append the rest to xml output
373:
374: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
370: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
371:
372: -- remove the header (21 characters) and append the rest to xml output
373:
374: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
375: DBMS_LOB.erase (l_xml_temp, l_offset,1);
376: DBMS_LOB.append (x_xml_doc, l_xml_temp);
377: END IF;
378:
377: END IF;
378:
379: -- close context and free memory
380:
381: DBMS_XMLGEN.closeContext(l_qryCtx);
382: CLOSE l_ref_cur;
383: DBMS_LOB.FREETEMPORARY (l_xml_temp);
384:
385: -- Standard call to get message count and if count is 1, get message info.
647: -- create new context
648:
649: l_stmt_num := 40;
650:
651: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
652: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'SUMMARY_DATA');
653: DBMS_XMLGEN.setRowTag (l_qryCtx,'SUMMARY');
654:
655:
648:
649: l_stmt_num := 40;
650:
651: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
652: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'SUMMARY_DATA');
653: DBMS_XMLGEN.setRowTag (l_qryCtx,'SUMMARY');
654:
655:
656:
649: l_stmt_num := 40;
650:
651: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
652: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'SUMMARY_DATA');
653: DBMS_XMLGEN.setRowTag (l_qryCtx,'SUMMARY');
654:
655:
656:
657: -- get XML into the temporary clob variable
657: -- get XML into the temporary clob variable
658:
659: l_stmt_num := 50;
660:
661: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
662:
663: -- remove the header (21 characters) and append the rest to xml output
664:
665: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
661: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
662:
663: -- remove the header (21 characters) and append the rest to xml output
664:
665: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
666:
667: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
668: DBMS_LOB.erase (l_xml_temp, l_offset,1);
669: DBMS_LOB.append (x_xml_doc, l_xml_temp);
663: -- remove the header (21 characters) and append the rest to xml output
664:
665: l_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
666:
667: IF (DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0) THEN
668: DBMS_LOB.erase (l_xml_temp, l_offset,1);
669: DBMS_LOB.append (x_xml_doc, l_xml_temp);
670: END IF;
671:
670: END IF;
671:
672: -- close context and free memory
673:
674: DBMS_XMLGEN.closeContext(l_qryCtx);
675: CLOSE l_ref_cur;
676: DBMS_LOB.FREETEMPORARY (l_xml_temp);
677:
678: -- to add number of rows processed
688: -- create new context
689:
690: l_stmt_num := 70;
691:
692: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
693: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
694: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
695:
696:
689:
690: l_stmt_num := 70;
691:
692: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
693: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
694: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
695:
696:
697: -- get XML to add the number of rows processed
690: l_stmt_num := 70;
691:
692: l_qryCtx := DBMS_XMLGEN.newContext (l_ref_cur);
693: DBMS_XMLGEN.setRowSetTag (l_qryCtx,'record_num');
694: DBMS_XMLGEN.setRowTag (l_qryCtx,NULL);
695:
696:
697: -- get XML to add the number of rows processed
698:
697: -- get XML to add the number of rows processed
698:
699: l_stmt_num := 80;
700:
701: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
702:
703: -- remove the header (21 characters) and append the rest to xml output
704:
705: IF ( DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0 ) THEN
701: DBMS_XMLGEN.getXML (l_qryCtx, l_xml_temp, DBMS_XMLGEN.none);
702:
703: -- remove the header (21 characters) and append the rest to xml output
704:
705: IF ( DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx) > 0 ) THEN
706: DBMS_LOB.erase (l_xml_temp, l_offset,1);
707: DBMS_LOB.append (x_xml_doc, l_xml_temp);
708: END IF;
709:
708: END IF;
709:
710: -- close context and free memory
711:
712: DBMS_XMLGEN.closeContext(l_qryCtx);
713: CLOSE l_ref_cur;
714: DBMS_LOB.FREETEMPORARY (l_xml_temp);
715:
716: -- Standard call to get message count and if count is 1, get message info.