Skip to Content

Sales Order with batches cannot be closed or cancelled for specific item

Aug 03, 2017 at 12:39 PM


avatar image


In a client's SAP B1 system version 9.2 Pl07, they use batches for every transaction.

They had created a sales order, then copied to an Invoice. They wanted to cancel the invoice so they copied it to a Credit Note. They mentioned that SAP asked them if they wanted it to return the quantities and they clicked 'yes'. But it seems that it didnt do it correctly, because now the sales order cannot be closed or cancelled when a specific item is in it.

when it is copied to a delivery, or we delete the line in the sales order for that specific item and click update, SAP does not allow and displays message 'internal error (-5002)'.

We can copy to a delivery note and in the delivery note we delete the line before it is added. SAP allows that workaround and it works.

Another workaround we tried is to copy that sales order and save it and then copy it to a delivery note. We can assign the same batch number (that was causing the problem in the initial sales order) and SAP allows it.

But we still have a sales order that is not closed and an item that shows its pending.

Can someone suggest a solution to close that sales order?

Thank you in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Balaji Selvaraj Aug 03, 2017 at 01:05 PM


In the sale order if Batch is allocated then it may cause issue.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hello Balaji,

Thank you for your reply. What do you suggest we do in this case?

Thank you.


Try to deallocate the batch for that row item quantity.By selecting the quantity field in row the press Ctrl + tab and remove the allocated batch.


Hello Balaji,

Deallocating the batch was the first thing I tried. The case is that although in the window Batch Number Selection I am able to deallocate it and update it, in the Sales Order window when I click 'update' it says 'Internal error (-5002) occured Message [131 - 183]'.

Is there any way we can solve this?

Thank you,



Hi Maria

Check this note 1448046. Try to contact sap support.