Search Results get_enddate
Overview
OKC_TIME_UTIL_PUB is the public API package for time and duration calculations within the Oracle E-Business Suite Contracts (OKC) module. Its principal business purpose is to convert between the two fundamental representations of contract term length used throughout the ETRM (Enterprise Contracts) schema: a start-and-end-date pair, and a duration-plus-time-unit pair. Contract authors, renewal processors, and pricing engines rely on this conversion logic whenever a term must be normalized, validated, or recalculated.
The package follows the standard EBS two-layer architecture. OKC_TIME_UTIL_PUB is a thin public wrapper (API classification PUB) that delegates all substantive computation to the internal package OKC_TIME_UTIL_PVT. Each public subprogram simply accepts the caller's arguments, invokes the corresponding private procedure or function, and returns the result. This separation allows Oracle Development to revise the internal implementation without changing the published signature in what Oracle classifies as a "striping" arrangement — the presence of two overloads for GET_APP_ID and GET_RULE_DF_NAME (one unparameterized, one accepting a rule_code) illustrates this deliberate design.
The package body carries the standard CVS header identifier OKCPTULB.pls, version 120.0, last modified in May 2005, and initializes the l_debug flag from the AFLOG_ENABLED profile option, giving support engineers the ability to trace execution through the EBS logging framework.
Key Procedures and Functions
- GET_DURATION — A procedure that derives the most suitable time unit and duration value from a supplied start date and end date. This is the inverse of GET_ENDDATE and is typically used when a user-entered term must be expressed in a canonical duration form.
- GET_ENDDATE — The function most commonly sought by users searching for "get_enddate." It returns the calculated end date given a start date, a time unit, and a duration. This is the core term-derivation routine invoked whenever a contract line, coverage period, or renewal window must be projected forward.
- GET_APP_ID — Returns the application identifier associated with the time rules in use. Two overloads exist: one without parameters and one accepting a rule_code for rule-specific resolution.
- GET_RULE_DF_NAME — Returns the descriptive-flexfield name associated with the time rules. Also overloaded, with and without a rule_code argument.
- GET_RULE_DEFS_USING_VS — Retrieves rule definitions that make use of value sets, supporting the configurable rule engine behind duration calculations.
- GET_DFF_COLUMN_VALUES — Returns descriptive-flexfield column values, allowing callers to enumerate or validate DFF segments relevant to time rules.
- GET_TVE_IDS — Returns time-validation or time-value entity identifiers used to link calculated terms back to the underlying rule records.
Tables Accessed
The ETRM documentation excerpt does not enumerate specific base tables for this package body. Because the body consists entirely of pass-through calls, all SQL access occurs inside OKC_TIME_UTIL_PVT and the rule-definition packages it calls. In practice these routines read the OKC time-rule and rule-definition metadata (including descriptive-flexfield configuration) rather than transactional contract data; the package is a calculation and configuration utility, not a contract-document writer. Where the package returns IDs such as those from GET_TVE_IDS, those values serve as foreign keys for callers that subsequently query the contract tables.
Usage Notes
OKC_TIME_UTIL_PUB is referenced by approximately 50 other packages, confirming its status as foundational Contracts infrastructure. Typical invocation paths include:
- Concurrent programs that recalculate contract terms, expiration dates, or renewal windows in bulk.
- Forms and OAF pages in the Contracts workbench, where GET_ENDDATE is called on save to derive the end date from user-entered duration and period.
- Custom code and extensions that need EBS-standard term arithmetic rather than duplicating calendar logic.
When calling GET_ENDDATE, the return value is a DATE; pass-through callers always receive the result of OKC_TIME_UTIL_PVT.GET_ENDDATE without post-processing. Note that the package header itself is not the implementation — anyone diagnosing unexpected end-date results should inspect the private package and the applicable rule definitions, not this body.
-
PACKAGE BODY: APPS.OKC_TIME_UTIL_PUB
12.1.1
-
PACKAGE BODY: APPS.OKC_TIME_UTIL_PUB
12.2.2
-
PACKAGE: APPS.OKC_TIME_UTIL_PUB
12.2.2
-
PACKAGE: APPS.OKC_TIME_UTIL_PUB
12.1.1
-
PACKAGE: APPS.OKC_TIME_UTIL_PVT
12.2.2
-
PACKAGE: APPS.OKC_TIME_UTIL_PVT
12.1.1
-
PACKAGE BODY: APPS.OKC_TIME_UTIL_PVT
12.2.2
-
PACKAGE BODY: APPS.OKC_TIME_UTIL_PVT
12.1.1
-
APPS.OKS_RENEW_CONTRACT_PVT dependencies on OKC_TIME_UTIL_PUB
12.1.1
-
APPS.OKS_RENEW_CONTRACT_PVT dependencies on OKC_TIME_UTIL_PUB
12.2.2
-
PACKAGE BODY: APPS.OKS_RENEW_CONTRACT_PVT
12.1.1
-
PACKAGE BODY: APPS.OKS_RENEW_CONTRACT_PVT
12.2.2
-
APPS.OKS_RENEW_CONTRACT_PVT dependencies on FND_LOG
12.1.1
-
APPS.OKS_RENEW_CONTRACT_PVT dependencies on FND_LOG
12.2.2