CREATE TABLE cst_scenario_rollup_details (
    SCENARIO_ROLLUP_DETAIL_ID         NUMBER(18, 0) ,
    SCENARIO_ROLLUP_HEADER_ID         NUMBER(18, 0)     NOT NULL,
    CST_OPERATION_ID                  NUMBER(18, 0)     NOT NULL,
    RESOURCE_SEQ_NUMBER               NUMBER        ,
    RESOURCE_ID                       NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ITEM_ID        NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ORG_ID         NUMBER(18, 0) ,
    COST_ELEMENT_ID                   NUMBER(18, 0)     NOT NULL,
    EXPENSE_POOL_ID                   NUMBER(18, 0) ,
    COST_LEVEL                        VARCHAR2(120)     NOT NULL,
    OVERHEAD_RATE_ID                  NUMBER(18, 0) ,
    OVERHEAD_FLAG                     VARCHAR2(4)   ,
    COSTING_BATCH_OUTPUT_SIZE         NUMBER            NOT NULL,
    BASIS_TYPE                        VARCHAR2(120) ,
    QUANTITY_USAGE                    NUMBER            NOT NULL,
    QTY_UOM_CODE                      VARCHAR2(12)      NOT NULL,
    EXTENDED_COST                     NUMBER            NOT NULL,
    UNIT_COST                         NUMBER            NOT NULL,
    YIELD_FACTOR                      NUMBER        ,
    WD_OPERATION_ID                   NUMBER(18, 0) ,
    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),
    COST_COMPONENT_ID                 NUMBER(18, 0) ,
    COST_UOM_CODE                     VARCHAR2(12)  ,
    CUMULATIVE_UNIT_COST              NUMBER        ,
    CUMULATIVE_EXTENDED_COST          NUMBER        ,
    ALLOCATED_UNIT_COST               NUMBER        ,
    ALLOCATED_EXTENDED_COST           NUMBER        ,
    UNALLOCATED_UNIT_COST             NUMBER        ,
    UNALLOCATED_EXTENDED_COST         NUMBER        ,
    COST_ALLOCATION_PERCENTAGE        NUMBER        ,
    OPERATION_EXTENDED_COST           NUMBER        ,
    OPERATION_UNIT_COST               NUMBER        ,
    PREV_UNALLOCATED_EXTENDED_COST    NUMBER        ,
    PREV_UNALLOCATED_UNIT_COST        NUMBER        ,
    THIS_ALLOCATION_PERCENTAGE        NUMBER        ,
    OTHER_ALLOCATION_PERCENTAGE       NUMBER        ,
    THIS_ALLOCATED_EXTENDED_COST      NUMBER        ,
    THIS_ALLOCATED_UNIT_COST          NUMBER        ,
    OTHER_ALLOCATED_EXTENDED_COST     NUMBER        ,
    OTHER_ALLOCATED_UNIT_COST         NUMBER        ,
    TOTAL_ALLOCATED_EXTENDED_COST     NUMBER        ,
    TOTAL_ALLOCATED_UNIT_COST         NUMBER        ,
    SOURCE_TYPE                       VARCHAR2(120) ,
    SOURCE_ID                         NUMBER(18, 0) ,
    OUTPUT_INVENTORY_ITEM_ID          NUMBER(18, 0) ,
    OUTPUT_INVENTORY_ORG_ID           NUMBER(18, 0) ,
    RUNNING_UNIT_TOTAL                NUMBER        ,
    RUNNING_EXTENDED_TOTAL            NUMBER        ,
    OUTPUT_QUANTITY                   NUMBER        ,
    OUTPUT_BASIS_TYPE                 VARCHAR2(120) ,
    OUTPUT_UOM_CONVERSION_FACTOR      NUMBER        ,
    OUTPUT_UOM_CODE                   VARCHAR2(12)  ,
    BATCH_QUANTITY                    NUMBER        ,
    BATCH_UOM_CONVERSION_FACTOR       NUMBER        ,
    BATCH_UOM_CODE                    VARCHAR2(12)  ,
    OUTPUT_SEQ_NUMBER                 NUMBER        ,
    OPERATION_SEQ_NUMBER              NUMBER        ,
    SCENARIO_ID                       NUMBER(18, 0) ,
    CST_MSC_SOURCE_RULE_ID            NUMBER(18, 0) ,
    STD_TXFR_COST_RULE_ID             NUMBER(18, 0) ,
    TXFR_CURRENCY_CONVERSION_FLAG     VARCHAR2(4)   ,
    ROLLUP_DETAIL_SOURCE              VARCHAR2(80)  ,
    OP_YIELD_FACTOR                   NUMBER            NOT NULL,
    OP_REV_YIELD_FACTOR               NUMBER            NOT NULL,
    OP_CUM_YIELD_FACTOR               NUMBER        ,
    TRANSFER_PERCENT                  NUMBER        ,
    CUM_TRANSFER_PERCENT              NUMBER        ,
    SCENARIO_ROLLUP_DETAIL_ID         NUMBER(18, 0) ,
    SCENARIO_ROLLUP_HEADER_ID         NUMBER(18, 0)     NOT NULL,
    WD_OPERATION_ID                   NUMBER(18, 0) ,
    RESOURCE_SEQ_NUMBER               NUMBER        ,
    RESOURCE_ID                       NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ITEM_ID        NUMBER(18, 0) ,
    MATERIAL_INVENTORY_ORG_ID         NUMBER(18, 0) ,
    COST_COMPONENT_ID                 NUMBER(18, 0) ,
    EXPENSE_POOL_ID                   NUMBER(18, 0) ,
    COST_LEVEL                        VARCHAR2(120)     NOT NULL,
    OVERHEAD_FLAG                     VARCHAR2(4)   ,
    OVERHEAD_RATE_ID                  NUMBER(18, 0) ,
    COSTING_BATCH_OUTPUT_SIZE         NUMBER            NOT NULL,
    BASIS_TYPE                        VARCHAR2(120) ,
    QUANTITY_USAGE                    NUMBER            NOT NULL,
    QTY_UOM_CODE                      VARCHAR2(12)      NOT NULL,
    COST_UOM_CODE                     VARCHAR2(12)  ,
    EXTENDED_COST                     NUMBER            NOT NULL,
    UNIT_COST                         NUMBER            NOT NULL,
    YIELD_FACTOR                      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),
    COST_ELEMENT_ID                   NUMBER(18, 0)     NOT NULL,
    CST_OPERATION_ID                  NUMBER(18, 0)     NOT NULL,
    CUMULATIVE_UNIT_COST              NUMBER        ,
    CUMULATIVE_EXTENDED_COST          NUMBER        ,
    ALLOCATED_UNIT_COST               NUMBER        ,
    ALLOCATED_EXTENDED_COST           NUMBER        ,
    UNALLOCATED_UNIT_COST             NUMBER        ,
    UNALLOCATED_EXTENDED_COST         NUMBER        ,
    COST_ALLOCATION_PERCENTAGE        NUMBER        ,
    OPERATION_EXTENDED_COST           NUMBER        ,
    OPERATION_UNIT_COST               NUMBER        ,
    PREV_UNALLOCATED_EXTENDED_COST    NUMBER        ,
    PREV_UNALLOCATED_UNIT_COST        NUMBER        ,
    THIS_ALLOCATION_PERCENTAGE        NUMBER        ,
    OTHER_ALLOCATION_PERCENTAGE       NUMBER        ,
    THIS_ALLOCATED_EXTENDED_COST      NUMBER        ,
    THIS_ALLOCATED_UNIT_COST          NUMBER        ,
    OTHER_ALLOCATED_EXTENDED_COST     NUMBER        ,
    OTHER_ALLOCATED_UNIT_COST         NUMBER        ,
    TOTAL_ALLOCATED_EXTENDED_COST     NUMBER        ,
    TOTAL_ALLOCATED_UNIT_COST         NUMBER        ,
    SOURCE_TYPE                       VARCHAR2(120) ,
    SOURCE_ID                         NUMBER(18, 0) ,
    OUTPUT_INVENTORY_ITEM_ID          NUMBER(18, 0) ,
    OUTPUT_INVENTORY_ORG_ID           NUMBER(18, 0) ,
    RUNNING_UNIT_TOTAL                NUMBER        ,
    RUNNING_EXTENDED_TOTAL            NUMBER        ,
    OUTPUT_QUANTITY                   NUMBER        ,
    OUTPUT_UOM_CONVERSION_FACTOR      NUMBER        ,
    OUTPUT_UOM_CODE                   VARCHAR2(12)  ,
    BATCH_QUANTITY                    NUMBER        ,
    BATCH_UOM_CONVERSION_FACTOR       NUMBER        ,
    BATCH_UOM_CODE                    VARCHAR2(12)  ,
    OUTPUT_SEQ_NUMBER                 NUMBER        ,
    OPERATION_SEQ_NUMBER              NUMBER        ,
    SCENARIO_ID                       NUMBER(18, 0) ,
    CST_MSC_SOURCE_RULE_ID            NUMBER(18, 0) ,
    STD_TXFR_COST_RULE_ID             NUMBER(18, 0) ,
    TXFR_CURRENCY_CONVERSION_FLAG     VARCHAR2(4)   ,
    ROLLUP_DETAIL_SOURCE              VARCHAR2(80)  ,
    OP_YIELD_FACTOR                   NUMBER            NOT NULL,
    OP_REV_YIELD_FACTOR               NUMBER            NOT NULL,
    OUTPUT_BASIS_TYPE                 VARCHAR2(120) ,
    OP_CUM_YIELD_FACTOR               NUMBER        ,
    TRANSFER_PERCENT                  NUMBER        ,
    CUM_TRANSFER_PERCENT              NUMBER        ,
    CONSTRAINT pk_cst_scenario_rollup_details PRIMARY KEY (SCENARIO_ROLLUP_DETAIL_ID, SCENARIO_ROLLUP_DETAIL_ID)
);
