SAP Knowledge Base Article - Public

3726121 - Field status check (mandatory) runs before substitution check in SAP S/4 Hana Public Cloud

Symptom

  • A custom field status variant was created, where a specific field is defined as mandatory.
  • A substitution/BAdI substitution exists to populate the value for the same field in parallel
  • During posting, the system triggers an error: "Please enter a value for field ******," indicating that the mandatory field status variant check occurs before substitution rules are applied.

Environment

  • SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a custom field status variant ****** with a specific field defined as mandatory.
  2. Configure a substitution rule/Badi to derive and populate the same field automatically during journal entry creation. 
  3. Attempt to post a journal entry which should trigger both the field status variant check and substitution. 
  4. Observe the error message: "Please enter a value for field ******"

Cause

  • The mandatory field status variant check for the specified field is triggered before the substitution logic is executed, causing the error to appear. 
  • If a field will be substituted subsequently, it does not make sense to have it set as suppressed for example. 
  • Field status variant check is a prerequisite for data integrity before any additional business logic can be applied.

Resolution

  1. Set the specified field in the field status variant configuration (SSCUI 102393) to optional to allow the substitution rule to populate the value during journal entry creation. 
  2. Test the substitution rule with the field set to optional to confirm that the value is populated correctly.
  3. Consider setting up a validation rule using the "Manage Substitution and Validation Rules" functionality instead of the field status check. This will allow for additional checks on the field to confirm if it is populated or not. The validation will be processed after the substitution. By following this approach, it is still possible to ensure that the field will be filled without making it mandatory in the field status variant customising.

Keywords

transaction type, field status variant, mandatory field validation, substitution rule, s/4hana cloud public edition, customer open items, financial transaction error, upload error, BADI, custom logic, validation rules, FSV check, 102393 , KBA , FI-SL-VSR-2CL , Validation, Substitution and Rules (Public Cloud) , FI-GL-GL-A-2CL , Posting/Clearing (Public Cloud) , FI-FIO-GL-TRA-2CL , Transaction Apps (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions