SAP Message B1265 - Error when writing IDoc status: IDoc number is invalid

Diagnosis
The status record of the IDoc could not be written in the previousstep because the number in the program was invalid. This errorcan only result from a programm error.

Procedure
Please contact SAP.