Search Results get_seq_val




Overview

FND_SEQNUM is the Oracle E-Business Suite foundation package that implements Sequential Numbering (document sequencing). It provides the central logic used by applications across EBS to assign, generate, and validate unique sequential numbers for documents such as invoices, purchase orders, journals, and payments. Rather than each application maintaining its own numbering scheme, FND_SEQNUM resolves numbering requirements through a shared configuration model built on document sequences, sequence categories, and assignment records. In Oracle EBS 12.1.1 and 12.2.2, the package is owned by APPS and declared AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema. It is one of the most widely referenced foundation packages, invoked by 47 other packages, and returns a defined set of status constants (SEQSUCC, ORAFAIL, NOASSIGN, NOTUSED, ALWAYS, and others) that mirror the behavior of the underlying C function fdssop(). These constants allow calling code to distinguish success, configuration problems, missing assignments, and validation failures such as duplicate or non-unique manual entries.

Key Procedures and Functions

The package exposes 14 documented entry points covering configuration and runtime retrieval:

Tables Accessed

FND_SEQNUM reads and writes a defined set of foundation tables through APPS synonyms. FND_DOCUMENT_SEQUENCES and its _S (security) view/table hold sequence definitions, while FND_DOC_SEQUENCE_ASSIGNMENTS and its _S counterpart hold the assignment of sequences to applications and categories. FND_DOC_SEQUENCE_CATEGORIES provides valid category codes, and FND_DOC_SEQUENCE_USERS supports user-specific numbering behavior. FND_APPLICATION and FND_ORACLE_USERID supply application and database user context. FND_DESCR_FLEX_COLUMN_USAGES and FND_PRODUCT_INSTALLATIONS supply descriptive flexfield and installation context. AD_DDL is used to execute DDL for creating database sequences, DBMS_SQL supports dynamic sequence creation, and DUAL is used for single-row computations.

Usage Notes

FND_SEQNUM is rarely called directly by end users; it is invoked programmatically by application APIs, forms, and concurrent programs whenever a document requires a sequential number. Calling code passes the set of books, category, and method, then interrogates the returned status constant — SEQSUCC for success, NOTUSED or ALWAYS for numbering policy outcomes, NOASSIGN when no assignment exists, and the various BAD* constants for invalid input. The CREATE_DB_SEQ and CREATE_GAPLESS_SEQUENCE routines are configuration-time operations, typically triggered by the System Administrator when defining or assigning a sequence, and require DDL privileges to create the backing database sequence. Custom integrations that must emulate standard EBS document numbering should call GET_NEXT_SEQUENCE rather than querying sequences directly, ensuring consistent gapless or audit behavior and correct handling of manual and automatic methods.