Search Results end_datetime
Overview
OKS_CON_COVERAGE_PVT is a private PL/SQL package body in the Oracle E-Business Suite Service Contracts (OKS) module. It encapsulates the core logic that derives and validates service coverage for contract lines, with particular emphasis on the calculation of coverage start dates, end dates, grace periods, and billing rate schedules. The package was introduced or substantially reworked as part of the Release 12.0 Coverage Rearchitecture project, as indicated by the header comment referencing the Coverage Rearch effort. Because it is classified as a PVT (private) package, it is not exposed as a public API; it is intended to be called internally by other OKS coverage packages and concurrent processes rather than by external customizations.
A significant portion of the package concerns time-based computation. The end_datetime concept central to user searches surfaces through helper functions that manipulate dates using the OKC_Time_Util_Pub.Get_EndDate utility, converting durations and time units into concrete start and end date boundaries. This is essential for correct proration, grace-period handling, and billrate scheduling across contract coverage periods.
Key Procedures and Functions
- APPLY_CONTRACT_COVERAGE — orchestrates the assignment of coverage to a contract, applying the derived coverage dates and associated billing schedules to the appropriate contract line records.
- GET_BP_LINE_START_OFFSET — computes the start date of a covered line by reading the offset duration and period from OKS_K_LINES_B and adjusting the service line start using OKC_Time_Util_Pub.Get_EndDate. For standard coverage it derives the offset start; otherwise it defaults to the passed-in line start.
- GET_FINAL_END_DATE — determines the effective terminating date of coverage, reconciling multiple contributing periods into a single final end datetime.
- GET_GRACE_END_DATE — calculates the end of the grace period following coverage expiration, supporting continued entitlement logic.
- GET_NEXT_WKDAY — returns the next working day, used to normalize coverage boundaries that would otherwise fall on non-working days.
- GET_BILL_RATES — retrieves billing rate definitions applicable to a coverage period.
- GET_BP_PRICELIST — resolves the price list associated with a business-process or coverage configuration.
- REMOVE_ZERO_DURATION_BILLRATES — filters out billing rate schedule entries whose duration is zero, preventing invalid or empty billing rows.
- SORT_BILLRATES_DATETIME — orders billing rate schedule records chronologically by datetime, ensuring correct sequencing for downstream processing.
Tables Accessed
The package reads and writes contract header, line, and item data through APPS synonyms including OKC_K_HEADERS_ALL_B, OKC_K_ITEMS, OKC_K_LINES_B, OKS_K_HEADERS_B, and OKS_K_LINES_B. These provide the contract structure and the line-level offset duration and period attributes consumed by GET_BP_LINE_START_OFFSET and related routines. Billing rate schedule data resides in OKS_BILLRATE_SCHEDULES, which GET_BILL_RATES reads and REMOVE_ZERO_DURATION_BILLRATES / SORT_BILLRATES_DATETIME manipulate. PLITBLM is referenced for PL/SQL table (index-by) handling.
Usage Notes
Because OKS_CON_COVERAGE_PVT is a private package, it is not called directly from forms or custom concurrent programs. It is invoked internally by the Service Contracts coverage engine and referenced by one other OKS package. Typical invocation occurs during contract authoring and coverage application, when the system must translate line offsets and durations into concrete coverage start and end datetimes, apply grace periods, and build the billing rate schedule. When troubleshooting coverage date discrepancies — especially reported end_datetime values — the GET_FINAL_END_DATE, GET_GRACE_END_DATE, and GET_BP_LINE_START_OFFSET functions are the key entry points to inspect, along with the OKS_BILLRATE_SCHEDULES rows produced by the billing rate routines.
-
PACKAGE BODY: APPS.OKS_CON_COVERAGE_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_CON_COVERAGE_PVT
12.1.1
-
PACKAGE BODY: APPS.CS_SERVICE_BILLING_ENGINE_PVT
12.1.1
-
PACKAGE BODY: APPS.CS_SERVICE_BILLING_ENGINE_PVT
12.2.2
-
PACKAGE: APPS.OKS_CON_COVERAGE_PUB
12.2.2
-
PACKAGE: APPS.OKS_CON_COVERAGE_PUB
12.1.1
-
PACKAGE BODY: APPS.CSF_TRIPS_PUB
12.1.1
-
PACKAGE BODY: APPS.CSF_TRIPS_PUB
12.2.2
-
APPS.CS_SERVICE_BILLING_ENGINE_PVT dependencies on CS_TM_LABOR_SCHEDULE_PVT
12.2.2
-
APPS.CS_SERVICE_BILLING_ENGINE_PVT dependencies on CS_TM_LABOR_SCHEDULE_PVT
12.1.1
-
PACKAGE: APPS.CSF_RESOURCE_PUB
12.1.1
-
APPS.CS_SERVICE_BILLING_ENGINE_PVT dependencies on OKS_CON_COVERAGE_PUB
12.1.1
-
APPS.CSF_TRIPS_PUB dependencies on JTF_OBJECTS_B
12.2.2
-
APPS.CSF_TRIPS_PUB dependencies on JTF_OBJECTS_B
12.1.1
-
PACKAGE BODY: APPS.CSF_RESOURCE_PUB
12.1.1
-
APPS.CSF_TRIPS_PUB dependencies on FND_NEW_MESSAGES
12.2.2
-
PACKAGE: APPS.CSF_RESOURCE_PUB
12.2.2
-
APPS.CSF_TRIPS_PUB dependencies on FND_NEW_MESSAGES
12.1.1
-
PACKAGE BODY: APPS.CSF_RESOURCE_PUB
12.2.2
-
APPS.CS_SERVICE_BILLING_ENGINE_PVT dependencies on FND_LOG
12.1.1
-
APPS.CS_SERVICE_BILLING_ENGINE_PVT dependencies on FND_LOG
12.2.2
-
PACKAGE BODY: APPS.CSP_PARTS_REQUIREMENT
12.2.2
-
APPS.CSF_TRIPS_PUB dependencies on FND_MESSAGE
12.1.1
-
APPS.CSF_TRIPS_PUB dependencies on FND_MESSAGE
12.2.2
-
APPS.CSF_TRIPS_PUB dependencies on FND_LOG
12.1.1
-
APPS.CSF_TRIPS_PUB dependencies on FND_LOG
12.2.2
-
APPS.CSF_TRIPS_PUB dependencies on FND_API
12.1.1
-
APPS.CSF_TRIPS_PUB dependencies on FND_API
12.2.2