Search Results get_serial_diff




Overview

APPS.INV_SERIAL_NUMBER_PUB is the public PL/SQL API for the Oracle Inventory serial number business entity (INV_SERIAL_NUMBER). It exposes a controlled, supported interface through which callers in Oracle E-Business Suite 12.1.1 and 12.2.2 create, validate, update, and query serial numbers and the transactions that move them. The package is classified as PUB in ETRM, meaning its procedures are intended for external invocation rather than internal-only use, and it is referenced by 33 other packages across the applications schema.

Functionally, the package centralizes serial number lifecycle logic that would otherwise be duplicated in forms, concurrent programs, and custom extensions. It supports uniqueness checking, attribute validation and update, serial range generation, mask handling, unit (serial) transaction creation, and the derivation of differences between two serial numbers. Because serial-controlled items drive receiving, inventory movement, shipping, and eAM maintenance flows, this API sits at a high-leverage point in the inventory data model.

Key Procedures and Functions

The ETRM metadata documents 27 procedures and functions. The principal entries relevant to serial creation, validation, and comparison are described below.

  • INSERTSERIAL / INSERT_RANGE_SERIAL — Validate and insert a single serial number or a contiguous range of serials. INSERTSERIAL is overloaded for eAM usage.
  • UPDATESERIAL / UPDATE_MSN — Apply attribute changes to an existing serial number record; UPDATE_MSN targets the master serial number.
  • INSERTUNITTRX / INSERTRANGEUNITTRX — Create unit (serial) transactions that record the movement or status change of serialized material.
  • GENERATE_SERIALS — Produce serial numbers from an established numbering scheme or range definition.
  • IS_SERIAL_UNIQUE — Test whether a proposed serial value conflicts with existing entries.
  • GET_SERIAL_DIFF — Compute the difference between two serial numbers, supporting range and continuity checks (the searched term).
  • VALIDATE_SERIALS / VALIDATE_STATUS / VALSN — Validate serial numbers, their statuses, and associated business rules before persistence or transaction posting.
  • INCREMENT_SER_NUM / SNGETMASK — Increment a serial value according to its numbering convention and resolve the mask that governs serial formatting.
  • VALIDATE_UPDATE_SERIAL_ATT — Validate serial attribute changes prior to update.
  • IS_SERIAL_CONTROLLED / IS_SERIAL_TAGGED — Determine whether an item or context is serial-controlled and whether serial tagging applies.
  • POPULATEATTRIBUTESCOLUMN — Populate serial attribute columns used by selection and display logic.
  • SET_FIRSTSCAN — Set the g_firstscan package variable that governs first-scan behavior.
  • GETGROUPID — Retrieve the group identifier associated with a serial context.

Tables Accessed

The package reads and writes the core serial tables and their supporting reference data through APPS synonyms.

Usage Notes

INV_SERIAL_NUMBER_PUB is typically invoked from Oracle Inventory and eAM forms, from serial-related concurrent programs, and from custom PL/SQL that must create or manipulate serials without bypassing validation. Standard callers should supply p_api_version, p_init_msg_list, p_commit, and validation-level arguments, then inspect the standard message list on return. Direct DML against MTL_SERIAL_NUMBERS is unsupported; custom code should route through this package so that uniqueness, status, mask, and attribute rules remain enforced across releases 12.1.1 and 12.2.2.