Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 

Lately, I found several requests on this question 'return order can be created with reference of a cancelled invoice'. Most customer is questioning why system behaves like this and ask what 's the best way to avoid it. So here I'd like to explain it in a short blog and give you some hint for it.

First we need to understand it is standard system behavior that it is possible to create documents (for example returns, credit memo, debit memo) with reference to a cancelled invoice. Normally 'copying requirements 021 billing header' is used in the copy control from billing to returns. (Transaction: VTAF)

The copy requirement routine 021 does not have any check for the field VBRK-FKSTO = X (billing document is cancelled). So it is allowed to create such document.

If you want to avoid the creation of documents when the invoice has been cancelled, you need to add the check for 'VBRK-FKSTO = X' in the requirement routine.

You could either modifying standard routine 021 or creating your own requirement routine in VOFM by copying the same coding in 021 and include the check for VBRK-FKSTO.

You may let me know if you had another good way to avoid such behavior.