Search Results write_bis_refresh_log




Overview

APPS.BIS_COLLECTION_UTILITIES is a shared PL/SQL utility package within the Oracle E-Business Suite Business Intelligence System (BIS) schema, which underpins the collection and refresh architecture used by ETRM (Enterprise Territory and Resource Management) and related BIS-based reporting and data-warehousing components. The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the calling user rather than the package owner, which is significant given that the collection framework is frequently invoked from concurrent programs and background jobs operating under differing application responsibility contexts.

The package's business function is to centralize the plumbing common to every BIS collection program: session setup, logging, refresh-status bookkeeping, parallel DML handling, buffer output, and diagnostics. Its header declares a large set of global variables (including debug flags, hash area size, sort area size, parallel degree, tablespace name, and a persistent status/message pair) that are shared across collection routines to enforce consistent runtime behavior. Rather than each collection program implementing its own logging and status logic, they delegate to this package, producing a uniform operational signature in the refresh log that administrators can query uniformly.

Key Procedures and Functions

  • SETUP – Initializes a collection run, accepting an object name and an optional parallel degree, and returns a boolean indicating success. It establishes the session-level globals used by subsequent calls.
  • WRAPUP – Concludes a collection run, accepting a status flag, a processed count, a message, a from/to period date range, and up to ten free-form attribute parameters. It records the terminal state of the run.
  • WRITE_BIS_REFRESH_LOG – Writes the standard refresh-log entry, capturing status, count, message, and period information in the BIS refresh log table.
  • GET_LAST_FAILURE_PERIOD – Returns the period associated with the most recent failed collection or refresh, enabling restart logic and gap detection.
  • GET_LAST_REFRESH_PERIOD – Returns the period of the last successful refresh, forming the baseline for incremental collection.
  • GET_LAST_REFRESH_DATES – Returns the date boundaries corresponding to the last refresh, complementing the period-based accessors.
  • GET_LAST_USER_ATTRIBUTES – Retrieves the user-defined attribute values persisted from the previous run.
  • LOG, DEBUG, OUT, PUT_NAMES, PUT_LINE, PUT_LINE_OUT – Diagnostic and formatted-output helpers used for trace messages, indented listing output, and buffered line emission during collection processing.
  • WRITEMISSINGRATEHEADER, GETMISSINGRATEHEADER, WRITEMISSINGRATE, WRITEMISSINGCONTRACT – Record rate and contract data identified as missing during collection, supporting exception reporting to the business user.
  • DELETELOGFOROBJECT – Purges log entries for a specified object, typically called before a fresh run.
  • ENABLEPARALLELDML, DISABLEPARALLELDML – Toggle parallel DML for the session, governing whether the collection executes serially or in parallel.

Tables Accessed

  • BIS_REFRESH_LOG – The primary persistence target for run status, counts, messages, and period boundaries written by WRAPUP and WRITE_BIS_REFRESH_LOG.
  • BIS_SYSTEM_DATE – Supplies the system date reference used for period and date determination.
  • FND_CONCURRENT_PROGRAMS – Used to resolve concurrent program context and metadata during logging.
  • GL_DAILY_CONVERSION_TYPES – Referenced for rate-type currency conversion handling in the missing-rate routines.
  • DBA_TABLESPACES – Resolves the operational tablespace used for temporary or staging objects during collection.
  • V$PARAMETER and DBMS_SQL – Used for dynamic SQL execution and session/parameter inspection supporting parallel and setup operations.
  • PLITBLM – The PL/SQL table utility supporting buffered line output routines.

Usage Notes

BIS_COLLECTION_UTILITIES is not an end-user-facing API; it is invoked programmatically by collection programs, concurrent programs, and custom extensions that participate in the BIS refresh framework. Twenty other packages reference it, confirming its role as a foundational dependency. Typical invocation follows a fixed sequence: SETUP at the start of a collection program, periodic LOG and diagnostic calls during processing, and WRAPUP at completion, which internally persists status through WRITE_BIS_REFRESH_LOG. A get_last_failure_period query—the search term that led to this object—is most relevant when restarting a failed collection: the calling code obtains the last failure period, compares it against GET_LAST_REFRESH_PERIOD and GET_LAST_REFRESH_DATES, and reprocesses only the affected range. Parallel execution is controlled explicitly through ENABLEPARALLELDML and DISABLEPARALLELDML, so custom code should disable parallel DML before commit-sensitive operations. Because the package is AUTHID CURRENT_USER, callers require direct grants on the underlying tables and views. Debugging is enabled by setting the package's g_debug flag, which directs LOG and DEBUG output through the PUT_LINE family.