Error while posting a Warehouse shipment

Hi everyone,
I am trying to post a Warehouse shipment an getting the following error:

An attempt was made to change an old version of a Sales Line record. The record should first be reread from the database. This is a programming error.

Identification fields and values:

Document Type='Order',Document No.='1339',Line No.='10000'

While debugging, the debugger points at the following line,

IF ModifyLine THEN
SalesLine.MODIFY;

What can possibly cause that?

Do you have any customized code which is modifying sales line record before this code?

Did you made any changes in sales line after creating the warehouse shipment ?

No, I created the warehouse shipment and wanted to post it then I got the error message…