Symptom
When creating a sales document with reference to other document (sales document, billing document, delivery document) and changing the item quantity in the sales document, error "An exception was raised" (Message no. SY530) occurs.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Create a sales document with reference to other document
- Change the quantity of items in the sales document.
- Observe the error message "An exception was raised" (Message no. SY530).
Cause
One of the possible reasons lies in a zero divisor in the executed BAdI, as the divisor in the code cannot be zero.
Resolution
Check the code of the executed BAdI in the "Custom Logic" app to ensure a non-zero variable is used as the divisor.
Keywords
SAP S/4HANA Cloud Public Edition, Create with reference, Create, Reference, Sales document, Document, An exception was raised, SY530, Error, Message, Zero divisor, Custom logic, BAdi, Division by zero , KBA , SD-SLS-2CL , Sales (Public Cloud) , Problem