SAP Knowledge Base Article - Public

3779451 - Manage Sales Orders Version 2 Dumps with BEHAVIOR_ILLEGAL_STATEMENT When Material Is Obsolete (V1028) - SAP S/4HANA Cloud Public Edition

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

  1. Open the app Manage Sales Orders – Version 2.
  2. Create a sales order (for example, document type OR).
  3. Select a customer.
  4. Add a material that is set to status obsolete and has product substitution maintained.
  5. Ensure the substitute product is blocked for sales.
  6. 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

  1. As a temporary workaround, review ATP product substitution settings and remove materials that are blocked for sales(or otherwise unavailable)from substitution candidates.
  2. 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

Product

SAP S/4HANA Cloud Public Edition all versions