Search Results pa_inv_grp_col_whr_clauses




Overview

The PA_INV_GRP_COL_WHR_CLAUSES table is a system-defined intersection table within the Oracle E-Business Suite Projects (PA) module, specifically for releases 12.1.1 and 12.2.2. Its primary role is to manage the assignment of predefined WHERE clauses to specific columns used for grouping transactions into invoices. This table is a core component of the invoice grouping functionality, enabling the application of complex filtering logic to determine which project expenditure items are aggregated together on a single invoice line based on shared column values. It acts as a junction between the definition of grouping columns and the conditional rules applied to them.

Key Information Stored

This table stores a minimal set of foreign key columns that define the many-to-many relationship between invoice group columns and their associated filtering clauses. The two critical columns are INVOICE_GROUP_COLUMN_ID and INVOICE_GROUP_WHERE_CLAUSE_ID. Together, they form the table's primary key (PA_INV_GRP_COL_WHR_CLAUSES_PK), ensuring a unique combination of a column and a WHERE clause. The table does not typically store descriptive or transactional data; its purpose is purely relational. The INVOICE_GROUP_COLUMN_ID links to a specific column defined in PA_INVOICE_GROUP_COLUMNS, such as a project, task, or expenditure type. The INVOICE_GROUP_WHERE_CLAUSE_ID links to a specific conditional rule defined in PA_INV_GRP_WHR_CLAUSES, which contains the actual SQL fragment used for filtering.

Common Use Cases and Queries

The primary use case is supporting the setup and generation of grouped project invoices. Administrators configure grouping rules in the application interface, and this table persists the associations. A common reporting need is to audit or verify the grouping rules applied to a specific invoice group column. For example, to list all WHERE clauses assigned to the 'Project' grouping column, one might execute a query joining to the related descriptive tables:

  • SELECT igc.column_name, igwc.where_clause_name, igwc.where_clause
    FROM pa_inv_grp_col_whr_clauses igcwc,
        pa_invoice_group_columns igc,
        pa_inv_grp_whr_clauses igwc
    WHERE igcwc.invoice_group_column_id = igc.invoice_group_column_id
    AND igcwc.invoice_group_where_clause_id = igwc.invoice_group_where_clause_id
    AND igc.column_name = 'PROJECT_ID';

This table is also critical during the invoice generation process, where the Oracle Projects application engine references these associations to dynamically build the complete SQL statement used to select and group invoiceable transactions.

Related Objects

PA_INV_GRP_COL_WHR_CLAUSES is centrally linked to two key master tables via foreign key constraints, forming the core of the invoice grouping rule definition.

  • PA_INVOICE_GROUP_COLUMNS: This table defines the available columns for grouping (e.g., PROJECT_ID, TASK_ID). The relationship is established through the foreign key on PA_INV_GRP_COL_WHR_CLAUSES.INVOICE_GROUP_COLUMN_ID.
  • PA_INV_GRP_WHR_CLAUSES: This table stores the system-defined conditional WHERE clause fragments (e.g., "AND pa_expenditure_items.billable_flag = 'Y'"). The relationship is established through the foreign key on PA_INV_GRP_COL_WHR_CLAUSES.INVOICE_GROUP_WHERE_CLAUSE_ID.

These relationships ensure data integrity, guaranteeing that any assignment in the intersection table references a valid grouping column and a valid WHERE clause.