Search Results get_header_defaults




Overview

ARP_TRX_DEFAULTS is a public PL/SQL package body in the Oracle Receivables (AR) module of Oracle E-Business Suite. Its principal business function is to resolve and return the header-level default values that govern the creation of an accounts receivable transaction — an invoice, debit memo, credit memo, chargeback, or deposit. When a user opens the Transaction workbench or when any interface program constructs a new transaction, the application must derive a coherent set of defaults (batch source, transaction type, payment terms, GL date, freight and tax flags, creation sign, over-application rules, and so on) from a combination of user input, customer records, system parameters, and profile options. ARP_TRX_DEFAULTS encapsulates that derivation logic so that the same rules are applied consistently regardless of the entry point. The package header declares private package-level variables that cache the base currency code, base precision, minimum accountable unit, and set of books identifier, avoiding repeated lookups against GL_SETS_OF_BOOKS, FND_CURRENCIES, and AR_SYSTEM_PARAMETERS during a session. The package is documented with a single public procedure and is referenced by one other package in the ETRM repository.

Key Procedures and Functions

  • GET_HEADER_DEFAULTS — The sole documented procedure in the package. It returns the header-level default values for a transaction. The procedure accepts a large set of IN arguments that supply context for defaulting, including the batch source identifiers at batch, batch-source, and profile levels; the customer transaction, customer transaction type, payment term, and commercial default transaction type identifiers; the transaction class; the transaction date and number; the row identifier; the invoicing rule and revenue recognition run flag; completion, open receivables, and security flags; and the customer, site use, GL date, previous GL date, commit GL date, and batch GL date. Its OUT arguments return the resolved defaults, including the default batch source identifier and name, the automatic transaction numbering flag, batch source type, copy document number flag, default customer transaction type identifier and name, class, open receivable flag, post-to-GL flag, allow freight flag, creation sign, allow overapplication flag, natural application only flag, and tax calculation flag. A debug hook to ARP_UTIL.DEBUG is listed among the external procedures accessed. The procedure is scope PUBLIC and is the canonical entry point for header defaulting in the transaction flow.

Tables Accessed

The package reads reference and setup data from the following tables through APPS synonyms:

  • RA_BATCH_SOURCES — supplies batch source attributes that drive transaction numbering, class defaults, and source type.
  • RA_CUST_TRX_TYPES — provides transaction type definitions, including class, creation sign, freight, tax, and over-application attributes.
  • RA_CUSTOMER_TRX — the header table, consulted to derive values from any existing or referenced transaction row.
  • RA_TERMS — supplies payment term defaults associated with the customer, site, or transaction type.
  • RA_RULES — provides invoicing and accounting rule defaults relevant to revenue scheduling.
  • HZ_CUST_ACCOUNTS and HZ_CUST_SITE_USES — TCA customer and site-use records that determine customer/site level defaults and security checks.
  • RA_CUST_TRX_LINE_GL_DIST — the distribution table, accessed in the context of GL date and posting defaults.
  • AR_SYSTEM_PARAMETERS — the set of books identifier and other system-wide receivables settings.
  • FND_CURRENCIES and GL_SETS_OF_BOOKS — base currency code, precision, and minimum accountable unit used for currency validation and rounding.

Usage Notes

ARP_TRX_DEFAULTS is invoked primarily from the Oracle Receivables Transaction workbench (the ARXTWMAI family of forms) immediately after a user selects or enters a transaction type, batch source, or customer, so that the header block can be populated with the correct defaults. It is also called from AutoInvoice and other transaction interface paths where a transaction must be programmatically initialized with the same defaults a user would receive interactively. Because the procedure is declared PUBLIC, custom extensions and third-party integrations may call it directly, but callers must supply the full IN argument list and be prepared for the procedure to raise exceptions on invalid combinations of batch source, transaction type, and customer. The package-level currency and set-of-books variables are initialized once per session and reused, so it is not suited to multi-org or multi-currency processing within a single session without reinitialization. Customers and implementers should generally prefer the supported Transaction API (AR_INVOICE_API_PUB) over direct calls to ARP_TRX_DEFAULTS, reserving direct invocation for cases where the header defaults are needed in isolation.