Search Results csm_mobile_query_pkg




Overview

CSM_MOBILE_QUERY_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that supports the Oracle Field Service / Customer Service Mobile (CSM) framework. Its principal business function is to reconcile changes made to query definitions and query variables on a handheld or disconnected mobile device with the corresponding records held in the Enterprise database. This is accomplished through the "upward sync" of the publication item CSM_QUERY, which is the mobile publication that carries query configuration data to and from the field. The package is therefore part of the broader Oracle Mobile Supply Chain / Field Service synchronization architecture, in which client-side changes are queued locally on a mobile device and later applied to the central instance when connectivity is restored.

The package is declared with AUTHID CURRENT_USER, meaning that its SQL statements execute with the privileges of the invoking user rather than as the definer. The header comment in the source identifies a revision dated 2009/08/03, confirming that the package has been part of the EBS code line since at least the early 12.1.1 releases and remains present in 12.2.2.

Key Procedures and Functions

The ETRM metadata documents a single callable program unit within the package specification: APPLY_CLIENT_CHANGES. This is a procedure designed to be invoked by the mobile synchronization engine when a client initiates an upward sync of the CSM_QUERY publication item. Its documented purpose is to update query instance changes that originated on the handheld device against the Enterprise database, applying the client-originated modifications so that the central data store reflects the field user's edits. The procedure is the sole entry point exposed by the package specification; no other procedures or functions are declared in the documented metadata.

Parameter details beyond the documented signature are not enumerated here; the procedure's role is to accept the sync context supplied by the caller and to return a status indicator reflecting the outcome of the apply operation.

Tables Accessed

The package accesses a defined set of tables and views, largely through APPS synonyms, reflecting the CSM query data model:

  • CSM_QUERY_B and CSM_QUERY_B_S — the base table and its sequence/primary-key companion that store the header-level query definitions being synchronized.
  • CSM_QUERY_TL — the translation (multi-language) table holding the language-specific query text.
  • CSM_QUERY_INQ — the interface/queue table that stages inbound client changes prior to application to the base tables.
  • CSM_QUERY_VARIABLES_B and CSM_QUERY_VARIABLES_INQ — the base and interface tables for query variable definitions associated with each query.
  • ASG_USER — used to resolve the identity and context of the resource or user performing the sync.
  • DUAL — the standard single-row utility table used for scalar evaluations.
  • PLITBLM — the PL/SQL integer-indexed table type commonly used by Oracle EBS mobile APIs for internal row processing.

Usage Notes

APPLY_CLIENT_CHANGES is not intended for direct interactive invocation by end users. It is called programmatically by the CSM mobile synchronization infrastructure when a handheld device performs an upward sync of the CSM_QUERY publication item. In typical deployments the call is issued from mobile client sync services or from concurrent programs that orchestrate publication sync, and the package is referenced by at least one other package within the application, consistent with its role as a subordinate sync handler rather than a top-level API.

Customizations that extend the CSM query model, such as additional query attributes, must respect the interface-table staging pattern this package implements: changes arrive through the _INQ tables and are validated and merged into the _B tables. Because the package runs with AUTHID CURRENT_USER, the invoking session must hold the necessary privileges on the underlying CSM objects. Developers extending the mobile query publication should treat this package as the authoritative apply logic for the CSM_QUERY sync item and avoid bypassing it when routing field-originated query changes into the Enterprise database.