Symptom
Unable to implement the "OR" operator for the custom class in Manage Substitution and Validation Rules in SAP S/4HANA Cloud Public Edition.
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Open "Manage Substitution and Validation Rules" application.
- Create a new Substitution/Validation rule
- Attempt to configure the Precondition rule with an OR operator.
- Observe that the "OR" logic is not applied as expected.
Cause
The logic of the "OR" operator and "AND" operator is triggered as follows:
All lines of conditions are implicitly connected by a logical AND.
However, unless the left column (Field/Function) of several EQUAL comparisons is identical. In this case these lines are connected by an OR.
Resolution
Ensure that the Field/Function in the left column is identical.
For example:
Choose "Show Script", the OR operator is triggered as CompanyCode field left column is identical, while other fields like Company Code Currency, and Fiscal are connected by the "AND".
The function in the left column of Precondition must also have the same parameters and values to trigger the "OR" operator.
Choose "Show Script" to confirm the logic.
Keywords
substitution rule, OR condition, custom class, journal entry item , SAP S/4HANA Cloud Public Edition, validation rule, substitution logic, logical AND, logical OR, field value settings, SAP standard design, substitution issue, "Manage Substitution / Validation", "Manage Substitution/Validation Rules" , KBA , FI-SL-VSR-2CL , Validation, Substitution and Rules (Public Cloud) , How To
Product
Attachments
| Pasted image.png |
SAP Knowledge Base Article - Public