Why is Validation and Substitution rule important?

As the user sets the Validation rule, it checks the validation rule defined on specific fields data. When user is trying to post the transaction and enters data in that specific field, which violates the validation rule, system throws an error message for the user and it will not allow the transaction to post.

It will succeed to post the transaction only when the data is posted in that specific field as defined in the validation rule. It helps to avoid wrong entry at initial stage of posting the transaction.

Whereas Substitution rule is set up to substitute the data immediately upon the entry made. As the user enters the value, system validates according to the prerequisite defined by the user. If the prerequisite rule is met, the system replaces the value entered with other values.

With SAP S/4HANA Cloud 2005, The Manage Substitution/Validation Rules app for JVA is enhanced with the new comparison operator Matches and the new substitution type Table Lookup.

The Matches operator can be used to match a string-type field value against a regular expression.

The Table Lookup substitution type allows user to choose a source field from a custom business object and uses its value to fill in the target field.

Let’s see how it looks and how to configure in the Cloud System with 2005 upgrade:

 Apps involved:

Ø  Manage Substitution/Validation Rules

Ø  Post General Journal Entries

 Business Roles :

Unrestricted read/write for:

Ø  Configuration Expert - Business Process Configuration: BR_BPC_EXPERT

Ø  General Ledger Accountant:  BR_GL_ACCOUNTANT

Example:

 1. Define Validation Rule

Login with the role Configuration Expert - BPC_EXPERT

 Go to “Manage Substitution/Validation Rules”

Picture1.png

Click on “Create Rule”.

Picture2.png

Enter the following:

Context: Coding Block

Event: Coding Block

Rule Type: Validation Rule

Click on “Create”

Picture3.png

Under General Information enter the following:

Picture4.png 

Under Precondition, enter the following:

Picture5.png 

Under Validation, enter the following:

picture6.png 

Click on “Save”.

Click on “Activate”.

picture7.png 

2. Post Journal Entry

Login with the role General Leder Accountant:  GL_ACCOUNTANT

picture8.png

Enter the following Header details.

picture9.png

Line Item 1: Enter the following details

picture10.png

Line Item 2: Enter the following details

picture11.png

Click on “Post”.

You should receive the below error message.

picture12.png

Click on OK and go to Line Item 1.

Change the Cost Center to CC_CON

picture13.png

Click on “Post”

picture14.png

3. Create Substitution Rule

Login with the role Configuration Expert - BPC_EXPERT 

Go to “Manage Substitution/Validation Rules”  

picture15.png

Click on “Create Rule”

picture16.png

Enter the following

Context: Coding Block

Event: Coding Block

Rule Type: Substitution Rule

Click on “Create”

picture17.png

Under General Information, enter the following:

picture18.png

Under Precondition, Enter the following:

picture19.png

Under Substitution, Enter the following:

Substitute Type: Substitute with Constant

picture20.png

Click on Save.

Click on Activate.

picture21.png

4. Post Journal Entry

Login with the role General Ledger Accountant:  GL_ACCOUNTANT

picture22.png

Enter the following Header details.

picture23.png

Line Item 1: Enter the following details

picture24.png

Line Item 2: Enter the following details

picture25.png

Click on Post.

Click on Display.

picture26.png

Click on Settings

picture27.png

Select Functional area and click on OK.

picture28.png

picture29.png

Functional Area is YB20 which proves Substitution Rule has been triggered correctly.

With this the user can successfully create and validate the rules as per business requirements.

Please find help link for the feature: https://help.sap.com/viewer/0fa84c9d9c634132b7c4abb9ffdd8f06/2005.500/en-US/5c8c2825535f4e3aa9b7f716a0085221.html

Thanks & regrads,

Hima.