Search Results delete_stage_data




Overview

EC_OUTBOUND is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that provides the core processing logic for outbound electronic commerce transactions. It is a component of the E-Commerce Gateway (EC) module, which is responsible for the exchange of business documents — such as purchase orders, invoices, advance ship notices, and other EDI transactions — between Oracle EBS and external trading partners. In this architecture, "outbound" refers to documents generated within EBS that must be extracted, staged, and delivered to a partner system or value-added network.

The package is declared with AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking user rather than the definer, and it exposes two global positioning variables (g_key_column_pos and g_tp_code_pos) that track the ordinal position of key and trading-partner code columns during staging operations. These globals support the parsing and column-mapping logic that the outbound process relies upon when constructing flat-file or interface records from staged data.

Key Procedures and Functions

The ETRM metadata documents two procedures in this package.

  • PROCESS_OUTBOUND_DOCUMENTS — The primary entry point for outbound document processing. It accepts an input transaction type and map identifier, and returns an output run identifier. Its role is to drive the extraction and staging of outbound documents for a given transaction type and map definition, producing a run ID that downstream processes use to reference the batch of staged records.
  • DELETE_STAGE_DATA — Removes records from the staging table. The run ID is the only required parameter, allowing bulk cleanup of an entire run; an optional document ID parameter permits deletion of a single document from the staging table at a time. The header comment notes this routine avoids the expense of DBMS_SQL-based dynamic parsing, making it an efficient housekeeping mechanism.

Tables Accessed

  • ECE_STAGE — The central staging table where outbound document records are written and from which they are later read; also the target of DELETE_STAGE_DATA.
  • ECE_STAGE_ID_S — Sequence supplying unique identifiers for staged records.
  • ECE_DOCUMENT_ID_S — Sequence generating document identifiers.
  • ECE_OUTPUT_RUNS_S — Sequence producing run identifiers returned by PROCESS_OUTBOUND_DOCUMENTS.
  • DBMS_SQL — Oracle-supplied dynamic SQL package, referenced for record handling in staging operations.
  • DUAL — Used for single-row sequence and constant evaluations.
  • PLITBLM — PL/SQL index-by table package used for bulk processing support.

Usage Notes

EC_OUTBOUND is typically invoked from the E-Commerce Gateway concurrent programs that transmit outbound transactions. The PROCESS_OUTBOUND_DOCUMENTS procedure is called to initiate extraction for a specified transaction type and map, returning a run ID that identifies the batch. The DELETE_STAGE_DATA procedure is invoked as a follow-up cleanup step, either to purge an entire processed run or to remove individual documents after successful transmission or upon error recovery.

The package is referenced by two other packages within the EC module, indicating it sits within a layered call structure rather than being called directly by end users. Customizations or extensions that need to programmatically trigger outbound processing or purge staging data should call these procedures through supported APIs, preserving the run ID returned for reconciliation and troubleshooting. Because the package relies on sequence-generated identifiers and staging tables, any direct manipulation of ECE_STAGE outside these procedures risks corrupting run integrity and should be avoided.