0% found this document useful (0 votes)
256 views7 pages

Data Design For Oracle Contracts v1.3

1. The document describes the data model and tables used to store information for discoverer reports on contracts, including contract headers, lines, parties, items, coverage, and billing schedules. 2. Key information like contract numbers, customers, products, dates, amounts, and billing information is stored across several tables with defined relationships. 3. Examples are provided of sample programs that can be used to retrieve and display relevant contract information from these tables for different report types like coverage, billing schedules, and reaction times.

Uploaded by

vedavyas4fun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
256 views7 pages

Data Design For Oracle Contracts v1.3

1. The document describes the data model and tables used to store information for discoverer reports on contracts, including contract headers, lines, parties, items, coverage, and billing schedules. 2. Key information like contract numbers, customers, products, dates, amounts, and billing information is stored across several tables with defined relationships. 3. Examples are provided of sample programs that can be used to retrieve and display relevant contract information from these tables for different report types like coverage, billing schedules, and reaction times.

Uploaded by

vedavyas4fun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

1

ffffffffffffffffffffffffffffffffffff
DATA MODEL FOR ITS DISCOVERER REPORTS
Object1_Id1 party_id
chr_id object1_id1
id
rle_code=CUSTOMER userenv('LANG')
id dnz_chr_id lse_id
id
cle_id
id id id
chr_id
id id lse_id!"1#"!$%
id lse_id&"1'"!1%
cle_id
i( jtot_object1_code=O)*_CO+ITEM
in,entory_ite-_id object1_id1
or.anization_id object1_id!
object1_id1
in,entory_ite-_id
i( jtot_object1_code= O)*_CUST/RO0
id

