OKS_CONTRACTS_PUB
Service Contracts OKS_CONTRACTS_PUB
Hi,
I am doing conversion for Oracle Service contracts. And I am getting status E, so I would like to know which are mandatory parameters for creating service lines.
The API I am using is OKS_CONTRACTS_PUB. Also are there are documentation in creating service contracts.
Regards,
Sanjay
Hi Tapash,
Thnaks for your reply.
As per the doc we were able to create the contract header,lines and sub lines(Covered lines).
Are there any APIs for updation..?
Appreciate your help.
Thanks
Similar Messages
-
Problem in OKS_CONTRACTS_PUB
Hi,
I am making a conversion for contracts. Here is my code
r_k_header_rec.contract_number := v_contract_number; --M203125v3
r_k_header_rec.start_date := to_date (v_contract_header.start_date,'MM/DD/YYYY');
r_k_header_rec.end_date := to_date(v_contract_header.end_date,'MM/DD/YYYY');
r_k_header_rec.sts_code := UPPER(v_contract_header.status);
r_k_header_rec.scs_code := v_scs_code;
r_k_header_rec.authoring_org_id := v_auth_org_id;
r_k_header_rec.short_description := 'CUST:' || v_party_name;
r_k_header_rec.chr_group := v_contract_group_id;
r_k_header_rec.pdf_id := v_pdf_id;
r_k_header_rec.party_id := v_party_id;
r_k_header_rec.bill_to_id := v_bill_to_id;
r_k_header_rec.ship_to_id := NULL;
r_k_header_rec.price_list_id := v_price_list_id;
r_k_header_rec.cust_po_number := v_cust_po;
r_k_header_rec.agreement_id := NULL;
r_k_header_rec.currency := 'USD';
r_k_header_rec.accounting_rule_type := v_accounting_rule_type;
r_k_header_rec.invoice_rule_type := v_invoice_rule_type;
r_k_header_rec.order_hdr_id := NULL; --check
r_k_header_rec.payment_term_id := v_payment_term_id;
r_k_header_rec.cvn_type := NULL;
r_k_header_rec.cvn_rate := NULL;
r_k_header_rec.cvn_date := NULL;
r_k_header_rec.cvn_euro_rate := NULL;
r_k_header_rec.tax_exemption_id := NULL;
r_k_header_rec.qto_contact_id := NULL;
r_k_header_rec.qto_email_id := NULL;
r_k_header_rec.qto_phone_id := NULL;
r_k_header_rec.qto_fax_id := NULL;
r_k_header_rec.qto_site_id := NULL;
r_k_header_rec.contact_id := NULL;
r_k_header_rec.tax_status_flag := NULL;
r_k_header_rec.third_party_role := NULL;
r_k_header_rec.merge_type := NULL;
r_k_header_rec.merge_object_id := NULL;
r_k_header_rec.renewal_type := NULL;
r_k_header_rec.renewal_pricing_type := NULL;
r_k_header_rec.renewal_price_list_id := v_price_list_id;
r_k_header_rec.renewal_markup := NULL;
r_k_header_rec.renewal_po := NULL;
r_k_header_rec.estimate_percent := NULL;
r_k_header_rec.estimate_duration := NULL;
r_k_header_rec.estimate_period := NULL;
r_k_header_rec.credit_card_no := v_cc_no; --No value
r_k_header_rec.expiry_date := v_cc_expiry_date; --No value
r_k_header_rec.organization_id := v_inv_org_id;
r_k_header_rec.ar_interface_yn := 'Y';
r_k_header_rec.transaction_type := v_transaction_type_id;
r_k_header_rec.summary_invoice_yn := 'N';
r_k_header_rec.rve_percent := NULL;
r_k_header_rec.rve_end_date := NULL;
r_k_header_rec.qcl_id := v_qcl_id;
r_k_header_rec.attribute1 := v_isr_zone;
r_k_header_rec.attribute2 := v_enotify_status;
r_k_header_rec.attribute3 := v_promotional_credit_amt; --No value
r_k_header_rec.attribute4 := v_orbital_profile_id ; --No value
r_k_header_rec.attribute5 := v_ccholder_name; --No value
r_k_header_rec.attribute6 := v_cc_zip; --No value
r_k_header_rec.attribute7 := NULL;
r_k_header_rec.attribute8 := NULL;
r_k_header_rec.attribute9 := NULL;
r_k_header_rec.attribute10 := NULL;
r_k_header_rec.attribute11 := NULL;
r_k_header_rec.attribute12 := NULL;
r_k_header_rec.attribute13 := NULL;
r_k_header_rec.attribute14 := NULL;
r_k_header_rec.attribute15 := NULL;
--Create contacts
v_k_header_contacts_tbl(1).party_role := 'EATON';
v_k_header_contacts_tbl(1).contact_role := 'Internal Salesperson';
v_k_header_contacts_tbl(1).contact_object_code := 'OKX_SALEPERS';
v_k_header_contacts_tbl(1).contact_id := v_int_salesrep_id;
apps.OKS_CONTRACTS_PUB.create_contract_header(p_k_header_rec => r_k_header_rec,
p_header_contacts_tbl => v_k_header_contacts_tbl,
p_header_sales_crd_tbl => v_k_header_sales_crd_tbl,
p_header_articles_tbl => v_k_header_articles_tbl,
x_chrid => v_chr_id,
x_return_status => v_return_status,
x_msg_count => v_msg_count,
x_msg_data => v_msg_data);
After this I am creating lines but here it is returning v_return_status as 'U' that means it is not successful.Please give me some suggestion on it.Which release of Apps are you trying this in? Did you ensure that all the mandatory fields when you enter a contract from front end are populated by your API?
-
How to delete the coverages for an ACTIVE service contract ?
Hi ,
I have created coverages for few service lines for a service contract in R12. The contract is in ACTIVE status. If it was in ENTERED state, I could use OKS_COVERAGES_PUB.DELETE_COVERAGE to delete the coverages. But this contract is in ACTIVE status.
Basically I want the lines lse_id=2,3 removed for a particular line (lse_id=1) which were created by using OKS_CONTRACTS_PUB.CREATE_SERVICE_LINE. This contract has a standard coverage and hence there should not be lines with lse_id=2,3 for that particular service line .
Also, I am not able to delete a coverage for an EXPIRED contract.
Please let me know if you need more information on this.Hi 2619098
Did you find a solution for this? I am having the same problem. Please advice.
Regards -
Creation of Mfg Service contract from IB Instance number
Hi Team,
We have a requirement from client that we need to create a Mfg Service contract for a given IB Instance number. Can you please let me know, if we have any API for this?
I tried to create contract using Oks_Contracts_Pub.Create_Contract_Header API but this contract is not associated with Instance in IB.
Please help to provide any ideas on this. We are on 11.5.10 version.
Thanks/Suresh KSolution: You need to associate Contract with Covered line with that serial number.
-
Service Contracts Billing Schedule Creation Error
Hi,
I have a requirement of creating service contracts from back-end for which I am using the oks_contracts_pub.create_contract_header, create_service_line, and create_bill_schedule. I am creating my contracts with active status and renewal type of EVN (Header level), FUL(Line Level). My contract is of type subscription. The contract header and line are creating fine but the Bill schedule API is throwing an UNEXPECTED ERROR. The billing schedules need to be created based on accounting rule which can be quarterly or monthly. I have included the bill schedule code (hard coded values) for review. Any help is greatly appreciated.
Also the version I am working on is R12
________________________________________________CODE___________________________________________________________________
CREATE OR REPLACE PROCEDURE BILLING_SCHEDULE AS
l_strm_level_tbl OKS_BILL_SCH.STREAMLVL_TBL;
v_bill_qtrs NUMBER := 0;
v_bill_mths NUMBER := 0;
v_bill_days NUMBER := 0;
v_net_amount NUMBER := 468;
v_acct_rule_name VARCHAR2(50) := 'QUARTERLY';
v_amt_per_day NUMBER;
x_error_locator VARCHAR2(2000);
v_start_date DATE := '04-MAY-2010';
v_end_date DATE := '25-MAY-2010';
x_return_status VARCHAr2(3);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
v_billing_sequence NUMBER;
x_chr_id NUMBER := 17000;
x_line_id NUMBER := 223248604345353294444923586786456728480;
g_day_uom VARCHAR2(10) := 'DAY';
g_month_uom VARCHAR2(10) := 'MTH';
g_quarter_uom VARCHAR2(10) := 'QTR';
v_amt NUMBER;
v_invoicing_rule_id NUMBER := -2;
BEGIN
--Create Billing Schedule based on accounting rule
okc_context.set_okc_org_context;
MO_GLOBAL.INIT('OKS');
MO_GLOBAL.SET_POLICY_CONTEXT('S', 83);
v_bill_qtrs := 0;
v_bill_days := 0;
v_bill_mths := 0;
SELECT NVL(v_net_amount, 0)/(v_end_date - v_start_date)
INTO v_amt_per_day
FROM dual;
dbms_output.put_line('Calculated amt per day ' || v_amt_per_day);
IF v_acct_rule_name LIKE '%QUARTERLY%' THEN
--Quarterly billing schedule
SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
v_start_date)/3),
v_end_date - ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3))
INTO v_bill_qtrs,
v_bill_days
FROM dual;
dbms_output.put_line('Calculated the qtrs and days');
IF v_bill_qtrs > 0 THEN
SELECT (ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3)) - v_start_date)*v_amt_per_day
INTO v_amt
FROM dual;
dbms_output.put_line('Calculated qtr amt');
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
-- l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_quarter_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for QTR');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for QTR');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Quarterly schedule creation error ' || x_msg_data);
---DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
-- RETURN;
END IF;
END IF;
IF v_bill_days > 0 THEN
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
dbms_output.put_line('sequence '||v_billing_sequence);
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_periods := 1;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_net_amount;--v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_amount := v_net_amount;--v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for QTR days');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for QTR days ' || v_bill_days || ' ' || x_return_status);
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Day schedule, for quarterly accounting rule, creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
ELSE
--Monthly billing schedule
SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
v_start_date)),
v_end_date - ADD_MONTHS(v_start_date, FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)))
INTO v_bill_mths,
v_bill_days
FROM dual;
dbms_output.put_line('Calculated the mths and days');
IF v_bill_mths > 0 THEN
SELECT (ADD_MONTHS(v_start_date,FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date))) - v_start_date)*v_amt_per_day
INTO v_amt
FROM dual;
dbms_output.put_line('Calculated the mths amt');
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_month_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_mths;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_mths;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_mths;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for MTHS');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for MTHS');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Monthly schedule creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
IF v_bill_days > 0 THEN
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_periods := 1;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for MTH days');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for MTH days');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Day schedule, for monthly accounting rule, creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
END IF;
COMMIT;
EXCEPTION
when others then
dbms_output.put_line('Error ' || sqlerrm);
END;
Thanks,
Yash.Hi There,
I have a similar requirement to create rental service contracts and create billing schedules.
Can you please pass on your functional docs so that i can refer to them.
Thanks,
Raidu -
Documentation for Service Contract API
Hi All,
Sub: Any Documentation For The Public API's OKS_CONTRACTS_PUB,
OKC_CONTRACTS_PUB.
Firstly i would like to say Thank You for spending your valuable time for this Query.
Introduction:
Currently i am working in Oracle Service Contracts module, which is Oracle
Application's CRM module.
Specifications:
oracle application version: 11.5.10.2
Data Base version: oracle 9.2.0.6
Problem:
We are trying to integrate the Service Contracts through following Public API's
with web.
API's are:
OKS_CONTRACTS_PUB,
OKC_CONTRACTS_PUB.
I search so much to the documentation for these API's, but i did not get any thing.
I search in Oracle Meta Link, Google.
Could you help If any Documentation If you find (or) you have ?
Please forward to:
[email protected]
[email protected]
Any help from your side will appreciate.
Thank you.
Regards,
Sai Krishna @cavayaLook at this link you will be able to get some information about the Api
http://mywebpages.comcast.net/muzaffarl/whitepaper/02d.pdf
If you find any document regarding this Api other than this kindly let me know. -
Hi Experts,
I came across the api oks_contracts_pub which can be used to create contract headers,lines and sublines.My requirement is to update the start and end date of the headers ,lines and sublines after the contract is created.
Can this api be used for update as well ?
ThanksTry OKC_CONTRACT_PUB.update_header
Hope this answers your question
Sandeep Gandhi
Omkar Technologies Inc.
Independent Techno-functional Consultant -
Bill Schedule in Oracle Service Contracts.....
Hi frds,
I can able to create a new Billing Schedule for the Contracts in 11.5.10 Version.But, according to our Client requirement I am in need to update already existing Schedule.
I am creating a new schedule using oks_contracts_pub.create_bill_schedule.
if anyone worked on this area will you please let us know how to insert scheduling option in the Contracts.
Thanks,
Chandrasekhar V.Hope you can use OKS_BILL_SCH package for re-creating billing Schedules.
-
Contracts open interface in R12?
Hi,
In past(11.5.9) we've used APIs for interfacing legacy contracts. Now that we're on R12.1.1, I was wondering if there exists an open interface for Contracts.
TIA
AlkaYes, in fact I've used it for creating warranties. But, while mostly I've been successful creating warranty contracts, there are times when I cannot find a coverage line (lse_id=15) for a warranty. Since these warranties do not carry dollar amount and are solely for the purpose of Preventive Maintenance and basic services on parts and equipment, it's not been a huge issue till now. I mean I can query the contract fine....it just shows up a little different...with some missing information....but no errors. Have you had this kind of issue where the coverage for contract is not created? Following are the APIs that I use, in sequence. I find it odd that for some warranties, I have all the information and for some others there's this line type and others(16 and 59) are missing. I would really appreciate if you could provide some insight into this issue.
Thanks & regards,
Alka
oks_contracts_pub.create_contract_header(p_k_header_rec => l_contract_header_rec
,p_header_contacts_tbl => l_contact_tbl
,p_header_sales_crd_tbl => l_salescredits_tbl
,p_header_articles_tbl => l_articles_tbl
,x_chrid => x_chr_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data);
oks_contracts_pub.create_service_line(p_k_line_rec => l_contract_line_rec
,p_contact_tbl => l_contact_line_tbl
,p_line_sales_crd_tbl => l_salescredits_tbl
,x_service_line_id => x_usage_line_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data);
oks_contracts_pub.create_covered_line(p_k_covd_rec => l_cov_level_rec
,p_price_attribs => l_price_attribs_rec
,x_cp_line_id => x_cp_line_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data);
Maybe you are looking for
-
Down Payment Request for Delivery-Related Item
Hi, My customer has a scenario where they will need make a down payment request to the customer before delivery. E.g. For a sale of Item 1 ($100), they need a deposit of $10 before they proceed with the delivery. After the collection of the 10% down
-
Oracle Suite Practice Sessions ESB example OrderBookingESB
Hi All, As per the Practise sessions i have created the Oracle ESB Project called OrderBookingESB and applied sipmle routing logic to it. Able to register it into the ESB. When i open ESB Console and try to open the WSDL it is saying that "XML docume
-
Microsoft account sign in option is missing
hello there has been 3 days now that I can't logon to skype using my microsoft account. Out of the blue the landing page/window of skype has been changed to the old one, and there is no microsoft account option in there. I attach a screen shot also.
-
HI to all experts, i need help in devloping a command in wad using java script. the command i want to create will provide me the option to send a certain wad URL (link) thru a message using outlook . the command needs to genrate the url from bi porta
-
Identity Services Engine and Blackberry Phones
Hello Community! As you know, current ISE does not support native supplicant for client/end-user Blackberry mobile devices. Is there a way to manually configure ISE so Blackberry phones can connect to the wireless network?