61: ,retcode OUT NOCOPY NUMBER
62: ,p_business_group_id varchar2
63: , p_reporting_year number) is
64:
65: qryCtx DBMS_XMLGEN.ctxHandle;
66: l_result CLOB;
67: -- Commented for bug#11736960
68: --l_query varchar2(10000);
69: l_report_date date;
386: -- Added for bug#12570805
387: IF (hr_utility.debug_enabled) THEN
388: FND_FILE.PUT_LINE(FND_FILE.LOG,l_query3);
389: END IF;
390: qryCtx := dbms_xmlgen.newContext (l_query3);
391:
392: l_xml_string := '';
393: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
394: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
397: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
398: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
399:
400: --Load 5 records at a time
401: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
402: LOOP
403: --save the XML into the CLOB field
404: l_result := DBMS_XMLGEN.getXML(qryCtx);
405: l_xml_string := substr( l_result, instr(l_result,'
400: --Load 5 records at a time
401: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
402: LOOP
403: --save the XML into the CLOB field
404: l_result := DBMS_XMLGEN.getXML(qryCtx);
405: l_xml_string := substr( l_result, instr(l_result,'
406: --insert into tab_clob values (to_char(l_xml_string));
407: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
408: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
403: --save the XML into the CLOB field
404: l_result := DBMS_XMLGEN.getXML(qryCtx);
405: l_xml_string := substr( l_result, instr(l_result,'
406: --insert into tab_clob values (to_char(l_xml_string));
407: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
408: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
409: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
410:
411: END LOOP;
413: -- Added for bug#12570805
414: IF (hr_utility.debug_enabled) THEN
415: FND_FILE.PUT_LINE(FND_FILE.LOG,l_query4);
416: END IF;
417: qryCtx := dbms_xmlgen.newContext (l_query4);
418:
419: --Load 5 records at a time
420: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
421: LOOP
416: END IF;
417: qryCtx := dbms_xmlgen.newContext (l_query4);
418:
419: --Load 5 records at a time
420: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
421: LOOP
422: --save the XML into the CLOB field
423: l_result := DBMS_XMLGEN.getXML(qryCtx);
424: l_xml_string := substr( l_result, instr(l_result,'
419: --Load 5 records at a time
420: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
421: LOOP
422: --save the XML into the CLOB field
423: l_result := DBMS_XMLGEN.getXML(qryCtx);
424: l_xml_string := substr( l_result, instr(l_result,'
425: --insert into tab_clob values (to_char(l_xml_string));
426: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
427: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
422: --save the XML into the CLOB field
423: l_result := DBMS_XMLGEN.getXML(qryCtx);
424: l_xml_string := substr( l_result, instr(l_result,'
425: --insert into tab_clob values (to_char(l_xml_string));
426: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
427: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
428: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
429:
430: END LOOP;
435: END IF;
436: --FND_FILE.PUT_LINE(FND_FILE.LOG,l_query);
437:
438: -- Added for bug#11736960
439: qryCtx := dbms_xmlgen.newContext (l_query1);
440: --qryCtx := dbms_xmlgen.newContext (l_query);
441:
442: --Load 5 records at a time
443: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
436: --FND_FILE.PUT_LINE(FND_FILE.LOG,l_query);
437:
438: -- Added for bug#11736960
439: qryCtx := dbms_xmlgen.newContext (l_query1);
440: --qryCtx := dbms_xmlgen.newContext (l_query);
441:
442: --Load 5 records at a time
443: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
444: LOOP
439: qryCtx := dbms_xmlgen.newContext (l_query1);
440: --qryCtx := dbms_xmlgen.newContext (l_query);
441:
442: --Load 5 records at a time
443: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
444: LOOP
445: --save the XML into the CLOB field
446: l_result := DBMS_XMLGEN.getXML(qryCtx);
447: l_xml_string := substr( l_result, instr(l_result,'
442: --Load 5 records at a time
443: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
444: LOOP
445: --save the XML into the CLOB field
446: l_result := DBMS_XMLGEN.getXML(qryCtx);
447: l_xml_string := substr( l_result, instr(l_result,'
448: --insert into tab_clob values (to_char(l_xml_string));
449: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
450: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
445: --save the XML into the CLOB field
446: l_result := DBMS_XMLGEN.getXML(qryCtx);
447: l_xml_string := substr( l_result, instr(l_result,'
448: --insert into tab_clob values (to_char(l_xml_string));
449: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
450: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
451: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
452:
453: END LOOP;
456: IF (hr_utility.debug_enabled) THEN
457: FND_FILE.PUT_LINE(FND_FILE.LOG,l_query2);
458: END IF;
459:
460: qryCtx := dbms_xmlgen.newContext (l_query2);
461:
462: --Load 5 records at a time
463: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
464: LOOP
459:
460: qryCtx := dbms_xmlgen.newContext (l_query2);
461:
462: --Load 5 records at a time
463: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
464: LOOP
465: --save the XML into the CLOB field
466: l_result := DBMS_XMLGEN.getXML(qryCtx);
467: l_xml_string := substr( l_result, instr(l_result,'
462: --Load 5 records at a time
463: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
464: LOOP
465: --save the XML into the CLOB field
466: l_result := DBMS_XMLGEN.getXML(qryCtx);
467: l_xml_string := substr( l_result, instr(l_result,'
468: --insert into tab_clob values (to_char(l_xml_string));
469: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
470: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
465: --save the XML into the CLOB field
466: l_result := DBMS_XMLGEN.getXML(qryCtx);
467: l_xml_string := substr( l_result, instr(l_result,'
468: --insert into tab_clob values (to_char(l_xml_string));
469: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
470: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
471: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
472:
473: END LOOP;
475: --execute l_query5,added for bug 14034810
476: IF (hr_utility.debug_enabled) THEN
477: FND_FILE.PUT_LINE(FND_FILE.LOG,l_query5);
478: END IF;
479: qryCtx := dbms_xmlgen.newContext (l_query5);
480:
481: --Load 5 records at a time
482: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
483:
478: END IF;
479: qryCtx := dbms_xmlgen.newContext (l_query5);
480:
481: --Load 5 records at a time
482: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
483:
484: LOOP
485: --save the XML into the CLOB field
486: l_result := DBMS_XMLGEN.getXML(qryCtx);
482: DBMS_XMLGEN.setMaxRows(qryCtx, 5);
483:
484: LOOP
485: --save the XML into the CLOB field
486: l_result := DBMS_XMLGEN.getXML(qryCtx);
487:
488: --Extract the 5 records
489: l_xml_string := substr( l_result, instr(l_result,'
490:
487:
488: --Extract the 5 records
489: l_xml_string := substr( l_result, instr(l_result,'
490:
491: EXIT WHEN DBMS_XMLGEN.getNumRowsProcessed(qryCtx) = 0;
492:
493: FND_FILE.PUT_LINE(FND_FILE.LOG,l_xml_string);
494: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,l_xml_string);
495: END LOOP;