212: | |
213: +============================================================================*/
214: PROCEDURE gme_res_generate_xml IS
215:
216: qryCtx DBMS_XMLGEN.ctxHandle;
217: result1 CLOB;
218: x_stmt VARCHAR2(25000);
219: seq_stmt VARCHAR2(200);
220: l_encoding VARCHAR2(20); /* B7481907 */
320: -- B7481907 Rajesh Patangya starts
321: DBMS_LOB.createtemporary(temp_clob, TRUE);
322: DBMS_LOB.createtemporary(result1, TRUE);
323:
324: qryctx := dbms_xmlgen.newcontext(x_stmt);
325:
326: -- generate XML data
327: DBMS_XMLGEN.getXML (qryctx, temp_clob, DBMS_XMLGEN.none);
328: l_offset := DBMS_LOB.INSTR (lob_loc => temp_clob,
323:
324: qryctx := dbms_xmlgen.newcontext(x_stmt);
325:
326: -- generate XML data
327: DBMS_XMLGEN.getXML (qryctx, temp_clob, DBMS_XMLGEN.none);
328: l_offset := DBMS_LOB.INSTR (lob_loc => temp_clob,
329: pattern => '>',
330: offset => 1,
331: nth => 1);
341: -- Append the rest to xml output
342: DBMS_LOB.append (result1, temp_clob);
343:
344: -- close context and free memory
345: DBMS_XMLGEN.closeContext(qryctx);
346: DBMS_LOB.FREETEMPORARY (temp_clob);
347: -- B7481907 Rajesh Patangya Ends
348:
349: seq_stmt := 'select gmp_matl_rep_id_s.nextval from dual ';
348:
349: seq_stmt := 'select gmp_matl_rep_id_s.nextval from dual ';
350: EXECUTE IMMEDIATE seq_stmt INTO resdisp_rpt_id ;
351: INSERT INTO GMP_RESDISP_XML_TEMP (RESDISP_XML_RPT_ID,RESULT) VALUES (resdisp_rpt_id, result1);
352: DBMS_XMLGEN.closeContext(qryCtx);
353:
354: COMMIT;
355:
356: resdl_generate_output(resdisp_rpt_id);
374: | |
375: +============================================================================*/
376: PROCEDURE aps_res_generate_xml IS
377:
378: qryCtx DBMS_XMLGEN.ctxHandle;
379: result1 CLOB;
380: x_stmt1 VARCHAR2(25000);
381: seq_stmt VARCHAR2(200);
382: l_encoding VARCHAR2(20); /* B7481907 */
531: -- B7481907 Rajesh Patangya starts
532: DBMS_LOB.createtemporary(temp_clob, TRUE);
533: DBMS_LOB.createtemporary(result1, TRUE);
534:
535: qryctx := dbms_xmlgen.newcontext(x_stmt1);
536:
537: -- generate XML data
538: DBMS_XMLGEN.getXML (qryctx, temp_clob, DBMS_XMLGEN.none);
539: l_offset := DBMS_LOB.INSTR (lob_loc => temp_clob,
534:
535: qryctx := dbms_xmlgen.newcontext(x_stmt1);
536:
537: -- generate XML data
538: DBMS_XMLGEN.getXML (qryctx, temp_clob, DBMS_XMLGEN.none);
539: l_offset := DBMS_LOB.INSTR (lob_loc => temp_clob,
540: pattern => '>',
541: offset => 1,
542: nth => 1);
552: -- Append the rest to xml output
553: DBMS_LOB.append (result1, temp_clob);
554:
555: -- close context and free memory
556: DBMS_XMLGEN.closeContext(qryctx);
557: DBMS_LOB.FREETEMPORARY (temp_clob);
558: -- B7481907 Rajesh Patangya Ends
559:
560: seq_stmt := 'select gmp_matl_rep_id_s.nextval from dual ';
559:
560: seq_stmt := 'select gmp_matl_rep_id_s.nextval from dual ';
561: EXECUTE IMMEDIATE seq_stmt INTO resdisp_rpt_id ;
562: INSERT INTO GMP_RESDISP_XML_TEMP (RESDISP_XML_RPT_ID,RESULT) VALUES (resdisp_rpt_id, result1);
563: DBMS_XMLGEN.closeContext(qryCtx);
564:
565: COMMIT;
566:
567: resdl_generate_output(resdisp_rpt_id);