SAP Knowledge Base Article - Public

2996469 - Workflow Rule Formula Does Not Work

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

  1. Go to the Administrator work center.
  2. Go to the Workflow Rules view.
  3. Create a workflow rule XYZ with action "Field Update" type. 
  4. Add the field Field 03 to update and choose the Update Type. 
  5. Now, choose the type as "Formula" and write your formula like required. E.g.: #Field01# - #Field02# will be the update value of Field 03.
  6. Save the rule and activate it. 

Now, you want to use the rule.

  1. Go to the Sales workcenter.
  2. Choose Opportunities / Sales Quote / Sales Order view.
  3. Create a new document and fill Field 02 with the desired value. Here, the Field 01 is dependent of Field 02. 
  4. 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

    2817897 - Basic Guidelines While Using Formula Editor in Workflow

Keywords

 Workflow Rule ; Formula ; Amount. , KBA , LOD-CRM-WKF , Workflow , How To

Product

SAP Cloud for Customer core applications 2011