Results for “fnd_random_pkg”

36 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

FND_RANDOM_PKG is an Oracle E-Business Suite database package owned by the APPS schema that provides a reusable pseudo-random number generation facility for PL/SQL code. Unlike many FND packages that support application functionality such as security, flexfields, or concurrent processing, FND_RANDOM_PKG is an infrastructure utility whose sole business function is the deterministic generation of random or pseudo-random numeric values on demand. Within the EBS 12.1.1 and 12.2.2 codebases, it is classified under the ETRM (E-Business Suite Technical Reference Manual) as an OTHER API, reflecting its role as an internal helper rather than a public, customer-facing interface. The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling session rather than the definer, which is consistent with a utility that performs no privileged data access of its own. Its header identifies it as source file AFCPRNDS.pls, indicating an origin in the Application Foundation (FND) code family.

Key Procedures and Functions

The documented ETRM metadata identifies four callable units within the package:

  • INIT — A procedure that initializes the random number generator, taking a length argument (p_length) that governs the size or range characteristics of the sequence to be produced.
  • SEED — A procedure that sets the seed value for the generator, allowing callers to control or reproduce the sequence. Its documented signature includes a value, a cycle count, and a forced flag (boolean), enabling deterministic restart behavior.
  • INIT_ARRAYS — A procedure that initializes the internal array structures used by the generator. The package declares a NUMBER_ARRAY type as a PL/SQL associative array indexed by BINARY_INTEGER, which this procedure presumably populates or resets.
  • GET_NEXT — A function that returns the next number in the generated sequence. This is the primary runtime entry point for consumers of the package.

The exported specification consists only of these units plus the NUMBER_ARRAY type; internal package body logic is not exposed.

Tables Accessed

The ETRM metadata records no tables referenced via APPS synonyms. This is consistent with the nature of a random number generator: it relies on package-level state (the seeded sequence and initialized arrays) rather than on persistent database storage. No DML or queries against EBS application tables are performed.

Usage Notes

FND_RANDOM_PKG is typically invoked from PL/SQL code that requires randomized values — for example, generating unique temporary identifiers, populating test or sample data, or introducing jitter into scheduling logic. The documented dependency graph shows that the package is referenced by three other packages within the EBS schema, confirming that it is used programmatically rather than through a form or concurrent program interface. Standard usage follows a prepare-then-consume pattern: callers first invoke INIT (and optionally SEED) to establish the generator state, then repeatedly call GET_NEXT to obtain values. Because it holds no persistent state and carries no table privileges, it is safe to call from custom code and concurrent programs alike, provided the calling session has EXECUTE on the APPS package. Developers should note the AUTHID CURRENT_USER declaration when considering privilege propagation, and should seed explicitly where reproducible sequences are required.