I have this problem... after some validation, some positions of the sales order must be either deleted or blocked. I'm trying to do this in user exit SAVE_DOCUMENT_REFRESH, in include MV45AFZA using the BAPI BAPI_SALESORDER_CHANGE. If i run the BAPI in se37, it makes all the modifications correctly, but when i run it in the user exit, it returns error V1 045 'Enter the document number'. The data passed to the BAPI is exactly the same in both cases, i even try putting a break point in the user exit, and on that moment ran the BAPI in se37, and it work out correctly. Did anyone ever had this problem?
I'm on SAP ECC 5.0