Symptom
You set a workflow rule XYZ that triggers a formula to calculate an Amount type Field 03, based on the difference between Field 01 and Field 02. Both fields type is Amount as well.
Environment
SAP Cloud for Customer
Reproducing the Issue
- Go to the Administrator work center.
- Go to the Workflow Rules view.
- Create a workflow rule XYZ with action "Field Update" type.
- Add the field Field 03 to update and choose the Update Type.
- Now, choose the type as "Formula" and write your formula like required. E.g.: #Field01# - #Field02# will be the update value of Field 03.
- Save the rule and activate it.
Now, you want to use the rule.
- Go to the Sales workcenter.
- Choose Opportunities / Sales Quote / Sales Order view.
- Create a new document and fill Field 02 with the desired value. Here, the Field 01 is dependent of Field 02.
- Save the document and see that the Field 03 is not updated as you expected to.
Cause
The result is a negative value.
Resolution
This is the expected behavior.
The rule will not update negative values to Amount type fields.
In order to achieve the expected result, will have to set a formula that will return an absolute value:
Example:
ABS( ( FIELD 01 - FIELD 02 ) )
The above formula will return absolute value of the expression (#FIELD01# - #FIELD02#).
See Also
Keywords
Workflow Rule ; Formula ; Amount. , KBA , LOD-CRM-WKF , Workflow , How To