Search Results cln_syncitem_pkg




Overview

CLN_SYNCITEM_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports outbound item synchronization between a trading partner and the local EBS instance within the Oracle Collaborative Planning / Supply Chain Trading Connector (CLN) module. The package header is defined with AUTHID CURRENT_USER, meaning its procedures and functions execute with the privileges of the invoking user rather than the definer, which is significant because the package is designed to be called from both the 2A12 XGM (XML Gateway Message) processing context and from the 2A12 concurrent program. The header carries the RCS identifier CLNSYITS.pls 120.0 dated 2005/05/24, and the original author is recorded as Rahul Krishan (July-21-2003). Its core responsibility is to resolve trading-party and customer-account context, capture user-supplied selection criteria for item synchronization, and raise the outbound business event that carries item payloads to the trading partner.

Key Procedures and Functions

  • GET_PARTY_ID — Returns the trading party identifier identifying the destination to which the synchronization payload must be sent.
  • GET_CUST_ACCT_ID — Returns the customer account identifier associated with the current trading context.
  • SET_PARTY_ID — Sets the party identifier so that the view CLN_2A12_PARTY_V is populated with the correct value. It is invoked from the 2A12 XGM during inprocessing to preserve context across the XML Gateway call stack.
  • RAISE_SYNCITEM_EVENT — Called from the 2A12 concurrent program. It accepts the user's selection criteria (trading partner header, inventory organization, category set and category, catalog category, item status, from/to item ranges, and items per payload) and, after processing, raises the outbound event that drives synchronization. It follows the standard concurrent-program signature returning errbuf and retcode.
  • SEND_SYNCITEM_DELETE — Invoked from the 2A12 Workflow. It checks the trading partner configuration and dispatches delete notifications for items that have been removed from the synchronized set.
  • ARCHIVE_DELETED_ITEMS — Moves or records deleted synchronization items into an archival structure so that deletion history is retained.
  • DELETE_ARCHIVED_ITEMS — Purges previously archived deleted items, providing housekeeping for the archival table.

Tables Accessed

The package reads EBS master and transactional data through APPS synonyms. Trading-partner configuration and messaging context come from ECX_TP_HEADERS, ECX_TP_DETAILS, ECX_EXT_PROCESSES, and ECX_TRANSACTIONS. Party and customer resolution uses HZ_PARTIES, HZ_CUST_ACCOUNTS, HZ_PARTY_SITES, and HZ_LOCATIONS. Item and category selection draws on MTL_ITEM_CATEGORIES, MTL_CATEGORY_SET_VALID_CATS, MTL_ITEM_CATALOG_GROUPS_KFV, MTL_CUSTOMER_ITEMS, and MTL_CUSTOMER_ITEM_XREFS. Staging and deletion tracking rely on CLN_SYNCITEM_S and CLN_ITEMMST_DELETED_ITEMS, which support the archive and purge procedures.

Usage Notes

CLN_SYNCITEM_PKG is not an end-user-facing API; it is invoked indirectly. The 2A12 concurrent program calls RAISE_SYNCITEM_EVENT to launch synchronized item extraction, the 2A12 XGM calls SET_PARTY_ID to seed context during inprocessing, and the 2A12 Workflow calls SEND_SYNCITEM_DELETE for outbound delete processing. The metadata records that the package is referenced by one other package, confirming it operates as a supporting utility rather than a top-level entry point. Customizations should not modify the package directly; instead, extensions should wrap or replicate its documented interfaces, since it participates in the standard 2A12 item synchronization flow.