CREATE TABLE cst_ap_invoice_dtls_s_gt (
    CMR_AP_INVOICE_DISTRIBUTION_ID    NUMBER(18, 0)    NOT NULL,
    INVOICE_ID                        NUMBER(18, 0)    NOT NULL,
    INVOICE_LINE_NUMBER               VARCHAR2(160),
    INVOICE_AMT                       NUMBER       ,
    INVOICE_BASE_AMOUNT               NUMBER       ,
    INVOICE_TYPE                      VARCHAR2(100),
    INVOICE_QTY                       NUMBER       ,
    UNIT_OF_MEASURE                   VARCHAR2(100),
    INVOICE_QTY_IN_PO_UOM             NUMBER       ,
    DISTRIBUTION_MATCH_TYPE           VARCHAR2(100),
    INVOICE_DISTRIBUTION_TYPE         VARCHAR2(100),
    CMR_PO_DISTRIBUTION_ID            NUMBER(18, 0),
    CMR_RCV_TRANSACTION_ID            NUMBER(18, 0),
    FINAL_MATCH_FLAG                  VARCHAR2(4)  ,
    ACCOUNTING_DATE                   TIMESTAMP(6) ,
    CORRECTED_INVOICE_DIST_ID         NUMBER(18, 0),
    RELATED_DISTRIBUTION_ID           NUMBER(18, 0),
    CURRENCY_CODE                     VARCHAR2(60) ,
    INVOICING_BU_FUNC_CURR_CODE       VARCHAR2(60) ,
    CURRENCY_CONVERSION_TYPE          VARCHAR2(120),
    CURRENCY_CONVERSION_DATE          TIMESTAMP(6) ,
    CURRENCY_CONVERSION_RATE          NUMBER       ,
    REVERSAL_FLAG                     VARCHAR2(4)  ,
    PARENT_REVERSAL_ID                NUMBER(18, 0),
    ADJUSTMENT_DATE                   TIMESTAMP(6) ,
    PROCESSED_BY_CA_FLAG              VARCHAR2(4)  ,
    PO_LINE_LOCATION_ID               NUMBER(18, 0),
    ROW_UPDATED_FLAG                  VARCHAR2(4)  ,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240),
    CONSUMPTION_ADVICE_LINE_ID        NUMBER(18, 0),
    INVOICE_QTY_IN_PRIMARY_UOM        NUMBER       ,
    CMR_AP_INVOICE_DISTRIBUTION_ID    NUMBER(18, 0)    NOT NULL,
    INVOICE_ID                        NUMBER(18, 0)    NOT NULL,
    INVOICE_LINE_NUMBER               VARCHAR2(160),
    INVOICE_AMT                       NUMBER       ,
    INVOICE_BASE_AMOUNT               NUMBER       ,
    INVOICE_TYPE                      VARCHAR2(100),
    INVOICE_QTY                       NUMBER       ,
    UNIT_OF_MEASURE                   VARCHAR2(100),
    INVOICE_QTY_IN_PO_UOM             NUMBER       ,
    DISTRIBUTION_MATCH_TYPE           VARCHAR2(100),
    INVOICE_DISTRIBUTION_TYPE         VARCHAR2(100),
    CMR_PO_DISTRIBUTION_ID            NUMBER(18, 0),
    CMR_RCV_TRANSACTION_ID            NUMBER(18, 0),
    FINAL_MATCH_FLAG                  VARCHAR2(4)  ,
    ACCOUNTING_DATE                   TIMESTAMP(6) ,
    CORRECTED_INVOICE_DIST_ID         NUMBER(18, 0),
    RELATED_DISTRIBUTION_ID           NUMBER(18, 0),
    CURRENCY_CODE                     VARCHAR2(60) ,
    INVOICING_BU_FUNC_CURR_CODE       VARCHAR2(60) ,
    CURRENCY_CONVERSION_TYPE          VARCHAR2(120),
    CURRENCY_CONVERSION_DATE          TIMESTAMP(6) ,
    CURRENCY_CONVERSION_RATE          NUMBER       ,
    REVERSAL_FLAG                     VARCHAR2(4)  ,
    PARENT_REVERSAL_ID                NUMBER(18, 0),
    ADJUSTMENT_DATE                   TIMESTAMP(6) ,
    PROCESSED_BY_CA_FLAG              VARCHAR2(4)  ,
    PO_LINE_LOCATION_ID               NUMBER(18, 0),
    ROW_UPDATED_FLAG                  VARCHAR2(4)  ,
    EXTERNAL_SYSTEM_REFERENCE         VARCHAR2(240),
    CONSUMPTION_ADVICE_LINE_ID        NUMBER(18, 0),
    INVOICE_QTY_IN_PRIMARY_UOM        NUMBER       
);
