Search Results insert_location




Overview

The APPS.CSM_HZ_LOCATIONS_EVENT_PKG package body forms part of the Oracle E-Business Suite Change Management / Audit Capture (CSM) infrastructure, which records a continuous transactional audit trail of master reference data changes. Its specific responsibility is to publish change events raised against the HZ_LOCATIONS table — the central TCA (Trading Community Architecture) table that stores addresses and location records used across Order Management, Receivables, Payables, and other modules.

When a location row is created or removed, the Applications database triggers invoke this event package so that the change is captured into the audit tables managed by the CSM audit capture layer. The package is registered with the ETRM repository as an OTHER classification API under the APPS schema and is documented as being referenced by two other packages, confirming its role as a dependency within the location audit-capture chain rather than as an independently callable API.

The header comment ($Header: csmehzlb.pls 120.1 ... noship $) indicates the source was last touched in the 11.5.10 / 12.0 generation and carried unchanged into 12.1.1 and 12.2.2, where the CSM audit architecture remains the same.

Key Procedures and Functions

Two documented procedures are exposed by the package:

  • INSERT_LOCATION — Handles the publication of a create event for a location row. It accepts the location identifier and the acting user identifier, then delegates the actual audit-record creation to CSM_ACC_PKG.Insert_Acc, passing the publication item CSM_HZ_LOCATIONS, the audit table CSM_HZ_LOCATIONS_ACC, its sequence CSM_HZ_LOCATIONS_ACC_S, and the primary-key column LOCATION_ID. The procedure brackets its work with debug-level logging through JTM_HOOK_UTIL_PKG.Get_Debug_Level and jtm_message_log_pkg.Log_Msg, emitting "Entering Insert_Location" and "Leaving Insert_Location" messages at full debug level. A generic WHEN OTHERS handler captures SQLCODE and SQLERRM, logs them, and re-raises the exception.
  • DELETE_LOCATION — The symmetric counterpart for delete events, publishing the removal of a location row into the same audit-capture framework.

Package-level globals — g_debug_level, g_acc_table_name, g_seq_name, g_table_name, g_pk1_name, and g_publication_item_name — centralise the audit table, sequence, and publication-item metadata so the procedures contain no hard-coded literals.

Tables Accessed

The package is documented as referencing no tables directly via APPS synonyms; all data manipulation is performed through the CSM audit-capture framework. Indirectly, the audit records are written to CSM_HZ_LOCATIONS_ACC, keyed by the sequence CSM_HZ_LOCATIONS_ACC_S, and the source of the event is the HZ_LOCATIONS table with primary key LOCATION_ID. The publication item CSM_HZ_LOCATIONS controls which consumers receive the change notification.

Usage Notes

This package is not intended for direct invocation from forms, concurrent programs, or custom code. It is an event hook invoked by the seeded CSM audit triggers and subscription machinery attached to HZ_LOCATIONS. Because it is referenced by two other packages, modifications carry a ripple risk across the audit-capture chain.

Debug output is governed by the JTM hook utility debug level; setting the level to FULL or MEDIUM produces detailed entries in the JTM message log, which is the primary diagnostic aid when location changes fail to appear in the audit tables. Any exception raised by CSM_ACC_PKG.Insert_Acc propagates upward after logging, so failures surface in the calling transaction rather than being silently swallowed. When troubleshooting the search term insert_location, the audit-trail symptom to check is whether rows are being written to CSM_HZ_LOCATIONS_ACC for the affected LOCATION_ID and whether the corresponding JTM log entries were generated.