Search Results insert_mtl_unit_trans
Overview
CSM_MTL_UNIT_TXN_ACC_PKG is an Oracle EBS Applications (APPS) package body that maintains the transactional accounting staging table CSM_MTL_UNIT_TXN_ACC. It belongs to the Oracle Complex Maintenance, Repair, and Overhaul (CMRO) / Enterprise Asset Management (EAM) family of packages, prefixed with the CSM (Complex Service Management) naming convention used across the CSM_ACC_PKG accounting framework. The package acts as the integration bridge between core inventory unit transaction data held in MTL_UNIT_TRANSACTIONS and the accounting records required for downstream financial posting. Its responsibilities include inserting, updating, and deleting accounting rows whenever unit-level inventory transactions (receipts, issues, transfers, and adjustments involving serialized or lot-controlled items) occur, and providing a bulk purge utility for clearing staged accounting data. In the context of EBS 12.1.1 and 12.2.2, this package operates as a component of the CSM accounting event model, publishing transaction data through CSM_ACC_PKG's publication item framework so that the accounting engine can consume it.
Key Procedures and Functions
- INSERT_MTL_UNIT_TRANS — Creates new accounting records in CSM_MTL_UNIT_TXN_ACC for unit transactions. It opens a cursor against MTL_UNIT_TRANSACTIONS filtered by transaction ID, bulk-collects the matching TRANSACTION_ID and SERIAL_NUMBER values into PL/SQL index-by tables, and loops over the result set to populate the accounting staging table. Logging is performed through CSM_UTIL_PKG.LOG at statement level.
- UPDATE_MTL_UNIT_TRANS — Maintains existing accounting rows when a unit transaction is modified, ensuring the staged data remains synchronized with the source transaction. A global variable g_old_user_id is populated in a pre-update hook to preserve the original user context.
- DELETE_MTL_UNIT_TRANS — Removes accounting records associated with a specific unit transaction, typically invoked when a unit transaction is reversed, cancelled, or deleted at source.
- DELETE_ALL_ACC_RECORDS — Performs a bulk purge of all records in the CSM_MTL_UNIT_TXN_ACC staging table. This is the procedure most commonly associated with the search term "delete_all_acc_records" and is used during data clean-up, re-processing, or resynchronization activities.
The package declares constants g_acc_table_name ('CSM_MTL_UNIT_TXN_ACC'), g_table_name ('MTL_UNIT_TRANSACTIONS'), g_tasks_seq_name, g_pk1_name ('TRANSACTION_ID'), and g_pk2_name ('SERIAL_NUMBER'), and registers the 'CSM_MTL_UNIT_TXNS' publication item with CSM_ACC_PKG.
Tables Accessed
- CSM_MTL_UNIT_TXN_ACC — The primary target table; the package inserts, updates, and deletes accounting staging rows here.
- MTL_UNIT_TRANSACTIONS — The source table for unit-level inventory transactions; read to obtain TRANSACTION_ID and SERIAL_NUMBER pairs for accounting record generation.
- PLITBLM — Referenced indirectly, typically for PL/SQL table column masking used in the accounting framework.
Usage Notes
CSM_MTL_UNIT_TXN_ACC_PKG is invoked from the CSM accounting subscription model, commonly triggered by business events or concurrent programs that process unit transaction accounting. It is referenced by one other package and is designed to be called by the CSM accounting framework rather than directly from Forms. The DELETE_ALL_ACC_RECORDS procedure is typically executed during implementation cut-over, data correction, or before re-running accounting generation for a set of unit transactions. Because the package performs bulk DML without committing, callers must manage transaction control explicitly. Debug output is governed by g_debug_level via CSM_UTIL_PKG, enabling statement-level tracing when diagnosing accounting discrepancies in 12.1.1 and 12.2.2 environments.
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG SQL Statements
12.1.1
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG SQL Statements
12.2.2
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG SQL Statements
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG SQL Statements
12.2.2
-
PACKAGE BODY: APPS.CSM_MTL_UNIT_TXN_ACC_PKG
12.2.2
-
PACKAGE BODY: APPS.CSM_MTL_UNIT_TXN_ACC_PKG
12.1.1
-
PACKAGE: APPS.CSM_MTL_UNIT_TXN_ACC_PKG
12.2.2
-
PACKAGE BODY: APPS.CSL_MTL_UNIT_TRANS_ACC_PKG
12.2.2
-
PACKAGE BODY: APPS.CSL_MTL_UNIT_TRANS_ACC_PKG
12.1.1
-
PACKAGE: APPS.CSL_MTL_UNIT_TRANS_ACC_PKG
12.2.2
-
PACKAGE: APPS.CSM_MTL_UNIT_TXN_ACC_PKG
12.1.1
-
PACKAGE: APPS.CSL_MTL_UNIT_TRANS_ACC_PKG
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on FND_LOG
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on FND_LOG
12.2.2
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on CSM_UTIL_PKG
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on CSM_UTIL_PKG
12.2.2
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG dependencies on JTM_MESSAGE_LOG_PKG
12.2.2
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG dependencies on JTM_MESSAGE_LOG_PKG
12.1.1
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG dependencies on JTM_HOOK_UTIL_PKG
12.2.2
-
APPS.CSL_MTL_UNIT_TRANS_ACC_PKG dependencies on JTM_HOOK_UTIL_PKG
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on MTL_UNIT_TRANSACTIONS
12.1.1
-
APPS.CSM_MTL_UNIT_TXN_ACC_PKG dependencies on MTL_UNIT_TRANSACTIONS
12.2.2