Symptom
- ABAP Runtime Error: BEHAVIOR_ILLEGAL_STATEMENT occurs in the app Manage Sales Orders – Version 2.
- In the classic transaction VA01, the same scenario shows “Material XXX has status: Obsolete E = 0” (message no. V1028) instead.
- The app dumps instead of presenting a business error message.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Open the app Manage Sales Orders – Version 2.
- Create a sales order (for example, document type OR).
- Select a customer.
- Add a material that is set to status obsolete and has product substitution maintained.
- Ensure the substitute product is blocked for sales.
- Observe that the app raises an ABAP dump instead of the expected business error (V1028 in the classic transaction).
Cause
During sourcing_transfer, creation of a subitem raises an error that is not handled correctly, breaking the process flow and causing a runtime dump. Error handling in sourcing_transfer must be adapted so the situation is handled in a controlled manner.
Resolution
- As a temporary workaround, review ATP product substitution settings and remove materials that are blocked for sales(or otherwise unavailable)from substitution candidates.
- Retest the scenario in the app after adjusting substitution settings to confirm that no dump occurs.
Keywords
manage sales orders version 2, behavior_illegal_statement, abap dump, v1028, obsolete material, product substitution, blocked for sales, sourcing_transfer, sd-sls, fiori sales order, runtime error, substitution candidate, atp substitution, classic transaction, user-friendly message , KBA , SD-FIO-SLS-2CL , Sales Apps (Public Cloud) , Problem
SAP Knowledge Base Article - Public