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