in,entory_ite-_id instance_id
cle_id
id
dnz_chr_id
t,e_id
id
r1l_id t,e_id_started
0nz_chr_id id
T,e_id
R1l_id id
R1l_id r.p_id r.p_id id1
OKC_K_HEADERS_B
2ttrib1te1 /roject_Code"
Contract_n1-ber"
Contract_n1-ber_-odi(ier"
-ore
OKC_K_LINES_B
3se_id
Start 0ate
End 0ate
3ine_hierarchy
OKC_K_ITEMS
41-ber_o(_ite-s5ty%
MTL_SYSTEM_ITEMS_B
/rod1ct 4a-e
Ite-_n1-berse.-ent1%
CSI_ITEM_INSTANCES
Serial_41-ber
OKC_K_PARTY_ROLES_B HZ_PARTIES
/arty_na-e
OKC_COVER_TIMES
OKC_TIMEVALUES_B
0ay_o(_6ee7"
OKC_K_LINES_TL
Co,era.e 4a-e
81siness /rocess
OKC_REACT_INTERVALS
OKC_LINE_STYLES_B
3ty_codecontract_type%
3ine styles
O)S_8US_/ROCESSES_+
na-e
O)C_RU3E_9ROU/S_8
O)C_CO4T2CTS
!
id object1_id1
OKC_K_HEADERS_B:
Authoring_org_id Organization of the Author.
Sts_code Status Of the Contract.
Qcl_id ID of the QA Check List That is given for the
Contract
Scs_code Contract Category (SERVICE OR WARRANTY)
Currency_code Currency in which the contract amount is
signed for
date_approved
date_signed
date_terminated
date_renewed
start_date Contract Starting Date
end_date Contract Ending Date
estimated_amount Amount of Contract.
Line Styles
I0 3T:_CO0E 3SE_/2RE4T_I0
;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
! CO+ER29E 1
& 8/_S+C !
< RE2CT &
# 8I33_T:/E &
' 8I33_R2TE #
= CO+ER_ITEM 1
> CO+ER_/T: 1
? CO+ER_/RO0 1
1$ CO+ER_SITE 1
11 CO+ER_S:S 1
1! US29E
1& I4ST_CTR 1!
1< @2RR24T:
1# CO+ER29E 1<
1' 8/_@2RR 1#
1= RE2CT 1'
1> CO+ER_/RO0 1<
1? E*T_@2RR24T:
!$ CO+ER29E 1?
!1 8/_@2RR !$
!! RE2CT !1
!& 8I33_T:/E !1
!< 8I33_R2TE !&
!# CO+ER_/RO0 1?
!' 3ICE4SE
!= 0E/3O: &'
!> SU//ORT
!? ME0I2
&$ TR2I4
&1 CO4SU3T
&! SE3A_SER+E
&# CO+ER_CUST 1
&' 3ICE4SE_3E+E3 !'
&= SU//ORT_3I4E !>
OKC_RULES_B
Renewal
Bill S!ed"le
OK#_INCIDENT_SEVERITS_V
4a-eSe,erity 4a-e%
O)S_3E+E3_E3EME4TS
8ill_Aro-
In,oice_0ate
&
1 SER+ICE
Renewal: The renewal information given in the renewal tab is stored in
the OKC_RULES_B table where rule_information_category=REN.
Rule_information1 stores the Renewal Type.
Rule_information3 stores the Renewal duration.
Billing schedules: Billing schedule information is stored in
OKS_LEVEL_ELEMENTS table.
For Billing Schedule records. The rule_information_category of
OKC_RULES_B is SLL.
Sample Program: This program will give the billing schedule information
for the contracts.
SE3ECT o7chBcontract_n1-ber Contract_41-ber"
o7clBid"
hzpBparty_na-e C1sto-er_4a-e"
r1l_in,Br1le_in(or-ation1 In,oice_TeCt"
TO_02TETO_CD2RbillBdate_transaction"E00;MO4;::::E%% In,oice_0ate"
o7clBc1rrency_code C1rrency"
o7chBattrib1te1 /roject_41-ber"
billBdate_start 8ill_Aro-"
0ECO0E1pperr1lBobject1_id1%" E02:E"
billBdate_startFTO_4UM8ERr1lBr1le_in(or-ation<%;1%" E@)E"
billBdate_startFTO_4UM8ERr1lBr1le_in(or-ation<%G=;1%" EMTDE"
200_MO4TDSbillBdate_start"TO_4UM8ERr1lBr1le_in(or-ation<%%;1%" E82E"
200_MO4TDSbillBdate_start"'GTO_4UM8ERr1lBr1le_in(or-ation<%%;1%" EHTRE"
200_MO4TDSbillBdate_start"&GTO_4UM8ERr1lBr1le_in(or-ation<%%;1%" E:RE"
200_MO4TDSbillBdate_start"1!GTO_4UM8ERr1lBr1le_in(or-ation<%%;1% % 8ill_To"
billBa-o1nt 2-o1nt
AROM o7cBo7c_7_party_roles_b rol"
arBhz_parties hzp"
o7cBo7c_r1les_b r1l"
o7cBo7c_r1les_b r1l_in,"
o7cBo7c_r1le_.ro1ps_b rl.p"
o7cBo7c_stat1ses_b o7cs"
o7cBo7c_7_headers_b o7ch"
o7cBo7c_7_lines_b o7cl"
appsBo7s_le,el_ele-ents bill
@DERE hzpBparty_id = rolBobject1_id1
240 rolBchr_id = o7chBid
240 rolBrle_code = ECUSTOMERE
240 o7csBste_code I= EE4TERE0E
240 o7csBcode = o7chBsts_code
240 o7chBattrib1te! I= E@arrantyE
240 o7clBchr_id = o7chBid
240 rl.pBcle_id = o7clBid
<
240 r1lBr.p_id = rl.pBid
240 r1lBr1le_in(or-ation_cate.ory = ES33E
240 r1l_in,Br1le_in(or-ation_cate.ory = EIRTE
240 r1l_in,Br.p_id = rl.pBid
240 billBr1l_id = r1lBid
Lines hierarchy:


id
chr_id
lse_id
1 Service
14 Warranty
19 Extended
id 12 Usage
cle_id cle_id
Covered Levels:
id
cle_id

cle_id id
Id
Cle_id
Reaction Times
LSE_ID LTY_CODE LSE_PARENT_ID
--------- ------------------------------ -------------
3 BP_SVC 2
4 REACT 3
16 BP_WARR 15
17 REACT 16
21 BP_WARR 20
22 REACT 21
O)C_)_DE20ERS_8
O)C_)_3I4ES_8
Ser,ice Ite-s In(o
O)C_)_3I4ES_8
Co,ered 3e,els
O)C_)_3I4ES_8
Co,era.e
O)C_)_3I4ES_8
81siness /rocess
O)C_)_3I4ES_8
Reaction Ti-es
O)C_)_3I4ES_8
8illin. Rates
#
Business Process
LSE_ID LTY_CODE LSE_PARENT_ID
--------- ------------------------------ -------------
2 COVERAGE 1
3 BP_SVC 2
15 COVERAGE 14
16 BP_WARR 15
20 COVERAGE 19
21 BP_WARR 20
Billing Type
LSE_ID LTY_CODE LSE_PARENT_ID
--------- ------------------------------ -------------
5
Coverage
LSE_ID LTY_CODE LSE_PARENT_ID
--------- ------------------------------ -------------
2 COVERAGE 1
15 COVERAGE 14
19 EXT_WARRANTY
20 COVERAGE 19
(For Service) Covered Level
7 Item
8 Party
9 Product
10 Site
11 System
35 Customer
(For Warranty)
18 Product
(For Extended Warranty)
25 Product
Reaction Times:
SELECT okch.contract_number,
okch.contract_number_modifier Modifier,
okch.id,
okch.attribute1 Project_Number,
okch.attribute2 Contract_Type,
okch.scs_code,
okch.sts_code,
hzp.party_name Customer_Name,
hzp.party_id,
okcl1.lse_id,
'

