902: PO_DEBUG.debug_var(l_log_head,l_progress,'l_event_source_info.source_id_int_1', l_event_source_info.source_id_int_1);
903: END IF;
904:
905: IF( p_doc_entity <> 'RELEASE' ) then
906: --Before cleaning up of unwanted events, cleaning the PO_BC_DISTRIBUTIONS too
907: DELETE FROM po_bc_distributions WHERE header_id = p_doc_id
908: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
909: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
910: else
903: END IF;
904:
905: IF( p_doc_entity <> 'RELEASE' ) then
906: --Before cleaning up of unwanted events, cleaning the PO_BC_DISTRIBUTIONS too
907: DELETE FROM po_bc_distributions WHERE header_id = p_doc_id
908: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
909: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
910: else
911: --Before cleaning up of unwanted events, cleaning the PO_BC_DISTRIBUTIONS too
907: DELETE FROM po_bc_distributions WHERE header_id = p_doc_id
908: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
909: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
910: else
911: --Before cleaning up of unwanted events, cleaning the PO_BC_DISTRIBUTIONS too
912: DELETE FROM po_bc_distributions WHERE po_release_id = p_doc_id
913: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
914: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
915: END IF;
908: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
909: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
910: else
911: --Before cleaning up of unwanted events, cleaning the PO_BC_DISTRIBUTIONS too
912: DELETE FROM po_bc_distributions WHERE po_release_id = p_doc_id
913: AND APPLIED_TO_ENTITY_CODE = p_doc_entity
914: AND ae_event_id IN (SELECT event_id FROM xla_events WHERE event_status_code = 'U' AND process_status_code IN ('I', 'D'));
915: END IF;
916: