CREATE TABLE gl_ledgers (
    LEDGER_ID                         NUMBER(18, 0) ,
    NAME                              VARCHAR2(120)     NOT NULL,
    SHORT_NAME                        VARCHAR2(80)      NOT NULL,
    DESCRIPTION                       VARCHAR2(960) ,
    LEDGER_CATEGORY_CODE              VARCHAR2(120)     NOT NULL,
    ALC_LEDGER_TYPE_CODE              VARCHAR2(120)     NOT NULL,
    OBJECT_TYPE_CODE                  VARCHAR2(4)       NOT NULL,
    LE_LEDGER_TYPE_CODE               VARCHAR2(4)       NOT NULL,
    COMPLETION_STATUS_CODE            VARCHAR2(120) ,
    CONFIGURATION_ID                  NUMBER(18, 0) ,
    CHART_OF_ACCOUNTS_ID              NUMBER(18, 0)     NOT NULL,
    CURRENCY_CODE                     VARCHAR2(60)      NOT NULL,
    PERIOD_SET_NAME                   VARCHAR2(60)      NOT NULL,
    ACCOUNTED_PERIOD_TYPE             VARCHAR2(60)      NOT NULL,
    FIRST_LEDGER_PERIOD_NAME          VARCHAR2(60)      NOT NULL,
    RET_EARN_CODE_COMBINATION_ID      NUMBER(18, 0)     NOT NULL,
    SUSPENSE_ALLOWED_FLAG             VARCHAR2(4)       NOT NULL,
    ALLOW_INTERCOMPANY_POST_FLAG      VARCHAR2(4)       NOT NULL,
    TRACK_ROUNDING_IMBALANCE_FLAG     VARCHAR2(4)       NOT NULL,
    ENABLE_AVERAGE_BALANCES_FLAG      VARCHAR2(4)       NOT NULL,
    CUM_TRANS_CODE_COMBINATION_ID     NUMBER(18, 0) ,
    RES_ENCUMB_CODE_COMBINATION_ID    NUMBER(18, 0) ,
    NET_INCOME_CODE_COMBINATION_ID    NUMBER(18, 0) ,
    ROUNDING_CODE_COMBINATION_ID      NUMBER(18, 0) ,
    ENABLE_BUDGETARY_CONTROL_FLAG     VARCHAR2(4)       NOT NULL,
    REQUIRE_BUDGET_JOURNALS_FLAG      VARCHAR2(4)       NOT NULL,
    ENABLE_JE_APPROVAL_FLAG           VARCHAR2(4)       NOT NULL,
    ENABLE_AUTOMATIC_TAX_FLAG         VARCHAR2(4)       NOT NULL,
    CONSOLIDATION_LEDGER_FLAG         VARCHAR2(4)       NOT NULL,
    TRANSLATE_EOD_FLAG                VARCHAR2(4)       NOT NULL,
    TRANSLATE_QATD_FLAG               VARCHAR2(4)       NOT NULL,
    TRANSLATE_YATD_FLAG               VARCHAR2(4)       NOT NULL,
    TRANSACTION_CALENDAR_ID           NUMBER(18, 0) ,
    DAILY_TRANSLATION_RATE_TYPE       VARCHAR2(120) ,
    AUTOMATICALLY_CREATED_FLAG        VARCHAR2(4)       NOT NULL,
    BAL_SEG_VALUE_OPTION_CODE         VARCHAR2(4)       NOT NULL,
    BAL_SEG_COLUMN_NAME               VARCHAR2(100)     NOT NULL,
    MGT_SEG_VALUE_OPTION_CODE         VARCHAR2(4)       NOT NULL,
    MGT_SEG_COLUMN_NAME               VARCHAR2(100) ,
    BAL_SEG_VALUE_SET_ID              NUMBER(18, 0)     NOT NULL,
    MGT_SEG_VALUE_SET_ID              NUMBER(18, 0) ,
    IMPLICIT_ACCESS_SET_ID            NUMBER(18, 0) ,
    CRITERIA_SET_ID                   NUMBER(18, 0) ,
    FUTURE_ENTERABLE_PERIODS_LIMIT    NUMBER(18, 0)     NOT NULL,
    LEDGER_ATTRIBUTES                 VARCHAR2(4000)    NOT NULL,
    IMPLICIT_LEDGER_SET_ID            NUMBER(18, 0) ,
    LATEST_OPENED_PERIOD_NAME         VARCHAR2(60)  ,
    LATEST_ENCUMBRANCE_YEAR           NUMBER(18, 0) ,
    PERIOD_AVERAGE_RATE_TYPE          VARCHAR2(120) ,
    PERIOD_END_RATE_TYPE              VARCHAR2(120) ,
    BUDGET_PERIOD_AVG_RATE_TYPE       VARCHAR2(120) ,
    BUDGET_PERIOD_END_RATE_TYPE       VARCHAR2(120) ,
    SLA_ACCOUNTING_METHOD_CODE        VARCHAR2(120) ,
    SLA_ACCOUNTING_METHOD_TYPE        VARCHAR2(4)   ,
    SLA_DESCRIPTION_LANGUAGE          VARCHAR2(60)  ,
    SLA_ENTERED_CUR_BAL_SUS_CCID      NUMBER(18, 0) ,
    SLA_SEQUENCING_FLAG               VARCHAR2(4)   ,
    SLA_BAL_BY_LEDGER_CURR_FLAG       VARCHAR2(4)   ,
    SLA_LEDGER_CUR_BAL_SUS_CCID       NUMBER(18, 0) ,
    ENABLE_SECONDARY_TRACK_FLAG       VARCHAR2(4)   ,
    ENABLE_REVAL_SS_TRACK_FLAG        VARCHAR2(4)   ,
    LAST_UPDATE_DATE                  TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                   VARCHAR2(256)     NOT NULL,
    CREATION_DATE                     TIMESTAMP(6)      NOT NULL,
    CREATED_BY                        VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN                 VARCHAR2(128) ,
    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) ,
    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          ,
    ENABLE_RECONCILIATION_FLAG        VARCHAR2(4)       NOT NULL,
    CREATE_JE_FLAG                    VARCHAR2(4)       NOT NULL,
    SLA_LEDGER_CASH_BASIS_FLAG        VARCHAR2(4)   ,
    COMPLETE_FLAG                     VARCHAR2(4)   ,
    OBJECT_VERSION_NUMBER             NUMBER(9, 0)      NOT NULL,
    USSGL_OPTION_CODE                 VARCHAR2(4)   ,
    VALIDATE_JOURNAL_REF_DATE         VARCHAR2(4)   ,
    JRNLS_GROUP_BY_DATE_FLAG          VARCHAR2(4)   ,
    REVAL_FROM_PRI_LGR_CURR           VARCHAR2(4)   ,
    AUTOREV_AFTER_OPEN_PRD_FLAG       VARCHAR2(4)   ,
    PRIOR_PRD_NOTIFICATION_FLAG       VARCHAR2(4)   ,
    POP_UP_STAT_ACCOUNT_FLAG          VARCHAR2(4)   ,
    THRESHOLD_AMOUNT                  NUMBER        ,
    NUMBER_OF_PROCESSORS              NUMBER(9, 0)  ,
    PROCESSING_UNIT_SIZE              NUMBER(9, 0)  ,
    RELEASE_UPGRADE_FROM              VARCHAR2(60)  ,
    CROSS_LGR_CLR_ACC_CCID            NUMBER(18, 0) ,
    INTERCO_GAIN_LOSS_CCID            NUMBER(18, 0) ,
    SEQUENCING_MODE_CODE              VARCHAR2(8)   ,
    DOC_SEQUENCING_OPTION_CODE        VARCHAR2(4)   ,
    ENF_SEQ_DATE_CORRELATION_CODE     VARCHAR2(4)   ,
    AR_DOC_SEQUENCING_OPTION_FLAG     VARCHAR2(4)   ,
    AP_DOC_SEQUENCING_OPTION_FLAG     VARCHAR2(4)   ,
    NET_CLOSING_BAL_FLAG              VARCHAR2(4)   ,
    AUTOMATE_SEC_JRNL_REV_FLAG        VARCHAR2(4)   ,
    MINIMUM_THRESHOLD_AMOUNT          NUMBER        ,
    STRICT_PERIOD_CLOSE_FLAG          VARCHAR2(4)   ,
    INCOME_STMT_ADB_STATUS_CODE       VARCHAR2(120) ,
    BALANCE_MJE_BY_CURRENCY_FLAG      VARCHAR2(4)   ,
    SINGLE_CURRENCY_JOURNAL_FLAG      VARCHAR2(4)   ,
    PARTITION_GROUP_CODE              VARCHAR2(60)  ,
    POSTING_CUTOFF_FLAG               VARCHAR2(4)   ,
    POSTING_CUTOFF_DATE               DATE          ,
    POSTING_CUTOFF_TIMEZONE_CODE      VARCHAR2(200) ,
    LEDGER_SET_CLASSIFICATION_CODE    VARCHAR2(120) ,
    LEDGER_SET_CURRENCY_CODE          VARCHAR2(60)  ,
    LEDGER_ID                         NUMBER(18, 0) ,
    NAME                              VARCHAR2(120)     NOT NULL,
    SHORT_NAME                        VARCHAR2(80)      NOT NULL,
    DESCRIPTION                       VARCHAR2(960) ,
    LEDGER_CATEGORY_CODE              VARCHAR2(120)     NOT NULL,
    ALC_LEDGER_TYPE_CODE              VARCHAR2(120)     NOT NULL,
    OBJECT_TYPE_CODE                  VARCHAR2(4)       NOT NULL,
    LE_LEDGER_TYPE_CODE               VARCHAR2(4)       NOT NULL,
    COMPLETION_STATUS_CODE            VARCHAR2(120) ,
    CONFIGURATION_ID                  NUMBER(18, 0) ,
    CHART_OF_ACCOUNTS_ID              NUMBER(18, 0)     NOT NULL,
    CURRENCY_CODE                     VARCHAR2(60)      NOT NULL,
    PERIOD_SET_NAME                   VARCHAR2(60)      NOT NULL,
    ACCOUNTED_PERIOD_TYPE             VARCHAR2(60)      NOT NULL,
    FIRST_LEDGER_PERIOD_NAME          VARCHAR2(60)      NOT NULL,
    RET_EARN_CODE_COMBINATION_ID      NUMBER(18, 0)     NOT NULL,
    SUSPENSE_ALLOWED_FLAG             VARCHAR2(4)       NOT NULL,
    ALLOW_INTERCOMPANY_POST_FLAG      VARCHAR2(4)       NOT NULL,
    TRACK_ROUNDING_IMBALANCE_FLAG     VARCHAR2(4)       NOT NULL,
    ENABLE_AVERAGE_BALANCES_FLAG      VARCHAR2(4)       NOT NULL,
    CUM_TRANS_CODE_COMBINATION_ID     NUMBER(18, 0) ,
    RES_ENCUMB_CODE_COMBINATION_ID    NUMBER(18, 0) ,
    NET_INCOME_CODE_COMBINATION_ID    NUMBER(18, 0) ,
    ROUNDING_CODE_COMBINATION_ID      NUMBER(18, 0) ,
    ENABLE_BUDGETARY_CONTROL_FLAG     VARCHAR2(4)       NOT NULL,
    REQUIRE_BUDGET_JOURNALS_FLAG      VARCHAR2(4)       NOT NULL,
    ENABLE_JE_APPROVAL_FLAG           VARCHAR2(4)       NOT NULL,
    ENABLE_AUTOMATIC_TAX_FLAG         VARCHAR2(4)       NOT NULL,
    CONSOLIDATION_LEDGER_FLAG         VARCHAR2(4)       NOT NULL,
    TRANSLATE_EOD_FLAG                VARCHAR2(4)       NOT NULL,
    TRANSLATE_QATD_FLAG               VARCHAR2(4)       NOT NULL,
    TRANSLATE_YATD_FLAG               VARCHAR2(4)       NOT NULL,
    TRANSACTION_CALENDAR_ID           NUMBER(18, 0) ,
    DAILY_TRANSLATION_RATE_TYPE       VARCHAR2(120) ,
    AUTOMATICALLY_CREATED_FLAG        VARCHAR2(4)       NOT NULL,
    BAL_SEG_VALUE_OPTION_CODE         VARCHAR2(4)       NOT NULL,
    BAL_SEG_COLUMN_NAME               VARCHAR2(100)     NOT NULL,
    MGT_SEG_VALUE_OPTION_CODE         VARCHAR2(4)       NOT NULL,
    MGT_SEG_COLUMN_NAME               VARCHAR2(100) ,
    BAL_SEG_VALUE_SET_ID              NUMBER(18, 0)     NOT NULL,
    MGT_SEG_VALUE_SET_ID              NUMBER(18, 0) ,
    IMPLICIT_ACCESS_SET_ID            NUMBER(18, 0) ,
    CRITERIA_SET_ID                   NUMBER(18, 0) ,
    FUTURE_ENTERABLE_PERIODS_LIMIT    NUMBER(18, 0)     NOT NULL,
    LEDGER_ATTRIBUTES                 VARCHAR2(4000)    NOT NULL,
    IMPLICIT_LEDGER_SET_ID            NUMBER(18, 0) ,
    LATEST_OPENED_PERIOD_NAME         VARCHAR2(60)  ,
    LATEST_ENCUMBRANCE_YEAR           NUMBER(18, 0) ,
    PERIOD_AVERAGE_RATE_TYPE          VARCHAR2(120) ,
    PERIOD_END_RATE_TYPE              VARCHAR2(120) ,
    BUDGET_PERIOD_AVG_RATE_TYPE       VARCHAR2(120) ,
    BUDGET_PERIOD_END_RATE_TYPE       VARCHAR2(120) ,
    SLA_ACCOUNTING_METHOD_CODE        VARCHAR2(120) ,
    SLA_ACCOUNTING_METHOD_TYPE        VARCHAR2(4)   ,
    SLA_DESCRIPTION_LANGUAGE          VARCHAR2(60)  ,
    SLA_ENTERED_CUR_BAL_SUS_CCID      NUMBER(18, 0) ,
    SLA_SEQUENCING_FLAG               VARCHAR2(4)   ,
    SLA_BAL_BY_LEDGER_CURR_FLAG       VARCHAR2(4)   ,
    SLA_LEDGER_CUR_BAL_SUS_CCID       NUMBER(18, 0) ,
    ENABLE_SECONDARY_TRACK_FLAG       VARCHAR2(4)   ,
    ENABLE_REVAL_SS_TRACK_FLAG        VARCHAR2(4)   ,
    LAST_UPDATE_DATE                  TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY                   VARCHAR2(256)     NOT NULL,
    CREATION_DATE                     TIMESTAMP(6)      NOT NULL,
    CREATED_BY                        VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN                 VARCHAR2(128) ,
    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) ,
    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          ,
    ENABLE_RECONCILIATION_FLAG        VARCHAR2(4)       NOT NULL,
    CREATE_JE_FLAG                    VARCHAR2(4)       NOT NULL,
    SLA_LEDGER_CASH_BASIS_FLAG        VARCHAR2(4)   ,
    COMPLETE_FLAG                     VARCHAR2(4)   ,
    OBJECT_VERSION_NUMBER             NUMBER(9, 0)      NOT NULL,
    USSGL_OPTION_CODE                 VARCHAR2(4)   ,
    VALIDATE_JOURNAL_REF_DATE         VARCHAR2(4)   ,
    JRNLS_GROUP_BY_DATE_FLAG          VARCHAR2(4)   ,
    REVAL_FROM_PRI_LGR_CURR           VARCHAR2(4)   ,
    AUTOREV_AFTER_OPEN_PRD_FLAG       VARCHAR2(4)   ,
    PRIOR_PRD_NOTIFICATION_FLAG       VARCHAR2(4)   ,
    POP_UP_STAT_ACCOUNT_FLAG          VARCHAR2(4)   ,
    THRESHOLD_AMOUNT                  NUMBER        ,
    NUMBER_OF_PROCESSORS              NUMBER(9, 0)  ,
    PROCESSING_UNIT_SIZE              NUMBER(9, 0)  ,
    RELEASE_UPGRADE_FROM              VARCHAR2(60)  ,
    CROSS_LGR_CLR_ACC_CCID            NUMBER(18, 0) ,
    INTERCO_GAIN_LOSS_CCID            NUMBER(18, 0) ,
    AUTOMATE_SEC_JRNL_REV_FLAG        VARCHAR2(4)   ,
    SEQUENCING_MODE_CODE              VARCHAR2(8)   ,
    DOC_SEQUENCING_OPTION_CODE        VARCHAR2(4)   ,
    ENF_SEQ_DATE_CORRELATION_CODE     VARCHAR2(4)   ,
    AR_DOC_SEQUENCING_OPTION_FLAG     VARCHAR2(4)   ,
    AP_DOC_SEQUENCING_OPTION_FLAG     VARCHAR2(4)   ,
    NET_CLOSING_BAL_FLAG              VARCHAR2(4)   ,
    MINIMUM_THRESHOLD_AMOUNT          NUMBER        ,
    STRICT_PERIOD_CLOSE_FLAG          VARCHAR2(4)   ,
    INCOME_STMT_ADB_STATUS_CODE       VARCHAR2(120) ,
    BALANCE_MJE_BY_CURRENCY_FLAG      VARCHAR2(4)   ,
    SINGLE_CURRENCY_JOURNAL_FLAG      VARCHAR2(4)   ,
    PARTITION_GROUP_CODE              VARCHAR2(60)  ,
    POSTING_CUTOFF_FLAG               VARCHAR2(4)   ,
    POSTING_CUTOFF_DATE               DATE          ,
    POSTING_CUTOFF_TIMEZONE_CODE      VARCHAR2(200) ,
    LEDGER_SET_CLASSIFICATION_CODE    VARCHAR2(120) ,
    LEDGER_SET_CURRENCY_CODE          VARCHAR2(60)  ,
    CONSTRAINT pk_gl_ledgers PRIMARY KEY (LEDGER_ID, LEDGER_ID)
);
