73: '; resolution type: ' || p_resolution_type ||
74: '; transaction type: ' || p_transaction_type);
75: END IF;
76: /* Initialze variables */
77: DBMS_LOB.createtemporary(l_xml_doc, TRUE);
78:
79: /*Bug 7305146: The following 3 lines of code ensures that XML data generated here uses the right encoding*/
80: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
81: l_xml_header := '';
78:
79: /*Bug 7305146: The following 3 lines of code ensures that XML data generated here uses the right encoding*/
80: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
81: l_xml_header := '';
82: DBMS_LOB.writeappend (l_xml_doc, length(l_xml_header), l_xml_header);
83:
84: DBMS_LOB.writeappend (l_xml_doc, 8, '
85: l_record_count := 0;
86:
80: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
81: l_xml_header := '';
82: DBMS_LOB.writeappend (l_xml_doc, length(l_xml_header), l_xml_header);
83:
84: DBMS_LOB.writeappend (l_xml_doc, 8, '
86:
87: l_stmt_num := 10;
88: SELECT period_start_date, schedule_close_date
364: END IF;
365: END IF;
366:
367: IF (l_record_count = 0) THEN
368: DBMS_LOB.writeappend (l_xml_doc, 10, '
369: END IF;
370: DBMS_LOB.writeappend (l_xml_doc, 9, '');
371:
372: /* write to output file */
366:
367: IF (l_record_count = 0) THEN
368: DBMS_LOB.writeappend (l_xml_doc, 10, '
369: END IF;
370: DBMS_LOB.writeappend (l_xml_doc, 9, '');
371:
372: /* write to output file */
373:
374: l_length := nvl(DBMS_LOB.getlength(l_xml_doc), 0);
370: DBMS_LOB.writeappend (l_xml_doc, 9, '');
371:
372: /* write to output file */
373:
374: l_length := nvl(DBMS_LOB.getlength(l_xml_doc), 0);
375: l_offset := 1;
376: l_amount := 16383;
377:
378: l_stmt_num := 130;
377:
378: l_stmt_num := 130;
379: LOOP
380: EXIT WHEN l_length <= 0;
381: DBMS_LOB.read (l_xml_doc, l_amount, l_offset, l_buffer);
382: FND_FILE.PUT (FND_FILE.OUTPUT, l_buffer);
383: l_length := l_length - l_amount;
384: l_offset := l_offset + l_amount;
385: END LOOP;
390: 'Completed writing to output file');
391: END IF;
392:
393: /* free temporary memory */
394: DBMS_LOB.FREETEMPORARY (l_xml_doc);
395: l_success := FND_CONCURRENT.SET_COMPLETION_STATUS('NORMAL', 'Request Completed Successfully');
396:
397: IF (l_pLog) THEN
398: FND_LOG.STRING (FND_LOG.LEVEL_PROCEDURE,
496: -- Initialize API return status to success
497: x_return_status := FND_API.G_RET_STS_SUCCESS;
498:
499: /* Initialize */
500: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
501:
502: l_stmt_num := 10;
503: SELECT ORGANIZATION_CODE
504: INTO l_org_code
543: DBMS_XMLGEN.getXML (l_ctx, l_xml_temp, DBMS_XMLGEN.none);
544:
545: /* Add the XML header as the first line of output. add data to end */
546: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
547: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
548: pattern => '>',
549: offset => 1,
550: nth => 1);
551: /*Bug 7305146*/
548: pattern => '>',
549: offset => 1,
550: nth => 1);
551: /*Bug 7305146*/
552: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
553: DBMS_LOB.writeappend (x_xml_doc, 8, '
554: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
555: DBMS_LOB.append (x_xml_doc, l_xml_temp);
556: END IF;
549: offset => 1,
550: nth => 1);
551: /*Bug 7305146*/
552: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
553: DBMS_LOB.writeappend (x_xml_doc, 8, '
555: DBMS_LOB.append (x_xml_doc, l_xml_temp);
556: END IF;
557:
550: nth => 1);
551: /*Bug 7305146*/
552: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
553: DBMS_LOB.writeappend (x_xml_doc, 8, '
554: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
555: DBMS_LOB.append (x_xml_doc, l_xml_temp);
556: END IF;
557:
558: /* close context and free memory */
551: /*Bug 7305146*/
552: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
553: DBMS_LOB.writeappend (x_xml_doc, 8, '
554: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
555: DBMS_LOB.append (x_xml_doc, l_xml_temp);
556: END IF;
557:
558: /* close context and free memory */
559: DBMS_XMLGEN.closeContext(l_ctx);
557:
558: /* close context and free memory */
559: DBMS_XMLGEN.closeContext(l_ctx);
560: CLOSE l_ref_cur;
561: DBMS_LOB.FREETEMPORARY (l_xml_temp);
562:
563: -- Standard call to get message count and if count is 1, get message info.
564: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
565: p_data => x_msg_data);
648: -- Initialize API return status to success
649: x_return_status := FND_API.G_RET_STS_SUCCESS;
650:
651: /* Initialize */
652: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
653:
654: /* Open Ref Cursor */
655: l_stmt_num := 10;
656: OPEN l_ref_cur FOR
733: IF (x_record_count > 0) THEN
734: /* Find the number of characters in the header and delete
735: them. Header ends with '>'. Hence find first occurrence of
736: '>' in the CLOB */
737: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
738: pattern => '>',
739: offset => 1,
740: nth => 1);
741: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
737: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
738: pattern => '>',
739: offset => 1,
740: nth => 1);
741: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
742: DBMS_LOB.append (x_xml_doc, l_xml_temp);
743: END IF;
744: /* close context and free memory */
745: DBMS_XMLGEN.closeContext(l_ctx);
738: pattern => '>',
739: offset => 1,
740: nth => 1);
741: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
742: DBMS_LOB.append (x_xml_doc, l_xml_temp);
743: END IF;
744: /* close context and free memory */
745: DBMS_XMLGEN.closeContext(l_ctx);
746: CLOSE l_ref_cur;
743: END IF;
744: /* close context and free memory */
745: DBMS_XMLGEN.closeContext(l_ctx);
746: CLOSE l_ref_cur;
747: DBMS_LOB.FREETEMPORARY (l_xml_temp);
748:
749: -- Standard call to get message count and if count is 1, get message info.
750: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
751: p_data => x_msg_data);
827: -- Initialize API return status to success
828: x_return_status := FND_API.G_RET_STS_SUCCESS;
829:
830: /* Initialize */
831: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
832:
833: /* Open Ref Cursor */
834: l_stmt_num := 10;
835: OPEN l_ref_cur FOR
896: IF (x_record_count > 0) THEN
897: /* Find the number of characters in the header and delete
898: them. Header ends with '>'. Hence find first occurrence of
899: '>' in the CLOB */
900: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
901: pattern => '>',
902: offset => 1,
903: nth => 1);
904: DBMS_LOB.erase (l_xml_temp, l_offset,1);
900: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
901: pattern => '>',
902: offset => 1,
903: nth => 1);
904: DBMS_LOB.erase (l_xml_temp, l_offset,1);
905: DBMS_LOB.append (x_xml_doc, l_xml_temp);
906: END IF;
907:
908: /* close context and free memory */
901: pattern => '>',
902: offset => 1,
903: nth => 1);
904: DBMS_LOB.erase (l_xml_temp, l_offset,1);
905: DBMS_LOB.append (x_xml_doc, l_xml_temp);
906: END IF;
907:
908: /* close context and free memory */
909: DBMS_XMLGEN.closeContext(l_ctx);
907:
908: /* close context and free memory */
909: DBMS_XMLGEN.closeContext(l_ctx);
910: CLOSE l_ref_cur;
911: DBMS_LOB.FREETEMPORARY (l_xml_temp);
912:
913: -- Standard call to get message count and if count is 1, get message info.
914: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
915: p_data => x_msg_data);
990: -- Initialize API return status to success
991: x_return_status := FND_API.G_RET_STS_SUCCESS;
992:
993: /* Initialize */
994: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
995:
996: /* Open Ref Cursor */
997: l_stmt_num := 10;
998: OPEN l_ref_cur FOR
1065: IF (x_record_count > 0) THEN
1066: /* Find the number of characters in the header and delete
1067: them. Header ends with '>'. Hence find first occurrence of
1068: '>' in the CLOB */
1069: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1070: pattern => '>',
1071: offset => 1,
1072: nth => 1);
1073: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1069: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1070: pattern => '>',
1071: offset => 1,
1072: nth => 1);
1073: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1074: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1075: END IF;
1076: /* close context and free memory */
1077: DBMS_XMLGEN.closeContext(l_ctx);
1070: pattern => '>',
1071: offset => 1,
1072: nth => 1);
1073: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1074: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1075: END IF;
1076: /* close context and free memory */
1077: DBMS_XMLGEN.closeContext(l_ctx);
1078: CLOSE l_ref_cur;
1075: END IF;
1076: /* close context and free memory */
1077: DBMS_XMLGEN.closeContext(l_ctx);
1078: CLOSE l_ref_cur;
1079: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1080:
1081: -- Standard call to get message count and if count is 1, get message info.
1082: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1083: p_data => x_msg_data);
1162: -- Initialize API return status to success
1163: x_return_status := FND_API.G_RET_STS_SUCCESS;
1164:
1165: /* Initialize */
1166: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1167: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1168: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1169: l_wsmti_flag := FND_API.G_FALSE;
1170: l_wlmti_flag := FND_API.G_FALSE;
1163: x_return_status := FND_API.G_RET_STS_SUCCESS;
1164:
1165: /* Initialize */
1166: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1167: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1168: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1169: l_wsmti_flag := FND_API.G_FALSE;
1170: l_wlmti_flag := FND_API.G_FALSE;
1171: l_wlsmi_flag := FND_API.G_FALSE;
1164:
1165: /* Initialize */
1166: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1167: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1168: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1169: l_wsmti_flag := FND_API.G_FALSE;
1170: l_wlmti_flag := FND_API.G_FALSE;
1171: l_wlsmi_flag := FND_API.G_FALSE;
1172:
1219: x_record_count := DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1220: /* remove the header*/
1221: IF (x_record_count > 0) THEN
1222: l_wsmti_flag := FND_API.G_TRUE;
1223: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wsmti,
1224: pattern => '>',
1225: offset => 1,
1226: nth => 1);
1227: DBMS_LOB.erase (l_xml_wsmti, l_offset,1);
1223: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wsmti,
1224: pattern => '>',
1225: offset => 1,
1226: nth => 1);
1227: DBMS_LOB.erase (l_xml_wsmti, l_offset,1);
1228: END IF;
1229: /* close context */
1230: DBMS_XMLGEN.closeContext(l_ctx);
1231: CLOSE l_ref_cur;
1298: x_record_count := x_record_count + DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1299: /* remove the header */
1300: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
1301: l_wlmti_flag := FND_API.G_TRUE;
1302: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlmti,
1303: pattern => '>',
1304: offset => 1,
1305: nth => 1);
1306: DBMS_LOB.erase (l_xml_wlmti, l_offset,1);
1302: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlmti,
1303: pattern => '>',
1304: offset => 1,
1305: nth => 1);
1306: DBMS_LOB.erase (l_xml_wlmti, l_offset,1);
1307: END IF;
1308: /* close context */
1309: DBMS_XMLGEN.closeContext(l_ctx);
1310: CLOSE l_ref_cur;
1367: x_record_count := x_record_count + DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1368: /* remove the header */
1369: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
1370: l_wlsmi_flag := FND_API.G_TRUE;
1371: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlsmi,
1372: pattern => '>',
1373: offset => 1,
1374: nth => 1);
1375: DBMS_LOB.erase (l_xml_wlsmi, l_offset,1);
1371: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlsmi,
1372: pattern => '>',
1373: offset => 1,
1374: nth => 1);
1375: DBMS_LOB.erase (l_xml_wlsmi, l_offset,1);
1376: END IF;
1377: /* close context */
1378: DBMS_XMLGEN.closeContext(l_ctx);
1379: CLOSE l_ref_cur;
1387: IF (FND_API.to_Boolean (l_wsmti_flag) OR FND_API.to_Boolean (l_wlmti_flag)
1388: OR FND_API.to_Boolean (l_wlsmi_flag) ) THEN
1389: /* Atleast one transaction is present */
1390: l_stmt_num := 100;
1391: DBMS_LOB.writeappend (x_xml_doc, 17, '
1393: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1394: END IF;
1395: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1389: /* Atleast one transaction is present */
1390: l_stmt_num := 100;
1391: DBMS_LOB.writeappend (x_xml_doc, 17, '
1392: IF (FND_API.to_Boolean (l_wsmti_flag)) THEN
1393: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1394: END IF;
1395: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1396: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1397: END IF;
1392: IF (FND_API.to_Boolean (l_wsmti_flag)) THEN
1393: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1394: END IF;
1395: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1396: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1397: END IF;
1398: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1399: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1400: END IF;
1395: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1396: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1397: END IF;
1398: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1399: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1400: END IF;
1401: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1402: END IF;
1403:
1397: END IF;
1398: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1399: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1400: END IF;
1401: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1402: END IF;
1403:
1404: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1405: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1400: END IF;
1401: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1402: END IF;
1403:
1404: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1405: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1406: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1407:
1408: -- Standard call to get message count and if count is 1, get message info.
1401: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1402: END IF;
1403:
1404: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1405: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1406: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1407:
1408: -- Standard call to get message count and if count is 1, get message info.
1409: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1402: END IF;
1403:
1404: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1405: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1406: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1407:
1408: -- Standard call to get message count and if count is 1, get message info.
1409: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1410: p_data => x_msg_data);
1486: -- Initialize API return status to success
1487: x_return_status := FND_API.G_RET_STS_SUCCESS;
1488:
1489: /* Initialize */
1490: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1491:
1492: SELECT min (TRANSACTION_INTERFACE_ID)
1493: INTO l_min_txn_if_id
1494: FROM mtl_transactions_interface
1593: IF (x_record_count > 0) THEN
1594: /* Find the number of characters in the header and delete
1595: them. Header ends with '>'. Hence find first occurrence of
1596: '>' in the CLOB */
1597: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1598: pattern => '>',
1599: offset => 1,
1600: nth => 1);
1601: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1597: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1598: pattern => '>',
1599: offset => 1,
1600: nth => 1);
1601: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1602: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1603: END IF;
1604: /* close context and free memory */
1605: DBMS_XMLGEN.closeContext(l_ctx);
1598: pattern => '>',
1599: offset => 1,
1600: nth => 1);
1601: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1602: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1603: END IF;
1604: /* close context and free memory */
1605: DBMS_XMLGEN.closeContext(l_ctx);
1606: CLOSE l_ref_cur;
1603: END IF;
1604: /* close context and free memory */
1605: DBMS_XMLGEN.closeContext(l_ctx);
1606: CLOSE l_ref_cur;
1607: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1608:
1609: -- Standard call to get message count and if count is 1, get message info.
1610: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1611: p_data => x_msg_data);
1687: -- Initialize API return status to success
1688: x_return_status := FND_API.G_RET_STS_SUCCESS;
1689:
1690: /* Initialize */
1691: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1692:
1693: /* Open Ref Cursor */
1694: l_stmt_num := 10;
1695: OPEN l_ref_cur FOR
1763: IF (x_record_count > 0) THEN
1764: /* Find the number of characters in the header and delete
1765: them. Header ends with '>'. Hence find first occurrence of
1766: '>' in the CLOB */
1767: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1768: pattern => '>',
1769: offset => 1,
1770: nth => 1);
1771: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1767: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1768: pattern => '>',
1769: offset => 1,
1770: nth => 1);
1771: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1772: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1773: END IF;
1774:
1775: /* close context and free memory */
1768: pattern => '>',
1769: offset => 1,
1770: nth => 1);
1771: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1772: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1773: END IF;
1774:
1775: /* close context and free memory */
1776: DBMS_XMLGEN.closeContext(l_ctx);
1774:
1775: /* close context and free memory */
1776: DBMS_XMLGEN.closeContext(l_ctx);
1777: CLOSE l_ref_cur;
1778: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1779:
1780: -- Standard call to get message count and if count is 1, get message info.
1781: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1782: p_data => x_msg_data);
1857: -- Initialize API return status to success
1858: x_return_status := FND_API.G_RET_STS_SUCCESS;
1859:
1860: /* Initialize */
1861: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1862:
1863: /* Open Ref Cursor */
1864: l_stmt_num := 10;
1865: OPEN l_ref_cur FOR
1919: IF (x_record_count > 0) THEN
1920: /* Find the number of characters in the header and delete
1921: them. Header ends with '>'. Hence find first occurrence of
1922: '>' in the CLOB */
1923: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1924: pattern => '>',
1925: offset => 1,
1926: nth => 1);
1927: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1923: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1924: pattern => '>',
1925: offset => 1,
1926: nth => 1);
1927: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1928: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1929: END IF;
1930: /* close context and free memory */
1931: DBMS_XMLGEN.closeContext(l_ctx);
1924: pattern => '>',
1925: offset => 1,
1926: nth => 1);
1927: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1928: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1929: END IF;
1930: /* close context and free memory */
1931: DBMS_XMLGEN.closeContext(l_ctx);
1932: CLOSE l_ref_cur;
1929: END IF;
1930: /* close context and free memory */
1931: DBMS_XMLGEN.closeContext(l_ctx);
1932: CLOSE l_ref_cur;
1933: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1934:
1935: -- Standard call to get message count and if count is 1, get message info.
1936: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1937: p_data => x_msg_data);
2014: -- Initialize API return status to success
2015: x_return_status := FND_API.G_RET_STS_SUCCESS;
2016:
2017: /* Initialize */
2018: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2019:
2020: /* Open Ref Cursor */
2021:
2022: /* This cursor SQL should be dual maintained with the one used to
2157: IF (x_record_count > 0) THEN
2158: /* Find the number of characters in the header and delete
2159: them. Header ends with '>'. Hence find first occurrence of
2160: '>' in the CLOB */
2161: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2162: pattern => '>',
2163: offset => 1,
2164: nth => 1);
2165: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2161: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2162: pattern => '>',
2163: offset => 1,
2164: nth => 1);
2165: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2166: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2167: END IF;
2168: /* close context and free memory */
2169: DBMS_XMLGEN.closeContext(l_ctx);
2162: pattern => '>',
2163: offset => 1,
2164: nth => 1);
2165: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2166: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2167: END IF;
2168: /* close context and free memory */
2169: DBMS_XMLGEN.closeContext(l_ctx);
2170: CLOSE l_ref_cur;
2167: END IF;
2168: /* close context and free memory */
2169: DBMS_XMLGEN.closeContext(l_ctx);
2170: CLOSE l_ref_cur;
2171: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2172:
2173: -- Standard call to get message count and if count is 1, get message info.
2174: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2175: p_data => x_msg_data);
2250: -- Initialize API return status to success
2251: x_return_status := FND_API.G_RET_STS_SUCCESS;
2252:
2253: /* Initialize */
2254: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2255:
2256: /* Open Ref Cursor */
2257: l_stmt_num := 10;
2258: OPEN l_ref_cur FOR
2350: IF (x_record_count > 0) THEN
2351: /* Find the number of characters in the header and delete
2352: them. Header ends with '>'. Hence find first occurrence of
2353: '>' in the CLOB */
2354: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2355: pattern => '>',
2356: offset => 1,
2357: nth => 1);
2358: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2354: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2355: pattern => '>',
2356: offset => 1,
2357: nth => 1);
2358: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2359: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2360: END IF;
2361: /* close context and free memory */
2362: DBMS_XMLGEN.closeContext(l_ctx);
2355: pattern => '>',
2356: offset => 1,
2357: nth => 1);
2358: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2359: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2360: END IF;
2361: /* close context and free memory */
2362: DBMS_XMLGEN.closeContext(l_ctx);
2363: CLOSE l_ref_cur;
2360: END IF;
2361: /* close context and free memory */
2362: DBMS_XMLGEN.closeContext(l_ctx);
2363: CLOSE l_ref_cur;
2364: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2365:
2366: -- Standard call to get message count and if count is 1, get message info.
2367: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2368: p_data => x_msg_data);
2443: -- Initialize API return status to success
2444: x_return_status := FND_API.G_RET_STS_SUCCESS;
2445:
2446: /* Initialize */
2447: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2448:
2449: /* Open Ref Cursor */
2450: l_stmt_num := 10;
2451: OPEN l_ref_cur FOR
2492: IF (x_record_count > 0) THEN
2493: /* Find the number of characters in the header and delete
2494: them. Header ends with '>'. Hence find first occurrence of
2495: '>' in the CLOB */
2496: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2497: pattern => '>',
2498: offset => 1,
2499: nth => 1);
2500: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2496: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2497: pattern => '>',
2498: offset => 1,
2499: nth => 1);
2500: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2501: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2502: END IF;
2503: /* close context and free memory */
2504: DBMS_XMLGEN.closeContext(l_ctx);
2497: pattern => '>',
2498: offset => 1,
2499: nth => 1);
2500: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2501: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2502: END IF;
2503: /* close context and free memory */
2504: DBMS_XMLGEN.closeContext(l_ctx);
2505: CLOSE l_ref_cur;
2502: END IF;
2503: /* close context and free memory */
2504: DBMS_XMLGEN.closeContext(l_ctx);
2505: CLOSE l_ref_cur;
2506: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2507:
2508: -- Standard call to get message count and if count is 1, get message info.
2509: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2510: p_data => x_msg_data);