Search Results check_new_status_change




Overview

APPS.AMS_UTILITY_PVT is a private (PVT) PL/SQL utility package belonging to the Oracle Marketing (AMS) module of Oracle E-Business Suite. It consolidates a broad set of shared helper routines used across the Marketing and Trade Management (formerly OZF, now merged into AMS) application family. Its responsibilities include generic data validation, lookup resolution, currency conversion, timezone handling, resource and user resolution, concurrent program logging, and workflow messaging. Because the package is classified as PVT, its APIs are not part of Oracle's public, supported integration surface; they are intended for internal consumption by other AMS packages and are subject to change without notice. The ETRM metadata records roughly forty-six documented procedures and functions, and the package is referenced by 292 other packages, underscoring its role as a central shared-services library within the Marketing schema. The header history shows continuous evolution from 2000 through 2002, reflecting the consolidation of earlier OZF utilities into AMS as the two product lines converged.

Key Procedures and Functions

The documented routines fall into several functional clusters. The logging group includes DEBUG_MESSAGE, LOG_MESSAGE, LOGGING_ENABLED, and CREATE_LOG, which support diagnostic output and the writing of concurrent program log entries, including activity, threshold, and budget logging. Validation utilities include CHECK_FK_EXISTS, CHECK_LOOKUP_EXISTS, CHECK_UNIQUENESS, and IS_Y_OR_N, providing referential, lookup, uniqueness, and Yes/No flag checks. Lookup and metadata helpers include GET_LOOKUP_MEANING, GET_OBJECT_NAME, GET_SOURCE_CODE, GET_QUAL_TABLE_NAME_AND_PK, and GET_INSTALL_INFO.

Currency and timezone utilities comprise CONVERT_CURRENCY, GET_SYSTEM_TIMEZONE, GET_USER_TIMEZONE, and CONVERT_TIMEZONE. Resource and user identification is handled by GET_RESOURCE_NAME, GET_RESOURCE_ID, and the related GET_RESOURCE_ROLE procedures. Status handling is provided through CHECK_STATUS_CHANGE, CHECK_NEW_STATUS_CHANGE, GET_DEFAULT_USER_STATUS, GET_SYSTEM_STATUS_TYPE, and GET_SYSTEM_STATUS_CODE. Error presentation uses ERROR_MESSAGE and DISPLAY_MESSAGES, while workflow integration is served by SEND_WF_STANDALONE_MESSAGE. The specific routine IS_IN_MY_DIVISION, which the user searched for, serves as an organizational access-control predicate: it determines whether a given record, resource, or owning entity belongs to the division of the currently logged-in user. It is typically invoked during list-of-values construction or query filtering to restrict Marketing entities to the user's authorized division. Related constants g_number, g_varchar2, and g_ams_lookups define data-type and lookup-name literals used throughout the package.

Tables Accessed

The package reads and writes several operational and reference tables. AMS_ACT_LOGS, AMS_ACT_LOGS_S, and AMS_ACT_LOGS_TRANSACTION_ID_S underlie the logging and activity-history routines, including CREATE_LOG. AMS_CAMPAIGN_SCHEDULES and AMS_STATUS_ORDER_RULES support scheduling and status-transition logic used by the status-check functions. AMS_CUSTOM_SETUP_ATTR and AMS_SOURCE_CODES provide setup and source-code metadata for the corresponding getter routines. FND_LOOKUP_VALUES and AMS_LOOKUPS back the lookup-validation and lookup-meaning functions.

Customer information is drawn from HZ_PARTIES, while item and unit-of-measure references come from MTL_SYSTEM_ITEMS_KFV and MTL_UNITS_OF_MEASURE. OZF_SYS_PARAMETERS_ALL supplies system parameter values retained from the Trade Management lineage. QP_LIST_LINES is accessed for pricing and qualifier list data, and DUAL supports simple expression evaluation. PLITBLM is used for PL/SQL table and record-type handling, notably for the delete-dependency structures noted in the package history.

Usage Notes

AMS_UTILITY_PVT is normally invoked indirectly rather than directly by end users. Marketing forms and concurrent programs, and the 292 dependent packages, call its routines for validation, logging, currency and timezone conversion, and status management. Customizations should treat the package as private: direct calls are unsupported and may break on patching or upgrades. Where a supported public API exists for the same purpose, it should be preferred.

The division-scoped predicate IS_IN_MY_DIVISION is most commonly observed in list-of-values queries and form-level access filters, where it enforces that a user sees only Marketing data belonging to their division. Developers troubleshooting "no rows" or visibility issues in Marketing forms should verify the user's division setup in the relevant AMS configuration, since this routine gates record accessibility based on division assignment. Logging routines such as CREATE_LOG and LOG_MESSAGE should be used within concurrent programs to produce auditable output, and the timezone and currency helpers should be used consistently to avoid mismatched conversions across Marketing transactions. Because the package maintains no persistent session state beyond its constants and exceptions, it is safe to call repeatedly within a single database session.