Validation and substitution in SAP is used in document posting. In SAP all input values are validated either by a program or with a table. However, certain validations are not carried on by these standard programs so you have to specifically use validation program to create validation rules in sap for you specific requirements. Substitution is also worked similarly in SAP.
Its very difficult to say which one is more beneficial to use and why. In this article we have tried to compare validation and substitution in SAP.
What is Validation in SAP
While entering a transaction into SAP FI module, system will validate the combination that is entered and if its matches with the requirement that is defined in validation rule in SAP then it will allow you to post the transaction or else it will show an error message that the combination is not allowed.
If this type of validation error occurs then either you have to change the combination that you entered or you need to change the validation rule in SAP.
Transaction Code for creating Validation rules in SAP : OB28
Example: Suppose you have defined a validation rule in SAP to check a particular cost center for a particular cost element while entering a FI posting. In this case, system will not allow you to post any other cost center with that particular cost element. Only the cost center defined with the cost element in validation rule of SAP will be allowed to post.
What is Substitution in SAP
In substitution, SAP will substitute the entered value with the value that has been defined in SAP. Suppose you have defined to use one particular cost center for a cost element in a substitution rule and you entered a transaction in FI with some other cost center for those cost elements then system will replace the entered cost center with the cost center that is present in the substitution rule.
Transaction Code for creating Substitution rule in SAP : OBBH
Three call points provided in validation and substitution rule creation in SAP FI :
- Validation at document header level: this validation rule in SAP can be used at the header level of a document entry.
- Document line item: this is mostly used in any company. At this point, validation in SAP is used for the line items that we record in SAP FI module.
- Complete document: Here you can set a validation rule for the whole document in SAP.
During document entry only a valid combination of general ledger account and cost center needs to be entered. If this set as a validation rule for a company code then system will not allow any other combination of cost center with the General ledger account.
Examples of Substitution in SAP
Suppose management has decided that, for a particular combination of general ledger account and cost center, a specific profit center should be picked up. When you configure this requirement in SAP FICO, you specify to substitute the profit center for the combination of General ledger account and cost center. When you enter a transaction with that particular General ledger account and cost center, system will automatically substitute the profit center you mentioned in the substitution rule in SAP. If any profit center has been picked up from cost center master then that gets substituted with this substitution rule in SAP.