2369: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
2370: END IF;
2371:
2372: INSERT
2373: INTO igc_cc_arc_po_lines_all
2374: (po_line_id,
2375: last_update_date,
2376: last_updated_by,
2377: po_header_id,
2591: project_id,
2592: task_id,
2593: expiration_date,
2594: tax_code_id
2595: FROM po_lines PLA
2596: WHERE PLA.po_header_id IN
2597: ( SELECT PHA.po_header_id
2598: FROM po_headers PHA
2599: WHERE PHA.segment1 IN
2603: );
2604:
2605: -- IF (IGC_MSGS_PKG.g_debug_mode) THEN
2606: IF (g_debug_mode = 'Y') THEN
2607: g_debug_msg := ' Inserted ' || SQL%ROWCOUNT || ' number rows into PO Lines ALL Table for ' ||
2608: ' Last Activity Date : ' || g_last_activity_date;
2609: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
2610: END IF;
2611:
3871: -- Delete Archived PO Line records that may exist
3872: -- --------------------------------------------------------------------
3873: -- IF (IGC_MSGS_PKG.g_debug_mode) THEN
3874: IF (g_debug_mode = 'Y') THEN
3875: g_debug_msg := ' Deleting records from Archive PO Lines table for' ||
3876: ' Last Activity Date : ' || g_last_activity_date;
3877: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
3878: END IF;
3879:
3877: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
3878: END IF;
3879:
3880: DELETE
3881: FROM igc_cc_arc_po_lines IPLA
3882: WHERE IPLA.po_header_id IN
3883: ( SELECT PHA.po_header_id
3884: FROM po_headers_all PHA
3885: WHERE PHA.segment1 IN
5314: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
5315: END IF;
5316:
5317: -- --------------------------------------------------------------------
5318: -- Delete all PO Lines records for related CC Header IDs.
5319: -- --------------------------------------------------------------------
5320: DELETE
5321: FROM po_lines_all PLA
5322: WHERE PLA.po_header_id IN
5317: -- --------------------------------------------------------------------
5318: -- Delete all PO Lines records for related CC Header IDs.
5319: -- --------------------------------------------------------------------
5320: DELETE
5321: FROM po_lines_all PLA
5322: WHERE PLA.po_header_id IN
5323: ( SELECT PHA.po_header_id
5324: FROM po_headers_all PHA
5325: WHERE PHA.segment1 IN
5329: )
5330: );
5331:
5332: IF (g_debug_mode = 'Y') THEN
5333: g_debug_msg := 'Number Rows Deleted from PO_LINES_ALL for CC Header ID : ' ||
5334: l_cc_header_id || ' SOB ID : ' || g_sob_id || ' is : ' ||
5335: to_char(SQL%ROWCOUNT);
5336: Output_Debug (l_full_path, p_debug_msg => g_debug_msg);
5337: END IF;