Search Results ra_line_ordering_rules




Overview

The RA_LINE_ORDERING_RULES table is a core setup table within Oracle E-Business Suite Receivables (AR), specifically for the AutoInvoice program. It stores master definitions for line ordering rules, which are critical for controlling the sequence in which transaction lines are imported and processed during an AutoInvoice run. The proper ordering of lines is essential for accurate tax calculation, revenue recognition, and financial reporting, as the sequence can affect the application of accounting rules and dependencies between lines. This table acts as a parent definition, with its rules applied to transactions based on customer or system profile settings.

Key Information Stored

The table's primary purpose is to define unique ordering rule entities. The key columns include ORDERING_RULE_ID, which is the system-generated primary key and unique identifier for each rule. The NAME column holds the unique, user-defined name for the ordering rule, such as 'Line Number Order' or 'Revenue Account Order'. This name is displayed in the AutoInvoice setup and grouping rule assignment interfaces. While the ETRM excerpt shows only these core structural columns, the table's data drives the selection and sequence logic executed by the AutoInvoice program, referencing child objects that define the specific ordering criteria.

Common Use Cases and Queries

The primary use case is configuring and reviewing the setup for AutoInvoice line sequencing. Administrators query this table to audit existing rules before assigning them to grouping rules or to troubleshoot AutoInvoice import issues related to line order. Common SQL patterns include listing all defined rules and verifying rule usage. For example:

  • To list all ordering rules: SELECT ordering_rule_id, name FROM ra_line_ordering_rules ORDER BY name;
  • To find a specific rule's ID for use in a join: SELECT ordering_rule_id FROM ra_line_ordering_rules WHERE name = '<Rule Name>';

These rules are typically referenced in setups involving the RA_GROUPING_RULES table and are executed during the Ordering phase of the AutoInvoice program (arpinvd.pc).

Related Objects

RA_LINE_ORDERING_RULES has defined parent-child relationships with two key tables, as per the provided foreign key metadata:

  • RA_GROUPING_RULES: This table references RA_LINE_ORDERING_RULES via the column RA_GROUPING_RULES.ORDERING_RULE_ID. A grouping rule can be assigned one line ordering rule to determine the sequence of lines within a created transaction.
  • RA_LINE_ORDER_BYS: This is a critical child table that references RA_LINE_ORDERING_RULES via RA_LINE_ORDER_BYS.ORDERING_RULE_ID. It stores the specific columns and sort order (e.g., LINE_NUMBER ascending, REVENUE_ACCOUNT descending) that constitute the detailed definition of the parent ordering rule.

Therefore, the complete functional setup involves creating a rule in RA_LINE_ORDERING_RULES, defining its sort criteria in RA_LINE_ORDER_BYS, and then assigning that rule to a grouping rule in RA_GROUPING_RULES.