Search Results convert_to_global_sequence




Overview

APPS.PER_BG_NUMBERING_METHOD_PKG is a PL/SQL package in Oracle E-Business Suite that governs how person numbers are generated across the Human Resources (HR) and related person-centric modules. Person numbers are the unique identifiers assigned to employees, applicants, contacts, and other person types recorded in the PER tables. The package supports three distinct numbering strategies: business-group-specific automatic generation, cross-business-group global sequencing, and fast formula driven numbering. It centralizes the logic that determines which strategy applies and provides the runtime services needed to produce the next number in sequence.

Because person numbering policy is often set at the enterprise level while person records are created within individual business groups, the package must coordinate configuration stored in HR organization and numbering control tables with the actual allocation of new numbers. The package is declared with AUTHID CURRENT_USER, meaning its SQL executes under the privileges of the calling user, which is significant when invoked from concurrent programs or custom code that may not be owned by APPS. It is referenced by three other packages, confirming that it is a shared low-level utility rather than a stand-alone end-user feature.

Key Procedures and Functions

The package exposes seven documented programs, many of which accept a p_person_type argument — the parameter users most frequently search for. This argument scopes numbering behavior to a particular person type, such as Employee, Applicant, or Contingent Worker, since numbering rules can differ by type.

  • CONVERT_TO_AUTO_GEN_METHOD — A concurrent-program style procedure with standard errbuf and retcode outputs, plus p_business_group_id and p_person_type. It enables automatic generation within a specific business group using the global sequence.
  • CONVERT_TO_GLOBAL_SEQUENCE — A similar concurrent interface, parameterized by person type only. It switches numbering to the cross-business-group global sequence.
  • GLOBAL_PERSON_NUMBERING — A Boolean function that returns TRUE when cross-business-group person numbering is enabled for the given person type.
  • GETGLOBALPERSONNUM — Returns the next available person number from the global sequence for the specified person type.
  • SET_GLOBAL_SEQUENCE — Alters the global sequence so that future allocations begin from a supplied last number, typically used when migrating or correcting numbering.
  • GET_PERSONNUMBER_FORMULA — Retrieves the fast formula identifier configured for person number generation for a person type as of an effective date.
  • EXECUTE_GET_PERSON_NUMBER_FF — Executes the identified fast formula to produce the next person number, receiving formula, date, business group, person type, legislation, and person context.

Tables Accessed

The package reads and writes configuration and state through APPS synonyms. PER_NUMBER_GENERATION_CONTROLS stores the numbering method selected per business group and person type. PER_PERSON_TYPES validates the person type supplied by callers. HR_ORGANIZATION_INFORMATION holds organization-level attributes used to determine enterprise numbering settings, while PER_ALL_PEOPLE_F provides existing person data for uniqueness and reference checks. FF_FORMULAS_F supplies fast formula definitions for the formula-driven method.

Sequence state is maintained in the global sequence tables: PER_GLOBAL_APL_NUM_S for applicants, PER_GLOBAL_CWK_NUM_S for contingent workers, and PER_GLOBAL_EMP_NUM_S for employees. ALL_SEQUENCES and DUAL support sequence interrogation and arithmetic, and FND_NEW_MESSAGES provides standardized error messaging. PLITBLM is the Oracle Applications PL/SQL table type used internally for array handling.

Usage Notes

This package is primarily invoked indirectly. The Person Numbering setup in the HR application, and the concurrent programs exposed through the numbering method conversion routines, call into it to read and change the configured method. Person entry forms and the person creation APIs rely on GETGLOBALPERSONNUM, GLOBAL_PERSON_NUMBERING, and EXECUTE_GET_PERSON_NUMBER_FF whenever a new person record is committed.

Custom code should not bypass the package by manipulating the global sequence tables directly. Because the package runs with AUTHID CURRENT_USER, custom callers must have appropriate grants. The person type parameter should always be supplied explicitly; passing an incorrect value causes numbering policy to resolve against the wrong rule set. Conversion routines should be executed in a controlled maintenance window, since changing the numbering method affects all subsequent person creation in the affected business group or across the enterprise.