[go: up one dir, main page]

0% found this document useful (0 votes)
37 views12 pages

Validation and Substitution in SAP

The document explains the concepts of Validations and Substitutions in SAP S/4 HANA, detailing how these functionalities enforce business rules and modify data entries. It provides step-by-step instructions for configuring validations and substitutions using transaction codes like FB50, GGB0, and OB28. The document emphasizes the importance of these features in preventing incorrect data entry and reducing manual intervention.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views12 pages

Validation and Substitution in SAP

The document explains the concepts of Validations and Substitutions in SAP S/4 HANA, detailing how these functionalities enforce business rules and modify data entries. It provides step-by-step instructions for configuring validations and substitutions using transaction codes like FB50, GGB0, and OB28. The document emphasizes the importance of these features in preventing incorrect data entry and reducing manual intervention.

Uploaded by

Ganesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

8/20/24, 3:28 PM Validation and Substitution in SAP

Validation and Substitution in SAP S/4 HANA


Updated: Aug 2

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

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 1/12
8/20/24, 3:28 PM Validation and Substitution in SAP

Every Step follow this 3 step process : Prerequisite > Check > Message
1. Prerequisite : defines the conditions that must be met for the validation to
be executed
2. Check : If the check evaluates to true, the condition is met, the validation is
successful.
3. 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.

1. Formula Bar : where condition is defined.


2. Table Field : consists of ABAP System Fields & Accounting Document
Header Fields.
3. Formula Builder : to process mathematical formulas for Boolean logic.
4. Constant : to input value fields.
5. 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

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 2/12
8/20/24, 3:28 PM Validation and Substitution in SAP

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.

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 3/12
8/20/24, 3:28 PM Validation and Substitution in SAP

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.

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 4/12
8/20/24, 3:28 PM Validation and Substitution in SAP

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.

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 5/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 6/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 7/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 8/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 9/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 10/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 11/12
8/20/24, 3:28 PM Validation and Substitution in SAP

https://www.gauravconsulting.com/post/validation-and-substitution-in-sap-s-4-hana 12/12

You might also like