Search Results oks_accdur_basis
Overview
APPS.GL_CALENDAR_PKG is a General Ledger calendar utility package that resolves accounting calendar information for a given date range. Its primary business purpose is to determine how many accounting periods fall between two dates and to validate that both endpoints are properly mapped to periods within a specified accounting calendar. The package returns this information through a documented return code, which allows calling applications to distinguish a successful resolution from a range whose start or end date is not assigned to any period.
The body carries the header identifier glustclb.pls 120.2 and is classified as an OTHER API rather than a formal public interface. Despite that classification, the package is referenced by two other packages and is embedded in revenue recognition processing, which indicates it is a shared internal dependency rather than an isolated helper. The return_code OUT parameter central to the search term is the principal mechanism by which callers interpret the outcome of a calendar lookup.
Key Procedures and Functions
The package body documents a single procedure, GET_NUM_PERIODS_IN_DATE_RANGE. Its purpose is to calculate the number of accounting periods contained within a supplied date range for a named calendar and period type. Upon entry it initializes the return_code parameter to a success indicator and then evaluates the range.
- Special handling for monthly revenue recognition: When the profile option
OKS_ACCDUR_BASISis set to MONTHLY (or is null, which defaults to MONTHLY), the procedure bypasses calendar lookups entirely and computes the period count directly using month arithmetic between the start and end dates. A range that spans less than one month is normalized to a count of one. - Start date validation: The procedure queries the date-to-period mapping for the supplied start date and period type. If the date is not mapped, the return code is set to a bad-start indicator and the offending date is returned through the
unmapped_dateOUT parameter. - End date validation: An analogous lookup is performed for the end date, with a distinct return code and unmapped date reported on failure.
- Missing period detection: When a check-missing flag is supplied and the return code remains SUCCESS, the procedure continues to inspect the range for gaps, using aggregate date queries over the mapping table.
Tables Accessed
The package reads from GL_DATE_PERIOD_MAP, which associates individual accounting dates with period names for a given period set and period type. This table is the core lookup source for both the start and end date validations, and it also supports the missing-period check through minimum and related date aggregations. The package additionally references GL_PERIODS, the standard General Ledger period definition table used to resolve calendar and period type metadata. All access is read-only; the package does not insert, update, or delete data. Its dependency on APPS synonyms confirms it executes with the standard GL data model rather than a private copy of the calendar tables.
Usage Notes
GL_CALENDAR_PKG is invoked programmatically rather than through a dedicated form or concurrent program. Callers are expected to supply the calendar name, period type, start and end dates, and a missing-check flag, and to inspect the returned return_code, period count, and unmapped date. The success and error constants are defined within the package, so consumers should compare against those values instead of literal strings. Because the procedure honors the OKS_ACCDUR_BASIS profile option, behavior differs between monthly-based revenue recognition environments and those relying on explicit calendar mappings. Custom code should treat the package as an internal utility, validate that both endpoints are mapped before relying on the period count, and be aware that the bad-start and bad-end outcomes populate unmapped_date to identify the exact date requiring calendar maintenance.
-
Lookup Type: OKS_ACCDUR_BASIS
12.1.1
product: OKS - Service Contracts , meaning: Accounting Duration Basis ,
-
Lookup Type: OKS_ACCDUR_BASIS
12.2.2
product: OKS - Service Contracts , meaning: Accounting Duration Basis ,
-
12.2.2 FND Design Data
12.2.2
-
12.1.1 FND Design Data
12.1.1
-
PACKAGE BODY: APPS.GL_CALENDAR_PKG
12.1.1
-
PACKAGE BODY: APPS.GL_CALENDAR_PKG
12.2.2
-
APPS.GL_CALENDAR_PKG dependencies on FND_PROFILE
12.1.1
-
APPS.GL_CALENDAR_PKG dependencies on FND_PROFILE
12.2.2