CREATE TABLE cjm_document_programs_gt (
    DOCUMENT_PROGRAM_ID              NUMBER       ,
    PROGRAM_HEADER_ID                NUMBER(18, 0),
    PROGRAM_LINE_ID                  NUMBER(18, 0),
    DOCUMENT_BATCH_ID                NUMBER(18, 0),
    DOCUMENT_HEADER_ID               NUMBER(18, 0),
    DOCUMENT_LINE_ID                 NUMBER(18, 0),
    REQUEST_ID                       NUMBER(18, 0),
    BU_ID                            NUMBER(18, 0)    NOT NULL,
    PARTY_ID                         NUMBER(18, 0),
    VENDOR_ID                        NUMBER(18, 0),
    VENDOR_SITE_ID                   NUMBER(18, 0),
    CUST_ACCOUNT_ID                  NUMBER(18, 0),
    TRX_BILL_TO_SITE_USE_ID          NUMBER(18, 0),
    BILL_TO_CUST_ACCOUNT_ID          NUMBER(18, 0),
    BILL_TO_SITE_USE_ID              NUMBER(18, 0),
    SHIP_TO_PARTY_SITE_ID            NUMBER(18, 0),
    ITEM_ID                          NUMBER(18, 0),
    CATEGORY_ID                      NUMBER(18, 0),
    TRANSACTION_CURR_CODE            VARCHAR2(60) ,
    TRANSACTION_CURR_AMOUNT          NUMBER       ,
    TRANSACTION_DATE                 DATE         ,
    PERIOD_NAME                      VARCHAR2(60) ,
    YEAR_ID                          NUMBER(18, 0),
    DISCOUNT_TYPE                    VARCHAR2(120),
    TIER_TYPE_CODE                   VARCHAR2(120),
    PROGRAM_LINE_UOM_CODE            VARCHAR2(12) ,
    ACCRUAL_QTY                      NUMBER       ,
    ACCRUAL_UOM                      VARCHAR2(12) ,
    SEEDED_PROGRAM_TYPE_CODE         VARCHAR2(120),
    DISTRIBUTOR_ID                   NUMBER(18, 0),
    BILL_TO_LOCATION_ID              NUMBER(18, 0),
    SHIP_TO_LOCATION_ID              NUMBER(18, 0),
    TIER_HEADER_ID                   NUMBER(18, 0),
    CALCULATION_METHOD_CODE          VARCHAR2(120),
    INCLUDE_VOL_EXCLUDE_DIS_FLAG     VARCHAR2(4)  ,
    TOTAL_AMOUNT                     NUMBER       ,
    ROW_NUM                          NUMBER       ,
    CURRENT_VOLUME                   NUMBER       ,
    EXISTING_VOLUME                  NUMBER       ,
    CUMULATIVE_VOLUME                NUMBER       ,
    FUNCTIONAL_CURRENCY              VARCHAR2(12) ,
    EXCHANGE_RATE_TYPE               VARCHAR2(120),
    PROGRAM_TIER_LINE_ID             NUMBER(18, 0),
    CURRENT_TIER_LINE_NUMBER         NUMBER       ,
    CURRENT_DISCOUNT                 NUMBER       ,
    PRE_QUALIFYING_TIER_LINE_NUM     NUMBER       ,
    PRE_QUALIFYING_TIER_FLAG         VARCHAR2(4)  ,
    PRE_QUALIFYING_TIER_DISCOUNT     NUMBER       ,
    PRE_QUALIFYING_TIER_MAX_VALUE    NUMBER       ,
    MAXIMUM_TIER_VALUE               NUMBER       ,
    MAXIMUM_TIER_DISCOUNT            NUMBER       ,
    MAXIMUM_TIER_LINE_NUMBER         NUMBER       ,
    VOLUME_EXCEEDED_FLAG             VARCHAR2(4)  ,
    INVOICE_NUMBER                   VARCHAR2(200),
    INVOICE_LINE_NUMBER              NUMBER       ,
    PO_NUMBER                        VARCHAR2(120),
    SALES_AMOUNT                     NUMBER       ,
    TRANSACTION_QTY                  NUMBER       ,
    TOTAL_SALES_AMOUNT               NUMBER       ,
    TRANSACTION_UNIT_PRICE           NUMBER       ,
    INVENTORY_ORGANIZATION_ID        NUMBER(18, 0),
    DOCUMENT_PROGRAM_ID              NUMBER       ,
    PROGRAM_HEADER_ID                NUMBER(18, 0),
    PROGRAM_LINE_ID                  NUMBER(18, 0),
    DOCUMENT_BATCH_ID                NUMBER(18, 0),
    DOCUMENT_HEADER_ID               NUMBER(18, 0),
    DOCUMENT_LINE_ID                 NUMBER(18, 0),
    REQUEST_ID                       NUMBER(18, 0),
    BU_ID                            NUMBER(18, 0)    NOT NULL,
    PARTY_ID                         NUMBER(18, 0),
    VENDOR_ID                        NUMBER(18, 0),
    VENDOR_SITE_ID                   NUMBER(18, 0),
    CUST_ACCOUNT_ID                  NUMBER(18, 0),
    TRX_BILL_TO_SITE_USE_ID          NUMBER(18, 0),
    BILL_TO_CUST_ACCOUNT_ID          NUMBER(18, 0),
    BILL_TO_SITE_USE_ID              NUMBER(18, 0),
    SHIP_TO_PARTY_SITE_ID            NUMBER(18, 0),
    ITEM_ID                          NUMBER(18, 0),
    CATEGORY_ID                      NUMBER(18, 0),
    TRANSACTION_CURR_CODE            VARCHAR2(60) ,
    TRANSACTION_CURR_AMOUNT          NUMBER       ,
    TRANSACTION_DATE                 DATE         ,
    PERIOD_NAME                      VARCHAR2(60) ,
    YEAR_ID                          NUMBER(18, 0),
    DISCOUNT_TYPE                    VARCHAR2(120),
    TIER_TYPE_CODE                   VARCHAR2(120),
    PROGRAM_LINE_UOM_CODE            VARCHAR2(12) ,
    ACCRUAL_QTY                      NUMBER       ,
    ACCRUAL_UOM                      VARCHAR2(12) ,
    SEEDED_PROGRAM_TYPE_CODE         VARCHAR2(120),
    DISTRIBUTOR_ID                   NUMBER(18, 0),
    BILL_TO_LOCATION_ID              NUMBER(18, 0),
    SHIP_TO_LOCATION_ID              NUMBER(18, 0),
    TIER_HEADER_ID                   NUMBER(18, 0),
    CALCULATION_METHOD_CODE          VARCHAR2(120),
    INCLUDE_VOL_EXCLUDE_DIS_FLAG     VARCHAR2(4)  ,
    TOTAL_AMOUNT                     NUMBER       ,
    ROW_NUM                          NUMBER       ,
    CURRENT_VOLUME                   NUMBER       ,
    EXISTING_VOLUME                  NUMBER       ,
    CUMULATIVE_VOLUME                NUMBER       ,
    FUNCTIONAL_CURRENCY              VARCHAR2(12) ,
    EXCHANGE_RATE_TYPE               VARCHAR2(120),
    PROGRAM_TIER_LINE_ID             NUMBER(18, 0),
    CURRENT_TIER_LINE_NUMBER         NUMBER       ,
    CURRENT_DISCOUNT                 NUMBER       ,
    PRE_QUALIFYING_TIER_LINE_NUM     NUMBER       ,
    PRE_QUALIFYING_TIER_FLAG         VARCHAR2(4)  ,
    PRE_QUALIFYING_TIER_DISCOUNT     NUMBER       ,
    PRE_QUALIFYING_TIER_MAX_VALUE    NUMBER       ,
    MAXIMUM_TIER_VALUE               NUMBER       ,
    MAXIMUM_TIER_DISCOUNT            NUMBER       ,
    MAXIMUM_TIER_LINE_NUMBER         NUMBER       ,
    VOLUME_EXCEEDED_FLAG             VARCHAR2(4)  ,
    INVOICE_NUMBER                   VARCHAR2(200),
    INVOICE_LINE_NUMBER              NUMBER       ,
    PO_NUMBER                        VARCHAR2(120),
    SALES_AMOUNT                     NUMBER       ,
    TRANSACTION_QTY                  NUMBER       ,
    TOTAL_SALES_AMOUNT               NUMBER       ,
    TRANSACTION_UNIT_PRICE           NUMBER       ,
    INVENTORY_ORGANIZATION_ID        NUMBER(18, 0),
    CONSTRAINT pk_cjm_document_programs_gt PRIMARY KEY (DOCUMENT_PROGRAM_ID, DOCUMENT_PROGRAM_ID)
);
