Search Results insert_trx
Overview
CN_COLLECTION_AR_GEN is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It forms part of the Oracle Channel Revenue Management (formerly Oracle Trade Management) collections infrastructure. The package generates and maintains the Accounts Receivable-side collection records associated with trade management and channel revenue transactions. In practice, it acts as a generator layer that translates event-driven data held in the CN (Channel) schema tables into receivable transaction headers, lines, sales lines, and commission lines, and keeps the associated invoice totals synchronized.
The package is classified as OTHER in the ETRM 12.2.2 metadata, indicating it is not exposed as a formally versioned public API with a stable interface guarantee; it is instead an internal generation utility that supports the collections processing flow.
Key Procedures and Functions
The package exposes eight documented procedures. All share a common signature pattern consisting of a procedure name identifier, a module identifier, an event identifier, an IN OUT NOCOPY code parameter of type cn_utils.code_type for returning status and error information, and an organization identifier.
- INSERT_TRX — Creates the transaction-level (header) collection record for the event being processed.
- UPDATE_TRX — Updates an existing transaction-level collection record when the underlying event data changes.
- INSERT_LINES — Inserts the detail lines belonging to a collection transaction.
- UPDATE_LINES — Modifies existing detail lines to reflect revised event or source data.
- INSERT_SALES_LINES — Inserts sales-related lines used in the receivable generation, distinguishing sales detail from standard transaction lines.
- UPDATE_SALES_LINES — Updates previously generated sales lines.
- UPDATE_INVOICE_TOTAL — Recalculates and refreshes the invoice total after lines have been inserted or modified. This procedure does not carry the module and event identifiers, consistent with a summary roll-up operation.
- INSERT_COMM_LINES — The procedure matching the search term "insert_comm_lines." It inserts commission lines into the collection structure, supporting compensation and commission accounting associated with the source transaction.
Tables Accessed
The documented tables referenced through APPS synonyms are:
- CN_EVENTS — Stores the event definitions and event instances that drive generation. The event identifier passed to each procedure is resolved against this table.
- CN_MODULES — Holds module registration data; the module identifier parameter identifies the originating module context.
- CN_OBJECTS — Defines the object metadata used to determine which generation logic applies.
- CN_COLUMN_MAPS — Provides column-level mapping metadata that governs how source columns map to generated collection columns.
- CN_TABLE_MAPS — Provides table-level mapping metadata that governs the source-to-target table relationships used during generation.
The mapping tables (CN_COLUMN_MAPS and CN_TABLE_MAPS) indicate that generation is metadata-driven, allowing mappings to vary by module and object without code changes.
Usage Notes
CN_COLLECTION_AR_GEN is invoked internally rather than directly by end users. It is referenced by one other package, which typically acts as the orchestrator that iterates over eligible events and calls the appropriate insert or update procedures. Invocation occurs during collections processing, when trade management or channel revenue events must be reflected in Accounts Receivable.
Because the package is classified as OTHER and carries a proprietary source header, direct custom calls are discouraged. Custom code should invoke the supported public APIs that in turn call this generator. When troubleshooting, developers commonly search for individual procedures such as INSERT_COMM_LINES to trace the code path for a specific line type. The IN OUT NOCOPY code parameter should be inspected after each call to detect error conditions, as the package reports status through this mechanism rather than raising exceptions for every failure case.
-
APPS.CN_COLLECTION_AR_GEN SQL Statements
12.1.1
-
APPS.CN_COLLECTION_AR_GEN SQL Statements
12.2.2
-
PACKAGE: APPS.CN_COLLECTION_AR_GEN
12.1.1
-
PACKAGE: APPS.CN_COLLECTION_AR_GEN
12.2.2
-
PACKAGE BODY: APPS.CN_COLLECTION_AR_GEN
12.2.2
-
PACKAGE BODY: APPS.CN_COLLECTION_AR_GEN
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_DEBUG
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_DEBUG
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on FND_FILE
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on FND_FILE
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_MODULES
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_MODULES
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_EVENTS
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_MODULES
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_EVENTS
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_EVENTS
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_MODULES
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_EVENTS
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_OBJ_PROCEDURES_V
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_OBJ_PROCEDURES_V
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_UTILS
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_OBJ_PROCEDURES_V
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_OBJ_PROCEDURES_V
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_UTILS
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_UTILS
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_UTILS
12.2.2
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_GLOBAL
12.1.1
-
APPS.CN_COLLECTION_AR_GEN dependencies on CN_GLOBAL
12.2.2