APIs to Modify Service Contracts
Hi,
Can any one help me regarding apis for modification of service contracts (header,service line and covered line).
Thanks in Advance
There are lot of API s to achieve this process.
You can search for OKC_CONTRACTS_PUB.update_XXXXXX...
Thanks
Lloyd
Similar Messages
-
Documentation on APIs for the Service Contracts.
Hi,
Can anyone please, point out some documentation for the Public APIs provided under the Service Contracts for R12.
Though I can look at the source code of the APIs, I cannot figure out what parameter is used for what, due to lack of proper comments in the PL/SQL code.
Any pointers would be of great help.
Thanks in Advance,
VijayPlease review the following notes/docs, it may be helpful:
Note: 421170.1 - R12 Oracle Service Contracts And Integration Repository Access
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=421170.1
Oracle Integration Repository User's Guide
http://download.oracle.com/docs/cd/B40089_09/current/acrobat/120irepug.pdf -
Need Help in Oracle Service Contracts API -- OKS_COVERAGES_PUB
Hi All
We have a requirement in service contracts module, wherein we have to delete the old coverage template of service line of a contract and attach the new template with the service line.
For this, we are using OKS_COVERAGES_PUB (“OKS_COVERAGES_PUB.DELETE_COVERAGE”, “OKS_COVERAGES_PUB.CREATE_ACTUAL_COVERAGE”) API but not able to get the desired results.
The API Works for only those service line ids of the contract which has the status “Entered”.
For service line ids of status other than “Entered” the API throws an error.Error Message Details – (x_return_status – ‘E’, x_msg_count – 1, x_msg_data – ‘OKC’).
We don’t know exactly the limitation of the API and there is no detail available about these API in both Service Contracts Development and API reference guide.
If anyone come across similar requirement or known any details about this API, Kindly mail the details to this id : [email protected]
Thanks in Advance
Thanks & Regards
SivakumarHi,
i want to add the lines and covered product to the existing contract.
Cuold you please suggest me the API for the same.
Thanking you in anticipation.
Regards,
Reena
Edited by: user10829701 on Mar 27, 2009 1:34 AM -
Documentation of Service Contracts API -- OKS_COVERAGES_PUB
Hi All
We have a requirement in the OKS Service Contracts Module, in which a Concurrent Program has to be created, such that it will detach the old coverage template and attach the new coverage template to the existing contracts.
We tried with the Standard API (“OKS_COVERAGES_PUB.DELETE_COVERAGE”, “OKS_COVERAGES_PUB.CREATE_ACTUAL_COVERAGE”)
but we are not able to get the desired results.
The API Works for only those service line ids of the contract which has the status “Entered”. For service line ids of status other than “Entered” the API throws an error.
Error Message Details – (x_return_status – ‘E’, x_msg_count – 1, x_msg_data – ‘OKC’)
We don’t know exactly the limitation of the API and there is no detail available about these API in both Service Contracts Development and API reference guide.
Kindly provide me some documentation related to this API to this mail id [email protected]
Thanks in Advance.
Thanks & Regards
SivakumarHi,
i want to add the lines and covered product to the existing contract.
Cuold you please suggest me the API for the same.
Thanking you in anticipation.
Regards,
Reena
Edited by: user10829701 on Mar 27, 2009 1:34 AM -
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. -
How do we know, when the service contract is last modified ?
How do we know, when the service contract is last modified and by whom ?
thanks
siva
Edited by: sivapara on Nov 24, 2008 3:14 PMTo add also in OKC_K_HISTORY_B for some actions.
Thanks
Nagamohan -
How can i remove an Service Contract through DI API ????
Hi everybody,
when i try to delete an service contract through DI API (2007 PL 47), with method Remove, i receive the following error: "The object does not support this method, or method not implemented yet".
Somebody know the right way for delete an service contract?Hello,
This is not possible. If you read the help, this describes: Not Supported.
What you can do:
Set the Ending to Today or at least the same as Staring Date, or change the status to terminated or On Hold.
Best Regards,
János -
Service Contracts Line and Header Tax amounts are not matching
Hi,
I am creating service contracts using API. Using below code i am applying price adjustments on the line. while using the below API Tax is calculated at line level and added for each line But the Tax filed on the header is not getting updated. I fwe go to front end and click on reprice then the Tax amount is added to the header(If the contract created with status 'Entered').
Please help me to fix this.
l_multi_line_tbl (0).ID := l_x_clev_rec.ID;
l_multi_line_tbl (0).price_list_id :=l_curr_price_list_id;
l_multi_line_tbl (0).lse_id := 46;
l_multi_line_tbl (0).line_pl_flag := 'Y';
l_x_return_status := NULL;
apps.oks_auth_util_pub.compute_price_multiple_line (
p_api_version
=> 1.0,
p_detail_tbl
=> l_multi_line_tbl,
x_return_status => l_x_return_status,
x_status_tbl
=> l_status_tbl);
Thanks,
Harinot answered yet.
-
Problem in adding vales to service contract line item
I want the OBJECT ID field to be filled in OBJECT LIST tab at item level when ever a service product is entered in service contract ( new line item) automatically ...
I tired wiht CRM_ORDERADM_I_MERGE (CRM_ORDERADM_I_BADI) and
CRM_ORDERADM_I_MERGE(ZCRM_ORDERADM_I_BADI) methods and using fuction module
CRM_ORDPRP_I_MAINTAIN_OW but not success yet.
any help !!
Thanks ....
Edited by: aday rao on Sep 15, 2008 3:08 PMThe way I typically handle organizational service attributes is to have a single amadmin XML file per AM service and in that amadmin file I have two requests, one to assign the service and the second to modify the service attributes. I then run the amadmin command with the -c continue option on the amadmin XML file so the service is always modified with latest settings regardless of whether or not it was assigned for the first time.
Since your question relates to service attribute modification investigate the SchemaRequests -> AddAttributeSchema amadmin commands. For example, I use the following files to modify the amUserService
<Requests>
<!-- <SchemaRequests serviceName="iPlanetAMUserService" SchemaType="User">
<RemoveAttributeSchema>
<Attribute name="someoldattribute"/>
</RemoveAttributeSchema>
</SchemaRequests> -->
<SchemaRequests serviceName="iPlanetAMUserService" SchemaType="User">
<!-- full path or amadmin must run from same directory -->
<AddAttributeSchema fileName="/opt/SUNWam/custom/amUserAttributes.xml" />
</SchemaRequests>
</Requests>
<Requests>
<!-- newest addition first, amadmin will quit on error regardless of -c flag -->
<AttributeSchema name="somenewattribute"
type="single"
syntax="string"
any="display"
i18nKey="u301">
</AttributeSchema>
</Requests> -
Not able to create Service Contract from another svc.contract as followup
Hi,
I am trying to create a service contract from another service contract as folllow up document as a part of contract renewal process. However, when I click on follow up button, in the popup, not able to the option Service Contract. Hence I am unable to create.
Could you please let me know, what needs to be done such that Service Contract also will be shown in the popup.
Thanks for all the replies.
Thanks,
SandeepHello Sandeep,
It is not possible to create a follow up service contract (BUS2000112) for another service contract (BUS2000112).
I do not know your business scenario, you can debug method GET_FOLLOWUP_CUST of class CL_CRM_UIU_BT_GET_PROCTYPES and see where the follow-up transaction types are filtered out.
I met similar case before, the solution provided at that time was
- modify FM CRM_UBB_FILTER_SUC_PROC_TYPE in line 49. You can comment out the following line:
delete ct_suc_proc_type where process_type = ls_suc_proc_type-process_type.
Hope this could be helpful.
Best regards,
Maggie -
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 Contract header, line level and party data report.
Using 11.5.9.
In Service Contracts Module, trying to create a query that extracts header data, party data (role and name) and the name of the service from the lines/account tab, ie Full Service, Gold Service etc...
Created query that retrieve Service Contract header and party data, but when I try to join to mtl_system_items_b, I am getting a product description instead of the name of the service. I also include code below this that pulls in the lines from the lines/account tab which captures line 1.1 and has the correct service name. Note this code does not have the header data and party data built into it, but I am willing to modify either piece of code to create the need join and get the data returned.
SELECT
distinct (okhb.contract_number) contract_number,
nvl(okhb.contract_number_modifier,'-') contract_modifier,
okhb.sts_code,
okhb.start_date start_date,
okhb.end_date end_date,
okprb.rle_code ROLE,
msib.description,
(msib.segment1) item_number,
hp.party_name
FROM
hz_party_sites ps,
hz_party_sites ps9,
hz_locations l,
hz_locations l9,
hz_cust_acct_sites_all ca,
hz_cust_acct_sites_all ca9,
hz_cust_site_uses_all cs,
hz_cust_site_uses_all cs9,
hz_parties hp,
hz_parties hp9,
okc_rules_b orb,
okc_rules_b orb9,
okc_rule_groups_b ogb,
okc_k_headers_b okhb,
okc_k_party_roles_b okprb,
okc_k_lines_b oklb,
ra_customer_Trx_all rcta,
mtl_system_items_b msib
WHERE
PS.LOCATION_ID = L.LOCATION_ID AND
ps9.location_id = l9.location_id and
L.CONTENT_SOURCE_TYPE = 'USER_ENTERED' AND
l9.content_source_type = 'USER_ENTERED' and
PS.PARTY_SITE_ID = CA.PARTY_SITE_ID AND
ps9.party_site_id = ca9.party_site_id and
CA.CUST_ACCT_SITE_ID = CS.CUST_ACCT_SITE_ID and
ca9.cust_acct_site_id = cs9.cust_acct_site_id and
ps9.party_id = hp9.party_id and
ps.party_id = hp.party_id and
cs.site_use_id=orb.object1_id1 and
cs9.site_use_id = orb9.object1_id1 and
orb.jtot_object1_code in ('OKX_SHIPTO'/*,'OKX_BILLTO'*/) and
orb9.jtot_object1_code = 'OKX_BILLTO' and
orb.rgp_id = ogb.id and
orb9.rgp_id = ogb.id and
okhb.id = okprb.chr_id and
msib.inventory_item_id = orb.object1_id1 and
okhb.contract_number = rcta.interface_header_attribute1 and
nvl(okhb.contract_number_modifier,'-') = nvl(rcta.interface_header_attribute2,0) and
ogb.chr_id = okhb.id and
okhb.sts_code = 'ACTIVE' and
okhb.contract_number in ('VO-7001','VO-7078') and
okprb.rle_code in ('CUSTOMER','END_USER')
--oklb.line_number||'.'||oklbs.line_number = '1.1'
order by okhb.contract_number;
select
to_char(oklb.line_number)||'.'||to_char(oklbs.line_number) subline_number,
okhb.contract_number,
okhb.sts_code,
(msi.segment1) item_number,
msi.description,
okcis.number_of_items,
round(months_between(element.date_completed , element.date_start)) billable_days,
oklbs.start_date start_date,
oklbs.end_date end_date,
to_date(oklbs.attribute1, 'YYYY/MM/DD HH24:MI:SS') warranty_start_date,
to_date(oklbs.attribute2, 'YYYY/MM/DD HH24:MI:SS') warranty_end_date,
oklbs.attribute4 sales_order
from oks_level_elements_v element,
okc_rules_v rule,
okc_rule_groups_v grp,
oks_bill_cont_lines_v obcl,
okc_k_lines_v oklbs,
okc_k_items_v okcis,
mtl_system_items_vl msi,
okc_k_items_v okci,
okc_k_lines_v oklb,
okc_k_headers_v okhb,
OKS_BILL_TRANSACTIONS_V obtrx
where trunc(element.date_start) = trunc(obcl.date_billed_from) and
rule.id = element.rul_id and
rule.rgp_id = grp.id and
grp.rgp_type = 'KRG' and
grp.rgd_code = 'SVC_K' and
grp.cle_id = oklbs.id and
oklbs.cle_id = oklb.id and
oklbs.lse_id <> '2' and
okhb.sts_code = 'ACTIVE' and
msi.inventory_item_id = okci.object1_id1 and
msi.organization_id = 3 and
okcis.cle_id = oklbs.id and
okci.cle_id = oklb.id and
obcl.cle_id = oklb.id and
oklb.chr_id = okhb.id and
obcl.btn_id = obtrx.id and
okhb.contract_number like 'VO-7078' and
oklb.line_number||'.'||oklbs.line_number = '1.1'
order by okhb.contract_number, to_number(oklb.line_number), to_number(oklbs.line_number), oklbs.id;
Code that pulls in the correct description as seen at line level in Service Contracts Module.
OUTPUT of this query
CONTRACT_NUMBER STS_CODE ITEM_NUMBER DESCRIPTION
XX-XXXX ACTIVE FULL SERVICE FULL SERVICEI guess you are looking for coverage name. You need to add two more table to join with items like as in
select inventory_item_id,a.name,a.item_description from mtl_system_Items_b c,okc_k_lines_tl a,okc_k_lines_b b
where organization_id=<organization_id>
and contract_item_type_code in ('SERVICE','WARRANTY')
and a.id=b.id
and b.chr_id=-1
and coverage_schedule_id=b.id;
Thanks
Nagamohan -
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 -
Idoc Blaord for service contracts - update contracts
Hi
I am working with a 3rd party contract management system. I am now interfacing with this package to work with Service Contracts. When I try and process the BLAORD idoc, it comes back with an error saying that the package number already exists.
Im my opinion it is trying to create a new line item and therefore it is not happy to use the package number for the service line item that already is there. I need it to modify this entry and update the condition records.
Please help
ThanksHi,
Related to the error 00344, I did not find much information. I only found the following:
notice that the IDOC must contain two E1EDC20 segments to
transfer one service line. The first segment just contains header
information and maybe some unimportant default values, but not the
service data. The package number of this header line links the services
to the item. The subpackno of this service line must be the package
number of the 'real' service lines. I have copied an example from one of
our internal systems below.
In addition you may have a look at note 420334. It has nothing to do
with ALE or contracts, but the concept of creating a service line is
the same.
Example:
E1EDC20 001:
SGTYP 001
PACKNO 0100009042
INTROW 0000000001
EXTROW 0000000000
RANG 0
SUBPACKNO 0100009043
MENGE 0.000
PEINH 1
PREIS 0
BRTWR 0
NETWR 0
CURCY EUR
UEBTO 0.0
AUSGB 0000
FRPOS 1
PERNR 00000000
KNT_MENGE 0.000
KNT_WERT 0
UNG_WERT 0
UNG_MENGE 0.000
ALTROW 0000000000
MSGFN 005
E1EDC20 002:
SGTYP 002
PACKNO 0100009043
INTROW 0000000002
EXTROW 0000000010
RANG 0
SUBPACKNO 0000000000
MATKL 01
MENGE 120.000
MENEE HUR
PEINH 1
PREIS 1
BRTWR 120
NETWR 120
CURCY EUR
UEBTO 0.0
AUSGB 0000
KTEXT1 xxx
PERNR 00000000
KNT_MENGE 0.000
KNT_WERT 0
UNG_WERT 0
UNG_MENGE 0.000
ALTROW 0000000000
MSGFN 005
But I do not know if this is your case, if not, I would recommend to open a ticket at SAP.
Best Regards,
Arminda Jack -
How to get price list line id for service contract line(subline)
Does some one know how to find a price list line id for service contracts line (sub line)?
There is actually a column in table okc_k_lines_b which is called price_list_line_id, but it looks like it is never used (all columns values are NULL). I have tried to investigate reprice API's which are used in contracts authoring form, but they are too huge and it didn't lead to nay result. There is a way (bad hack), by calling OKS_QP_INT_PVT.COMPUTE_PRICE it is possible to get price list line id by which contract line is priced, it would be kina fine if I would need to find line id for some rows, but it wont work for thousands!
Is there some proper way how could I get price list line id by which is service contract line priced?Hi,
Check out the following query that gets the price_list_id on subline_level and more.
The price_list_Id is stored as a rule.
SELECT
chd.contract_number
, par.party_number
, par.party_name
, ldf.pas_nummer
, ldf.pas_houder
, rh.object1_id1 hdr_price_list_id
, rsl.object1_id1 sl_hdr_price_list_id
, pld.parkeerterrein
, msi.segment1
, sit.description
FROM
okc_k_headers_b chd
, okc_k_lines_b clt
, okc_k_lines_b cls
, okc_k_lines_b_dfv ldf
, okc_k_items cit
, okc_rule_groups_b rgh
, okc_rules_b rh
, okc_rule_groups_b rgt
, okc_rules_b rtl
, okc_line_styles_b lst
, okc_rule_groups_b rgs
, okc_rules_b rsl
, okc_line_styles_b lss
, qp_list_headers_b plh
, qp_list_lines pll
, qp_list_lines_dfv pld
, qp_pricing_attributes pat
, mtl_system_items_b msi
, mtl_system_items_tl sit
, hz_cust_accounts cac
, hz_parties par
WHERE
rgh.chr_id = chd.id
AND rh.rgp_id = rgh.id
AND rh.jtot_object1_code = 'OKX_PRICE'
AND cac.cust_account_id = rtl.object1_id1
AND par.party_id = cac.party_id
AND clt.chr_id = chd.id
AND clt.lse_id = lst.id
AND lst.lty_code = 'SERVICE'
AND rgt.cle_id = clt.id
AND rtl.rgp_id = rgt.id
AND rtl.jtot_object1_code = 'OKX_CUSTACCT'
AND cls.cle_id = clt.id
AND cit.cle_id = cls.cle_id
AND cit.jtot_object1_code = 'OKX_SERVICE'
AND cls.lse_id = lss.id
AND lss.lty_code = 'COVER_ITEM'
AND cls.id = rgs.cle_id
AND rgs.id = rsl.rgp_id
AND rsl.jtot_object1_code = 'OKX_PRICE'
AND plh.list_header_id = rsl.object1_id1
AND plh.list_header_id = pll.list_header_id
AND pll.rowid = pld.row_id
AND pat.list_header_id = pll.list_header_id
AND pat.list_line_id = pll.list_line_id
AND cit.object1_id1 = pat.product_attr_value
AND cit.object1_id2 = chd.authoring_org_id
AND msi.inventory_item_id = cit.object1_id1
AND msi.organization_id = cit.object1_id2
AND sit.inventory_item_id = msi.inventory_item_id
AND sit.organization_id = msi.organization_id
AND sit.language = userenv('LANG')
AND cls.rowid = ldf.row_id
Hth,
Martin
Edited by: mvdons on 4-sep-2008 2:13
Maybe you are looking for
-
BBC Radio Player no longer works with Airport Express
This weekend I've been unable to get connected to the BBC Radio Player (from http://www.bbc.co.uk/radio). This has worked for the past year, and suddenly stopped. I have narrowed the problem down to the airport express. Radio streaming works without
-
Se16 down load into excel sheet problem with PO number
Dear All, While I download vbak table data using se16 from table VBAK ( using System > List> save --> local File --> Spreadsheet ), I get the PO number converted as error like at it's end, the last digit is becoming zero when po number is of 16 digit
-
Problem in using animations in dynamic images
Hi Friendz, I've problem in using effects or animation after calling images dynamically from outside the flash. If somebody have any solution for this, then please solve my problem immediately....
-
Multiple views in single View Container
Hi Experts, Is it possible to display multiple views in single view container.!! . I want to display 2 views in a view container based on condition. Please suggest me how to achieve this. Thanks, Regards, Ram.
-
Upload eTDS file to Government portal
Hi Experts, Is it possible to upload the eTDS file directly SAP to government Portal. Thanks