CREATE TABLE cmr_transactions (
    TRANSACTION_ID                    NUMBER(18, 0) ,
    LCM_PROCESSED_FLAG                VARCHAR2(4)   ,
    CMR_PO_DISTRIBUTION_ID            NUMBER(18, 0) ,
    CMR_RCV_TRANSACTION_ID            NUMBER(18, 0) ,
    TRADE_EVENT_ID                    NUMBER(18, 0) ,
    PARENT_TRANSACTION_ID             NUMBER(18, 0)     NOT NULL,
    RCV_PARENT_TRANSACTION_ID         NUMBER(18, 0) ,
    CMR_ROOT_RECEIVE_TXN_ID           NUMBER(18, 0) ,
    RETURN_FOR_CREDIT_FLAG            VARCHAR2(4)   ,
    CMR_ROOT_DELIVER_TXN_ID           NUMBER(18, 0) ,
    TRANSACTION_TYPE                  VARCHAR2(160)     NOT NULL,
    TRANSACTION_DATE                  DATE              NOT NULL,
    SOURCE_DOC_QTY                    NUMBER        ,
    SOURCE_DOC_UOM_CODE               VARCHAR2(12)  ,
    TRANSACTION_AMT                   NUMBER        ,
    BILL_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    PROFIT_CENTER_BUSINESS_UNIT_ID    NUMBER(18, 0) ,
    SHIP_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    SHIP_TO_ORGANIZATION_ID           NUMBER(18, 0)     NOT NULL,
    INVENTORY_ITEM_ID                 NUMBER(18, 0) ,
    SOLD_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    POSTED_FLAG                       VARCHAR2(20)  ,
    ERROR_CODE                        VARCHAR2(120) ,
    SOURCE_DOCUMENT_CODE              VARCHAR2(100) ,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240) ,
    CMR_PO_LINE_LOCATION_ID           NUMBER(18, 0) ,
    PO_LINE_LOCATION_ID               NUMBER(18, 0) ,
    PO_DISTRIBUTION_ID                NUMBER(18, 0) ,
    FISCAL_DOC_ACCESS_KNUM            VARCHAR2(256) ,
    FISCAL_DOC_HEADER_ID              NUMBER(18, 0) ,
    FISCAL_DOC_LINE_ID                NUMBER(18, 0) ,
    FISCAL_DOC_SCHEDULE_ID            NUMBER(18, 0) ,
    REF_FISCAL_DOC_ACCESS_KNUM        VARCHAR2(256) ,
    REF_FISCAL_DOC_HEADER_ID          NUMBER(18, 0) ,
    REF_FISCAL_DOC_LINE_ID            NUMBER(18, 0) ,
    REF_FISCAL_DOC_SCHEDULE_ID        NUMBER(18, 0) ,
    INV_SHIPPING_TRANSACTION_ID       NUMBER(18, 0) ,
    PRIOR_TRADE_INV_ORG_ID            NUMBER(18, 0) ,
    SHIP_FROM_INV_ORG_ID              NUMBER(18, 0) ,
    ROOT_RECEIVE_TXN_ID               NUMBER(18, 0) ,
    RCV_TRANSACTION_ID                NUMBER(18, 0) ,
    SHIP_FROM_LOCATION_ID             NUMBER(18, 0) ,
    TRANSACTION_QTY                   NUMBER        ,
    TRANSACTION_UOM_CODE              VARCHAR2(12)  ,
    PRIMARY_QTY                       NUMBER        ,
    PRIMARY_UOM_CODE                  VARCHAR2(12)  ,
    SECONDARY_TRANSACTION_QTY         NUMBER        ,
    SECONDARY_UOM_CODE                VARCHAR2(12)  ,
    TRANSFER_PRICE_QTY                NUMBER        ,
    TRANSFER_PRICE_UOM_CODE           VARCHAR2(12)  ,
    CURRENCY_CONVERSION_RATE          NUMBER        ,
    CURRENCY_CONVERSION_DATE          TIMESTAMP(6)  ,
    CURRENCY_CONVERSION_TYPE          VARCHAR2(120) ,
    RECEIPT_NUMBER                    VARCHAR2(200) ,
    RECEIPT_LINE_NUMBER               NUMBER(18, 0) ,
    SHIPMENT_NUMBER                   VARCHAR2(120) ,
    SHIPMENT_LINE_NUMBER              NUMBER(18, 0) ,
    DESTINATION_TYPE_CODE             VARCHAR2(100) ,
    PO_UNIT_PRICE                     NUMBER        ,
    NONRECOVERABLE_TAX                NUMBER        ,
    XCC_NET_LIQUIDATION_QTY           NUMBER        ,
    XCC_NET_LIQUIDATION_AMOUNT        NUMBER        ,
    LIQUIDATED_QTY                    NUMBER        ,
    LIQUIDATED_AMOUNT                 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),
    DEFAULT_TAXATION_COUNTRY          VARCHAR2(8)   ,
    FIRST_PTY_REG_ID                  NUMBER(18, 0) ,
    THIRD_PTY_REG_ID                  NUMBER(18, 0) ,
    FINAL_DISCHARGE_LOCATION_ID       NUMBER(18, 0) ,
    DOCUMENT_FISCAL_CLASSIFICATION    VARCHAR2(960) ,
    TRX_BUSINESS_CATEGORY             VARCHAR2(960) ,
    USER_DEFINED_FISC_CLASS           VARCHAR2(120) ,
    TAX_INVOICE_NUMBER                VARCHAR2(600) ,
    TAX_INVOICE_DATE                  DATE          ,
    PRODUCT_FISC_CLASS_ID             NUMBER(18, 0) ,
    PRODUCT_CATEGORY                  VARCHAR2(960) ,
    INTENDED_USE_CLASSIF_ID           NUMBER(18, 0) ,
    INTENDED_USE                      VARCHAR2(960) ,
    COUNTRY_OF_ORIGIN_CODE            VARCHAR2(8)   ,
    PRODUCT_TYPE                      VARCHAR2(960) ,
    ASSESSABLE_VALUE                  NUMBER        ,
    TAX_CLASSIFICATION_CODE           VARCHAR2(200) ,
    FTR_ID                            NUMBER(18, 0) ,
    TXN_FLOW_HEADER_ID                NUMBER(18, 0) ,
    TAX_PROCESSED_FLAG                VARCHAR2(4)   ,
    CONSIGNED_FLAG                    VARCHAR2(4)   ,
    ROOT_RECEIPT_EVENT_DATE           TIMESTAMP(6)  ,
    TRANSFER_ORDER_DIST_ID            NUMBER(18, 0) ,
    TRANSFER_ORDER_HEADER_ID          NUMBER(18, 0) ,
    TRANSFER_ORDER_LINE_ID            NUMBER(18, 0) ,
    PHYSICAL_RETURN_REQD_FLAG         VARCHAR2(4)   ,
    RECEIPT_CREATION_DATE             DATE          ,
    BUDGETARY_CONTROL_FLAG            VARCHAR2(4)   ,
    ENCUMBRANCE_ACCOUNTING_FLAG       VARCHAR2(4)   ,
    CST_INV_TRANSACTION_ID            NUMBER(18, 0) ,
    MANUAL_RECEIPT_REQD_FLAG          VARCHAR2(4)   ,
    LE_TIMEZONE_CODE                  VARCHAR2(200) ,
    OWNERSHIP_CHANGE_EVENT_NUMBER     VARCHAR2(120) ,
    TRANSFER_TO_OWNED_TXN_ID          NUMBER(18, 0) ,
    ROOT_DELIVER_TXN_DATE             DATE          ,
    PROJECT_FLAG                      VARCHAR2(4)   ,
    DS_RECEIPT_SOURCE_LINE_ID         NUMBER(18, 0) ,
    LOT_NUMBER                        VARCHAR2(320) ,
    SERIAL_NUMBER                     VARCHAR2(320) ,
    DIRECT_TRANSFER_ORDER_FLAG        VARCHAR2(4)   ,
    TRANSACTION_ID                    NUMBER(18, 0) ,
    CMR_PO_DISTRIBUTION_ID            NUMBER(18, 0) ,
    CMR_RCV_TRANSACTION_ID            NUMBER(18, 0) ,
    PARENT_TRANSACTION_ID             NUMBER(18, 0)     NOT NULL,
    CMR_ROOT_RECEIVE_TXN_ID           NUMBER(18, 0) ,
    CMR_ROOT_DELIVER_TXN_ID           NUMBER(18, 0) ,
    PO_LINE_LOCATION_ID               NUMBER(18, 0) ,
    TRANSACTION_TYPE                  VARCHAR2(160)     NOT NULL,
    TRANSACTION_DATE                  DATE              NOT NULL,
    SOURCE_DOC_QTY                    NUMBER        ,
    TRANSACTION_AMT                   NUMBER        ,
    INVENTORY_ITEM_ID                 NUMBER(18, 0) ,
    SOLD_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    SHIP_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    SHIP_TO_ORGANIZATION_ID           NUMBER(18, 0)     NOT NULL,
    TXN_FLOW_HEADER_ID                NUMBER(18, 0) ,
    POSTED_FLAG                       VARCHAR2(20)  ,
    SOURCE_DOC_UOM_CODE               VARCHAR2(12)  ,
    TRANSACTION_QTY                   NUMBER        ,
    TRANSACTION_UOM_CODE              VARCHAR2(12)  ,
    PRIMARY_QTY                       NUMBER        ,
    PRIMARY_UOM_CODE                  VARCHAR2(12)  ,
    CURRENCY_CONVERSION_RATE          NUMBER        ,
    CURRENCY_CONVERSION_DATE          TIMESTAMP(6)  ,
    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),
    RECEIPT_NUMBER                    VARCHAR2(200) ,
    PO_UNIT_PRICE                     NUMBER        ,
    NONRECOVERABLE_TAX                NUMBER        ,
    ROOT_RECEIPT_EVENT_DATE           TIMESTAMP(6)  ,
    TRADE_EVENT_ID                    NUMBER(18, 0) ,
    BILL_TO_BUSINESS_UNIT_ID          NUMBER(18, 0) ,
    PROFIT_CENTER_BUSINESS_UNIT_ID    NUMBER(18, 0) ,
    ERROR_CODE                        VARCHAR2(120) ,
    SOURCE_DOCUMENT_CODE              VARCHAR2(100) ,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240) ,
    CMR_PO_LINE_LOCATION_ID           NUMBER(18, 0) ,
    PO_DISTRIBUTION_ID                NUMBER(18, 0) ,
    PRIOR_TRADE_INV_ORG_ID            NUMBER(18, 0) ,
    SHIP_FROM_INV_ORG_ID              NUMBER(18, 0) ,
    INV_SHIPPING_TRANSACTION_ID       NUMBER(18, 0) ,
    ROOT_RECEIVE_TXN_ID               NUMBER(18, 0) ,
    RCV_TRANSACTION_ID                NUMBER(18, 0) ,
    SHIP_FROM_LOCATION_ID             NUMBER(18, 0) ,
    SHIPMENT_NUMBER                   VARCHAR2(120) ,
    SHIPMENT_LINE_NUMBER              NUMBER(18, 0) ,
    DESTINATION_TYPE_CODE             VARCHAR2(100) ,
    DEFAULT_TAXATION_COUNTRY          VARCHAR2(8)   ,
    FIRST_PTY_REG_ID                  NUMBER(18, 0) ,
    THIRD_PTY_REG_ID                  NUMBER(18, 0) ,
    FINAL_DISCHARGE_LOCATION_ID       NUMBER(18, 0) ,
    DOCUMENT_FISCAL_CLASSIFICATION    VARCHAR2(960) ,
    TRX_BUSINESS_CATEGORY             VARCHAR2(960) ,
    USER_DEFINED_FISC_CLASS           VARCHAR2(120) ,
    TAX_INVOICE_NUMBER                VARCHAR2(600) ,
    TAX_INVOICE_DATE                  DATE          ,
    PRODUCT_FISC_CLASS_ID             NUMBER(18, 0) ,
    PRODUCT_CATEGORY                  VARCHAR2(960) ,
    INTENDED_USE_CLASSIF_ID           NUMBER(18, 0) ,
    PRODUCT_TYPE                      VARCHAR2(960) ,
    ASSESSABLE_VALUE                  NUMBER        ,
    TAX_CLASSIFICATION_CODE           VARCHAR2(200) ,
    FTR_ID                            NUMBER(18, 0) ,
    TAX_PROCESSED_FLAG                VARCHAR2(4)   ,
    CONSIGNED_FLAG                    VARCHAR2(4)   ,
    RECEIPT_CREATION_DATE             DATE          ,
    LCM_PROCESSED_FLAG                VARCHAR2(4)   ,
    CURRENCY_CONVERSION_TYPE          VARCHAR2(120) ,
    XCC_NET_LIQUIDATION_QTY           NUMBER        ,
    XCC_NET_LIQUIDATION_AMOUNT        NUMBER        ,
    TRANSFER_ORDER_DIST_ID            NUMBER(18, 0) ,
    TRANSFER_ORDER_HEADER_ID          NUMBER(18, 0) ,
    TRANSFER_ORDER_LINE_ID            NUMBER(18, 0) ,
    PHYSICAL_RETURN_REQD_FLAG         VARCHAR2(4)   ,
    RCV_PARENT_TRANSACTION_ID         NUMBER(18, 0) ,
    LIQUIDATED_QTY                    NUMBER        ,
    LIQUIDATED_AMOUNT                 NUMBER        ,
    FISCAL_DOC_ACCESS_KNUM            VARCHAR2(256) ,
    FISCAL_DOC_HEADER_ID              NUMBER(18, 0) ,
    FISCAL_DOC_LINE_ID                NUMBER(18, 0) ,
    FISCAL_DOC_SCHEDULE_ID            NUMBER(18, 0) ,
    REF_FISCAL_DOC_ACCESS_KNUM        VARCHAR2(256) ,
    REF_FISCAL_DOC_HEADER_ID          NUMBER(18, 0) ,
    REF_FISCAL_DOC_LINE_ID            NUMBER(18, 0) ,
    REF_FISCAL_DOC_SCHEDULE_ID        NUMBER(18, 0) ,
    RECEIPT_LINE_NUMBER               NUMBER(18, 0) ,
    BUDGETARY_CONTROL_FLAG            VARCHAR2(4)   ,
    ENCUMBRANCE_ACCOUNTING_FLAG       VARCHAR2(4)   ,
    CST_INV_TRANSACTION_ID            NUMBER(18, 0) ,
    MANUAL_RECEIPT_REQD_FLAG          VARCHAR2(4)   ,
    LE_TIMEZONE_CODE                  VARCHAR2(200) ,
    OWNERSHIP_CHANGE_EVENT_NUMBER     VARCHAR2(120) ,
    INTENDED_USE                      VARCHAR2(960) ,
    COUNTRY_OF_ORIGIN_CODE            VARCHAR2(8)   ,
    TRANSFER_TO_OWNED_TXN_ID          NUMBER(18, 0) ,
    ROOT_DELIVER_TXN_DATE             DATE          ,
    PROJECT_FLAG                      VARCHAR2(4)   ,
    SECONDARY_TRANSACTION_QTY         NUMBER        ,
    SECONDARY_UOM_CODE                VARCHAR2(12)  ,
    TRANSFER_PRICE_QTY                NUMBER        ,
    TRANSFER_PRICE_UOM_CODE           VARCHAR2(12)  ,
    DS_RECEIPT_SOURCE_LINE_ID         NUMBER(18, 0) ,
    LOT_NUMBER                        VARCHAR2(320) ,
    SERIAL_NUMBER                     VARCHAR2(320) ,
    DIRECT_TRANSFER_ORDER_FLAG        VARCHAR2(4)   ,
    RETURN_FOR_CREDIT_FLAG            VARCHAR2(4)   ,
    CONSTRAINT pk_cmr_transactions PRIMARY KEY (TRANSACTION_ID, TRANSACTION_ID)
);
