Application Development and Automation 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: 
Read only

BAPI_CUSTOMERCONTRACT_CHANGE

rahul2000
Contributor
0 Likes
764

Hi All,

I am facing the below problem while using BAPI_CUSTOMERCONTRACT_CHANGE

I came across a contract where in, the first line item has no open quantity against it and has an order quantity of 60000 Since we might not have line item always in the input file , the program tries to assign the Rejection Code to every line item , and in doing so it tries to do the same for the above material which here happens to be the first line item of the contract 5000023 . The BAPI returns an information message u2018Field 'ABGRU' cannot be changed, VBAPKOM 000010 ready for inputu2019 and error message u2018Sales document 0005000023 was not changedu2019.

As a result of this the subsequent items are also not being assigned the rejection code.

I ran the program for the above contract only for item no. 20 and the rejection code was successfully assigned .

Why is it that when the first line item fails that the next items don't get updated as well.

Rahul

2 REPLIES 2
Read only

Former Member
0 Likes
578

Check document flow of first line item (VBFA). If subsequent documents are created against this line item, field:Rejection reason will not be available for update & will trigger an error while executing the BAPI, which will stop the updation of other line items also. So before Triggering the BAPI, check the document flow of each line item, and update the rejection reason of line items for which subsequent document is not created.

Read only

former_member186491
Contributor
0 Likes
578

Hi,

It may be because the reason for rejection field is not as an input field when there is no open quantity lying. See, because, there is no open quantity left, hence the order has already been completely dispatched and thereby no quantity is pending to undergo REJECTION. If it is so, how can we set 'Reason for rejection of quotations and sales orders' i.e. ABGRU..?

I guess, you need to handle this in your condition.

Thanks.

Kumar Saurav.