CREATE TABLE jv_distributions (
    DISTRIBUTION_ID                   NUMBER(18, 0) ,
    OBJECT_VERSION_NUMBER             NUMBER(9, 0)      NOT NULL,
    TRANSACTION_ID                    NUMBER(18, 0)     NOT NULL,
    TRANSACTION_DATE                  DATE          ,
    OWNERSHIP_PERCENTAGE_ID           NUMBER(18, 0) ,
    STAKEHOLDER_ID                    NUMBER(18, 0)     NOT NULL,
    DISTRIBUTED_DEBIT_AMOUNT          NUMBER        ,
    DISTRIBUTED_CREDIT_AMOUNT         NUMBER        ,
    PERCENTAGE_OF_INTEREST            NUMBER        ,
    DISTRIBUTION_STATUS_CODE          VARCHAR2(120) ,
    DISTRIBUTION_TYPE_CODE            VARCHAR2(120) ,
    CURRENCY_CODE                     VARCHAR2(60)  ,
    ROUND_AMOUNT_FLAG                 VARCHAR2(4)   ,
    TARGET_TRANSACTION_ID             NUMBER(18, 0) ,
    CHILD_REQUEST_ID                  NUMBER(18, 0) ,
    JOINT_VENTURE_ID                  NUMBER(18, 0) ,
    DISTRIBUTION_ONLY_FLAG            VARCHAR2(4)   ,
    ERROR_GROUP_ID                    NUMBER(18, 0) ,
    TRX_NUMBER                        VARCHAR2(600) ,
    TRX_DATE                          DATE          ,
    DISTRIBUTION_LINE_NUMBER          NUMBER(9, 0)      NOT NULL,
    ORIG_DISTRIBUTED_AMOUNT_DEBIT     NUMBER        ,
    ORIG_DISTRIBUTED_AMOUNT_CREDIT    NUMBER        ,
    DISTRIBUTION_LINE_TYPE_CODE       VARCHAR2(120)     NOT NULL,
    ORIGINAL_DISTRIBUTION_ID          NUMBER(18, 0) ,
    CHANGE_REASON_CODE                VARCHAR2(120) ,
    CHANGE_REASON_ADDITIONAL_TEXT     VARCHAR2(960) ,
    CONTRIBUTION_ID                   NUMBER(18, 0) ,
    CONTRIBUTION_REVERSAL_FLAG        VARCHAR2(4)       NOT NULL,
    PROJECT_COSTING_STATUS_CODE       VARCHAR2(120)     NOT NULL,
    SOURCE_DISTRIBUTION_NUM           NUMBER(38, 0) ,
    TARGET_TRANSACTION_HEADER_CCID    NUMBER(18, 0) ,
    PARTNER_ACCOUNT_CCID              NUMBER(18, 0) ,
    OWNERSHIP_START_DATE              DATE          ,
    OWNERSHIP_END_DATE                DATE          ,
    DISTRIBUTED_ENTERED_CREDIT        NUMBER        ,
    DISTRIBUTED_ENTERED_DEBIT         NUMBER        ,
    ENTERED_CURRENCY_CODE             VARCHAR2(60)  ,
    ORIG_DISTRIBUTED_ENTERED_DR       NUMBER        ,
    ORIG_DISTRIBUTED_ENTERED_CR       NUMBER        ,
    REQUEST_ID                        NUMBER(18, 0) ,
    JOB_DEFINITION_NAME               VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE            VARCHAR2(3600),
    PARTNER_CONTRIBUTION_ID           NUMBER(18, 0) ,
    ORIGINAL_STAKEHOLDER_ID           NUMBER(18, 0) ,
    STAKEHOLDER_RPTG_STATUS_CODE      VARCHAR2(120)     NOT NULL,
    STAKEHOLDER_RPTG_LEDGER_ID        NUMBER(18, 0) ,
    STAKEHOLDER_RPTG_HEADER_ID        NUMBER(18, 0) ,
    RESERVED_FOR_CONTRIBUTION_FLAG    VARCHAR2(4)   ,
    INVOICE_TYPE_CODE                 VARCHAR2(120) ,
    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) ,
    ATTRIBUTE_CATEGORY                VARCHAR2(600) ,
    ATTRIBUTE_CHAR1                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR2                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR3                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR4                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR5                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR6                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR7                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR8                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR9                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR10                  VARCHAR2(600) ,
    ATTRIBUTE_NUMBER1                 NUMBER        ,
    ATTRIBUTE_NUMBER2                 NUMBER        ,
    ATTRIBUTE_NUMBER3                 NUMBER        ,
    ATTRIBUTE_NUMBER4                 NUMBER        ,
    ATTRIBUTE_NUMBER5                 NUMBER        ,
    ATTRIBUTE_DATE1                   DATE          ,
    ATTRIBUTE_DATE2                   DATE          ,
    ATTRIBUTE_DATE3                   DATE          ,
    ATTRIBUTE_DATE4                   DATE          ,
    ATTRIBUTE_DATE5                   DATE          ,
    DISTRIBUTION_ID                   NUMBER(18, 0) ,
    OBJECT_VERSION_NUMBER             NUMBER(9, 0)      NOT NULL,
    TRANSACTION_ID                    NUMBER(18, 0)     NOT NULL,
    TRANSACTION_DATE                  DATE          ,
    OWNERSHIP_PERCENTAGE_ID           NUMBER(18, 0) ,
    STAKEHOLDER_ID                    NUMBER(18, 0)     NOT NULL,
    DISTRIBUTED_DEBIT_AMOUNT          NUMBER        ,
    DISTRIBUTED_CREDIT_AMOUNT         NUMBER        ,
    PERCENTAGE_OF_INTEREST            NUMBER        ,
    DISTRIBUTION_STATUS_CODE          VARCHAR2(120) ,
    DISTRIBUTION_TYPE_CODE            VARCHAR2(120) ,
    CURRENCY_CODE                     VARCHAR2(60)  ,
    ROUND_AMOUNT_FLAG                 VARCHAR2(4)   ,
    REQUEST_ID                        NUMBER(18, 0) ,
    JOB_DEFINITION_NAME               VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE            VARCHAR2(3600),
    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) ,
    ATTRIBUTE_CATEGORY                VARCHAR2(600) ,
    ATTRIBUTE_CHAR1                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR2                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR3                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR4                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR5                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR6                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR7                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR8                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR9                   VARCHAR2(600) ,
    ATTRIBUTE_CHAR10                  VARCHAR2(600) ,
    ATTRIBUTE_NUMBER1                 NUMBER        ,
    ATTRIBUTE_NUMBER2                 NUMBER        ,
    ATTRIBUTE_NUMBER3                 NUMBER        ,
    ATTRIBUTE_NUMBER4                 NUMBER        ,
    ATTRIBUTE_DATE1                   DATE          ,
    ATTRIBUTE_DATE2                   DATE          ,
    ATTRIBUTE_DATE3                   DATE          ,
    ATTRIBUTE_DATE4                   DATE          ,
    ATTRIBUTE_DATE5                   DATE          ,
    TARGET_TRANSACTION_ID             NUMBER(18, 0) ,
    CHILD_REQUEST_ID                  NUMBER(18, 0) ,
    JOINT_VENTURE_ID                  NUMBER(18, 0) ,
    DISTRIBUTION_ONLY_FLAG            VARCHAR2(4)   ,
    ERROR_GROUP_ID                    NUMBER(18, 0) ,
    TRX_NUMBER                        VARCHAR2(600) ,
    TRX_DATE                          DATE          ,
    ADVANCE_PAYMENT_ID                NUMBER(18, 0) ,
    DISTRIBUTION_LINE_NUMBER          NUMBER(9, 0)      NOT NULL,
    ORIG_DISTRIBUTED_AMOUNT_DEBIT     NUMBER        ,
    ORIG_DISTRIBUTED_AMOUNT_CREDIT    NUMBER        ,
    DISTRIBUTION_LINE_TYPE_CODE       VARCHAR2(120)     NOT NULL,
    ORIGINAL_DISTRIBUTION_ID          NUMBER(18, 0) ,
    CHANGE_REASON_CODE                VARCHAR2(120) ,
    CHANGE_REASON_ADDITIONAL_TEXT     VARCHAR2(960) ,
    CONTRIBUTION_ID                   NUMBER(18, 0) ,
    CONTRIBUTION_REVERSAL_FLAG        VARCHAR2(4)       NOT NULL,
    PROJECT_COSTING_STATUS_CODE       VARCHAR2(120)     NOT NULL,
    SOURCE_DISTRIBUTION_NUM           NUMBER(38, 0) ,
    ATTRIBUTE_NUMBER5                 NUMBER        ,
    TARGET_TRANSACTION_HEADER_CCID    NUMBER(18, 0) ,
    OWNERSHIP_START_DATE              DATE          ,
    OWNERSHIP_END_DATE                DATE          ,
    DISTRIBUTED_ENTERED_CREDIT        NUMBER        ,
    DISTRIBUTED_ENTERED_DEBIT         NUMBER        ,
    ENTERED_CURRENCY_CODE             VARCHAR2(60)  ,
    ORIG_DISTRIBUTED_ENTERED_DR       NUMBER        ,
    ORIG_DISTRIBUTED_ENTERED_CR       NUMBER        ,
    PARTNER_CONTRIBUTION_ID           NUMBER(18, 0) ,
    ORIGINAL_STAKEHOLDER_ID           NUMBER(18, 0) ,
    PARTNER_ACCOUNT_CCID              NUMBER(18, 0) ,
    STAKEHOLDER_RPTG_STATUS_CODE      VARCHAR2(120)     NOT NULL,
    STAKEHOLDER_RPTG_LEDGER_ID        NUMBER(18, 0) ,
    STAKEHOLDER_RPTG_HEADER_ID        NUMBER(18, 0) ,
    RESERVED_FOR_CONTRIBUTION_FLAG    VARCHAR2(4)   ,
    INVOICE_TYPE_CODE                 VARCHAR2(120) ,
    CONSTRAINT pk_jv_distributions PRIMARY KEY (DISTRIBUTION_ID, DISTRIBUTION_ID)
);
