Updating service contract line item's end date
Hi,
I am trying to extend the end date on a line item in a service contract via the DI and it is giving me the following error: 'Item's end date cannot be greater than contract's end date' and I don't understand why.
I retrieve the service contract object, change the header end date then find the line item I need, update it with the same end date and then issue call the SC update method. Here's my code:
Try
SC.Lines.SetCurrentLine(SerialNbrLineNumber)
NewStartDate = LineEndDate
'calculate new end date & extend service contract
NewEndDate = NewStartDate.AddYears(Warranty_Duration)
'never make the contract end date earlier than it had been
SC.EndDate = IIf(NewEndDate > SC.EndDate, _
NewEndDate, _
SC.EndDate)
'update service contract detail with new end date
If NewEndDate > LineEndDate Then
SC.Lines.EndDate = NewEndDate
End If
If SC.Update() <> 0 Then
rs.RtnCode = -1
rs.RtnMessage = B1Comp.GetLastErrorDescription()
End If
I did see something in the di help that mentions that B1 calcs an end date based on the "duration of coverage" field but I don't think I could use that because I might only change the end date for one line item.
BTW I can do this in the application with no problem.
Thanks in advance for any assistance.
Known B1 bug. Should have checked support first. More info on note # 1026540
Similar Messages
-
Hello
We are facing an issue while using a Z discount condition type in price agreement at service contract line item level.
A Z Condition type has been created in ECC and assigned to the pricing procedure. This pricing procedure is downloaded in CRM and determined in the service contract.
A condition maintenance group using this Z condition type is created in CRM and assigned to service contract item category.
Condition records are created in CRM for this condition type/condition maintenance group for specific products along with sales org and discount percentage.
But when the price agreement(using this condition type) is used at the item level of a service contract, the system throws errors (related to product/unit of measure and sales org, even though no issues seem to be there)and thus the price agreement is not allowed to be used.
If anyone has worked on such kind of scenario, please get in touch, I will share more details for the same.
Regards
Ankit AroraDear Ankit,
Once the pricing procedure is downloaded, please maintain the document pricing procedure at service contract header level, and maintain the customer pricing procedure at business partner sales area billing data.
In spro, maintain the pricing procedure for the combination of sales area, document pricing procedure, customer pricing procedure.
Please crosscheck whether the condition table is active or not.
Regards,
Maddy -
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> -
Adding Objects to Object List on the Service Contract Line Item
Hi,
I want to add a new fields at the object list. This is identified as configurable when I click on Configure Page button. Now when I add click on new field it which object should I select to enhance Object List.
<< Moderator message - Please do not promise points >>
Thanks and Regards,
Edited by: Rob Burbank on Dec 16, 2010 3:59 PMAs books is a list of String it can't accept a Book object !
LinkedList<Book> books = new LinkedList<Book>(); -
Dates getting wiped from Service Plan line item
Hi All,
We are currently facing an issue in the dates management on the service contracts. When we create a service contract and without saving if we change start date at the header we come across the following issues
1) Date rule gets wipes out from the service contract items.
2) All the dates maintained at the service plan line item are empty.
Contract header and Contract item has the same custom date profile .
For the service plan line item its a standard date profile SRVPLAN.
It will be helpful in getting some pointers towards the issue or if someone has faced similar problem before.
Regards
SohitHello Moises,
Can you give some details on how you managed to get this solved?
Thx
Nicolas -
Badi ISU_PRODUCT_CHANGE and creation of a new contract line item
Hello Gurus;
I have this requirement: Once a contract gets close the ending date (30 days before) i need to automatically renew the contract. In order to do that i thought that an action in the Contract Item might get the job done and browsing i found that badi ISU_PRODUCT_CHANGE does almost what i need even if it creates a new contract line item with a new product and this is not good for me... Does anybody know if there is a better Badi matching with my requirements or i have to "modify" the ISU_PRODUCT_CHANGE? I hope my question was clear if you need more specifics please ask me...
Thank you very much.
FabioYou can create a new costing variant with a valuation variant that points to inforecords for material prices. Go to OKKN t-code and create the required configuration and start using the new costing variant to measure the current cost of making vehicles.
-
Problem in CRM_ORDER_MAINTAIN for updating amount in line items
Hi abapers,
I have a scenario as follows: i want to update amount for line items in a transaction. i use the bapi crm_order_maintain followed by CRM_ORDER_SAVE and bapi transaction _commit . The problem is i loop the itab by passing the trnstn id , prdct code and new amount.
i applied the logic as given by rita tan (thread no 4)
link:[Re: Update Pricing Document with CRM_ORDER_MAINTAIN]
as per the logic i delete the existing value and insert the new amount . this works fine in the first loop and in second loop it deletes the existing record but does not insert the new value . It doesn't even give error too. what may be the problem.
here's a snapshot of the code i have written:
loop at itab.
SELECT SINGLE * FROM CRMD_ORDERADM_H
WHERE OBJECT_ID = WA_ZCMR_UPDATE-Z_OBJECTID
AND PROCESS_TYPE = P_TYPE.
SELECT SINGLE * FROM CRMD_ORDERADM_I
WHERE HEADER = CRMD_ORDERADM_H-GUID
AND ORDERED_PROD = WA_ZCMR_UPDATE-PRODUCT_CODE.
SELECT SINGLE * FROM CRMD_LINK
WHERE GUID_HI = CRMD_ORDERADM_H-GUID
AND OBJTYPE_SET = '18'.
SELECT * FROM PRCD_COND
INTO CORRESPONDING FIELDS OF TABLE IT_PRCD_COND
WHERE KNUMV = CRMD_LINK-GUID_SET
AND KPOSN = CRMD_ORDERADM_I-GUID
AND KSCHL = 'ZR12'.
READ TABLE IT_PRCD_COND
INTO WA_PRCD_COND INDEX 1.
DELETE FROM PRCD_COND
WHERE KNUMV = WA_PRCD_COND-KNUMV
AND KPOSN = WA_PRCD_COND-KPOSN
AND KSCHL = 'ZR12'.
COMMIT WORK.
WA_PRIDOC-REF_HANDLE = '0000000001'.
WA_PRIDOC-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_PRIDOC-REF_KIND = 'B' .
WA_COND_ADD-KSCHL = 'ZR12'.
WA_COND_ADD-KBETR = WA_ZCMR_UPDATE-NET_VALUE.
WA_COND_ADD-KPEIN = '1'.
WA_COND_ADD-WAERS = 'INR'.
INSERT WA_COND_ADD INTO TABLE IT_COND_ADD.
CLEAR WA_COND_ADD.
WA_PRIDOC-COND_ADD = IT_COND_ADD.
CLEAR IT_COND_ADD[].
INSERT WA_PRIDOC INTO TABLE IT_PRIDOC .
CLEAR WA_PRIDOC .
WA_CT_INPUT_FIELDS1-REF_HANDLE = '0000000001'.
WA_CT_INPUT_FIELDS1-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_CT_INPUT_FIELDS1-REF_KIND = 'B' .
WA_CT_INPUT_FIELDS1-OBJECTNAME = 'PRIDOC'.
INSERT WA_CT_INPUT_FIELDS1 INTO TABLE IT_CT_INPUT_FIELDS1.
CLEAR WA_CT_INPUT_FIELDS1.
AT END OF Z_OBJECTID.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PRIDOC = IT_PRIDOC
CHANGING
CT_INPUT_FIELDS = IT_CT_INPUT_FIELDS1
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
CALL FUNCTION 'CRM_ORDER_SAVE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
endat.
endloop.
Please help out.
Regards,
Navin
Edited by: navin.c on Jan 7, 2010 10:09 AMCheck the link below. This should help
Re: Change Order Quantity in CRM Sales Order -
Not able to change the the Contract Line Item Payer
Hi there,
I am not able to change the Contract Line item Payer and giving an error message '' Credit limit customer differs from credit limit customer in header''.
I checked the credit management assignment and the Business partner is assigned with the required Payer.
Request your help.
Thanks,
RenjithHi Renjith
So first of all check with which customer you have created Contract. So go to CMR data and check wheather you have maintained multiple Payers or not. If not maintained maintain multiple payers.
As you are getting error '' Credit limit customer differs from credit limit customer in header'' , so check the payer at header level and item level also. the payer at header level and item level should be different.
Regards
Srinath -
MIRO - Business Area not getting updated in Vendor Line item
Hello friends,
I am posting Vendor invoice in MIRO transaction.
After Posting if i see the financial document generated,
Business area has not got updated in Vendor Line item.
What could be the problem ?
Please help me out.
Hari PrasathHi Kale,
Make sure the field Business area is not supressed in tx. OB14. for the GL account in line item 001.
On the other hand, have a look to the note and kba below:
41294 - Business area in customer/vendor item
Kba 1727802 - Business area not getting populated in sales/ purchase tax -
Schedule Line Item 100001 delivery date is missing
Hello Sirs,
After created a sales order in ECC and transferred to TM via XI, the queue remains with STOP status. Entering in transaction /SAPPO/PPO2 I’m facing the error “Schedule Line Item 100001 delivery date is missing”. The delivery date is filled in ECC side.
Is there something that I need to check in TM regarding delivery date?
Thanks.Please try to edit the PO[Change date] and process it again. This issue happens when we use a conversion program to create PO instead of creating it from UI.
-
User defined Characterestics not being updated in actual line items
Gurus!
I am using Accounting Based COPA only.
I have defined a user based characteristic for which I am using user exit to derive.
However, this charaterstic is not getting updated in actual line items.
The derivation is working correctly at Sales order and Invoicing documents. (account assignment tab).
Where could I be going wrong??
Regards
SaurabhHi,
Please check the settlement rule of the sales order and check whether the relevant characteristics have been maintained in the settlement rule of PSG. If not, you may have to include the same.
Trust this helps much.
Cheers -
Standard Service Process-Line item for TECO not creating
Hi,
In the standard repair order process,upon TECO of service order,one line item will get generated in repair order and based on that outbound delivery will be done.In mycase after TECO of service order,line item is not automatically getting created.What could be the reason?
Regards
SBHi
I dont think how much this will be helpful
Check ur repair procedure
Sales
Sales Documents
Customer Service
Returns and Repairs Processing
Returns and Repairs Processing
Check it out...
- Pithan -
Surcharge on Net not update in PO line item
Hi,
we had a problem in Surcharge on Net calculated as per condition value. Some PO,s Surcharge+ Net value update in PO line item, some PO's not updating.
I have checked all the configuration part. Validity periods maintained upto 9999.
Info records valid, Vendor valid.
Please help me.
Regards,
SridharHi,
I have checked EKPO table and I found If Surcharge on net calculated then Item effects commitment filed (XOBLR) Updated. Otherwise surchage on net failure to calculate XOBLR not update in Table level.
Is there any way to update XOBLR field?
Regards,
Sridhar -
Buyer change the PO line items and end up with Awaiting Approval status.
Can you please help to look into this issue.
1.Buyer change the PO line items and end up with Awaiting Approval status.
2. But user claim that she got enough limit and should not route to her manager's approval. Also check with her manager and this PO do not exist his queue.
Any clue or tips on how to investigate on this issue. All your tips are appreciated,
-RickYou cannot change these POs because their changed version has status
'Deleted'. My proposal to fix them will be the following:
You will have to set changed version as closed(DOC_CLOSED set to X)
and in active version set DOC_CLOSED to space.
__-For the above statement, Can you guys please let me know, which table DOC_CLOSED belongs to and what are the steps to do this, as i come from a functional back ground.__ -
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
-
Best way to Lock a Table in exclusive mode ?
Hi I have a procedure that update a record in a table. This table is accessed for many work stations and these stations update this table several times. In average this table is updated 900,000 times a day. My oracle version is 9.02 In this table the
-
Lightroom 3.5 Import Errors using Synology NAS on Macbook
Hi all, I've been trying out Lighroom 3.5 and I love it, with one exception.... When importing my archive (which is stored on a Synology Diskstation DS211j, accessed via an Airport Extreme), I get multiple import errors (around 5% of the total files)
-
Hoe to calculate "average YTD target"
Hi Experts, I have a requirement in Bex report . the data will be like as follows... 0calmonth empnumber empname perday-target AvGYTD-target 04.2011 2 abc1 100 100 04.2011 3
-
Replace flash with JQuery Cycle plugin on my website
Hello, I am hoping someone can help me with a little programming on my current website www.ci.guilford.ct.us I am not a website developer so I am having some difficulty getting the down. I would like to replace my current flash content that scrolls t
-
Uninstall before installing universal FCP?
just wondering if i have to unistall FCP studio apps before i install new universal FCP 5 + dvd studio pro, motion, et al.