Service Contract Sublines appear Active in Contract, but Expired in IB
Contract is Active, contains 1 Service Line with End Date > today, contains 5 sublines.
Originally contract contained 3 Sublines, contract Expired, was then Extended and successfully Active again, 2 covered items added.
Contract header, lines and sublines have End Date > today, however, the original 3 covered items have a 'Status' of Expired in the Installed Base, while the 2 added items are Active in the IB.
Can someone explain this, why does every indication in the Contract lead one to believe the contract AND all products are active (based on future end date, no termination date), however some items have a status of Expired in the IB?
Does anyone at Oracle read these? Are support analysts for Contracts on here to help?
Similar Messages
-
Proforma invoice for Service Contracts
Hello,
I know the invoice types F5 for order related proforma and F8 for delivery related invoice. Now I'm looking for possibilities to create a proforma invoice based on a Service contract (Order Type WV) as a periodical invoiced sales order.
I tried to use proforma invoice (type F5) with Service contract but the billing plan will be set on status C (completely processed) so that the same period can not be invoiced again with the real commercial invoice. The billing status in the sales order has been changed as well with the proforma, which should not be the case as the proforma should just generate a printout.
Does SAP offer anything or how can I setup customizing to be able to create proforma for periodical sales orders?
Kind regards
RafaelHello,
Thank's for the information.
Finally I tried to copy our existing invoice type and set it up like F5 but the problem is still that the billing plan periods are set to status C - completely processed. The accounting side is OK as no accounting document is being created.
But with this billing plan situation it would not be possible to create first the proforma invoice for one Period and then later create the real commercial invoice for the same period.
Any ideas what I can setup to avoid this problem? I thought of chancelling the proforma after creation so that the billing period will be opened again, but this is no user friendly or professional solution.
Thank's in advance for your ideas.
Kind regards
Rafael -
Accounting Rule query from the Pricing/Billing tab in Service Contracts
Running Oracle Apps. 11.5.10.2. I have the query listed below which returns both header and live level data for service contracts. I am trying to add the Accounting Rule from the Pricing/Billing tab within service contracts, but I am not having luck finding a suitable join. I have tried joining ra_customer_trx_lines_all to okc_k_lines_b using the following join from etrm rctla.contract_line_id(+) = oklb.cle_id, but it does not return any records for accounting_rule_id. Once I can get records to return for accounting_rule_id, I can pull in the rule name from ra_rules.
SELECT OKHB.CONTRACT_NUMBER CONTRACT_NUMBER,
NVL(OKHB.CONTRACT_NUMBER_MODIFIER, '-') CONTRACT_NUMBER_MODIFIER,
OKHB.STS_CODE STATUS,
OKHB.START_DATE START_DATE,
OKHB.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,
rctta.name PRODUCT_GROUP,
rctla.accounting_rule_id,
P.PARTY_NUMBER PARTY_NUMBER,
P.PARTY_NAME PARTY_NAME,
to_char(oklb.line_number)||'.'||to_char(oklbs.line_number) SUBLINE_NUMBER,
to_char(okcis.number_of_items, '9,999,999,999') QTY,
msib.segment1 ITEM_NUMBER,
msib.description DESCRIPTION,
to_char(oklbs.price_unit, '9,999,999,990.99') UNIT_PRICE,
to_char(oklbs.price_negotiated, '9,999,999,990.99') EXTENDED_PRICE
FROM OKC_K_HEADERS_B OKHB,
OKC_K_PARTY_ROLES_B OKPRB,
HZ_PARTIES P,
HZ_PARTIES HP,
OKX_CUST_SITE_USES_V C_BILL_TO,
OKX_CUST_SITE_USES_V C_SHIP_TO,
OKC_CONTACTS OC,
OKC_CONTACTS OCS,
OKX_RESOURCES_V ORV,
OKC_K_LINES_B oklb,
MTL_SYSTEM_ITEMS_B MSIB,
OKC_K_ITEMS OKCI,
OKC_K_ITEMS OKCIS,
OKC_K_LINES_B OKLBS,
OKX_SALESREPS_V OSV,
RA_CUST_TRX_TYPES_ALL RCTTA,
ra_customer_trx_lines_all rctla
WHERE OKHB.ID = OKPRB.CHR_ID
AND OKPRB.JTOT_OBJECT1_CODE = 'OKX_PARTY'
AND OKPRB.OBJECT1_ID1 = P.PARTY_ID
AND C_SHIP_TO.PARTY_ID = HP.PARTY_ID
AND OKHB.ID = OC.dnz_chr_id(+)
AND okhb.id = ocs.dnz_chr_id(+)
AND oc.jtot_object1_code (+) = 'OKX_RESOURCE'
AND oc.OBJECT1_ID1 = orv.ID1(+)
AND ocs.jtot_object1_code = 'OKX_SALEPERS'
AND ocs.object1_id1 = osv.id1
AND C_BILL_TO.SITE_USE_CODE(+) = 'BILL_TO'
AND OKHB.SHIP_TO_SITE_USE_ID = C_SHIP_TO.ID1(+)
AND OKHB.BILL_TO_SITE_USE_ID = C_BILL_TO.ID1(+)
AND C_SHIP_TO.SITE_USE_CODE(+) = 'SHIP_TO'
AND okhb.id = oklb.chr_id
AND msib.inventory_item_id = okci.object1_id1
AND msib.organization_id = 3
AND okcis.cle_id = oklbs.id
AND okci.cle_id = oklb.id
AND oklbs.lse_id <> '2'
and oklbs.cle_id = oklb.id
AND rctta.cust_trx_type_id(+) = oklbs.attribute8
and rctla.contract_line_id(+) = oklb.cle_idSorry for the late reply, but this solution worked great.
and OKS_K_HEADERS_B.ACCT_RULE_ID = RA_RULES.RULE_ID
and OKC_K_HEADERS_B.ID = OKS_K_HEADERS_B.CHR_ID -
How to creating Service Contract using BAPI_SLSTRANSACT_CREATEMULTI
Hi,
In my requirement, I have to create a Service Contract from flat file by using BAPI - BAPI_SLSTRANSACT_CREATEMULTI and data which are comming from flat files are, Serial number, Sold-to party, Ship-to party, Installation date, Contract start date, Contract end date, Service profile, Response profile.
Please suggest me what are the Import parameters should I pass in this BAPI to create Service Contract?
Thanks in Advance,
DeepeshHi All,
for everybody's benefit (and to avoid you the time I've spent to work this out...), here is a working example on how to create an sales order (TA) via the BAPI_SLSTRANSACT_CREATEMULTI.
Not really a Service Contract, but it tells you how to call the BAPI.
Points appreciated, if you find this helpful...
I use the convention entryField for the values that should be set based on your system.
Cheers
G
*& Report ZZGVBAPISALESORDER
REPORT ZZGVBAPISALESORDER.
include constants
include crm_direct.
// GUIDs
data: lv_guid_h type GUID_32,
lv_guid_i type GUID_32,
lv_guid_sl type GUID_32,
lv_guid_p type GUID_32.
// Handles
data: lv_current_handle type crmt_handle,
lv_handle_h type crmt_handle,
lv_handle_i type crmt_handle,
lv_handle_sl type crmt_handle,
lv_handle_p type crmt_handle.
// Administration header + item + etc
data: lt_salesorder_header type table of bapibus20001_header_ins,
ls_salesorder_header type bapibus20001_header_ins,
lt_salesorder_item type table of bapibus20001_item,
ls_salesorder_item type bapibus20001_item,
lt_scheduleline type table of BAPIBUS20001_SCHEDLIN,
ls_scheduleline type BAPIBUS20001_SCHEDLIN,
lt_partner type table of BAPIBUS20001_PARTNER_INS,
ls_partner type BAPIBUS20001_PARTNER_INS,
ls_logical_key TYPE crmt_partner_logic_partner_key,
lt_organisation type table of BAPIBUS20001_ORGMAN_INS,
ls_organisation type BAPIBUS20001_ORGMAN_INS.
// Saved sales orders
data: lt_saved_process type table of bapibus20001_object_id,
ls_saved_process type bapibus20001_object_id,
ls_salesorder type CRMT_RETURN_OBJECTS_STRUC.
data: lt_input_fields type table of bapibus20001_input_fields,
ls_input_fields type bapibus20001_input_fields,
lt_return type table of bapiret2,
ls_return type bapiret2.
// Macro definition to populate structure and input field
This, called as
setfield ls_salesorder_header GUID lv_guid_h
is exploded as
ls_salesorder_header-GUID = lv_guid_h.
ls_input_fields-fieldname = 'GUID'.
append ls_input_fields to lt_input_fields.
Note 1: &2 (field name) MUST be uppercase
Note 2: for the salesorder header, I haven't used the macro,
to show how the code should look.
I've used the macro everywhere else.
define setfield.
&1-&2 = &3.
ls_input_fields-fieldname = '&2'.
append ls_input_fields to lt_input_fields.
end-of-definition.
// end of macro definition
// fill order administration header
perform get_guid changing lv_guid_h.
add 1 to lv_handle_h.
ls_salesorder_header-guid = lv_guid_h.
ls_salesorder_header-handle = lv_handle_h.
ls_salesorder_header-process_type = 'TA'.
clear ls_input_fields.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_guid = lv_guid_h.
*ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-orderadm_h.
ls_input_fields-fieldname = 'GUID'.
append ls_input_fields to lt_input_fields.
ls_input_fields-fieldname = 'HANDLE'.
append ls_input_fields to lt_input_fields.
ls_input_fields-fieldname = 'PROCESS_TYPE'.
append ls_input_fields to lt_input_fields.
append ls_salesorder_header to lt_salesorder_header.
// fill organisation data (I needed this, you may rely on
sales org determination instead...)
clear ls_input_fields.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-orgman.
setfield ls_organisation REF_GUID lv_guid_h.
setfield ls_organisation REF_HANDLE lv_handle_h.
setfield ls_organisation REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_organisation SALES_ORG_RESP salesOrgResp(input).
setfield ls_organisation SALES_ORG salesOrg(input).
setfield ls_organisation DIS_CHANNEL disChannel(input).
append ls_organisation to lt_organisation.
// fill order administration item
perform get_guid changing lv_guid_i.
lv_handle_i = lv_handle_h.
add 1 to lv_handle_i.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_i.
ls_input_fields-ref_handle = lv_handle_i.
*ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_i.
ls_input_fields-objectname = gc_object_name-orderadm_i.
setfield ls_salesorder_item GUID lv_guid_i.
setfield ls_salesorder_item HEADER lv_guid_h.
setfield ls_salesorder_item HANDLE lv_handle_i.
setfield ls_salesorder_item HEADER_HANDLE lv_handle_h.
setfield ls_salesorder_item ORDERED_PROD product(input).
*_set_field ls_salesorder_item ITM_TYPE 'TAN'.
setfield ls_salesorder_item MODE 'A'.
*adjustment taken from standard include LCMS_MAPPERF04
*(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
delete lt_input_fields where fieldname = 'HANDLE'
OR
fieldname = 'HEADER_HANDLE'.
append ls_salesorder_item to lt_salesorder_item.
// fill schedule line for item
perform get_guid changing lv_guid_sl.
add 1 to lv_handle_sl.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_i.
ls_input_fields-ref_handle = lv_handle_i.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_i.
ls_input_fields-objectname = gc_object_name-schedlin.
setfield ls_scheduleline ITEM_GUID lv_guid_i.
setfield ls_scheduleline GUID lv_guid_sl.
setfield ls_scheduleline HANDLE lv_handle_sl.
setfield ls_scheduleline ITEM_HANDLE lv_handle_i.
setfield ls_scheduleline QUANTITY '1.000'.
append ls_scheduleline to lt_scheduleline.
// fill partner line
*perform get_guid changing lv_guid_p.
*the partner use the logical key as well
ls_logical_key-ref_partner_handle = '0001'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0001'.
setfield ls_partner KIND_OF_ENTRY 'C'.
setfield ls_partner PARTNER_FCT '00000001'.
setfield ls_partner PARTNER_NO bpNumber(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
// example of a second partner function (custom) with data
override
ls_logical_key-ref_partner_handle = '0002'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0002'.
setfield ls_partner KIND_OF_ENTRY 'B'. "manual entry...
setfield ls_partner PARTNER_FCT customFct(input).
setfield ls_partner PARTNER_NO bpNumber(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
setfield ls_partner TITLE 'Mr.'.
setfield ls_partner FIRSTNAME 'John'.
setfield ls_partner LASTNAME 'Smith'.
setfield ls_partner STR_SUPPL1 'John Smith and Co'.
setfield ls_partner STREET 'Street1'.
setfield ls_partner STR_SUPPL3 'Street4'.
setfield ls_partner HOUSE_NO '42'.
setfield ls_partner CITY 'Townville'.
setfield ls_partner DISTRICT 'Districtshire'.
setfield ls_partner POSTL_COD1 'AA1 2BB'.
note now ...
*adjustment taken from standard include LCMS_MAPPERF04
*(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
I don't use macro because name of the field in input_table is different
*_set_field ls_partner COUNTRYISO 'GB'.
*instead
ls_partner-COUNTRYISO = 'GB'.
ls_input_fields-fieldname = 'COUNTRY'.
append ls_input_fields to lt_input_fields.
*_set_field ls_partner LANGU_ISO 'EN'.
ls_partner-LANGU_ISO = 'EN'.
ls_input_fields-fieldname = 'LANGU'.
append ls_input_fields to lt_input_fields.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
Create sales orders *
call function 'BAPI_SLSTRANSACT_CREATEMULTI'
EXPORTING
testrun = false
TABLES
header = lt_salesorder_header[]
item = lt_salesorder_item[]
partner = lt_partner[]
organisation = lt_organisation[]
input_fields = lt_input_fields[]
scheduleline = lt_scheduleline[]
saved_process = lt_saved_process[]
return = lt_return[].
// get the GUID of the created object
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01.
The include contains only this:
***INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01 .
*& Form get_guid
text
<--guid text
FORM get_guid CHANGING GUID.
CALL FUNCTION 'SYSTEM_UUID_C_CREATE'
IMPORTING
UUID = GUID.
ENDFORM. " get_guid -
Unable to Assign Service Profile and Response Profiles to Service contract
Hi All,
I am creating a new Service contract but unable to assign service and response profile in the Item details of a service contract.
The serice and response profiles are in display mode they are greyed out.
any ideas...
Regards,
Raj.Hello, please ignore I've replied to the wrong posting.
Cheers
Message was edited by: Andrey Bondarev
Message was edited by: Andrey Bondarev -
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 -
Dear sir
I bought my iPhone 4 from Apple store in Charlotte N/C about 2years ago without contract.
Now I tried to upgrade it to iOS 7.0.4.but after that my phone not work with last sim card.
And invalid sim appeared.so I bought it without contract but it seems to be lock in my country
Please tell me whats the matter?
My phone serial no 86034HTCA4T
Modem firmware 04.12.09
ThanksWithout contract is not the same as unlocked. The update to iOS 7 relocked
the iPhone to the wireless carrier to which it was originally locked. You must
contact that wireless carrier to see if they offer unlocking and if you qualify.
If you used jailbreak or other hack to unlock the iPhone initially, the method
used may prevent a legitimate unlock from succeeding and may render your
iPhone unuseable. -
Service PO with reference to Service Contract "Qty appearing as '1' in PO"
Hello Gurus,
I am creating a service PO with reference to a service contract. For service line there is lets say "1500" qty but while adopting the service lines from the contract to PO, system pick the qty as "1" only eventhough "1500" is remaining for PO release.
No other PO is created for this qty and for this contract.
Thanks in advance....
Malviya....Hi,
Usually a contract is created for establishing a price with the vendor.
This is the reason for is the only purchasing document which can be
created without quantities. The quantity in contract has the purpose of
limitation, as a guideline for all orders created with reference to
that contract and is not an immediate requirement like a quantity in
purchase requisition, for example.
When a purchase order is created with
reference to a contract, the services selected from that contract will
have ALWAYS the proposed quantity 1, and was designed and hard coded to
be like that.
Regards,
Edit -
When I try to download apps, a message appears saying that to move forward I have to agree to the new terms of the contract, but does not allow me to agree and not low Apps. Someone can explain what is happening?? thank you
Delete some stuff to make room on the device.
iCloud is not local storage and has nothing to do with your situation. -
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 -
Hello! I bought an iphone on ebay. I feel the introduction says that is not a service. need to unlock official data on where the contract but I am not asking for help
I'm sorry but your post doesn't make much sense in English. You may want to try posting again in your native language.
Best of luck. -
Unable to create a service contract from IDoc BLAORD FM IDOC_INPUT_BLAORD
I've been testing creating service contracts using BLAORD and it appears that SAP does not have any way of creating a service contract using IDOC_INPUT_BLAORD. Inside this function a BDC is built and either ME31K or ME32K is called. There is processing that checks the service line package numbers, but it doesn't appear to be creating them (Maybe I'm overlooking something). When the BDC is being built the services screen is ignored. There is a user exit that could be used to populate the BDC for these screens.
I recently had to develop a custom BDC to create service contracts becuase, to the knowledge of our best ABAP-ers, there is no SAP standard functionality to create service contracts programmatically besides using a BDC. My custom BDC will fail when run in background because of a GUI control on the services screen. It runs fine in the foreground. The short dump is 'RAISE_EXCEPTION'. Short text: Exception condition "CNTL_ERROR" raised. Termination is occurring in CL_GUI_DOCKING_CONTAINER->CONSTRUCTOR. We're on ECC 6.0.
I checked the SAP Notes system and I was unable to find anything related specifically to contracts for this issues. I did see that SAP has released OSS notes for other BDC processes so that they would be able to run in background.
I am wondering if there is anyone who currently is able to create service contracts using IDOC_INPUT_BLAORD. My plan is to set up an RFC between SAP systems. The customer wants to be able to receive contracts on demand. Has anyone done this before for service contracts? What has your approach been? Is there anyway of having the function run in foreground when it receives a IDoc?
Thanks for your input,
SteveHello Steve,
Did you get a solution to Service Contract (Purchase) creation through BLAORD or through any other FM please?
BAPI_CONTRAT_CREATE does not handle services.
Have a similar requirement and trying to avoid BDC.
Thanks & Regards
Prashanth -
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 -
How to getLine Details from Invoice Details window inside Service Contracts
Working on 11.5.10.2 Service Contracts Module.
Trying to retrieve Line Details from Invoice Details tab. Service Contracts Authoring > Invoice Details > Line Details. I have tried creating a join to oks_bill_transactions but this returns too many records, thousand of records for one contract. I then tried a join to oks_bill_sub_lines obsl,
OKS_BILL_TXN_LINES obtl but this was returning too many records as well. Seeing if these are the correct tables to pull the line detail for Invoices from in the Service Contract module or if I may be setting up my joins incorrectly and that is why I am getting so many records returned?
FROM OKC_K_HEADERS_B OKHB,
OKC_K_PARTY_ROLES_B OKPRB,
HZ_PARTIES P,
OKX_CUST_SITE_USES_V C_BILL_TO,
OKX_CUST_SITE_USES_V C_SHIP_TO,
ra_customer_Trx_all rcta,
okc_contacts oc,
OKC_K_LINES_B oklb,
OKC_K_LINES_B oklbs,
--oks_bill_sub_lines obsl,
--OKS_BILL_TXN_LINES obtl,
oks_bill_transactions obt,
okx_resources_v orv
WHERE OKHB.ID = OKPRB.CHR_ID
AND OKPRB.JTOT_OBJECT1_CODE = 'OKX_PARTY'
AND OKPRB.OBJECT1_ID1 = P.PARTY_ID
AND okhb.id = oc.dnz_chr_id(+)
AND oc.jtot_object1_code (+) = 'OKX_RESOURCE'
AND oc.object1_id1 = orv.ID1(+)
AND OKHB.ship_to_site_use_Id = C_SHIP_TO.ID1(+)
AND OKHB.bill_to_site_use_Id = C_BILL_TO.ID1(+)
AND C_SHIP_TO.SITE_USE_CODE(+) = 'SHIP_TO'
AND C_BILL_TO.SITE_USE_CODE(+) = 'BILL_TO'
AND OKHB.SHIP_TO_SITE_USE_ID = C_SHIP_TO.ID1(+)
AND OKHB.BILL_TO_SITE_USE_ID = C_BILL_TO.ID1(+)
AND OKHB.STS_CODE = 'ACTIVE'
AND p.party_id = C_SHIP_TO.party_id
AND okhb.contract_number(+) = rcta.interface_header_attribute1
AND rcta.cust_trx_type_id(+) = oklbs.attribute8
AND oklbs.cle_id = oklb.id
-- and oklbs.id = obsl.cle_id(+)
-- and obsl.id = obtl.bsl_id(+)
and obt.trx_number = rcta.trx_number(+)
and oklb.line_number||'.'||oklbs.line_number <> '1.1'
and nvl(okhb.contract_number_modifier,'-') = nvl(rcta.interface_header_attribute2,0)
and OKHB.CONTRACT_NUMBER = 'VO-7128'You can redirect the resultos to a txt file:
Open a command prompt as Administrator
Enter the command and redirect it to a file, here is an example:
tasklist /v > c:\results.txt
When you Open the file, you should able to see the Process name, PID, User, etc.
Good luck on that. -
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
Maybe you are looking for
-
Deletting the file that has been used in 'Additional Files' in FILE SENDER
Hi people. I've developed an interface that has to send a ZIP file to an email address. I pick that file using a dummy file. This file is picked as an attachment and has been defined in 'additional parameters' of SENDER FILE. My problem is that i wan
-
Hi Gurus, I have a requirement in module pool programing to create a password popup, I created two screen., when the user clicks on the push button of the first screen then it should lead to second screen, in the second screen user need to key in use
-
Label Divider won`t appear?
Hello I am creating a simple Menu panel on the west side of my main JFrame.This has a Title label Divider label and vertical struts to each.My problem is getting the divider label I created to appear it seems to want to disappear.Please help * Assesi
-
Do I need to purchase this??
Hey guys, My small company wants to publish all their workbooks and materials on apps and sell them. I have an acrobat acct, Indesign CS5.5 and was wondering, in order to sell these folios and sell them as apps, do I need to purchase DPS?? or is ther
-
Flash player no funciona en internet explorer
En otros navegadores como Chrome puedo ver videos de cualquier página, pero en internet explorer solo puedo ver los de youtube; en las demás páginas la pantalla del video aparece negra. Ya lo reinstalé y seguí las indicaciones de http://helpx.adobe.c