SAP Knowledge Base Article - Public

2820950 - Message type W and I does not work for BADI SD_SLS_CHECK_BEFORE_SAVE

Symptom

A warning message is coded in BADi SD_SLS_CHECK_BEFORE_SAVE but the message is not raised during processing.

Environment

  •  Sales and Distribution (SD)
  •  Logistics Execution (LE)
  •  SAP S/4HANA Cloud All versions 

Reproducing the Issue

  1. Logon with user role 'Administrator'.
  2. Open App 'Customer Fields and Logic'.
  3. Add Custom logic - 'Sales Document Check Before Save' with message type Info or Warning.
  4. Logon with user role 'SAP_BR_Internal_Sales_Rep'.
  5. Select app 'Manage Sales Order'.
  6. Choose option 'Create' sales order.
  7. Add sales data to the order to trigger the BADI and message implemented in step 3.
  8. No message is displayed.

Cause

The Check Before Save Cloud BAdI should be used to abort document saving. If there is no 'E' message, the other messages will not be shown.

Resolution

As an alternative option 'Sales Item Check' BAdI can be utilised instead. This BAdI will write all messages to the log of the Sales Document.

Keywords

Sales, Document Item, business context, implementation_ID, SY-MSG, SY-MSGTY, SY-MSGID , KBA , SD-SLS-SO , Sales Orders , SD-SLS-SO-2CL , Sales Orders (Public Cloud) , SD-SLS-EXT , Extensibility , Problem

Product

SAP S/4HANA Cloud 1905 ; SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions