CREATE TABLE fun_interco_source_documents (
    SOURCE_DOCUMENT_ID               NUMBER(18, 0) ,
    SOURCE_DOC_GROUP_ID              NUMBER(18, 0)     NOT NULL,
    RECEIVER_ORG_ID                  NUMBER(18, 0)     NOT NULL,
    SOURCE_DOCUMENT_NUMBER           VARCHAR2(240)     NOT NULL,
    SOURCE_DOCUMENT_DATE             DATE              NOT NULL,
    SOURCE_DOCUMENT_AMOUNT           NUMBER            NOT NULL,
    SOURCE_DOCUMENT_STATUS_CODE      VARCHAR2(120)     NOT NULL,
    ALLOCATION_PERCENTAGE            NUMBER            NOT NULL,
    DESCRIPTION                      VARCHAR2(960) ,
    PROVIDER_CCID                    NUMBER(18, 0) ,
    RECEIVER_CCID                    NUMBER(18, 0) ,
    SOURCE_DOCUMENT_REVERSAL_FLAG    VARCHAR2(4)       NOT NULL,
    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) ,
    ATTRIBUTE1                       VARCHAR2(600) ,
    ATTRIBUTE2                       VARCHAR2(600) ,
    ATTRIBUTE3                       VARCHAR2(600) ,
    ATTRIBUTE4                       VARCHAR2(600) ,
    ATTRIBUTE5                       VARCHAR2(600) ,
    ATTRIBUTE6                       VARCHAR2(600) ,
    ATTRIBUTE7                       VARCHAR2(600) ,
    ATTRIBUTE8                       VARCHAR2(600) ,
    ATTRIBUTE9                       VARCHAR2(600) ,
    ATTRIBUTE10                      VARCHAR2(600) ,
    ATTRIBUTE11                      VARCHAR2(600) ,
    ATTRIBUTE12                      VARCHAR2(600) ,
    ATTRIBUTE13                      VARCHAR2(600) ,
    ATTRIBUTE14                      VARCHAR2(600) ,
    ATTRIBUTE15                      VARCHAR2(600) ,
    ATTRIBUTE_CATEGORY               VARCHAR2(120) ,
    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          ,
    OBJECT_VERSION_NUMBER            NUMBER(9, 0)      NOT NULL,
    ORIGINAL_SOURCE_DOCUMENT_ID      NUMBER(18, 0) ,
    REVERSED_SOURCE_DOCUMENT_ID      NUMBER(18, 0) ,
    EXCHANGE_RATE_TYPE               VARCHAR2(120) ,
    DUE_TO_FROM_CURR_BASIS_CODE      VARCHAR2(120) ,
    EXCHANGE_RATE_DATE               DATE          ,
    DOC_REFERENCE_ID1                NUMBER(18, 0) ,
    DOC_REFERENCE_ID2                NUMBER(18, 0) ,
    DOC_REFERENCE_ID3                NUMBER(18, 0) ,
    DOC_REFERENCE_ID4                NUMBER(18, 0) ,
    DOC_REFERENCE_ID5                NUMBER(18, 0) ,
    DOC_NUMBER                       VARCHAR2(1000),
    DOC_LINE_NUMBER                  NUMBER(18, 0) ,
    DOC_DISTRIBUTION_NUMBER          NUMBER(18, 0) ,
    DOC_ADDITIONAL_TRX_NUMBER1       NUMBER(18, 0) ,
    DOC_ADDITIONAL_TRX_NUMBER2       NUMBER(18, 0) ,
    SOURCE_APPLICATION_ID            NUMBER(18, 0) ,
    DOC_TYPE_CODE                    VARCHAR2(120) ,
    DOC_DATE                         DATE          ,
    DOC_AMOUNT_TYPE_CODE             VARCHAR2(120) ,
    DOC_AMOUNT                       NUMBER        ,
    DOC_BU_ID                        NUMBER(18, 0) ,
    DOC_SUPPLIER_ID                  NUMBER(18, 0) ,
    DOC_LE_ID                        NUMBER(18, 0) ,
    INTERCO_TRX_SOURCE_DOC_ID        NUMBER(18, 0) ,
    INTERCO_TRX_SOURCE_NUMBER        NUMBER(18, 0) ,
    DOC_ACTION_CODE                  VARCHAR2(120) ,
    DOC_DESCRIPTION                  VARCHAR2(960) ,
    DOC_ASSET_BOOK_TYPE_CODE         VARCHAR2(120) ,
    DOC_LEDGER_ID                    NUMBER(18, 0) ,
    DOC_SUPPLIER_SITE_ID             NUMBER(18, 0) ,
    DOC_CUSTOMER_ID                  NUMBER(18, 0) ,
    DOC_CUST_ACCOUNT_ID              NUMBER(18, 0) ,
    DOC_CUST_BILL_TO_LOCATION_ID     NUMBER(18, 0) ,
    DOC_CCID                         NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID1       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID2       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID3       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID4       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID5       NUMBER(18, 0) ,
    DOC_CURRENCY_CODE                VARCHAR2(60)  ,
    DOC_ORIGIN                       VARCHAR2(600) ,
    DOC_SOURCE                       VARCHAR2(600) ,
    DOC_TYPE                         VARCHAR2(320) ,
    DOC_AMOUNT_TYPE                  VARCHAR2(320) ,
    DOC_BU_NAME                      VARCHAR2(960) ,
    DOC_SUPPLIER_NAME                VARCHAR2(1440),
    DOC_LE_NAME                      VARCHAR2(960) ,
    NOTES                            VARCHAR2(960) ,
    CURRENCY_CODE                    VARCHAR2(60)  ,
    STANDARD_CREDIT_MEMO_FLAG        VARCHAR2(4)   ,
    MANUAL_APPROVAL_FLAG             VARCHAR2(4)   ,
    SOURCE_DOCUMENT_ID               NUMBER(18, 0) ,
    SOURCE_DOC_GROUP_ID              NUMBER(18, 0)     NOT NULL,
    RECEIVER_ORG_ID                  NUMBER(18, 0)     NOT NULL,
    SOURCE_DOCUMENT_NUMBER           VARCHAR2(240)     NOT NULL,
    SOURCE_DOCUMENT_DATE             DATE              NOT NULL,
    SOURCE_DOCUMENT_AMOUNT           NUMBER            NOT NULL,
    SOURCE_DOCUMENT_STATUS_CODE      VARCHAR2(120)     NOT NULL,
    ALLOCATION_PERCENTAGE            NUMBER            NOT NULL,
    DESCRIPTION                      VARCHAR2(960) ,
    PROVIDER_CCID                    NUMBER(18, 0) ,
    RECEIVER_CCID                    NUMBER(18, 0) ,
    SOURCE_DOCUMENT_REVERSAL_FLAG    VARCHAR2(4)       NOT NULL,
    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) ,
    ATTRIBUTE1                       VARCHAR2(600) ,
    ATTRIBUTE2                       VARCHAR2(600) ,
    ATTRIBUTE3                       VARCHAR2(600) ,
    ATTRIBUTE4                       VARCHAR2(600) ,
    ATTRIBUTE5                       VARCHAR2(600) ,
    ATTRIBUTE6                       VARCHAR2(600) ,
    ATTRIBUTE7                       VARCHAR2(600) ,
    ATTRIBUTE8                       VARCHAR2(600) ,
    ATTRIBUTE9                       VARCHAR2(600) ,
    ATTRIBUTE10                      VARCHAR2(600) ,
    ATTRIBUTE11                      VARCHAR2(600) ,
    ATTRIBUTE12                      VARCHAR2(600) ,
    ATTRIBUTE13                      VARCHAR2(600) ,
    ATTRIBUTE14                      VARCHAR2(600) ,
    ATTRIBUTE15                      VARCHAR2(600) ,
    ATTRIBUTE_CATEGORY               VARCHAR2(120) ,
    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          ,
    OBJECT_VERSION_NUMBER            NUMBER(9, 0)      NOT NULL,
    ORIGINAL_SOURCE_DOCUMENT_ID      NUMBER(18, 0) ,
    REVERSED_SOURCE_DOCUMENT_ID      NUMBER(18, 0) ,
    EXCHANGE_RATE_TYPE               VARCHAR2(120) ,
    DUE_TO_FROM_CURR_BASIS_CODE      VARCHAR2(120) ,
    EXCHANGE_RATE_DATE               DATE          ,
    DOC_REFERENCE_ID1                NUMBER(18, 0) ,
    DOC_REFERENCE_ID2                NUMBER(18, 0) ,
    DOC_REFERENCE_ID3                NUMBER(18, 0) ,
    DOC_REFERENCE_ID4                NUMBER(18, 0) ,
    DOC_REFERENCE_ID5                NUMBER(18, 0) ,
    DOC_NUMBER                       VARCHAR2(1000),
    DOC_LINE_NUMBER                  NUMBER(18, 0) ,
    DOC_DISTRIBUTION_NUMBER          NUMBER(18, 0) ,
    DOC_ADDITIONAL_TRX_NUMBER1       NUMBER(18, 0) ,
    DOC_ADDITIONAL_TRX_NUMBER2       NUMBER(18, 0) ,
    SOURCE_APPLICATION_ID            NUMBER(18, 0) ,
    DOC_TYPE_CODE                    VARCHAR2(120) ,
    DOC_DATE                         DATE          ,
    DOC_AMOUNT_TYPE_CODE             VARCHAR2(120) ,
    DOC_AMOUNT                       NUMBER        ,
    DOC_BU_ID                        NUMBER(18, 0) ,
    DOC_SUPPLIER_ID                  NUMBER(18, 0) ,
    DOC_LE_ID                        NUMBER(18, 0) ,
    INTERCO_TRX_SOURCE_DOC_ID        NUMBER(18, 0) ,
    INTERCO_TRX_SOURCE_NUMBER        NUMBER(18, 0) ,
    DOC_ACTION_CODE                  VARCHAR2(120) ,
    DOC_DESCRIPTION                  VARCHAR2(960) ,
    DOC_ASSET_BOOK_TYPE_CODE         VARCHAR2(120) ,
    DOC_LEDGER_ID                    NUMBER(18, 0) ,
    DOC_SUPPLIER_SITE_ID             NUMBER(18, 0) ,
    DOC_CUSTOMER_ID                  NUMBER(18, 0) ,
    DOC_CUST_ACCOUNT_ID              NUMBER(18, 0) ,
    DOC_CUST_BILL_TO_LOCATION_ID     NUMBER(18, 0) ,
    DOC_CCID                         NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID1       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID2       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID3       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID4       NUMBER(18, 0) ,
    REVERSED_DOC_REFERENCE_ID5       NUMBER(18, 0) ,
    DOC_CURRENCY_CODE                VARCHAR2(60)  ,
    DOC_ORIGIN                       VARCHAR2(600) ,
    DOC_SOURCE                       VARCHAR2(600) ,
    DOC_TYPE                         VARCHAR2(320) ,
    DOC_AMOUNT_TYPE                  VARCHAR2(320) ,
    DOC_BU_NAME                      VARCHAR2(960) ,
    DOC_SUPPLIER_NAME                VARCHAR2(1440),
    DOC_LE_NAME                      VARCHAR2(960) ,
    NOTES                            VARCHAR2(960) ,
    CURRENCY_CODE                    VARCHAR2(60)  ,
    STANDARD_CREDIT_MEMO_FLAG        VARCHAR2(4)   ,
    MANUAL_APPROVAL_FLAG             VARCHAR2(4)   ,
    CONSTRAINT pk_fun_interco_source_documents PRIMARY KEY (SOURCE_DOCUMENT_ID, SOURCE_DOCUMENT_ID)
);
