Search Results create_db_seq
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:
- DEFINE_DOC_SEQ — defines a document sequence, establishing the base numbering definition used by an application.
- ASSIGN_DOC_SEQ — assigns a defined sequence to an application and category so it becomes active for a given context.
- GET_NEXT_SEQUENCE / GET_NEXT_AUTO_SEQ / GET_NEXT_AUTO_SEQUENCE — retrieve the next automatic sequence value for the supplied context.
- GET_NEXT_USER_SEQUENCE — returns the next value for a user-entered (manual) sequence.
- GET_SEQ_VAL / GET_SEQ_INFO — return the sequence value or sequence information and status for a parameter set, using the package status constants.
- GET_SEQ_NAME — resolves the sequence name associated with a given assignment.
- CREATE_GAPLESS_SEQUENCES / CREATE_GAPLESS_SEQUENCE — create underlying gapless sequence objects used to enforce contiguous numbering.
- CREATE_DB_SEQ — creates the database sequence object backing a defined document sequence; this is the routine associated with the "create_db_seq" search term.
- CREATE_AUDIT_REC — records an audit entry for sequence activity.
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.
-
PACKAGE: APPS.FND_SEQNUM
12.2.2
-
PACKAGE: APPS.FND_SEQNUM
12.1.1
-
APPS.FND_SEQNUM SQL Statements
12.1.1
-
APPS.FND_SEQNUM SQL Statements
12.2.2
-
PACKAGE BODY: APPS.FND_SEQNUM
12.1.1
-
PACKAGE BODY: APPS.FND_SEQNUM
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES
12.1.1
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_ORACLE_USERID
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_ORACLE_USERID
12.1.1
-
APPS.FND_SEQNUM dependencies on AD_DDL
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES
12.2.2
-
APPS.FND_SEQNUM dependencies on AD_DDL
12.1.1
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES
12.1.1
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES_S
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_DOCUMENT_SEQUENCES_S
12.1.1
-
APPS.FND_SEQNUM dependencies on FND_MESSAGE
12.2.2
-
APPS.FND_SEQNUM dependencies on FND_MESSAGE
12.1.1
-
APPS.FND_SEQNUM dependencies on APP_EXCEPTION
12.1.1
-
APPS.FND_SEQNUM dependencies on APP_EXCEPTION
12.2.2