307: MISSING_IMG_JUST,
308: OVERDUE_REQUEST_ID
309: from ap_expense_report_headers_all a, AP_EXP_REPORT_HEADERS_GT gt
310: where gt.report_header_id = a.report_header_id);
311: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Headers');
312:
313: -- Insert into Lines
314: ----------------------------------------------------------------------
315: l_debug_info := 'Insert into Lines.';
647: ADJUSTMENT_REASON_COPY
648: from ap_expense_report_lines_all a, AP_EXP_REPORT_HEADERS_GT gt
649: where gt.report_header_id = a.report_header_id);
650:
651: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Lines');
652:
653: -- Insert into Dists
654: ----------------------------------------------------------------------
655: l_debug_info := 'Insert into Dists.';
766: WEB_PARAMETER_ID
767: from ap_exp_report_dists_all a, AP_EXP_REPORT_HEADERS_GT gt
768: where gt.report_header_id = a.report_header_id);
769:
770: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Dists');
771:
772: -- Insert into CC transactions
773: ----------------------------------------------------------------------
774: l_debug_info := 'Insert into CC Transactions.';
1047: VALIDATE_REQUEST_ID
1048: from ap_credit_card_trxns_all a, AP_EXP_REPORT_HEADERS_GT gt
1049: where gt.report_header_id = a.report_header_id);
1050:
1051: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' CC Transactions');
1052:
1053: ----------------------------------------------------------------------
1054: l_debug_info := 'Insert into CC Transaction Details.';
1055: ----------------------------------------------------------------------
1090: from ap_cc_trx_details a, ap_credit_card_trxns_all b, AP_EXP_REPORT_HEADERS_GT gt
1091: where gt.report_header_id = b.report_header_id
1092: and a.trx_id = b.trx_id);
1093:
1094: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' CC Transaction Details');
1095:
1096: -- Insert into Add On Mileage Rates
1097: ----------------------------------------------------------------------
1098: l_debug_info := 'Insert into Add On Mileage Rates.';
1127: ap_expense_report_lines_all b
1128: where gt.report_header_id = b.report_header_id
1129: and a.report_line_id = b.report_line_id);
1130:
1131: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Add On Mileage Rates');
1132:
1133: -- Insert into Perdiem Daily Breakups
1134: ----------------------------------------------------------------------
1135: l_debug_info := 'Insert into Perdiem Daily Breakups.';
1200: ap_expense_report_lines_all b
1201: where gt.report_header_id = b.report_header_id
1202: and a.report_line_id = b.report_line_id);
1203:
1204: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Perdiem Daily Breakups');
1205:
1206: -- Insert into Perdiem Destinations
1207: ----------------------------------------------------------------------
1208: l_debug_info := 'Insert into Perdiem Destinations.';
1237: ap_expense_report_lines_all b
1238: where gt.report_header_id = b.report_header_id
1239: and a.report_line_id = b.report_line_id);
1240:
1241: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Perdiem Destinations');
1242:
1243: -- Insert into OIE Attendees
1244: ----------------------------------------------------------------------
1245: l_debug_info := 'Insert into OIE Attendees.';
1286: ap_expense_report_lines_all b
1287: where gt.report_header_id = b.report_header_id
1288: and a.report_line_id = b.report_line_id);
1289:
1290: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Attendees');
1291:
1292: -- Insert into Audit Reasons
1293: ----------------------------------------------------------------------
1294: l_debug_info := 'Insert into Audit Reasons.';
1317: A.LAST_UPDATED_BY
1318: from ap_aud_audit_reasons a, AP_EXP_REPORT_HEADERS_GT gt
1319: where gt.report_header_id = a.report_header_id);
1320:
1321: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Audit Reasons');
1322:
1323: -- Insert into Violations
1324: ----------------------------------------------------------------------
1325: l_debug_info := 'Insert into Violations.';
1366: A.DUP_DIST_LINE_NUMBER
1367: from ap_pol_violations_all a, AP_EXP_REPORT_HEADERS_GT gt
1368: where gt.report_header_id = a.report_header_id);
1369:
1370: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Policy Violations');
1371:
1372: -- Insert into AP Notes
1373: ----------------------------------------------------------------------
1374: l_debug_info := 'Insert into AP Notes.';
1407: A.LAST_UPDATE_LOGIN
1408: from ap_notes a, AP_EXP_REPORT_HEADERS_GT gt
1409: where gt.report_header_id = a.source_object_id);
1410:
1411: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Notes');
1412:
1413: EXCEPTION
1414: WHEN OTHERS THEN
1415: fnd_file.put_line(fnd_file.log,'Exception when archiving data ' || SQLERRM);
1411: fnd_file.put_line(fnd_file.log,'Archived ' || SQL%ROWCOUNT || ' Notes');
1412:
1413: EXCEPTION
1414: WHEN OTHERS THEN
1415: fnd_file.put_line(fnd_file.log,'Exception when archiving data ' || SQLERRM);
1416: fnd_file.put_line(fnd_file.log,'When Performing ' || l_debug_info);
1417: RAISE;
1418: END ArchiveData;
1419:
1412:
1413: EXCEPTION
1414: WHEN OTHERS THEN
1415: fnd_file.put_line(fnd_file.log,'Exception when archiving data ' || SQLERRM);
1416: fnd_file.put_line(fnd_file.log,'When Performing ' || l_debug_info);
1417: RAISE;
1418: END ArchiveData;
1419:
1420: PROCEDURE PurgeData(p_request_id IN NUMBER,
1451: SELECT source_object_id
1452: FROM ap_notes_arc
1453: WHERE arc_req_id = p_request_id);
1454:
1455: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Notes');
1456:
1457: -- Delete Policy Violations.
1458: ----------------------------------------------------------------------
1459: l_debug_info := 'Delete Policy Violations.';
1464: SELECT report_header_id
1465: FROM ap_pol_violations_arc
1466: WHERE arc_req_id = p_request_id);
1467:
1468: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Policy Violations');
1469:
1470: -- Delete Audit reasons.
1471: ----------------------------------------------------------------------
1472: l_debug_info := 'Delete Audit reasons.';
1477: SELECT audit_reason_id
1478: FROM ap_aud_audit_reasons_arc
1479: WHERE arc_req_id = p_request_id);
1480:
1481: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Audit Reasons');
1482:
1483: -- Delete Attendee information
1484: ----------------------------------------------------------------------
1485: l_debug_info := 'Delete Attendee information.';
1490: SELECT attendee_line_id
1491: FROM oie_attendees_arc
1492: WHERE arc_req_id = p_request_id);
1493:
1494: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Attendees');
1495:
1496: -- Delete Perdiem destinations
1497: ----------------------------------------------------------------------
1498: l_debug_info := 'Delete Perdiem destinations.';
1503: SELECT pdm_destination_id
1504: FROM oie_pdm_destinations_arc
1505: WHERE arc_req_id = p_request_id);
1506:
1507: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Perdiem Destinations');
1508:
1509: -- Delete Perdiem Daily Beakups.
1510: ----------------------------------------------------------------------
1511: l_debug_info := 'Delete Perdiem Daily Beakups.';
1516: SELECT pdm_daily_breakup_id
1517: FROM oie_pdm_daily_breakups_arc
1518: WHERE arc_req_id = p_request_id);
1519:
1520: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Perdiem Daily Breakups');
1521:
1522: -- Delete Add On Mileage rates.
1523: ----------------------------------------------------------------------
1524: l_debug_info := 'Delete Add On Mileage rates.';
1529: SELECT report_line_id
1530: FROM oie_addon_mileage_rates_arc
1531: WHERE arc_req_id = p_request_id);
1532:
1533: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Add On Mileage Rates');
1534:
1535: -- Delete CC transactions.
1536: ----------------------------------------------------------------------
1537: l_debug_info := 'Delete CC Transaction Details.';
1542: SELECT trx_detail_id
1543: FROM ap_cc_trx_details_arc
1544: WHERE arc_req_id = p_request_id);
1545:
1546: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' CC Transaction Details');
1547:
1548: -- Delete CC transactions.
1549: ----------------------------------------------------------------------
1550: l_debug_info := 'Delete CC Transactions.';
1555: SELECT report_header_id
1556: FROM ap_credit_card_trxns_arc
1557: WHERE arc_req_id = p_request_id);
1558:
1559: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' CC Transactions');
1560:
1561: -- Delete Distributions.
1562: ----------------------------------------------------------------------
1563: l_debug_info := 'Delete Distributions.';
1568: SELECT report_distribution_id
1569: FROM ap_exp_report_dists_arc
1570: WHERE arc_req_id = p_request_id);
1571:
1572: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Dists');
1573:
1574: -- Delete Lines.
1575: ----------------------------------------------------------------------
1576: l_debug_info := 'Delete Lines.';
1581: SELECT report_line_id
1582: FROM ap_expense_report_lines_arc
1583: WHERE arc_req_id = p_request_id);
1584:
1585: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Lines');
1586:
1587: -- Delete Headers.
1588: ----------------------------------------------------------------------
1589: l_debug_info := 'Delete Headers.';
1594: SELECT report_header_id
1595: FROM ap_expense_report_headers_arc
1596: WHERE arc_req_id = p_request_id);
1597:
1598: fnd_file.put_line(fnd_file.log,'Purged ' || SQL%ROWCOUNT || ' Headers');
1599:
1600: -- Purge Workflow.
1601: ----------------------------------------------------------------------
1602: l_debug_info := 'Purge Workflow.';
1602: l_debug_info := 'Purge Workflow.';
1603: ----------------------------------------------------------------------
1604: IF (p_purge_wf_attach_flag ='Y') THEN
1605:
1606: fnd_file.put_line(fnd_file.log,'Purging Workflow and Attachments');
1607:
1608: -- Delete Line Attachments
1609: open c_exp_report_lines(p_request_id);
1610: LOOP
1639: l_wf_active := FALSE;
1640: l_wf_exist := FALSE;
1641: end;
1642: IF l_wf_exist THEN
1643: fnd_file.put_line(fnd_file.log,'Purging Workflow');
1644: -- Abort the parent workflow if active
1645: IF l_wf_active THEN
1646: l_debug_info := 'WF Exists, abort process';
1647: fnd_file.put_line(fnd_file.log,'Abort Existing Workflow');
1643: fnd_file.put_line(fnd_file.log,'Purging Workflow');
1644: -- Abort the parent workflow if active
1645: IF l_wf_active THEN
1646: l_debug_info := 'WF Exists, abort process';
1647: fnd_file.put_line(fnd_file.log,'Abort Existing Workflow');
1648: wf_engine.AbortProcess (itemtype => 'APEXP',
1649: itemkey => to_char(l_report_header_id),
1650: cascade => TRUE);
1651: END IF;
1690: IF (l_wf_exist) THEN
1691: -- Abort the child workflow if active
1692: IF l_wf_active THEN
1693: l_debug_info := 'WF Exists, abort process';
1694: fnd_file.put_line(fnd_file.log,'Abort Existing Workflow');
1695: wf_engine.AbortProcess (itemtype => 'APEXP',
1696: itemkey => l_child_item_key,
1697: cascade => TRUE);
1698: END IF;
1720: X_pk1_value => to_char(l_report_header_id),
1721: X_delete_document_flag => 'N');
1722:
1723: END LOOP;
1724: fnd_file.put_line(fnd_file.log,'Purged Workflow and Attachments');
1725: END IF;
1726:
1727:
1728: EXCEPTION
1726:
1727:
1728: EXCEPTION
1729: WHEN OTHERS THEN
1730: fnd_file.put_line(fnd_file.log,'Exception when purging data ' || SQLERRM);
1731: fnd_file.put_line(fnd_file.log,'When Performing ' || l_debug_info);
1732: RAISE;
1733: END PurgeData;
1734:
1727:
1728: EXCEPTION
1729: WHEN OTHERS THEN
1730: fnd_file.put_line(fnd_file.log,'Exception when purging data ' || SQLERRM);
1731: fnd_file.put_line(fnd_file.log,'When Performing ' || l_debug_info);
1732: RAISE;
1733: END PurgeData;
1734:
1735: PROCEDURE RunProgram(errbuf OUT NOCOPY VARCHAR2,
1744: BEGIN
1745: -- p_source_date is a required parameter, no need to check for null.
1746: l_source_date := fnd_date.canonical_to_date(p_source_date);
1747:
1748: fnd_file.put_line(fnd_file.log, '=================================================================');
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1745: -- p_source_date is a required parameter, no need to check for null.
1746: l_source_date := fnd_date.canonical_to_date(p_source_date);
1747:
1748: fnd_file.put_line(fnd_file.log, '=================================================================');
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1746: l_source_date := fnd_date.canonical_to_date(p_source_date);
1747:
1748: fnd_file.put_line(fnd_file.log, '=================================================================');
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1747:
1748: fnd_file.put_line(fnd_file.log, '=================================================================');
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1748: fnd_file.put_line(fnd_file.log, '=================================================================');
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1756: ELSE
1749: fnd_file.put_line(fnd_file.log, 'Archive and Purge Parameters');
1750: fnd_file.put_line(fnd_file.log, '=================================================================');
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1756: ELSE
1757: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || p_org_id);
1751: fnd_file.put_line(fnd_file.log, 'Request Id: ' || l_request_id);
1752: fnd_file.put_line(fnd_file.log, 'Source Date: ' || l_source_date);
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1756: ELSE
1757: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || p_org_id);
1758: END IF;
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1753: fnd_file.put_line(fnd_file.log, 'Purge WF and Attachments: ' || p_purge_wf_attach_flag);
1754: IF (p_org_id IS NULL) THEN
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1756: ELSE
1757: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || p_org_id);
1758: END IF;
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1760:
1761: fnd_file.put_line(fnd_file.log, ' ');
1755: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || 'Processing all operating units');
1756: ELSE
1757: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || p_org_id);
1758: END IF;
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1760:
1761: fnd_file.put_line(fnd_file.log, ' ');
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1757: fnd_file.put_line(fnd_file.log, 'Operating Unit: ' || p_org_id);
1758: END IF;
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1760:
1761: fnd_file.put_line(fnd_file.log, ' ');
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1758: END IF;
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1760:
1761: fnd_file.put_line(fnd_file.log, ' ');
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1766: fnd_file.put_line(fnd_file.log, 'Archiving the selected Expense Reports');
1759: fnd_file.put_line(fnd_file.log, '=================================================================');
1760:
1761: fnd_file.put_line(fnd_file.log, ' ');
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1766: fnd_file.put_line(fnd_file.log, 'Archiving the selected Expense Reports');
1767: fnd_file.put_line(fnd_file.log, '=================================================================');
1761: fnd_file.put_line(fnd_file.log, ' ');
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1766: fnd_file.put_line(fnd_file.log, 'Archiving the selected Expense Reports');
1767: fnd_file.put_line(fnd_file.log, '=================================================================');
1768:
1769: -- Archive the data.
1762: fnd_file.put_line(fnd_file.log, ' ');
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1766: fnd_file.put_line(fnd_file.log, 'Archiving the selected Expense Reports');
1767: fnd_file.put_line(fnd_file.log, '=================================================================');
1768:
1769: -- Archive the data.
1770: ArchiveData(l_source_date, p_org_id, l_request_id);
1763: fnd_file.put_line(fnd_file.log, ' ');
1764:
1765: fnd_file.put_line(fnd_file.log, '=================================================================');
1766: fnd_file.put_line(fnd_file.log, 'Archiving the selected Expense Reports');
1767: fnd_file.put_line(fnd_file.log, '=================================================================');
1768:
1769: -- Archive the data.
1770: ArchiveData(l_source_date, p_org_id, l_request_id);
1771:
1768:
1769: -- Archive the data.
1770: ArchiveData(l_source_date, p_org_id, l_request_id);
1771:
1772: fnd_file.put_line(fnd_file.log, '=================================================================');
1773: fnd_file.put_line(fnd_file.log, 'Archive Complete');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1769: -- Archive the data.
1770: ArchiveData(l_source_date, p_org_id, l_request_id);
1771:
1772: fnd_file.put_line(fnd_file.log, '=================================================================');
1773: fnd_file.put_line(fnd_file.log, 'Archive Complete');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1770: ArchiveData(l_source_date, p_org_id, l_request_id);
1771:
1772: fnd_file.put_line(fnd_file.log, '=================================================================');
1773: fnd_file.put_line(fnd_file.log, 'Archive Complete');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1772: fnd_file.put_line(fnd_file.log, '=================================================================');
1773: fnd_file.put_line(fnd_file.log, 'Archive Complete');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1773: fnd_file.put_line(fnd_file.log, 'Archive Complete');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1781: fnd_file.put_line(fnd_file.log, 'Purging the selected Expense Reports');
1774: fnd_file.put_line(fnd_file.log, '=================================================================');
1775:
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1781: fnd_file.put_line(fnd_file.log, 'Purging the selected Expense Reports');
1782: fnd_file.put_line(fnd_file.log, '=================================================================');
1776: fnd_file.put_line(fnd_file.log, ' ');
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1781: fnd_file.put_line(fnd_file.log, 'Purging the selected Expense Reports');
1782: fnd_file.put_line(fnd_file.log, '=================================================================');
1783:
1784: -- Purge the data.
1777: fnd_file.put_line(fnd_file.log, ' ');
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1781: fnd_file.put_line(fnd_file.log, 'Purging the selected Expense Reports');
1782: fnd_file.put_line(fnd_file.log, '=================================================================');
1783:
1784: -- Purge the data.
1785: PurgeData(l_request_id, p_purge_wf_attach_flag);
1778: fnd_file.put_line(fnd_file.log, ' ');
1779:
1780: fnd_file.put_line(fnd_file.log, '=================================================================');
1781: fnd_file.put_line(fnd_file.log, 'Purging the selected Expense Reports');
1782: fnd_file.put_line(fnd_file.log, '=================================================================');
1783:
1784: -- Purge the data.
1785: PurgeData(l_request_id, p_purge_wf_attach_flag);
1786:
1783:
1784: -- Purge the data.
1785: PurgeData(l_request_id, p_purge_wf_attach_flag);
1786:
1787: fnd_file.put_line(fnd_file.log, '=================================================================');
1788: fnd_file.put_line(fnd_file.log, 'Purge Complete');
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1784: -- Purge the data.
1785: PurgeData(l_request_id, p_purge_wf_attach_flag);
1786:
1787: fnd_file.put_line(fnd_file.log, '=================================================================');
1788: fnd_file.put_line(fnd_file.log, 'Purge Complete');
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1792: fnd_file.put_line(fnd_file.log, ' ');
1785: PurgeData(l_request_id, p_purge_wf_attach_flag);
1786:
1787: fnd_file.put_line(fnd_file.log, '=================================================================');
1788: fnd_file.put_line(fnd_file.log, 'Purge Complete');
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1792: fnd_file.put_line(fnd_file.log, ' ');
1793: fnd_file.put_line(fnd_file.log, ' ');
1787: fnd_file.put_line(fnd_file.log, '=================================================================');
1788: fnd_file.put_line(fnd_file.log, 'Purge Complete');
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1792: fnd_file.put_line(fnd_file.log, ' ');
1793: fnd_file.put_line(fnd_file.log, ' ');
1794:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1788: fnd_file.put_line(fnd_file.log, 'Purge Complete');
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1792: fnd_file.put_line(fnd_file.log, ' ');
1793: fnd_file.put_line(fnd_file.log, ' ');
1794:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1796:
1789: fnd_file.put_line(fnd_file.log, '=================================================================');
1790:
1791: fnd_file.put_line(fnd_file.log, ' ');
1792: fnd_file.put_line(fnd_file.log, ' ');
1793: fnd_file.put_line(fnd_file.log, ' ');
1794:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1796:
1797: fnd_file.put_line(fnd_file.log, '=================================================================');
1793: fnd_file.put_line(fnd_file.log, ' ');
1794:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1796:
1797: fnd_file.put_line(fnd_file.log, '=================================================================');
1798: fnd_file.put_line(fnd_file.log, 'Total Expenses processed: ' || l_count);
1799: fnd_file.put_line(fnd_file.log, '=================================================================');
1800:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1794:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1796:
1797: fnd_file.put_line(fnd_file.log, '=================================================================');
1798: fnd_file.put_line(fnd_file.log, 'Total Expenses processed: ' || l_count);
1799: fnd_file.put_line(fnd_file.log, '=================================================================');
1800:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1802:
1795: select count(*) into l_count from AP_EXP_REPORT_HEADERS_GT;
1796:
1797: fnd_file.put_line(fnd_file.log, '=================================================================');
1798: fnd_file.put_line(fnd_file.log, 'Total Expenses processed: ' || l_count);
1799: fnd_file.put_line(fnd_file.log, '=================================================================');
1800:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1802:
1803: fnd_file.put_line(fnd_file.log, '=================================================================');
1799: fnd_file.put_line(fnd_file.log, '=================================================================');
1800:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1802:
1803: fnd_file.put_line(fnd_file.log, '=================================================================');
1804: fnd_file.put_line(fnd_file.log, 'Cleared Temp Contents');
1805: fnd_file.put_line(fnd_file.log, '=================================================================');
1806:
1807: commit;
1800:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1802:
1803: fnd_file.put_line(fnd_file.log, '=================================================================');
1804: fnd_file.put_line(fnd_file.log, 'Cleared Temp Contents');
1805: fnd_file.put_line(fnd_file.log, '=================================================================');
1806:
1807: commit;
1808:
1801: delete from AP_EXP_REPORT_HEADERS_GT;
1802:
1803: fnd_file.put_line(fnd_file.log, '=================================================================');
1804: fnd_file.put_line(fnd_file.log, 'Cleared Temp Contents');
1805: fnd_file.put_line(fnd_file.log, '=================================================================');
1806:
1807: commit;
1808:
1809: EXCEPTION