Search Results is_period_range_valid




Overview

OZF_TIME_API_PVT_W is a private PL/SQL package in the Oracle EBS Applications (APPS) schema that provides the public wrapper interface for the OZF_TIME_API_PVT time-validation business logic. The package belongs to the Oracle Trade Management (OZF) product family, which supports promotional planning, trade funds, and deal management. Its principal responsibility is to evaluate whether a given date range is permissible according to the calendar and period rules configured for a trade management application.

The "_W" suffix denotes a wrapper package generated for cross-schema or interface exposure, and the AUTHID CURRENT_USER declaration means that the package executes with the privileges of the calling user rather than the definer, allowing the surrounding application to apply its own security context. The $Header comment records the initial check-in as version 115.0 in March 2004, indicating that the package has been part of the ETRM codebase since early releases and remains present through 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes four documented program units:

  • IS_PERIOD_RANGE_VALID — This is the function most commonly sought by developers and is the object of the "is_period_range_valid" search. It accepts a start date and an end date and returns a character flag indicating whether the supplied range is a valid period range for the trade management application. It is typically called before creating or updating promotions, qualifiers, or offer records so that the application can reject ranges that fall outside configured periods or that violate calendar rules.
  • IS_QUARTER_ALLOWED — Similar in signature to IS_PERIOD_RANGE_VALID, this function takes a start date and an end date and returns a character value indicating whether the range corresponds to an allowed fiscal quarter. It is used where the business requires promotions or funds to be aligned to quarter boundaries.
  • ROSETTA_TABLE_COPY_IN_P0 — A generated bulk-copy helper that transfers a JTF_NUMBER_TABLE into the internal g_period_tbl_type collection. The "Rosetta" prefix identifies it as an automatically generated table-conversion utility used by the EBS integration framework.
  • ROSETTA_TABLE_COPY_OUT_P0 — The counterpart helper that copies the internal period-table collection back out into a JTF_NUMBER_TABLE for consumption by callers or external interfaces.

Only the two IS_ functions embody business rules; the Rosetta procedures exist purely to marshal data between the wrapper and the underlying OZF_TIME_API_PVT package.

Tables Accessed

The only table documented as referenced through APPS synonyms is PLITBLM. This is the standard EBS PL/SQL table column-sizing view used by the Rosetta table-copy utilities to determine the maximum size of the collection's columns. The business-rule functions derive their period and quarter definitions from the internal g_period_tbl_type collection populated elsewhere in the OZF_TIME_API_PVT package, not from direct table access by this wrapper.

Usage Notes

The package is not intended for direct end-user invocation. It is normally called from within the Trade Management forms and from custom PL/SQL that validates date ranges before writing promotional or offer data. Because the functions return a single character, callers typically test the result against the expected success flag before proceeding with DML. The wrapper is not referenced by any other documented package, so it sits at the top of its call chain; developers extending trade management logic should call OZF_TIME_API_PVT_W rather than the private OZF_TIME_API_PVT body to remain insulated from internal changes. In 12.2.2 the package continues to be deployed under APPS and can be invoked from concurrent programs or custom APIs that need to pre-validate period ranges in online or batch processing.