Skip to Content
Former Member
Sep 09, 2011 at 12:25 PM

Stop price update of delivered but un-invoiced (non-invoiced) line items


Hi Gurus,

I need some help regarding price update of line items which are delivered but not invoiced yet.

Case 1:

I am calling the FM 'BAPI_SALESORDER_CHANGE' and passing the line item (say 10) whose price needs to be updated. This line item is neither delivered nor invoiced. Result, correct change of price for line item 10.

Case 2:

In the above order, i am adding another line item (say 30), which is completely delivered, but I have not yet created an invoice for it. I want that this line item's price should not be changed (as delivery is already created for it). So, in my price update report, I check and filter this line item (10) and pass only line item 30 to the BAPI. Result: not only line item 30 but line item 10 also gets updated with new price!!

Case 3:

I created a new line item(40) and created an invoice for it after completely delivering it. When I call the BAPI now, I again filter the line items 30 and 40 and pass only line item 10 which i want to be updated.


Line item 10 - updated with new price

Line item 30 - updated with new price

Line item 40 - not updated


Any line item that is completely delivered should not be updated with the new price regardless of it having an invoice or not.


I am running a custom report to find the line items that need change and calling the BAPI_SALESORDER_CHANGE and passing those line items to update the price.

Problem faced:

This process is updating all line items in the SO that are not invoiced regardless of weather I am passing it to the BAPI or not

As far as i know, the checking of the invoice is in some standard program, and hence had debugged the BAPI and got the FM SD_SALES_DOCUMENT_SAVE which in my opinion is doing the change. But on further debugging I lost track of the tables which were holding the data as the code is flowing through a number of user exits and standard forms.

Please help!