74: '; resolution type: ' || p_resolution_type ||
75: '; transaction type: ' || p_transaction_type);
76: END IF;
77: /* Initialze variables */
78: DBMS_LOB.createtemporary(l_xml_doc, TRUE);
79:
80: /*Bug 7305146: The following 3 lines of code ensures that XML data generated here uses the right encoding*/
81: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
82: l_xml_header := '';
79:
80: /*Bug 7305146: The following 3 lines of code ensures that XML data generated here uses the right encoding*/
81: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
82: l_xml_header := '';
83: DBMS_LOB.writeappend (l_xml_doc, length(l_xml_header), l_xml_header);
84:
85: DBMS_LOB.writeappend (l_xml_doc, 8, '
86: l_record_count := 0;
87:
81: l_encoding := fnd_profile.value('ICX_CLIENT_IANA_ENCODING');
82: l_xml_header := '';
83: DBMS_LOB.writeappend (l_xml_doc, length(l_xml_header), l_xml_header);
84:
85: DBMS_LOB.writeappend (l_xml_doc, 8, '
87:
88: l_stmt_num := 10;
89: SELECT period_start_date, schedule_close_date
378: END IF;
379: END IF;
380:
381: IF (l_record_count = 0) THEN
382: DBMS_LOB.writeappend (l_xml_doc, 10, '
383: END IF;
384: DBMS_LOB.writeappend (l_xml_doc, 9, '');
385:
386: /* write to output file */
380:
381: IF (l_record_count = 0) THEN
382: DBMS_LOB.writeappend (l_xml_doc, 10, '
383: END IF;
384: DBMS_LOB.writeappend (l_xml_doc, 9, '');
385:
386: /* write to output file */
387:
388: l_length := nvl(DBMS_LOB.getlength(l_xml_doc), 0);
384: DBMS_LOB.writeappend (l_xml_doc, 9, '');
385:
386: /* write to output file */
387:
388: l_length := nvl(DBMS_LOB.getlength(l_xml_doc), 0);
389: l_offset := 1;
390: l_amount := 16383;
391:
392: l_stmt_num := 130;
391:
392: l_stmt_num := 130;
393: LOOP
394: EXIT WHEN l_length <= 0;
395: DBMS_LOB.read (l_xml_doc, l_amount, l_offset, l_buffer);
396: FND_FILE.PUT (FND_FILE.OUTPUT, l_buffer);
397: l_length := l_length - l_amount;
398: l_offset := l_offset + l_amount;
399: END LOOP;
404: 'Completed writing to output file');
405: END IF;
406:
407: /* free temporary memory */
408: DBMS_LOB.FREETEMPORARY (l_xml_doc);
409: l_success := FND_CONCURRENT.SET_COMPLETION_STATUS('NORMAL', 'Request Completed Successfully');
410:
411: IF (l_pLog) THEN
412: FND_LOG.STRING (FND_LOG.LEVEL_PROCEDURE,
510: -- Initialize API return status to success
511: x_return_status := FND_API.G_RET_STS_SUCCESS;
512:
513: /* Initialize */
514: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
515:
516: l_stmt_num := 10;
517: SELECT ORGANIZATION_CODE
518: INTO l_org_code
557: DBMS_XMLGEN.getXML (l_ctx, l_xml_temp, DBMS_XMLGEN.none);
558:
559: /* Add the XML header as the first line of output. add data to end */
560: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
561: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
562: pattern => '>',
563: offset => 1,
564: nth => 1);
565: /*Bug 7305146*/
562: pattern => '>',
563: offset => 1,
564: nth => 1);
565: /*Bug 7305146*/
566: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
567: DBMS_LOB.writeappend (x_xml_doc, 8, '
568: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
569: DBMS_LOB.append (x_xml_doc, l_xml_temp);
570: END IF;
563: offset => 1,
564: nth => 1);
565: /*Bug 7305146*/
566: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
567: DBMS_LOB.writeappend (x_xml_doc, 8, '
569: DBMS_LOB.append (x_xml_doc, l_xml_temp);
570: END IF;
571:
564: nth => 1);
565: /*Bug 7305146*/
566: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
567: DBMS_LOB.writeappend (x_xml_doc, 8, '
568: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
569: DBMS_LOB.append (x_xml_doc, l_xml_temp);
570: END IF;
571:
572: /* close context and free memory */
565: /*Bug 7305146*/
566: /*DBMS_LOB.copy (x_xml_doc, l_xml_temp, l_offset + 1);
567: DBMS_LOB.writeappend (x_xml_doc, 8, '
568: DBMS_LOB.erase(l_xml_temp, l_offset, 1);
569: DBMS_LOB.append (x_xml_doc, l_xml_temp);
570: END IF;
571:
572: /* close context and free memory */
573: DBMS_XMLGEN.closeContext(l_ctx);
571:
572: /* close context and free memory */
573: DBMS_XMLGEN.closeContext(l_ctx);
574: CLOSE l_ref_cur;
575: DBMS_LOB.FREETEMPORARY (l_xml_temp);
576:
577: -- Standard call to get message count and if count is 1, get message info.
578: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
579: p_data => x_msg_data);
662: -- Initialize API return status to success
663: x_return_status := FND_API.G_RET_STS_SUCCESS;
664:
665: /* Initialize */
666: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
667:
668: /* Open Ref Cursor */
669: l_stmt_num := 10;
670: OPEN l_ref_cur FOR
747: IF (x_record_count > 0) THEN
748: /* Find the number of characters in the header and delete
749: them. Header ends with '>'. Hence find first occurrence of
750: '>' in the CLOB */
751: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
752: pattern => '>',
753: offset => 1,
754: nth => 1);
755: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
751: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
752: pattern => '>',
753: offset => 1,
754: nth => 1);
755: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
756: DBMS_LOB.append (x_xml_doc, l_xml_temp);
757: END IF;
758: /* close context and free memory */
759: DBMS_XMLGEN.closeContext(l_ctx);
752: pattern => '>',
753: offset => 1,
754: nth => 1);
755: DBMS_LOB.erase (l_xml_temp, l_offset, 1);
756: DBMS_LOB.append (x_xml_doc, l_xml_temp);
757: END IF;
758: /* close context and free memory */
759: DBMS_XMLGEN.closeContext(l_ctx);
760: CLOSE l_ref_cur;
757: END IF;
758: /* close context and free memory */
759: DBMS_XMLGEN.closeContext(l_ctx);
760: CLOSE l_ref_cur;
761: DBMS_LOB.FREETEMPORARY (l_xml_temp);
762:
763: -- Standard call to get message count and if count is 1, get message info.
764: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
765: p_data => x_msg_data);
841: -- Initialize API return status to success
842: x_return_status := FND_API.G_RET_STS_SUCCESS;
843:
844: /* Initialize */
845: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
846:
847: /* Open Ref Cursor */
848: l_stmt_num := 10;
849: OPEN l_ref_cur FOR
910: IF (x_record_count > 0) THEN
911: /* Find the number of characters in the header and delete
912: them. Header ends with '>'. Hence find first occurrence of
913: '>' in the CLOB */
914: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
915: pattern => '>',
916: offset => 1,
917: nth => 1);
918: DBMS_LOB.erase (l_xml_temp, l_offset,1);
914: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
915: pattern => '>',
916: offset => 1,
917: nth => 1);
918: DBMS_LOB.erase (l_xml_temp, l_offset,1);
919: DBMS_LOB.append (x_xml_doc, l_xml_temp);
920: END IF;
921:
922: /* close context and free memory */
915: pattern => '>',
916: offset => 1,
917: nth => 1);
918: DBMS_LOB.erase (l_xml_temp, l_offset,1);
919: DBMS_LOB.append (x_xml_doc, l_xml_temp);
920: END IF;
921:
922: /* close context and free memory */
923: DBMS_XMLGEN.closeContext(l_ctx);
921:
922: /* close context and free memory */
923: DBMS_XMLGEN.closeContext(l_ctx);
924: CLOSE l_ref_cur;
925: DBMS_LOB.FREETEMPORARY (l_xml_temp);
926:
927: -- Standard call to get message count and if count is 1, get message info.
928: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
929: p_data => x_msg_data);
1004: -- Initialize API return status to success
1005: x_return_status := FND_API.G_RET_STS_SUCCESS;
1006:
1007: /* Initialize */
1008: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1009:
1010: /* Open Ref Cursor */
1011: l_stmt_num := 10;
1012: OPEN l_ref_cur FOR
1079: IF (x_record_count > 0) THEN
1080: /* Find the number of characters in the header and delete
1081: them. Header ends with '>'. Hence find first occurrence of
1082: '>' in the CLOB */
1083: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1084: pattern => '>',
1085: offset => 1,
1086: nth => 1);
1087: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1083: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1084: pattern => '>',
1085: offset => 1,
1086: nth => 1);
1087: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1088: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1089: END IF;
1090: /* close context and free memory */
1091: DBMS_XMLGEN.closeContext(l_ctx);
1084: pattern => '>',
1085: offset => 1,
1086: nth => 1);
1087: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1088: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1089: END IF;
1090: /* close context and free memory */
1091: DBMS_XMLGEN.closeContext(l_ctx);
1092: CLOSE l_ref_cur;
1089: END IF;
1090: /* close context and free memory */
1091: DBMS_XMLGEN.closeContext(l_ctx);
1092: CLOSE l_ref_cur;
1093: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1094:
1095: -- Standard call to get message count and if count is 1, get message info.
1096: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1097: p_data => x_msg_data);
1176: -- Initialize API return status to success
1177: x_return_status := FND_API.G_RET_STS_SUCCESS;
1178:
1179: /* Initialize */
1180: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1181: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1182: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1183: l_wsmti_flag := FND_API.G_FALSE;
1184: l_wlmti_flag := FND_API.G_FALSE;
1177: x_return_status := FND_API.G_RET_STS_SUCCESS;
1178:
1179: /* Initialize */
1180: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1181: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1182: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1183: l_wsmti_flag := FND_API.G_FALSE;
1184: l_wlmti_flag := FND_API.G_FALSE;
1185: l_wlsmi_flag := FND_API.G_FALSE;
1178:
1179: /* Initialize */
1180: DBMS_LOB.createtemporary(l_xml_wsmti, TRUE);
1181: DBMS_LOB.createtemporary(l_xml_wlmti, TRUE);
1182: DBMS_LOB.createtemporary(l_xml_wlsmi, TRUE);
1183: l_wsmti_flag := FND_API.G_FALSE;
1184: l_wlmti_flag := FND_API.G_FALSE;
1185: l_wlsmi_flag := FND_API.G_FALSE;
1186:
1233: x_record_count := DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1234: /* remove the header*/
1235: IF (x_record_count > 0) THEN
1236: l_wsmti_flag := FND_API.G_TRUE;
1237: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wsmti,
1238: pattern => '>',
1239: offset => 1,
1240: nth => 1);
1241: DBMS_LOB.erase (l_xml_wsmti, l_offset,1);
1237: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wsmti,
1238: pattern => '>',
1239: offset => 1,
1240: nth => 1);
1241: DBMS_LOB.erase (l_xml_wsmti, l_offset,1);
1242: END IF;
1243: /* close context */
1244: DBMS_XMLGEN.closeContext(l_ctx);
1245: CLOSE l_ref_cur;
1312: x_record_count := x_record_count + DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1313: /* remove the header */
1314: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
1315: l_wlmti_flag := FND_API.G_TRUE;
1316: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlmti,
1317: pattern => '>',
1318: offset => 1,
1319: nth => 1);
1320: DBMS_LOB.erase (l_xml_wlmti, l_offset,1);
1316: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlmti,
1317: pattern => '>',
1318: offset => 1,
1319: nth => 1);
1320: DBMS_LOB.erase (l_xml_wlmti, l_offset,1);
1321: END IF;
1322: /* close context */
1323: DBMS_XMLGEN.closeContext(l_ctx);
1324: CLOSE l_ref_cur;
1381: x_record_count := x_record_count + DBMS_XMLGEN.getNumRowsProcessed(l_ctx);
1382: /* remove the header */
1383: IF (DBMS_XMLGEN.getNumRowsProcessed(l_ctx) > 0) THEN
1384: l_wlsmi_flag := FND_API.G_TRUE;
1385: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlsmi,
1386: pattern => '>',
1387: offset => 1,
1388: nth => 1);
1389: DBMS_LOB.erase (l_xml_wlsmi, l_offset,1);
1385: l_offset := DBMS_LOB.instr (lob_loc => l_xml_wlsmi,
1386: pattern => '>',
1387: offset => 1,
1388: nth => 1);
1389: DBMS_LOB.erase (l_xml_wlsmi, l_offset,1);
1390: END IF;
1391: /* close context */
1392: DBMS_XMLGEN.closeContext(l_ctx);
1393: CLOSE l_ref_cur;
1401: IF (FND_API.to_Boolean (l_wsmti_flag) OR FND_API.to_Boolean (l_wlmti_flag)
1402: OR FND_API.to_Boolean (l_wlsmi_flag) ) THEN
1403: /* Atleast one transaction is present */
1404: l_stmt_num := 100;
1405: DBMS_LOB.writeappend (x_xml_doc, 17, '
1407: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1408: END IF;
1409: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1403: /* Atleast one transaction is present */
1404: l_stmt_num := 100;
1405: DBMS_LOB.writeappend (x_xml_doc, 17, '
1406: IF (FND_API.to_Boolean (l_wsmti_flag)) THEN
1407: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1408: END IF;
1409: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1410: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1411: END IF;
1406: IF (FND_API.to_Boolean (l_wsmti_flag)) THEN
1407: DBMS_LOB.append (x_xml_doc, l_xml_wsmti);
1408: END IF;
1409: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1410: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1411: END IF;
1412: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1413: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1414: END IF;
1409: IF (FND_API.to_Boolean (l_wlmti_flag)) THEN
1410: DBMS_LOB.append (x_xml_doc, l_xml_wlmti);
1411: END IF;
1412: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1413: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1414: END IF;
1415: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1416: END IF;
1417:
1411: END IF;
1412: IF (FND_API.to_Boolean (l_wlsmi_flag)) THEN
1413: DBMS_LOB.append (x_xml_doc, l_xml_wlsmi);
1414: END IF;
1415: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1416: END IF;
1417:
1418: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1419: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1414: END IF;
1415: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1416: END IF;
1417:
1418: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1419: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1420: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1421:
1422: -- Standard call to get message count and if count is 1, get message info.
1415: DBMS_LOB.writeappend (x_xml_doc, 18, '');
1416: END IF;
1417:
1418: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1419: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1420: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1421:
1422: -- Standard call to get message count and if count is 1, get message info.
1423: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1416: END IF;
1417:
1418: DBMS_LOB.FREETEMPORARY (l_xml_wsmti);
1419: DBMS_LOB.FREETEMPORARY (l_xml_wlmti);
1420: DBMS_LOB.FREETEMPORARY (l_xml_wlsmi);
1421:
1422: -- Standard call to get message count and if count is 1, get message info.
1423: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1424: p_data => x_msg_data);
1500: -- Initialize API return status to success
1501: x_return_status := FND_API.G_RET_STS_SUCCESS;
1502:
1503: /* Initialize */
1504: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1505:
1506: SELECT min (TRANSACTION_INTERFACE_ID)
1507: INTO l_min_txn_if_id
1508: FROM mtl_transactions_interface
1607: IF (x_record_count > 0) THEN
1608: /* Find the number of characters in the header and delete
1609: them. Header ends with '>'. Hence find first occurrence of
1610: '>' in the CLOB */
1611: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1612: pattern => '>',
1613: offset => 1,
1614: nth => 1);
1615: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1611: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1612: pattern => '>',
1613: offset => 1,
1614: nth => 1);
1615: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1616: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1617: END IF;
1618: /* close context and free memory */
1619: DBMS_XMLGEN.closeContext(l_ctx);
1612: pattern => '>',
1613: offset => 1,
1614: nth => 1);
1615: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1616: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1617: END IF;
1618: /* close context and free memory */
1619: DBMS_XMLGEN.closeContext(l_ctx);
1620: CLOSE l_ref_cur;
1617: END IF;
1618: /* close context and free memory */
1619: DBMS_XMLGEN.closeContext(l_ctx);
1620: CLOSE l_ref_cur;
1621: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1622:
1623: -- Standard call to get message count and if count is 1, get message info.
1624: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1625: p_data => x_msg_data);
1701: -- Initialize API return status to success
1702: x_return_status := FND_API.G_RET_STS_SUCCESS;
1703:
1704: /* Initialize */
1705: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1706:
1707: /* Open Ref Cursor */
1708: l_stmt_num := 10;
1709: OPEN l_ref_cur FOR
1777: IF (x_record_count > 0) THEN
1778: /* Find the number of characters in the header and delete
1779: them. Header ends with '>'. Hence find first occurrence of
1780: '>' in the CLOB */
1781: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1782: pattern => '>',
1783: offset => 1,
1784: nth => 1);
1785: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1781: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1782: pattern => '>',
1783: offset => 1,
1784: nth => 1);
1785: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1786: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1787: END IF;
1788:
1789: /* close context and free memory */
1782: pattern => '>',
1783: offset => 1,
1784: nth => 1);
1785: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1786: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1787: END IF;
1788:
1789: /* close context and free memory */
1790: DBMS_XMLGEN.closeContext(l_ctx);
1788:
1789: /* close context and free memory */
1790: DBMS_XMLGEN.closeContext(l_ctx);
1791: CLOSE l_ref_cur;
1792: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1793:
1794: -- Standard call to get message count and if count is 1, get message info.
1795: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1796: p_data => x_msg_data);
1871: -- Initialize API return status to success
1872: x_return_status := FND_API.G_RET_STS_SUCCESS;
1873:
1874: /* Initialize */
1875: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
1876:
1877: /* Open Ref Cursor */
1878: l_stmt_num := 10;
1879: OPEN l_ref_cur FOR
1933: IF (x_record_count > 0) THEN
1934: /* Find the number of characters in the header and delete
1935: them. Header ends with '>'. Hence find first occurrence of
1936: '>' in the CLOB */
1937: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1938: pattern => '>',
1939: offset => 1,
1940: nth => 1);
1941: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1937: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
1938: pattern => '>',
1939: offset => 1,
1940: nth => 1);
1941: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1942: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1943: END IF;
1944: /* close context and free memory */
1945: DBMS_XMLGEN.closeContext(l_ctx);
1938: pattern => '>',
1939: offset => 1,
1940: nth => 1);
1941: DBMS_LOB.erase (l_xml_temp, l_offset,1);
1942: DBMS_LOB.append (x_xml_doc, l_xml_temp);
1943: END IF;
1944: /* close context and free memory */
1945: DBMS_XMLGEN.closeContext(l_ctx);
1946: CLOSE l_ref_cur;
1943: END IF;
1944: /* close context and free memory */
1945: DBMS_XMLGEN.closeContext(l_ctx);
1946: CLOSE l_ref_cur;
1947: DBMS_LOB.FREETEMPORARY (l_xml_temp);
1948:
1949: -- Standard call to get message count and if count is 1, get message info.
1950: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
1951: p_data => x_msg_data);
2028: -- Initialize API return status to success
2029: x_return_status := FND_API.G_RET_STS_SUCCESS;
2030:
2031: /* Initialize */
2032: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2033:
2034: /* Open Ref Cursor */
2035:
2036: /* This cursor SQL should be dual maintained with the one used to
2171: IF (x_record_count > 0) THEN
2172: /* Find the number of characters in the header and delete
2173: them. Header ends with '>'. Hence find first occurrence of
2174: '>' in the CLOB */
2175: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2176: pattern => '>',
2177: offset => 1,
2178: nth => 1);
2179: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2175: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2176: pattern => '>',
2177: offset => 1,
2178: nth => 1);
2179: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2180: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2181: END IF;
2182: /* close context and free memory */
2183: DBMS_XMLGEN.closeContext(l_ctx);
2176: pattern => '>',
2177: offset => 1,
2178: nth => 1);
2179: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2180: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2181: END IF;
2182: /* close context and free memory */
2183: DBMS_XMLGEN.closeContext(l_ctx);
2184: CLOSE l_ref_cur;
2181: END IF;
2182: /* close context and free memory */
2183: DBMS_XMLGEN.closeContext(l_ctx);
2184: CLOSE l_ref_cur;
2185: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2186:
2187: -- Standard call to get message count and if count is 1, get message info.
2188: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2189: p_data => x_msg_data);
2264: -- Initialize API return status to success
2265: x_return_status := FND_API.G_RET_STS_SUCCESS;
2266:
2267: /* Initialize */
2268: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2269:
2270: /* Open Ref Cursor */
2271: l_stmt_num := 10;
2272: OPEN l_ref_cur FOR
2364: IF (x_record_count > 0) THEN
2365: /* Find the number of characters in the header and delete
2366: them. Header ends with '>'. Hence find first occurrence of
2367: '>' in the CLOB */
2368: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2369: pattern => '>',
2370: offset => 1,
2371: nth => 1);
2372: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2368: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2369: pattern => '>',
2370: offset => 1,
2371: nth => 1);
2372: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2373: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2374: END IF;
2375: /* close context and free memory */
2376: DBMS_XMLGEN.closeContext(l_ctx);
2369: pattern => '>',
2370: offset => 1,
2371: nth => 1);
2372: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2373: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2374: END IF;
2375: /* close context and free memory */
2376: DBMS_XMLGEN.closeContext(l_ctx);
2377: CLOSE l_ref_cur;
2374: END IF;
2375: /* close context and free memory */
2376: DBMS_XMLGEN.closeContext(l_ctx);
2377: CLOSE l_ref_cur;
2378: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2379:
2380: -- Standard call to get message count and if count is 1, get message info.
2381: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2382: p_data => x_msg_data);
2457: -- Initialize API return status to success
2458: x_return_status := FND_API.G_RET_STS_SUCCESS;
2459:
2460: /* Initialize */
2461: DBMS_LOB.createtemporary(l_xml_temp, TRUE);
2462:
2463: /* Open Ref Cursor */
2464: l_stmt_num := 10;
2465: OPEN l_ref_cur FOR
2506: IF (x_record_count > 0) THEN
2507: /* Find the number of characters in the header and delete
2508: them. Header ends with '>'. Hence find first occurrence of
2509: '>' in the CLOB */
2510: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2511: pattern => '>',
2512: offset => 1,
2513: nth => 1);
2514: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2510: l_offset := DBMS_LOB.instr (lob_loc => l_xml_temp,
2511: pattern => '>',
2512: offset => 1,
2513: nth => 1);
2514: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2515: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2516: END IF;
2517: /* close context and free memory */
2518: DBMS_XMLGEN.closeContext(l_ctx);
2511: pattern => '>',
2512: offset => 1,
2513: nth => 1);
2514: DBMS_LOB.erase (l_xml_temp, l_offset,1);
2515: DBMS_LOB.append (x_xml_doc, l_xml_temp);
2516: END IF;
2517: /* close context and free memory */
2518: DBMS_XMLGEN.closeContext(l_ctx);
2519: CLOSE l_ref_cur;
2516: END IF;
2517: /* close context and free memory */
2518: DBMS_XMLGEN.closeContext(l_ctx);
2519: CLOSE l_ref_cur;
2520: DBMS_LOB.FREETEMPORARY (l_xml_temp);
2521:
2522: -- Standard call to get message count and if count is 1, get message info.
2523: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
2524: p_data => x_msg_data);