Search Results oks_btn_pr




Overview

OKS_BTN_PR is a Service Contracts (OKS) transactional table that stores the Accounts Receivable (AR) transaction — invoice, credit memo, debit memo, or similar — that is eventually received against a service contract billing line. It functions as a staging and reconciliation anchor within the OKS billing-to-AR pipeline: when a service contract line is billed, OKS records the AR transaction reference in this table so that downstream processes can correlate contract billing history with the actual AR receivable document.

The table is owned by the OKS schema and holds 13 documented columns. Its primary key is OKS_BTN_PR_PK on the ID column, with a supporting unique index OKS_BTN_PR_U1 also on ID. It carries a single documented foreign key to FND_SECURITY_GROUPS via SECURITY_GROUP_ID, which enforces multi-tenant/Multi-Org security partitioning. Two child tables — OKS_BCL_PR and OKS_BTL_PR — reference OKS_BTN_PR through their BTN_ID columns, forming a hierarchical chain from the billing transaction down to contract and line level details.

Based on the foreign key topology mined from the metadata, this table exhibits a hub-leaning classification in Data Vault modeling terms. That is, OKS_BTN_PR behaves primarily as a business-key holder that other tables (OKS_BCL_PR, OKS_BTL_PR) attach to, though it also carries descriptive attributes (amounts, dates, currency) that would conventionally be modeled as satellite data.

Key Information Stored

The columns below represent the most operationally significant attributes from the documented 13-column schema:

  • ID — Surrogate primary key (OKS_BTN_PR_PK), the internal unique identifier referenced by child tables via BTN_ID.
  • TRX_NUMBER — The AR transaction number; the primary business-key candidate used to locate an invoice or credit memo.
  • TRX_DATE — The accounting/transaction date of the AR document, used for period-based reconciliation.
  • TRX_AMOUNT — The monetary value of the AR transaction.
  • TRX_CLASS — The AR transaction class (invoice, credit memo, debit memo), distinguishing document types.
  • CURRENCY_CODE — The currency in which TRX_AMOUNT is expressed.
  • OBJECT_VERSION_NUMBER — Optimistic locking column for concurrent update control.
  • CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — Standard EBS WHO columns for audit and change tracking.
  • SECURITY_GROUP_ID — Multi-tenant security partition key referencing FND_SECURITY_GROUPS.

The surrogate key ID should be distinguished from TRX_NUMBER, which is the natural business identifier. The unique index OKS_BTN_PR_U1 on ID confirms the surrogate key constraint; TRX_NUMBER, while business-meaningful, is not documented as uniquely indexed.

Common Use Cases and Queries

Typical scenarios include reconciling service contract billing lines against AR receivables, tracing which invoice settled a contract line, and reporting billed-versus-collected amounts by currency and period.

A representative query joins the child billing tables to retrieve AR transaction details for a contract line:

  • SELECT b.TRX_NUMBER, b.TRX_DATE, b.TRX_AMOUNT, b.TRX_CLASS, b.CURRENCY_CODE FROM OKS.OKS_BTN_PR b WHERE b.TRX_NUMBER = :trx_number;
  • SELECT l.BTN_ID, b.TRX_NUMBER, b.TRX_AMOUNT FROM OKS.OKS_BTL_PR l JOIN OKS.OKS_BTN_PR b ON l.BTN_ID = b.ID WHERE l.BNT_ID = :contract_line_id;
  • Currency-summary reporting: SELECT CURRENCY_CODE, SUM(TRX_AMOUNT) FROM OKS.OKS_BTN_PR GROUP BY CURRENCY_CODE;
  • Audit trail by WHO columns using CREATION_DATE ranges to identify recently integrated AR transactions.

Because the table is a reconciliation point, reporting extracts frequently filter on TRX_CLASS to separate invoices from credits, and join back to OKS_BCL_PR for contract-level context.

Related Objects

  • OKS_BCL_PR — Child table referencing OKS_BTN_PR.BTN_ID; links the AR transaction to contract-level billing detail.
  • OKS_BTL_PR — Child table referencing OKS_BTN_PR.BTN_ID; links the AR transaction to the billing transaction line.
  • FND_SECURITY_GROUPS — Referenced via SECURITY_GROUP_ID for multi-tenant security.
  • OKS_BTN_PR_PK / OKS_BTN_PR_U1 — Primary key constraint and unique index on ID.

The dependency chain OKS_BTN_PR → OKS_BCL_PR and OKS_BTL_PR should be respected in extension work: any custom reporting must join through BTN_ID to reach contract and line granularity, and inserts must supply a valid ID and SECURITY_GROUP_ID to satisfy the documented constraints.