SAP Message B1267 - Error when writing IDoc status: Invalid status

Diagnosis
The status record of the IDoc could not be written in the previousstep because the status value was invalid. This error can only resultfrom a program error.

Procedure
If the error was caused by a standard function module for applicationinput, please contact SAP.
Otherwise check the function module called.