--decode(okcl1.lse_id,1,'Maintanance',12,'Usage',14,'Warranty',19,'Exte
nded') Contract_Type,
mtl.segment1 Product_Number,
mtl.description Product_Name,
item.number_of_items Qty,
okcl_cov.start_Date Product_Start_Date,
okcl_cov.end_date Product_End_Date,
okcl_cov.price_negotiated Amount,
okcl_cov.currency_code Currency,
okch.start_date Contract_Start_date,
okch.end_date Contract_end_date,
csi.serial_number Serial_Number,
okctl.name Coverage_Name,
bus.bus_process_name Business_process_name,
time_v.day_of_week,
time_start.hour||':'||time_start.minute||' - '||
time_end.hour||':'||time_end.minute Coverage_time,
ori.duration Reaction_Time
FROM okc.okc_k_headers_b okch,
okc.okc_k_lines_b okcl_cov, -- For Covered products
okc.okc_k_lines_b okcl1, -- For Contract Types
okc.okc_k_lines_b okcl2,
okc.okc_k_lines_b okcl3,
okc.okc_k_lines_b okcl4,
okc.okc_k_lines_tl okctl, -- Coverage Nmae.
apps.oks_bus_processes_v bus, -- Business process Names.
okc.okc_react_intervals ori, -- Reaction times Link table
okc.okc_timevalues_b time_v, -- Reaction Times.
okc.okc_timevalues_b time_cov, -- Coverage Times
okc.okc_timevalues_b time_start,
okc.okc_timevalues_b time_end,
okc.okc_rules_b rul, -- rule group for reaction times
okc.okc_rules_b rul_cov, -- rule group for coverage times
apps.okx_incident_severits_v okx,
okc.okc_rule_groups_b rlgp, -- rule group for reaction times
okc.okc_rule_groups_b rlgp_cov, -- rule group for coverage times

okc.okc_k_items item,
inv.mtl_system_items_b mtl,
csi.csi_item_instances csi,
okc.okc_cover_times cvr,
okc.okc_k_party_roles_b rol,
ar.hz_parties hzp
WHERE okx.id1 = rul.object1_id1
and okx.name = 'High'
and (time_v.day_of_week is null or time_start.day_of_week =
time_v.day_of_week)
and time_v.id = ori.tve_id
and time_v.dnz_chr_id = okch.id -- time_v : For reaction
times.
and ori.rul_id = rul.id
and rul.rule_information_category = 'RCN'
and rul.rgp_id = rlgp.id
and rlgp.rgd_code = 'SVC_K'
and rlgp.cle_id = okcl4.id
and okcl4.cle_id(+) = okcl3.id
=
and okcl4.dnz_chr_id = okch.id -- okcl4 : For Reaction
times
and time_start.day_of_week = time_end.day_of_week
and time_end.id = time_cov.tve_id_ended
and time_end.dnz_chr_id = okch.id
and time_start.id = time_cov.tve_id_started
and time_start.dnz_chr_id = okch.id
and time_cov.id = cvr.tve_id
and time_cov.dnz_chr_id = okch.id -- time_cov : Coverage Times
and cvr.rul_id = rul_cov.id -- cvr : Link Table for coverage
times.
and rul_cov.rgp_id = rlgp_cov.id
and rlgp_cov.rgd_code = 'SVC_K'
and rlgp_cov.cle_id = okcl3.id
and bus.id = okcl3.id
and okcl3.cle_id = okcl2.id -- okcl3 : For Business Process
and okcl3.dnz_chr_id = okch.id
and okctl.id = okcl2.id
and okctl.language = userenv('LANG')
and okcl2.lse_id in (2,15,20) -- okcl2 : For Coverages
and okcl2.cle_id = okcl1.id
and okcl2.dnz_chr_id = okch.id
and mtl.inventory_item_id = csi.inventory_item_id
and mtl.organization_id = csi.inv_master_organization_id
and csi.instance_id = item.object1_id1
and item.jtot_object1_code = 'OKX_CUSTPROD'
and item.cle_id = okcl_cov.id
and okcl_cov.cle_id = okcl1.id -- okcl_cov : For Cover Products
and okcl1.chr_id = okch.id -- okcl1 : For Contract Types
and hzp.party_id = rol.object1_id1
and rol.rle_code='CUSTOMER'
and rol.chr_id = okch.id

You might also like