Results for “mtl_fetch_agreement_lines”
18 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
MTL_FETCH_AGREEMENT_LINES is an APPS-owned database view in the Oracle E-Business Suite Inventory (INV) module. It serves as a consolidated, denormalized reporting layer that surfaces service agreement line details alongside their associated customer account ("cust_account") information. In both release 12.1.1 and 12.2.2 it carries a VALID status, indicating it is a supported, queryable object used by third-party logistics (3PL) billing and usage-based service functionality.
The view joins Oracle Contracts (OKC) agreement headers and lines, Oracle Inventory item master definitions, 3PL client parameters, counter reading data, and Oracle Receivables trading community entities (HZ_PARTIES and HZ_CUST_ACCOUNTS). Its central purpose is to expose the relationship between a customer account, the service agreement line it is billed against, the billed service item, and the most recent counter reading recorded for that line. Because the search term "cust_account" is a matching criterion, the view is particularly relevant to queries that resolve client identity from a customer account identifier.
Underlying Base Objects
Per the documented ETRM 12.2.2 metadata, MTL_FETCH_AGREEMENT_LINES is defined over the following referenced objects:
- OKC_K_HEADERS_ALL_B (SYNONYM) — contract/agreement headers, providing CONTRACT_NUMBER, CONTRACT_ID, and AUTHORING_ORG_ID.
- OKC_K_LINES_B (SYNONYM) — agreement lines, supplying line start and end dates and the CUST_ACCT_ID used as the customer account link.
- OKC_K_ITEMS (SYNONYM) — contract line items linking service items; filtered on JTOT_OBJECT1_CODE = 'OKX_USAGE'.
- MTL_SYSTEM_ITEMS_B_KFV (VIEW) — the item master key flexfield view, providing concatenated segments, inventory item ID, and primary UOM.
- MTL_CLIENT_PARAMETERS (SYNONYM) — 3PL client setup, providing CLIENT_ID, CLIENT_CODE, and CLIENT_NUMBER.
- CSI_COUNTER_READINGS (SYNONYM) — counter reading history, supplying NET_READING, VALUE_TIMESTAMP, and COUNTER_READING.
- HZ_CUST_ACCOUNTS (SYNONYM) and HZ_PARTIES (SYNONYM) — the customer account and party records that resolve CLIENT_NAME.
- INV_3PL_BILLING_COUNTER_PVT (PACKAGE) — an internal package used to compute the top counter item via GET_TOP_COUNTER_DETAILS.
The join chain links HZ_CUST_ACCOUNTS.CUST_ACCOUNT_ID to MTL_CLIENT_PARAMETERS.CLIENT_ID and OKC_K_LINES_B.CUST_ACCT_ID, tying the agreement to its customer account.
Key Columns
- CONTRACT_NUMBER / CONTRACT_ID / AUTHORING_ORG_ID — the agreement identity and its authoring organization.
- SERVICE_AGREEMENT_LINE_ID (OKI.CLE_ID) — the service agreement line identifier.
- CLIENT_ID / CLIENT_CODE / CLIENT_NUMBER / CLIENT_NAME — the 3PL client and party name resolved from the customer account.
- SERVICE_ITEM / SERVICE_ITEM_ORG_ID / INVENTORY_ITEM_ID / BILLING_UOM — the billed service item and its unit of measure.
- SERVICE_LINE_START_DATE / SERVICE_LINE_END_DATE — agreement line effective period.
- COUNTER_ITEM_ID — returned by INV_3PL_BILLING_COUNTER_PVT.GET_TOP_COUNTER_DETAILS.
- COUNTER_NET_READING / LAST_COMPUTATION_DATE / COUNTER_READING — the latest counter reading values.
Common Use Cases and Queries
Typical uses include 3PL usage billing reconciliation, service agreement line reporting, and resolving a customer account to its active service items. A representative query filtering by customer account follows:
- SELECT contract_number, service_agreement_line_id, client_name, service_item, billing_uom, counter_net_reading FROM mtl_fetch_agreement_lines WHERE client_id = :cust_account_id;
- Aggregate counter readings by client: GROUP BY client_id, contract_number to review consumption per agreement.
Note the UNION in the view text, which combines regular usage rows with additional client-driven rows, so callers should filter on the columns they require to avoid duplicates.
-
APPS.MTL_FETCH_AGREEMENT_LINES·↳ CSI_COUNTER_READINGS·↳ HZ_CUST_ACCOUNTS·↳ HZ_PARTIES·Explore INV module →
-
APPS.MTL_BILLING_RULE_LINES_V·↳ CSI_COUNTERS_VL·↳ MTL_BILLING_RULE_HEADERS_VL·↳ MTL_BILLING_RULE_LINES·Explore INV module →
-
12.2.2 FND Design Data 12.2.2
-
SYNONYM: APPS.OKC_K_ITEMS 12.2.2
-
SYNONYM: APPS.OKC_K_LINES_B 12.2.2
-
SYNONYM: APPS.HZ_PARTIES 12.2.2
-
eTRM - INV Tables and Views 12.2.2
-
12.2.2 DBA Data 12.2.2
-
eTRM - INV Tables and Views 12.2.2