What are Validations in SAP ?
Validations are rules or conditions defined by the organization that the system must follow to accept or reject transactions, postings or master data entries.
When you're entering a transaction in SAP, the system checks if the combination you've entered meets the rules defined for it. If it matches those rules, the transaction goes through without a hitch. But if the combination doesn't meet the requirements set then it'll give you an error message, saying you can't proceed with that combination, you'll be stopped until you fix it.
Validations can be created for several modules like Financial Accounting, Asset accounting, Cost Accounting, etc.
How to Configure Validations in SAP ?
Let's consider an example :
While posting a Journal Voucher via T.Code FB50 (G/L Document Posting) in my company code BAJAJ, if Document date is greater than Posting date then system must give an Error message i.e., 'Document date must be same as Posting date' and allow to post only Document date is less than or equal to Posting date.
STEP 1 : Go to Transaction code - GGB0, click on Document Header (call-up point).
Call-up Points - refers to different levels within a document where validations or checks can be triggered. The call up points are Document Header, Line Item and Complete document.
STEP 2 : Select Document header and click on Validation
STEP 3 : Provide the New validation name and SAVE.
STEP 4 : Click on Step > To create Step 001 for New Validation Condition. There can be several Step in a single validation
Every Step follow this 3 step process : Prerequisite > Check > Message
Prerequisite : defines the conditions that must be met for the validation to be executed
Check : If the check evaluates to true, the condition is met, the validation is successful.
Message : notification generated based on the outcome of the checks.
STEP 5 : Click on Prerequisite > under Table Fields tab click on "ABAP system fields" to select Transaction code or "Accounting Document Header" to select BKPF table Field.
Formula Bar : where condition is defined.
Table Field : consists of ABAP System Fields & Accounting Document Header Fields.
Formula Builder : to process mathematical formulas for Boolean logic.
Constant : to input value fields.
Element : is to delete any particular selected field.
as per our example, we require a pre-condition where the Transaction Code is 'FB50' and company code is 'BAJA'
STEP 6 : Click on Check > To verify Document Date must be less than Posting Date.
STEP 7 : Click on Message > To give a notification to user if the check is not met.
Select Message Type like Warning (W), Error (E), Cancel (A) or Information (I) and then select the message number with pre-defined message, or click on pencil icon to create a message as shown below
Now, select the number like '088' and click on selected entries to edit and enter message "Document Date must be same as Posting Date"
Here, choose the message number and SAVE.
Validation Step 001 of BAJAJ
To Validate Accounting Documents ( T.Code OB28)
To assign the Validation for your company Code, You can maintain one validation per one call up point only. But under one validation you can create multiple steps to be performed during doc entry.
STEP 1 : Go to Transaction Code OB28 and click on New Entries,
STEP 2 : Enter Company code, Callup point, Validation, select Action Level as Active and SAVE.
Test result of the above Validation Rule in FB50 Screen :
As seen below Document Date is greater than Posting Date hence system is showing message to make user enter Document date same as Posting date to post.
What are Substitutions in SAP ?
Substitutions is a functionality in SAP that is used to automatically replace or modify data values in SAP documents, transactions, or reports based on predefined conditions.
Substitutions are triggered based on predefined conditions, which are typically defined using a combination of fields, values, formulas, and logical expressions. These conditions determine when the substitution should be applied.
Substitutions can be created for several modules like Financial Accounting, Asset accounting, Cost Accounting, etc.
How to configure Substitutions in SAP system ?
Let's consider an example :
If a user is posting any JV via T-Code FB50 (G/L Document Posting ) and if its company code is BAJAJ, then system must replace or fill the Text field of line items with 'Test Journal Voucher'.
STEP 1 : Go to Transaction Code GGB1, Select Line Item and click on Substitution to create Step. Similar to the Validation callup points, here also we have Document header, Line item, Complete Document and cost of sales accounting.
STEP 2 : Click on Step to create new substitution, Enter code for substitution with description and Save.
Under a Substitution there can be multiple step, and the step first checks condition (prerequisite) and replace (substitutes) with value.
STEP 3 : Create Condition with provided fields of Document header, line item and ABAP fields, formula builder, constants etc.
In our case, if T Code is "FB50" and Company code is "BAJA" then system must replace the BSEG table 'Text' field.
STEP 4 : Select substitution then click on (+) to insert substitution entry > select Field 'SGTXT'.
and then, click on Constant values to provide value manually.
Enter text 'Test Journal Voucher', that is to be transferred to the assigned recipient field. This value is also allowed to be blank.
Substitution Step 001 of BAJAJ
To Substitute in Accounting Document ( T.Code OBBH)
To activate the Substitution rule for your company code.
STEP 1 : Go to Transaction Code OBBH and click on New Entries,
STEP 2 : Enter Company code, Callup point, Substitution, Action Level and SAVE
Test result of the above substitution rule in FB50 Screen:
As seen below, while Posting JV in BAJAJ the system replaces the user Text field with provided Substitution Text.
Validation and Substitution in SAP are functionalities used to enforce business rules and automatically modify data entered in SAP system, throughout this blog, we've delved into the significance of these functionalities.
Validation rules act as gatekeepers, preventing incorrect or incomplete data from entering the system. On the other hand, substitutions offer a flexible mechanism to automatically adjust data according to predefined rules, thus reducing manual intervention.
Thank you for taking the time to read my blog. I appreciate your support and hope you found this content valuable. Stay tuned and follow me for more insightful articles in future.
UPCOMING SAP S4 HANA ONLINE BATCHES
SAP Financial Accounting (FICO)
Course link: https://www.gauravconsulting.com/product-page/sap-s-4-hana-finance-beginners-online-batch
SAP Sales & Distribution (SD)
Course link: https://www.gauravconsulting.com/product-page/sap-s4-hana-sales-distribution-sd-live-training
SAP Extended Warehouse Management (EWM)
SAP Controlling (CO)
Course link : https://www.gauravconsulting.com/product-page/sap-s-4-hana-controlling-co-online-training
#SAPFICO #SAPjobs #SAPblog #SAPcommunity #SAPconsultant #SAPerp #SAPbooks #SAPvalidation #SAPsubstitution #TcodeGGB1 #TcodeGGB0 #SAPMM #EnterpriseStructure #SAPInsights #SAPefficiency #SAPFICOImplementation #SAPFICOSuccess #SAPFICOTips #SAPFICOAutomation #SAPbestPractices #SAPEducational #SAPGuide #SAPExpertise #SAPTraining #SAPConsulting #SAPWorkflow #SAPSolutions #SAPBusinessProcesses #SAPConsultants
EPTU Machine ETPU Moulding…
EPTU Machine ETPU Moulding…
EPTU Machine ETPU Moulding…
EPTU Machine ETPU Moulding…
EPTU Machine ETPU Moulding…
EPS Machine EPS Block…
EPS Machine EPS Block…
EPS Machine EPS Block…
AEON MINING AEON MINING
AEON MINING AEON MINING
KSD Miner KSD Miner
KSD Miner KSD Miner
BCH Miner BCH Miner
BCH Miner BCH Miner