Search Results header_post_insert




Overview

ARP_PROCESS_INVOICE is an Oracle Receivables internal PL/SQL package that supports the posting of invoice distributions to the General Ledger within the Oracle E-Business Suite 12.1.1 and 12.2.2 environments. The package is owned by the APPS schema and is declared with AUTHID CURRENT_USER, meaning its procedures execute under the privileges of the invoking user rather than the definer. This is significant because the package is intended to be called by other Receivables packages or by the AutoInvoice posting engine rather than directly by end users. The header comment block indicates an origin in the ARTEINVS.pls source file, confirming its role as part of the invoice posting (distribution) logic in the Receivables module.

The package focuses specifically on the posting events that occur as an invoice moves through the distribution and GL transfer stages — header-level sales representative defaulting, tax adjustments, and freight line distribution. It is a supporting package for the core AutoInvoice and posting routines rather than a user-facing API.

Key Procedures and Functions

The ETRM documentation identifies three procedures within ARP_PROCESS_INVOICE. Their documented signatures are summarized below; parameter lists are described only as documented and are not altered.

  • HEADER_POST_INSERT — Handles post-insert processing at the invoice header level. It accepts a primary sales representative identifier, a customer transaction identifier, and a flag that controls whether default sales credit is created. This procedure is responsible for establishing the header's sales credit and sales representative associations when a transaction is inserted.
  • TAX_POST_UPDATE — Performs post-update processing for tax lines on a transaction, typically invoked during the posting cycle to keep tax distributions synchronized.
  • FREIGHT_POST_UPDATE — The procedure most relevant to the search term freight_post_update. It processes freight line distributions during posting. It accepts a freight line record (ra_customer_trx_lines%rowtype), a GL date (ra_cust_trx_line_gl_dist.gl_date%type), and a code combination identifier (ra_cust_trx_line_gl_dist.code_combination_id%type), and returns a status value via an OUT parameter. The procedure is central to correctly dating and accounting for freight amounts on an invoice.

Tables Accessed

The package reads and writes several core Receivables tables through APPS synonyms:

  • RA_CUSTOMER_TRX — the invoice/transaction header; supplies the customer_trx_id and primary_salesrep_id used by HEADER_POST_INSERT.
  • RA_CUSTOMER_TRX_LINES — the transaction lines; FREIGHT_POST_UPDATE receives a rowtype from this table for the freight line being processed.
  • RA_CUST_TRX_LINE_GL_DIST — the line-level GL distribution table; provides and receives the GL date and code combination for posted distributions.
  • RA_CUST_TRX_LINE_SALESREPS — the line-level sales representative assignments affected by header sales-credit defaulting.

Usage Notes

ARP_PROCESS_INVOICE is an internal, low-level package and is not intended for direct invocation by end users or typical custom integrations. It is referenced by two other packages within the Receivables application and is normally driven by the AutoInvoice and invoice posting processes. Because of the AUTHID CURRENT_USER clause and its OUT NOCOPY status parameter, any custom code calling FREIGHT_POST_UPDATE must supply a correctly structured freight line record and expect a status value indicating success or error conditions. Developers troubleshooting freight posting, tax adjustments, or salesrep defaulting during invoice distribution should examine this package alongside its callers in the Receivables posting stack. Direct modification is not supported, as the package is Oracle proprietary and confidential.