Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Material for Service Contract

kirankerudi
Active Participant
0 Kudos

Hello ABAPers,

How to change the Material within Service Contract using BAPI_CUSTOMERCONTRACT_CHANGE ?

When I tried changing the Material it gave me an error..'The material in item 000010 cannot be changed'

Is there any method on how to change the Material and Item Category ?

Thanks and Regards,

Kiran

3 REPLIES 3

Former Member
0 Kudos

Hi,

Check the document flow if the contract has been processed further and subsequent documents have been created with reference to this contract, if yes, in that case you will have to first reverse all the documents and then try to change the material in this line item.

Hope this helps.

0 Kudos

Hi Gaurav,

Thanks for the reply.

This has to happen in code. So any idea on how this can be achieved ?

Thanks & Regards,

Kiran

0 Kudos

Yes, but when you try to change a line item (material No in your case) after the subsequent documents have been created system gives you error.

If, for your contract there are no subsequent documents, then you can change the material no in Item table CONTRACT_ITEM_IN as below

CONTRACT_ITEM_IN-ITM_NUMBER = 000010.

CONTRACT_ITEM_IN-MATERIAL       = 'Material' (Here Give the new Material no).

APPEND CONTRACT_ITEM_IN.

CONTRACT_ITEM_INX-ITM_NUMBER = 000010.

CONTRACT_ITEM_INX-UPDATEFLAG = 'U'.

CONTRACT_ITEM_INX-MATERIAL = 'X'.

APPEND CONTRACT_ITEM_INX.

In this way pass all the fields you want to update and the corresponding X in the INX table.

Hope this helps.