# DW_CST_GROSS_MARGIN_DETAILS_CF

This fact table contains the cost of goods sold and gross margin details at document line and accounting date level.

## Details

Module: Cost Management

## Key Columns

GROSS_MARGIN_DETAIL_ID

## Columns

Columns
Name | Datatype | Length | Precision | Not Null | Comments | Referred Table | Referred Column
--- | --- | --- | --- | --- | --- | --- | ---
GROSS_MARGIN_DETAIL_ID | NUMBER | 38 | 0 | True | Surrogate key that identifies a row in this table. |  |
SOURCE_RECORD_ID | VARCHAR2 | 256 |  |  | This column is for Oracle Internal use only. System |  |
GL_DATE | DATE |  |  |  | General Ledger date of the cost of goods sold or revenue details. | DW_DAY_D | CALENDAR_DATE
PROFIT_CENTER_BUSINESS_UNIT_ID | NUMBER | 38 | 0 |  | Identifies the Profit Center Business Unit associated to the Cost Organization. | DW_BUSINESS_UNIT_D | BUSINESS_UNIT_ID
INVENTORY_ORG_ID | NUMBER | 38 | 0 |  | Identifies the Inventory Organization associated to the details. | DW_INTERNAL_ORG_D | ORGANIZATION_ID
INVENTORY_ORG_BUSINESS_UNIT_ID | NUMBER | 38 | 0 |  | Reference to Business Unit ID of Inventory Org | DW_BUSINESS_UNIT_D | BUSINESS_UNIT_ID
ITEM_ORGANIZATION_ID | NUMBER | 38 | 0 |  | Identifies the Inventory Organization associated to the Item. | DW_INVENTORY_ITEM_D | ORGANIZATION_ID
INVENTORY_ITEM_ID | NUMBER | 38 | 0 |  | Identifies the Item associated to the details. | DW_INVENTORY_ITEM_D | INVENTORY_ITEM_ID
BILL_TO_CUSTOMER_ACCOUNT_ID | NUMBER | 38 | 0 |  | Identifies the bill to Customer account associated to the details. | DW_CUSTOMER_ACCOUNT_D | CUSTOMER_ACCOUNT_ID
BILL_TO_PARTY_ID | NUMBER | 38 | 0 |  | Identifies the bill to Customer party to the details. | DW_PARTY_D | PARTY_ID
SHIP_TO_PARTY_ID | NUMBER | 38 | 0 |  | Identifies the ship to Customer party associated to the details. | DW_PARTY_D | PARTY_ID
COST_ORG_ID | NUMBER | 38 | 0 |  | Identifies the Cost Organization associated with the Inventory Organization. | DW_CST_COST_ORG_BOOKS_D | COST_ORG_ID
COST_BOOK_ID | NUMBER | 38 | 0 |  | Identifies the Cost Book assigned to the Cost Organization. | DW_CST_COST_ORG_BOOKS_D | COST_BOOK_ID
LEGAL_ENTITY_ID | NUMBER | 38 | 0 |  | Legal entity identifier.Derived from the Cost Book | DW_LEGAL_ENTITY_D | LEGAL_ENTITY_ID
LEDGER_ID | NUMBER | 38 | 0 |  | Primary ledger id. Derived from the Cost Book | DW_LEDGER_D | LEDGER_ID
FISCAL_PERIOD_SET_NAME | VARCHAR2 | 16 |  |  | Fiscal Period Set Name. #1 | DW_FISCAL_DAY_D | FISCAL_PERIOD_SET_NAME
FISCAL_PERIOD_TYPE | VARCHAR2 | 16 |  |  | Period type. Examples are Weekly, Monthly, Quarterly. #1 | DW_FISCAL_DAY_D | FISCAL_PERIOD_TYPE
SHIPMENT_NUMBER | VARCHAR2 | 256 |  |  | Shipment number or receipt number associated to the details. |  |
SHIPMENT_TYPE_CODE | VARCHAR2 | 64 |  |  | Type of the Shipment associated to the details. | DW_ORA_CST_DOC_FLOW_TYPES_LKP_TL | ORA_CST_DOC_FLOW_TYPES_CODE
DOC_LINE_ID | NUMBER | 38 | 0 |  | Fulfillment or orchestration line identifier from the cost of goods sold or revenue details. |  |
ORDER_NUMBER | VARCHAR2 | 256 |  |  | Order number associated to the details. |  |
ORDER_TYPE_CODE | VARCHAR2 | 64 |  |  | Type of the Order. Possible values are SO/OO: Sales Order, RMA: RMA Order , TO: Transfer Order, IOT: Interorganization Transfer Order, etc. | DW_ORA_CST_DOC_FLOW_TYPES_LKP_TL | ORA_CST_DOC_FLOW_TYPES_CODE
SALES_ORDER_TYPE_CODE | VARCHAR2 | 64 |  |  | Sales order type. | DW_ORDER_TYPE_LKP_TL | ORDER_TYPE_CODE
INVOICE_NUMBER | VARCHAR2 | 32 |  |  | Invoice number associated to the details. |  |
INVOICE_ID | NUMBER | 38 | 0 |  | Identifies the Invoice associated to the details. |  |
INVOICE_LINE_ID | NUMBER | 38 | 0 |  | Identifies the Invoice line associated to the details. |  |
COGS_GL_CODE_COMBINATION_ID | NUMBER | 38 | 0 |  | General Ledger account that contains the COGS amount. | DW_GL_CODE_COMBINATION_D | CODE_COMBINATION_ID
GL_BALANCING_SEGMENT | VARCHAR2 | 32 |  |  | Balancing segment for the ledger. | DW_BALANCING_SEGMENT_D | GL_BALANCING_SEGMENT
GL_BLNC_SGMNT_VALUESET_CODE | VARCHAR2 | 64 |  |  | Balancing segment value set code. | DW_BALANCING_SEGMENT_D | GL_BLNC_SGMNT_VALUESET_CODE
COST_CENTER_SEGMENT | VARCHAR2 | 32 |  |  | Cost center segment. | DW_COST_CENTER_D | COST_CENTER_SEGMENT
COST_CENTER_VALUESET_CODE | VARCHAR2 | 64 |  |  | Cost center value set code. | DW_COST_CENTER_D | COST_CENTER_VALUESET_CODE
NATURAL_ACCOUNT_SEGMENT | VARCHAR2 | 32 |  |  | Natural account segment. | DW_NATURAL_ACCOUNT_D | NATURAL_ACCOUNT_SEGMENT
NTRL_ACNT_SGMNT_VALUESET_CODE | VARCHAR2 | 64 |  |  | Natural account value set code. | DW_NATURAL_ACCOUNT_D | NTRL_ACNT_SGMNT_VALUESET_CODE
GL_SEGMENT1 | VARCHAR2 | 32 |  |  | Accounting segment 1. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT1_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 1 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT2 | VARCHAR2 | 32 |  |  | Accounting segment 2. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT2_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 2 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT3 | VARCHAR2 | 32 |  |  | Accounting segment 3. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT3_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 3 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT4 | VARCHAR2 | 32 |  |  | Accounting segment 4. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT4_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 4 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT5 | VARCHAR2 | 32 |  |  | Accounting segment 5. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT5_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 5 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT6 | VARCHAR2 | 32 |  |  | Accounting segment 6. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT6_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 6 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT7 | VARCHAR2 | 32 |  |  | Accounting segment 7. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT7_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 7 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT8 | VARCHAR2 | 32 |  |  | Accounting segment 8. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT8_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 8 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT9 | VARCHAR2 | 32 |  |  | Accounting segment 9. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT9_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 9 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
GL_SEGMENT10 | VARCHAR2 | 32 |  |  | Accounting segment 10. | DW_GL_SEGMENT_D | GL_SEGMENT_CODE
GL_SEGMENT10_VALUESET_CODE | VARCHAR2 | 64 |  |  | Accounting segment 10 value set code. | DW_GL_SEGMENT_D | GL_SEGMENT_VALUESET_CODE
DOCUMENT_CURRENCY_CODE | VARCHAR2 | 32 |  |  | Base Currency Code of the Cost Organization. |  |
RECOGNIZED_COGS_AMOUNT | NUMBER |  |  |  | Recognized cost of goods sold amount. |  |
RECOGNIZED_GROSS_MARGIN_AMOUNT | NUMBER |  |  |  | Recognized gross margin amount. |  |
RECOGNIZED_REVENUE_AMOUNT | NUMBER |  |  |  | Recognized revenue amount. |  |
UNRECOGNIZED_REVENUE_AMOUNT | NUMBER |  |  |  | Unrecognized revenue amount. |  |
UNRECOGNIZED_COGS_AMOUNT | NUMBER |  |  |  | Unrecognized cost of goods sold amount. |  |
UNRECOGNIZED_GROSS_MARGIN_AMOUNT | NUMBER |  |  |  | Unrecognized gross margin amount. |  |
RECOGNIZED_COGS_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Recognized cost of goods sold amount as of date |  |
RECOGNIZED_GROSS_MARGIN_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Recognized gross margin amount as of date |  |
RECOGNIZED_REVENUE_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Recognized revenue amount as of date |  |
UNRECOGNIZED_REVENUE_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Unrecognized revenue amount as of date |  |
UNRECOGNIZED_COGS_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Unrecognized cost of goods sold amount as of date |  |
UNRECOGNIZED_GROSS_MARGIN_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Unrecognized gross margin amount as of date |  |
GLOBAL_CURRENCY_CODE | VARCHAR2 | 32 |  |  | Analytics currency code |  |
GLOBAL_CURRENCY_EXCH_RATE | NUMBER |  |  |  | Transaction to Global currency exchange rate |  |
GLOBAL_RECOGNIZED_COGS_AMOUNT | NUMBER |  |  |  | Global Recognized cost of goods sold amount. |  |
GLOBAL_RECOGNIZED_GROSS_MARGIN_AMOUNT | NUMBER |  |  |  | Global Recognized gross margin amount. |  |
GLOBAL_RECOGNIZED_REVENUE_AMOUNT | NUMBER |  |  |  | Global Recognized revenue amount. |  |
GLOBAL_UNRECOGNIZED_REVENUE_AMOUNT | NUMBER |  |  |  | Global Unrecognized revenue amount. |  |
GLOBAL_UNRECOGNIZED_COGS_AMOUNT | NUMBER |  |  |  | Global Unrecognized cost of goods sold amount. |  |
GLOBAL_UNRECOGNIZED_GROSS_MARGIN_AMOUNT | NUMBER |  |  |  | Global Unrecognized gross margin amount. |  |
GLOBAL_RECOGNIZED_COGS_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Recognized cost of goods sold amount as of date |  |
GLOBAL_RECOGNIZED_GROSS_MARGIN_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Recognized gross margin amount as of date |  |
GLOBAL_RECOGNIZED_REVENUE_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Recognized revenue amount as of date |  |
GLOBAL_UNRECOGNIZED_REVENUE_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Unrecognized revenue amount as of date |  |
GLOBAL_UNRECOGNIZED_COGS_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Unrecognized cost of goods sold amount as of date |  |
GLOBAL_UNRECOGNIZED_GROSS_MARGIN_AMOUNT_AS_OF_DATE | NUMBER |  |  |  | Global Unrecognized gross margin amount as of date |  |
CREATION_TIMESTAMP | TIMESTAMP |  |  |  | Who column: indicates the date and time of the creation of the row. |  |
CREATION_DATE | DATE |  |  |  | Who column: indicates the date of the creation of the row. | DW_DAY_D | CALENDAR_DATE
LAST_UPDATE_TIMESTAMP | TIMESTAMP |  |  |  | Who column: indicates the date and time of the last update of the row. |  |
LAST_UPDATE_DATE | DATE |  |  |  | Who column: indicates the date and time of the last update of the row. | DW_DAY_D | CALENDAR_DATE

## Notes

#1 In these cases to join with DW_FISCAL_DAY_D apart from FISCAL_PERIOD_TYPE and FISCAL_PERIOD_SET_NAME the relationship should be based on GL_DATE column

Copyright © 2019, 2025, Oracle and/or its affiliates.