Search Results cst_margin_build_pk




Overview

The CST_MARGIN_BUILD table is a core data object within the Oracle E-Business Suite Bills of Material (BOM) module. It functions as a parameter and control table for the margin analysis load run process. This process is integral to cost management and profitability analysis, as it is responsible for loading sales order and cost data to enable detailed margin calculations. The table stores the configuration and execution parameters for each distinct margin analysis run, allowing users to define, track, and manage different analysis scenarios. Its role is to provide a persistent audit trail and definition for these critical financial analysis batches within the system.

Key Information Stored

The table's primary purpose is to store unique identifiers and parameters for each analysis run. The key columns, as indicated by the provided metadata, include the BUILD_ID, which serves as the primary surrogate key for the table. Of particular note, given the user's search context, is the BUILD_NAME column. This column is defined as a unique key (CST_MARGIN_BUILD_UK1), signifying that each margin analysis load run must have a distinct, user-defined name for identification and reporting purposes. Other critical foreign key columns store references to related transactional and master data: HEADER_ID links to sales order headers in SO_HEADERS_ALL, COST_TYPE_ID references the costing method in CST_COST_TYPES, and ORGANIZATION_ID identifies the inventory organization from MTL_PARAMETERS for which the analysis is performed.

Common Use Cases and Queries

The primary use case is the execution and review of margin analysis reports. A system process populates this table when a user initiates a new margin analysis load run, specifying a unique BUILD_NAME and other parameters. Common queries involve retrieving run history or identifying specific runs for auditing. For instance, to find all analysis runs for a specific organization using a particular cost type, one might query: SELECT build_id, build_name, creation_date FROM bom.cst_margin_build WHERE organization_id = :org_id AND cost_type_id = :cost_type_id ORDER BY creation_date DESC. Reporting use cases often join this table to the referenced foreign key tables to display meaningful names for organizations, cost types, and sales orders alongside the run parameters.

Related Objects

As documented in the metadata, CST_MARGIN_BUILD maintains defined foreign key relationships with several key EBS tables, establishing its place in the application's data model. The documented relationships are:

  • SO_HEADERS_ALL: Joined via CST_MARGIN_BUILD.HEADER_ID. This links the analysis run to a specific sales order.
  • CST_COST_TYPES: Joined via CST_MARGIN_BUILD.COST_TYPE_ID. This defines the costing method (e.g., Frozen, Average) used for the margin calculations in the run.
  • MTL_PARAMETERS: Joined via CST_MARGIN_BUILD.ORGANIZATION_ID. This identifies the inventory organization whose items and costs are being analyzed.
The table is also referenced by its primary key constraint, CST_MARGIN_BUILD_PK (on BUILD_ID), and its unique key constraint, CST_MARGIN_BUILD_UK1 (on BUILD_NAME).