OKS Service Contract Line Upload – Oracle EBS SQL Report
Oracle E-Business Suite SQL report from the Enginatics Library powered by Blitz Report™.
Overview
This upload maintains the lines of existing Oracle Service Contracts through the standard Service Contracts public APIs: it updates header and line level values, adds new service and usage lines, and adds covered product or counter sublines.
Each row is one contract line or subline. Rows identified by the Line Number column update that line; sublines use the parent.child format, for example 1.2 for the second covered product of service line 1. Rows without a Line Number create a new line: leave Parent Line Number empty and enter Line Type, Item and the line dates for a top line, or enter a Parent Line Number, the Covered Product and the covered dates for a subline. A subline can reference a top line created by an earlier row of the same file. Header level values repeat on every row of a contract and are applied once.
Usage lines need a Usage Type, and a Usage Period for all types except Negotiated per Period. Actual per Period and Actual by Quantity lines are invoiced in arrears, which the upload sets automatically, and their sublines need a Default Quantity and a Base Reading.
Prices are written as entered. Changing the negotiated amount or unit price does not reprice the line through the price list and does not regenerate an existing billing schedule, and lines cannot be removed by this upload.
Updates are validated by the Service Contracts APIs, so changes not allowed for the current contract or line status are rejected with the corresponding API message.
Run this report in Excel in seconds: download Blitz Report™ free (your first 30 reports are free) or try it in the online demo.
Report Parameters
Upload Mode, Operating Unit, Contract Number, Contract Status, Line Status
Oracle EBS Tables Used
hz_cust_acct_sites_all, hz_cust_accounts, okc_k_party_roles_b, hz_parties, okc_line_styles_v, mtl_system_items_vl, okc_k_items, okc_k_lines_v, mtl_units_of_measure_vl, csi_item_instances, csi_counters_vl, okc_k_headers_all_b, okc_k_headers_tl, oks_k_headers_b, oks_billing_profiles_v, hr_all_organization_units_vl, okc_statuses_v, hz_cust_site_uses_all, okc_k_lines_b, oks_k_lines_b, mo_glob_org_access_tmp
Report Categories
Related Reports
AR Transactions and Lines 11i, OKL Termination Quotes, CSI Customer Products Summary, GL Account Distribution Analysis, GL Account Analysis, GL Account Analysis (Drilldown) (with inventory and WIP), CSI Counter Readings
Running This SQL Without Blitz Report
The SQL source can be run in any SQL client. Some Oracle EBS SQL reports in this library use functions from the utility package xxen_util – install it first. Blitz Report™ adds parameters, Excel output with pivots, scheduling and security on top.
Download & Import Options
| Resource | Link |
|---|---|
| Excel Example Output | Example |
| Blitz Report™ XML Import | OKS_Service_Contract_Line_Upload.xml |
| SQL Source | OKS Service Contract Line Upload.sql |
| Full Report on Enginatics | www.enginatics.com/reports/oks-service-contract-line-upload/ |
Case Study & Technical Analysis: OKS Service Contract Line Upload
Executive Summary
This upload maintains the lines of existing Oracle Service Contracts through the standard Service Contracts public APIs. It updates header and line values, adds service and usage lines, and adds covered product or counter sublines to a contract. Service contract administrators and service finance teams use it to extend or correct large contracts, for example when many covered products are added to a maintenance agreement or when usage lines are set up for counter-based billing. The template runs in Excel through Blitz Report.
Business Challenge
- Contract maintenance volume: Service contracts with many covered products need each product added as a subline, which is slow to do in the Contracts form.
- Usage and counter billing: Usage lines for counter readings must carry a usage type, usage period and base reading that match the billing terms.
- Consistent header values: Header details such as the bill-to and ship-to sites, billing profile and party roles repeat across every line and must agree.
- Status-based restrictions: Changes that are not allowed for the current contract or line status must be rejected rather than forced through.
The Solution
- Line or subline by number: Rows with a line number update that line, and sublines use a parent.child format, so a second covered product of line 1 is written as 1.2.
- New lines by parent: Rows without a line number create a new top line, or a subline when a parent line number is entered.
- Usage line rules: Usage lines need a usage type, and a usage period except for negotiated per period lines. Actual per period and actual by quantity lines are invoiced in arrears, which the upload sets automatically.
- Header applied once: Header values repeat on every row of a contract, and they are applied once.
- API validation: Updates go through the Service Contracts APIs, so any rejected change returns the API message on the row.
Technical Architecture (High Level)
Primary Tables
OKC_K_HEADERS_ALL_BandOKC_K_HEADERS_TL: the contract header and its translated description and comments.OKS_K_HEADERS_BandOKS_BILLING_PROFILES_V: the service-specific header and the billing profile.OKC_K_LINES_BandOKS_K_LINES_B: the contract lines and their service-specific attributes, such as usage period.OKC_K_ITEMS: the item or covered product attached to each line.OKC_LINE_STYLES_V: the line type name.OKC_STATUSES_V: the contract and line status meanings.OKC_K_PARTY_ROLES_B: the additional party roles of the contract.HZ_CUST_ACCOUNTS,HZ_CUST_ACCT_SITES_ALLandHZ_CUST_SITE_USES_ALL: the header and line bill-to and ship-to accounts and locations.CSI_ITEM_INSTANCESandCSI_COUNTERS_VL: the covered product instance or counter.MTL_SYSTEM_ITEMS_VLandMTL_UNITS_OF_MEASURE_VL: the item and the unit of measure.MO_GLOB_ORG_ACCESS_TMP: the operating units the session can access.
Logical Relationships
OKC_K_HEADERS_ALL_Bjoins toOKC_K_HEADERS_TLon id, restricted to the session language, and toOKS_K_HEADERS_Bon the chr id.OKC_K_HEADERS_ALL_Bjoins toOKC_K_LINES_Bon the dnz chr id, restricted to service line styles.- Each line joins to its parent line through the cle id, and to
OKS_K_LINES_Bfor the usage period. - Each line joins to
OKC_K_ITEMSfor the covered product or counter, which resolves toCSI_ITEM_INSTANCESorCSI_COUNTERS_VLby the object type. - The bill-to and ship-to sites join to
HZ_CUST_SITE_USES_ALL, and the account numbers come fromHZ_CUST_ACCOUNTSon the header and line customer account ids, with a fallback throughHZ_CUST_ACCT_SITES_ALLwhen the account is not set.
Parameters & Filtering
- Upload Mode: selects Create, or Create, Update to download existing contract lines.
- Operating Unit: restricts the contracts to one operating unit.
- Contract Number: restricts the contracts to one contract.
- Contract Status and Line Status: restrict the contracts or lines to one status.
Performance & Optimization
- The service contract filter on the SCS code and the operating unit access list reduce the header scan before the line joins run.
- Line style filtering restricts the lines to a fixed set of service and usage line style identifiers.
- Site and account lookups are outer joins on site use id, so header and line detail is shown even when a site is missing.
FAQ
Q: How do I add a covered product to an existing service line? A: Enter a parent line number in the form parent.child, with the covered product and covered dates, and leave the line number empty.
Q: Why is my usage line rejected? A: Usage lines need a usage type, and a usage period for every type except negotiated per period.
Q: Can this upload remove a line? A: No. The upload does not remove lines.
Useful Links
- Blitz Report™ – World’s Fastest Oracle EBS Reporting Tool
- Oracle Discoverer Replacement – Import Worksheets into Blitz Report™
- Oracle EBS Reporting Toolkits by Blitz Report™
- Blitz Report™ FAQ & Community Q&A
- Supply Chain Hub by Blitz Report™
- Blitz Report™ Customer Case Studies
- Oracle EBS Reporting Blog
- Oracle EBS Reporting Resource Centre
© Enginatics GmbH