CREATE TABLE cst_and_inv_onhand_gt (
    COST_ORG_ID                       NUMBER(18, 0)    NOT NULL,
    COST_BOOK_ID                      NUMBER(18, 0)    NOT NULL,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240)    NOT NULL,
    INVENTORY_ORG_ID                  NUMBER(18, 0)    NOT NULL,
    INVENTORY_ITEM_ID                 NUMBER(18, 0)    NOT NULL,
    SUBINVENTORY_CODE                 VARCHAR2(120),
    LOCATOR_ID                        NUMBER(18, 0),
    LOT_NUMBER                        VARCHAR2(320),
    SERIAL_NUMBER                     VARCHAR2(320),
    GRADE_CODE                        VARCHAR2(600),
    EXPENSE_ONHAND_FLAG               VARCHAR2(4)      NOT NULL,
    VAL_UNIT_ID                       NUMBER(18, 0),
    INV_CALC_ONHAND_QTY               NUMBER       ,
    INV_UNSENT_TXN_QTY                NUMBER       ,
    INV_UOM_CODE                      VARCHAR2(12) ,
    CST_UNPROCESSED_QTY               NUMBER       ,
    CST_UNPROCESSED_SEC_QTY           NUMBER       ,
    CST_CT_ERROR_QTY                  NUMBER       ,
    CST_CT_ERROR_SEC_QTY              NUMBER       ,
    CST_INTERFACE_ERROR_QTY           NUMBER       ,
    CST_INTERFACE_ERROR_SEC_QTY       NUMBER       ,
    CST_INTERFACE_UNPROCESSED_QTY     NUMBER       ,
    CST_INTF_UNPROC_SEC_QTY           NUMBER       ,
    CST_CT_UNCOSTED_QTY               NUMBER       ,
    UNPROCESSED_ERROR_QTY_UOM_CODE    VARCHAR2(12) ,
    SEC_UOM_CODE                      VARCHAR2(12) ,
    CST_UOM_CODE                      VARCHAR2(12) ,
    UOM_CONVERSION_FACTOR             NUMBER       ,
    INV_CALC_SEC_ONHAND_QTY           NUMBER       ,
    INV_UNSENT_TXN_SEC_QTY            NUMBER       ,
    INV_SEC_UOM_CODE                  VARCHAR2(12) ,
    COST_ORG_ID                       NUMBER(18, 0)    NOT NULL,
    COST_BOOK_ID                      NUMBER(18, 0)    NOT NULL,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240)    NOT NULL,
    INVENTORY_ORG_ID                  NUMBER(18, 0)    NOT NULL,
    INVENTORY_ITEM_ID                 NUMBER(18, 0)    NOT NULL,
    SUBINVENTORY_CODE                 VARCHAR2(120),
    LOCATOR_ID                        NUMBER(18, 0),
    LOT_NUMBER                        VARCHAR2(320),
    SERIAL_NUMBER                     VARCHAR2(320),
    GRADE_CODE                        VARCHAR2(600),
    EXPENSE_ONHAND_FLAG               VARCHAR2(4)      NOT NULL,
    VAL_UNIT_ID                       NUMBER(18, 0),
    INV_CALC_ONHAND_QTY               NUMBER       ,
    INV_UNSENT_TXN_QTY                NUMBER       ,
    INV_UOM_CODE                      VARCHAR2(12) ,
    CST_UNPROCESSED_QTY               NUMBER       ,
    CST_UNPROCESSED_SEC_QTY           NUMBER       ,
    CST_CT_ERROR_QTY                  NUMBER       ,
    CST_CT_ERROR_SEC_QTY              NUMBER       ,
    CST_INTERFACE_ERROR_QTY           NUMBER       ,
    CST_INTERFACE_ERROR_SEC_QTY       NUMBER       ,
    CST_INTERFACE_UNPROCESSED_QTY     NUMBER       ,
    CST_INTF_UNPROC_SEC_QTY           NUMBER       ,
    CST_CT_UNCOSTED_QTY               NUMBER       ,
    UNPROCESSED_ERROR_QTY_UOM_CODE    VARCHAR2(12) ,
    SEC_UOM_CODE                      VARCHAR2(12) ,
    CST_UOM_CODE                      VARCHAR2(12) ,
    UOM_CONVERSION_FACTOR             NUMBER       ,
    INV_CALC_SEC_ONHAND_QTY           NUMBER       ,
    INV_UNSENT_TXN_SEC_QTY            NUMBER       ,
    INV_SEC_UOM_CODE                  VARCHAR2(12) 
);
