Search Results ap_check_stocks_all
Overview
The GL_CODE_COMBINATIONS table is the foundational data object for the chart of accounts within Oracle E-Business Suite General Ledger (GL). It stores every unique, valid account combination, known by its unique identifier, CODE_COMBINATION_ID (CCID). Each row represents a specific combination of segment values (e.g., Company, Department, Account) as defined by the organization's accounting flexfield structure. This table is central to all financial transactions across Oracle EBS, as the CCID is referenced by virtually all subledger and general ledger transaction lines to denote the account being debited or credited. Its integrity is paramount for accurate financial reporting.
Key Information Stored
The table's structure directly reflects the configured accounting flexfield. Its primary columns include the system-generated surrogate key, CODE_COMBINATION_ID, and the composite business key that enforces uniqueness for each account combination. As per the provided metadata, this unique key comprises:
- CHART_OF_ACCOUNTS_ID: Links to the specific chart of accounts structure.
- SEGMENT1 through SEGMENT30: Hold the actual values for each segment of the accounting flexfield. Only the number of segments defined in the flexfield structure are populated and used in the unique constraint.
- TEMPLATE_ID: A foreign key to GL_SUMMARY_TEMPLATES, indicating if the combination is a template account used for summary account generation.
- REVALUATION_ID: A foreign key to GL_REVALUATIONS, linking to revaluation setup information for the account.
Additional columns not listed in the excerpt but critical in practice include ENABLED_FLAG (to activate/inactivate the combination), DETAIL_POSTING_ALLOWED_FLAG, and various descriptive fields like DESCRIPTION.
Common Use Cases and Queries
The primary use case is validating and retrieving account combinations for transaction posting and reporting. A frequent query involves joining with the GL_SETS_OF_BOOKS or GL_LEDGERS table and the flexfield value tables (e.g., FND_FLEX_VALUES) to translate CCIDs into meaningful segment descriptions for reports. For example, a standard query to list active account combinations with descriptions is:
SELECT gcc.code_combination_id, gcc.segment1, gcc.segment2, gcc.segment3, gcc.description
FROM gl.gl_code_combinations gcc
WHERE gcc.enabled_flag = 'Y'
AND gcc.chart_of_accounts_id = :coa_id
ORDER BY gcc.segment1, gcc.segment2, gcc.segment3;
Another critical scenario is identifying the usage of a specific CCID across subledgers before disabling it, requiring joins to various distribution tables in AP, AR, FA, and GL. Administrators also query this table to audit and maintain the chart of accounts, ensuring no duplicate combinations exist.
Related Objects
GL_CODE_COMBINATIONS is one of the most referenced tables in Oracle EBS. The provided metadata highlights its foreign key relationship with GL_SUMMARY_TEMPLATES. Crucially, it is the foreign key target for numerous critical columns across application modules, as indicated by the extensive list of foreign keys from tables like AP_BANK_ACCOUNTS_ALL. Key dependent objects include:
- GL_JE_LINES: Every journal entry line stores a CODE_COMBINATION_ID.
- Subledger Distribution Tables: Such as AP_INVOICE_DISTRIBUTIONS_ALL, RA_CUST_TRX_LINE_GL_DIST_ALL, and FA_DISTRIBUTION_HISTORY.
- Setup Tables: GL_LEDGERS references the chart of accounts ID, which governs valid combinations.
- Key Views: GL_CODE_COMBINATIONS_KFV provides a flexfields-aware view of the data.
- APIs: The FND_FLEX_KEYVAL API is used for programmatic validation and creation of code combinations.
-
Table: GL_CODE_COMBINATIONS
12.1.1
owner:GL, object_type:TABLE, fnd_design_data:SQLGL.GL_CODE_COMBINATIONS, object_name:GL_CODE_COMBINATIONS, status:VALID, product: GL - General Ledger , description: Account combinations , implementation_dba_data: GL.GL_CODE_COMBINATIONS ,
-
Table: GL_CODE_COMBINATIONS
12.2.2
owner:GL, object_type:TABLE, fnd_design_data:SQLGL.GL_CODE_COMBINATIONS, object_name:GL_CODE_COMBINATIONS, status:VALID, product: GL - General Ledger , description: Account combinations , implementation_dba_data: GL.GL_CODE_COMBINATIONS ,