CREATE TABLE iby_docs_payable_all (
    PAY_PROC_TRXN_TYPE_CODE         VARCHAR2(400)     NOT NULL,
    ROUTING_ATTRIBUTE1              VARCHAR2(1080),
    ROUTING_ATTRIBUTE2              VARCHAR2(1080),
    ROUTING_ATTRIBUTE3              VARCHAR2(1080),
    ROUTING_ATTRIBUTE4              VARCHAR2(1080),
    ROUTING_ATTRIBUTE5              VARCHAR2(1080),
    CALLING_APP_ID                  NUMBER(18, 0)     NOT NULL,
    CALLING_APP_DOC_REF_NUMBER      VARCHAR2(400)     NOT NULL,
    DOCUMENT_PAYABLE_ID             NUMBER(18, 0) ,
    PAYMENT_FUNCTION                VARCHAR2(120)     NOT NULL,
    PAYMENT_DATE                    DATE              NOT NULL,
    DOCUMENT_DATE                   DATE              NOT NULL,
    DOCUMENT_TYPE                   VARCHAR2(120)     NOT NULL,
    DOCUMENT_STATUS                 VARCHAR2(120)     NOT NULL,
    DOCUMENT_CURRENCY_CODE          VARCHAR2(40)      NOT NULL,
    DOCUMENT_AMOUNT                 NUMBER            NOT NULL,
    PAYMENT_CURRENCY_CODE           VARCHAR2(40)      NOT NULL,
    PAYMENT_AMOUNT                  NUMBER            NOT NULL,
    PAYMENT_SERVICE_REQUEST_ID      NUMBER(18, 0)     NOT NULL,
    PAYMENT_METHOD_CODE             VARCHAR2(120)     NOT NULL,
    EXCLUSIVE_PAYMENT_FLAG          VARCHAR2(4)       NOT NULL,
    STRAIGHT_THROUGH_FLAG           VARCHAR2(4)       NOT NULL,
    EXT_PAYEE_ID                    NUMBER(18, 0)     NOT NULL,
    PAYEE_PARTY_ID                  NUMBER(18, 0)     NOT NULL,
    LEGAL_ENTITY_ID                 NUMBER(18, 0)     NOT NULL,
    ORG_ID                          NUMBER(18, 0)     NOT NULL,
    ALLOW_REMOVING_DOCUMENT_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,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)      NOT NULL,
    CALLING_APP_DOC_UNIQUE_REF1     VARCHAR2(400)     NOT NULL,
    CALLING_APP_DOC_UNIQUE_REF2     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF3     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF4     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF5     VARCHAR2(400) ,
    LAST_UPDATE_LOGIN               VARCHAR2(128) ,
    PARTY_SITE_ID                   NUMBER(18, 0) ,
    SUPPLIER_SITE_ID                NUMBER(18, 0) ,
    BENEFICIARY_PARTY               NUMBER(18, 0) ,
    ORG_TYPE                        VARCHAR2(120)     NOT NULL,
    ANTICIPATED_VALUE_DATE          DATE          ,
    PO_NUMBER                       VARCHAR2(1020),
    DOCUMENT_DESCRIPTION            VARCHAR2(1020),
    DOCUMENT_CURRENCY_TAX_AMOUNT    NUMBER        ,
    DOCUMENT_CURR_CHARGE_AMOUNT     NUMBER        ,
    AMOUNT_WITHHELD                 NUMBER        ,
    PAYMENT_CURR_DISCOUNT_TAKEN     NUMBER        ,
    DISCOUNT_DATE                   DATE          ,
    PAYMENT_DUE_DATE                DATE          ,
    PAYMENT_PROFILE_ID              NUMBER(18, 0) ,
    PAYMENT_ID                      NUMBER(18, 0) ,
    FORMATTING_PAYMENT_ID           NUMBER(18, 0) ,
    INTERNAL_BANK_ACCOUNT_ID        NUMBER(18, 0) ,
    EXTERNAL_BANK_ACCOUNT_ID        NUMBER(18, 0) ,
    BANK_CHARGE_BEARER              VARCHAR2(120) ,
    INTEREST_RATE                   NUMBER        ,
    PAYMENT_GROUPING_NUMBER         NUMBER(18, 0) ,
    PAYMENT_REASON_CODE             VARCHAR2(120) ,
    PAYMENT_REASON_COMMENTS         VARCHAR2(960) ,
    SETTLEMENT_PRIORITY             VARCHAR2(120) ,
    REMITTANCE_MESSAGE1             VARCHAR2(600) ,
    REMITTANCE_MESSAGE2             VARCHAR2(600) ,
    REMITTANCE_MESSAGE3             VARCHAR2(600) ,
    UNIQUE_REMITTANCE_IDENTIFIER    VARCHAR2(1024),
    URI_CHECK_DIGIT                 VARCHAR2(8)   ,
    DELIVERY_CHANNEL_CODE           VARCHAR2(120) ,
    PAYMENT_FORMAT_CODE             VARCHAR2(120) ,
    DOCUMENT_SEQUENCE_ID            NUMBER        ,
    DOCUMENT_SEQUENCE_VALUE         NUMBER        ,
    DOCUMENT_CATEGORY_CODE          VARCHAR2(120) ,
    BANK_ASSIGNED_REF_CODE          VARCHAR2(120) ,
    REMIT_TO_LOCATION_ID            NUMBER(18, 0) ,
    COMPLETED_PMTS_GROUP_ID         NUMBER(18, 0) ,
    REJECTED_DOCS_GROUP_ID          NUMBER(18, 0) ,
    ATTRIBUTE_CATEGORY              VARCHAR2(600) ,
    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) ,
    ADDRESS_SOURCE                  VARCHAR2(120) ,
    EMPLOYEE_ADDRESS_CODE           VARCHAR2(120) ,
    EMPLOYEE_PERSON_ID              NUMBER(18, 0) ,
    EMPLOYEE_PAYMENT_FLAG           VARCHAR2(4)   ,
    EMPLOYEE_ADDRESS_ID             NUMBER(18, 0) ,
    INVOICING_ORG_ID                NUMBER(18, 0) ,
    INVOICING_ORG_TYPE              VARCHAR2(120) ,
    PAY_GROUP_CODE                  VARCHAR2(100) ,
    INVOICING_LEGAL_ENTITY_ID       NUMBER(18, 0) ,
    DOC_CURRENCY_PAYMENT_AMOUNT     NUMBER        ,
    DOC_CURR_AMOUNT_WITHHELD        NUMBER        ,
    DOC_CURR_DISCOUNT_TAKEN         NUMBER        ,
    INV_EXT_PAYEE_ID                NUMBER(18, 0) ,
    INV_PAYEE_PARTY_ID              NUMBER(18, 0) ,
    INV_PARTY_SITE_ID               NUMBER(18, 0) ,
    INV_SUPPLIER_SITE_ID            NUMBER(18, 0) ,
    RELATIONSHIP_ID                 NUMBER(18, 0) ,
    GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE1               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE2               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE3               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE4               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE5               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE6               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE7               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE8               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE9               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE10              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE11              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE12              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE13              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE14              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE15              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE16              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE17              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE18              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE19              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE20              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE_NUMBER1        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER2        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER3        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER4        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER5        NUMBER        ,
    GLOBAL_ATTRIBUTE_DATE1          DATE          ,
    GLOBAL_ATTRIBUTE_DATE2          DATE          ,
    GLOBAL_ATTRIBUTE_DATE3          DATE          ,
    GLOBAL_ATTRIBUTE_DATE4          DATE          ,
    GLOBAL_ATTRIBUTE_DATE5          DATE          ,
    BALANCING_SEGMENT_VALUE         VARCHAR2(100) ,
    SET_OF_BOOKS_ID                 NUMBER(18, 0) ,
    PAYMENT_MODE_CODE               VARCHAR2(120) ,
    PAYMENT_INSTRUMENT_ID           NUMBER(18, 0) ,
    DIGITAL_PAYMENT_ACCOUNT_ID      NUMBER(18, 0) ,
    PAY_PROC_TRXN_TYPE_CODE         VARCHAR2(400)     NOT NULL,
    PAY_GROUP_CODE                  VARCHAR2(100) ,
    CALLING_APP_ID                  NUMBER(18, 0)     NOT NULL,
    CALLING_APP_DOC_REF_NUMBER      VARCHAR2(400)     NOT NULL,
    DOCUMENT_PAYABLE_ID             NUMBER(18, 0) ,
    PAYMENT_FUNCTION                VARCHAR2(120)     NOT NULL,
    PAYMENT_DATE                    DATE              NOT NULL,
    DOCUMENT_DATE                   DATE              NOT NULL,
    DOCUMENT_TYPE                   VARCHAR2(120)     NOT NULL,
    DOCUMENT_STATUS                 VARCHAR2(120)     NOT NULL,
    DOCUMENT_CURRENCY_CODE          VARCHAR2(40)      NOT NULL,
    DOCUMENT_AMOUNT                 NUMBER            NOT NULL,
    PAYMENT_CURRENCY_CODE           VARCHAR2(40)      NOT NULL,
    PAYMENT_AMOUNT                  NUMBER            NOT NULL,
    PAYMENT_SERVICE_REQUEST_ID      NUMBER(18, 0)     NOT NULL,
    PAYMENT_METHOD_CODE             VARCHAR2(120)     NOT NULL,
    EXCLUSIVE_PAYMENT_FLAG          VARCHAR2(4)       NOT NULL,
    STRAIGHT_THROUGH_FLAG           VARCHAR2(4)       NOT NULL,
    EXT_PAYEE_ID                    NUMBER(18, 0)     NOT NULL,
    PAYEE_PARTY_ID                  NUMBER(18, 0)     NOT NULL,
    LEGAL_ENTITY_ID                 NUMBER(18, 0)     NOT NULL,
    ORG_ID                          NUMBER(18, 0)     NOT NULL,
    ALLOW_REMOVING_DOCUMENT_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,
    OBJECT_VERSION_NUMBER           NUMBER(9, 0)      NOT NULL,
    CALLING_APP_DOC_UNIQUE_REF1     VARCHAR2(400)     NOT NULL,
    CALLING_APP_DOC_UNIQUE_REF2     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF3     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF4     VARCHAR2(400) ,
    CALLING_APP_DOC_UNIQUE_REF5     VARCHAR2(400) ,
    LAST_UPDATE_LOGIN               VARCHAR2(128) ,
    PARTY_SITE_ID                   NUMBER(18, 0) ,
    SUPPLIER_SITE_ID                NUMBER(18, 0) ,
    BENEFICIARY_PARTY               NUMBER(18, 0) ,
    ORG_TYPE                        VARCHAR2(120)     NOT NULL,
    ANTICIPATED_VALUE_DATE          DATE          ,
    PO_NUMBER                       VARCHAR2(1020),
    DOCUMENT_DESCRIPTION            VARCHAR2(1020),
    DOCUMENT_CURRENCY_TAX_AMOUNT    NUMBER        ,
    DOCUMENT_CURR_CHARGE_AMOUNT     NUMBER        ,
    AMOUNT_WITHHELD                 NUMBER        ,
    PAYMENT_CURR_DISCOUNT_TAKEN     NUMBER        ,
    DISCOUNT_DATE                   DATE          ,
    PAYMENT_DUE_DATE                DATE          ,
    PAYMENT_PROFILE_ID              NUMBER(18, 0) ,
    PAYMENT_ID                      NUMBER(18, 0) ,
    FORMATTING_PAYMENT_ID           NUMBER(18, 0) ,
    INTERNAL_BANK_ACCOUNT_ID        NUMBER(18, 0) ,
    EXTERNAL_BANK_ACCOUNT_ID        NUMBER(18, 0) ,
    BANK_CHARGE_BEARER              VARCHAR2(120) ,
    INTEREST_RATE                   NUMBER        ,
    PAYMENT_GROUPING_NUMBER         NUMBER(18, 0) ,
    PAYMENT_REASON_CODE             VARCHAR2(120) ,
    PAYMENT_REASON_COMMENTS         VARCHAR2(960) ,
    SETTLEMENT_PRIORITY             VARCHAR2(120) ,
    REMITTANCE_MESSAGE1             VARCHAR2(600) ,
    REMITTANCE_MESSAGE2             VARCHAR2(600) ,
    REMITTANCE_MESSAGE3             VARCHAR2(600) ,
    UNIQUE_REMITTANCE_IDENTIFIER    VARCHAR2(1024),
    URI_CHECK_DIGIT                 VARCHAR2(8)   ,
    DELIVERY_CHANNEL_CODE           VARCHAR2(120) ,
    PAYMENT_FORMAT_CODE             VARCHAR2(120) ,
    DOCUMENT_SEQUENCE_ID            NUMBER        ,
    DOCUMENT_SEQUENCE_VALUE         NUMBER        ,
    DOCUMENT_CATEGORY_CODE          VARCHAR2(120) ,
    BANK_ASSIGNED_REF_CODE          VARCHAR2(120) ,
    REMIT_TO_LOCATION_ID            NUMBER(18, 0) ,
    COMPLETED_PMTS_GROUP_ID         NUMBER(18, 0) ,
    REJECTED_DOCS_GROUP_ID          NUMBER(18, 0) ,
    ATTRIBUTE_CATEGORY              VARCHAR2(600) ,
    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) ,
    ADDRESS_SOURCE                  VARCHAR2(120) ,
    EMPLOYEE_ADDRESS_CODE           VARCHAR2(120) ,
    EMPLOYEE_PERSON_ID              NUMBER(18, 0) ,
    EMPLOYEE_PAYMENT_FLAG           VARCHAR2(4)   ,
    EMPLOYEE_ADDRESS_ID             NUMBER(18, 0) ,
    INVOICING_ORG_ID                NUMBER(18, 0) ,
    INVOICING_ORG_TYPE              VARCHAR2(120) ,
    INVOICING_LEGAL_ENTITY_ID       NUMBER(18, 0) ,
    DOC_CURRENCY_PAYMENT_AMOUNT     NUMBER        ,
    DOC_CURR_AMOUNT_WITHHELD        NUMBER        ,
    DOC_CURR_DISCOUNT_TAKEN         NUMBER        ,
    INV_EXT_PAYEE_ID                NUMBER(18, 0) ,
    INV_PAYEE_PARTY_ID              NUMBER(18, 0) ,
    INV_PARTY_SITE_ID               NUMBER(18, 0) ,
    INV_SUPPLIER_SITE_ID            NUMBER(18, 0) ,
    RELATIONSHIP_ID                 NUMBER(18, 0) ,
    BALANCING_SEGMENT_VALUE         VARCHAR2(100) ,
    GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE1               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE2               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE3               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE4               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE5               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE6               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE7               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE8               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE9               VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE10              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE11              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE12              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE13              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE14              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE15              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE16              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE17              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE18              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE19              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE20              VARCHAR2(600) ,
    GLOBAL_ATTRIBUTE_NUMBER1        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER2        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER3        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER4        NUMBER        ,
    GLOBAL_ATTRIBUTE_NUMBER5        NUMBER        ,
    GLOBAL_ATTRIBUTE_DATE1          DATE          ,
    GLOBAL_ATTRIBUTE_DATE2          DATE          ,
    GLOBAL_ATTRIBUTE_DATE3          DATE          ,
    GLOBAL_ATTRIBUTE_DATE4          DATE          ,
    GLOBAL_ATTRIBUTE_DATE5          DATE          ,
    ROUTING_ATTRIBUTE1              VARCHAR2(1080),
    ROUTING_ATTRIBUTE2              VARCHAR2(1080),
    ROUTING_ATTRIBUTE3              VARCHAR2(1080),
    ROUTING_ATTRIBUTE4              VARCHAR2(1080),
    ROUTING_ATTRIBUTE5              VARCHAR2(1080),
    SET_OF_BOOKS_ID                 NUMBER(18, 0) ,
    PAYMENT_MODE_CODE               VARCHAR2(120) ,
    PAYMENT_INSTRUMENT_ID           NUMBER(18, 0) ,
    DIGITAL_PAYMENT_ACCOUNT_ID      NUMBER(18, 0) ,
    CONSTRAINT pk_iby_docs_payable_all PRIMARY KEY (DOCUMENT_PAYABLE_ID, DOCUMENT_PAYABLE_ID)
);
