CREATE TABLE cst_wo_dtl_cost_variances (
    WO_DTL_COST_VARIANCE_ID        NUMBER(18, 0) ,
    WO_UPDATE_EVENT_TXN_ID         NUMBER(18, 0)     NOT NULL,
    OUTPUT_INVENTORY_ITEM_ID       NUMBER(18, 0)     NOT NULL,
    OUTPUT_INVENTORY_ORG_ID        NUMBER(18, 0)     NOT NULL,
    COST_ORGANIZATION_ID           NUMBER(18, 0)     NOT NULL,
    COST_BOOK_ID                   NUMBER(18, 0)     NOT NULL,
    COST_DATE                      TIMESTAMP(6)      NOT NULL,
    COSTING_BATCH_OUTPUT_SIZE      NUMBER        ,
    WO_COMPLETION_QTY              NUMBER        ,
    OUTPUT_UOM_CODE                VARCHAR2(12)      NOT NULL,
    TRANSACTION_TYPE               VARCHAR2(120)     NOT NULL,
    WD_OPERATION_ID                NUMBER(18, 0) ,
    OPERATION_SEQUENCE_NUM         NUMBER            NOT NULL,
    CST_WORK_ORDER_ID              NUMBER(18, 0)     NOT NULL,
    CST_WORK_ORDER_OPERATION_ID    NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ITEM_ID     NUMBER(18, 0) ,
    RESOURCE_ID                    NUMBER(18, 0) ,
    OPERATION_OUTPUT_ITEM_ID       NUMBER(18, 0) ,
    SUBSTITUTION_FLAG              VARCHAR2(4)   ,
    WO_QUANTITY                    NUMBER        ,
    BASIS_TYPE                     VARCHAR2(120) ,
    WD_SCALED_QTY                  NUMBER        ,
    UOM_CODE                       VARCHAR2(12)  ,
    COST_ELEMENT_ID                NUMBER(18, 0) ,
    EXPENSE_POOL_ID                NUMBER(18, 0) ,
    WD_UNIT_COST                   NUMBER        ,
    SCENARIO_ROLLUP_HEADER_ID      NUMBER(18, 0) ,
    SCENARIO_ROLLUP_DETAIL_ID      NUMBER(18, 0) ,
    STD_COST_ID                    NUMBER(18, 0) ,
    WO_UNIT_COST                   NUMBER        ,
    CURRENCY_CODE                  VARCHAR2(60)  ,
    VARIANCE_GROUP                 VARCHAR2(120)     NOT NULL,
    VARIANCE_TYPE                  VARCHAR2(120)     NOT NULL,
    VARIANCE_COST                  NUMBER        ,
    RESOURCE_SEQ_NUMBER            NUMBER        ,
    WD_MAKE_UNIT_COST              NUMBER        ,
    CREATED_BY                     VARCHAR2(256)     NOT NULL,
    CREATION_DATE                  TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE               TIMESTAMP(6)      NOT NULL,
    LAST_UPDATE_LOGIN              VARCHAR2(128) ,
    REQUEST_ID                     NUMBER(18, 0) ,
    JOB_DEFINITION_NAME            VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE         VARCHAR2(3600),
    SCCR_SOURCE_TYPE_CODE          VARCHAR2(20)  ,
    WO_DTL_COST_VARIANCE_ID        NUMBER(18, 0) ,
    WO_UPDATE_EVENT_TXN_ID         NUMBER(18, 0)     NOT NULL,
    OUTPUT_INVENTORY_ITEM_ID       NUMBER(18, 0)     NOT NULL,
    OUTPUT_INVENTORY_ORG_ID        NUMBER(18, 0)     NOT NULL,
    COST_ORGANIZATION_ID           NUMBER(18, 0)     NOT NULL,
    COST_BOOK_ID                   NUMBER(18, 0)     NOT NULL,
    COST_DATE                      TIMESTAMP(6)      NOT NULL,
    COSTING_BATCH_OUTPUT_SIZE      NUMBER        ,
    WO_COMPLETION_QTY              NUMBER        ,
    OUTPUT_UOM_CODE                VARCHAR2(12)      NOT NULL,
    TRANSACTION_TYPE               VARCHAR2(120)     NOT NULL,
    WD_OPERATION_ID                NUMBER(18, 0) ,
    OPERATION_SEQUENCE_NUM         NUMBER            NOT NULL,
    CST_WORK_ORDER_ID              NUMBER(18, 0)     NOT NULL,
    CST_WORK_ORDER_OPERATION_ID    NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ITEM_ID     NUMBER(18, 0) ,
    RESOURCE_ID                    NUMBER(18, 0) ,
    SUBSTITUTION_FLAG              VARCHAR2(4)   ,
    WO_QUANTITY                    NUMBER        ,
    BASIS_TYPE                     VARCHAR2(120) ,
    WD_SCALED_QTY                  NUMBER        ,
    UOM_CODE                       VARCHAR2(12)  ,
    COST_ELEMENT_ID                NUMBER(18, 0) ,
    EXPENSE_POOL_ID                NUMBER(18, 0) ,
    WD_UNIT_COST                   NUMBER        ,
    SCENARIO_ROLLUP_HEADER_ID      NUMBER(18, 0) ,
    SCENARIO_ROLLUP_DETAIL_ID      NUMBER(18, 0) ,
    STD_COST_ID                    NUMBER(18, 0) ,
    WO_UNIT_COST                   NUMBER        ,
    CURRENCY_CODE                  VARCHAR2(60)  ,
    VARIANCE_GROUP                 VARCHAR2(120)     NOT NULL,
    VARIANCE_TYPE                  VARCHAR2(120)     NOT NULL,
    VARIANCE_COST                  NUMBER        ,
    CREATED_BY                     VARCHAR2(256)     NOT NULL,
    CREATION_DATE                  TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE               TIMESTAMP(6)      NOT NULL,
    LAST_UPDATE_LOGIN              VARCHAR2(128) ,
    REQUEST_ID                     NUMBER(18, 0) ,
    JOB_DEFINITION_NAME            VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE         VARCHAR2(3600),
    OPERATION_OUTPUT_ITEM_ID       NUMBER(18, 0) ,
    RESOURCE_SEQ_NUMBER            NUMBER        ,
    WD_MAKE_UNIT_COST              NUMBER        ,
    SCCR_SOURCE_TYPE_CODE          VARCHAR2(20)  ,
    CONSTRAINT pk_cst_wo_dtl_cost_variances PRIMARY KEY (WO_DTL_COST_VARIANCE_ID, WO_DTL_COST_VARIANCE_ID)
);
