Professional Documents
Culture Documents
GL range 1001001 -
I. Introduction2
The validation and substitution tools can be used to validate and substitute data immediately upon
entry.
For example:
1. During document entry only a valid combination of GL account and business area needs to be
entered. This can be set as a validation in the system.
2. Providing the profit center contents using a certain combinations of expense accounts, company
code and business partner. This can be set as a substitution in the system.
Operator Definition
= Equal to
Symbol Operation
+ Addition
- Subtraction
* Multiplication
1
https://www.youtube.com/watch?v=xGrz_pfx0oc
2
https://www.gotothings.com/fico/validation-and-substitution-in-sap-fico.htm
/ Division
2. Substitution- In Substitution, the values entered into the SAP system are validated according to
a prerequisite defined by the user. If the prerequisite is met the system replaces the value entered
with other values.
1. Pages
2. …
3. Special Purpose Ledger
Go to start of banner
Go to start of metadata
- built-in help: check function is available to ensure the validation is logically correct
- output will be either a warning message (this message can be ignored) or an error
message
Substitution
- values or value intervals are validated according to certain conditions (prerequisits)
defined
- in case the conditition is met during the program run a replacement will happen
First step is to define which application should use validation / substitution (where?) The
following applications use the VSR-Tool and this makes this tool a cross-application-tool:
Second step is to define when exactly a validation / substitution is happening. In tr. GB31 you can
check the combinations of Callup-Points and Applications. Each combination builds a so-called
Boolean-Class. In table GB31, you will also find the information, if substitutions or validations are
possible for a certain Boolean-Class. Some examples:
Appl Callup Bool Val. Sub. Descr.
.
FI 1 8 x x Document Header
FI 2 9 x x Document Line
FI 3 15 x x Complete Document
Third step is the most complex: define the validation / substitution itself. (what to do and how to
do)
Forth step to assign the validation /substition to an appropriate org unit e.g. company code.
Validation
Many values that you enter into the SAP R/3 System e.g. in tr. fb60 are automatically checked
against standard validation rules.
eg. document date, posting period opened, existing company code
These validations are R/3 checks not Customer defined. These are standardized, however,
Customer specific validations cannot be standarized. FI-SL*provides a wide range of solution
approches to create customer validations. FI-SL validations allow you to create your own Boolean
statements without making any changes to the standard system.
Validation Structure
Each validation step consists of these 3 main points:
Callup points
Validation/substitution callup points are specific places in an application, which specify the exact
location where a validation/substitution occurs.
At each callup point, the system can use information you have already entered (such as a user
name, header information, and information entered in previous callup points) to
validate/substitute the values you enter at a callup point.
At callup point (1) only those fields above and the system fields can be used for validation.
Exception: Document number, Cross-CC no. are blank when they are created automatically by the
system at the end of the process.
Boolean class
Boolean class is a technical term, which determines the fields that can be used in a
validation/substitution/rule definition, as well as the message class for validation messages (see
table GB31 and GB01).
When defining a validation in tr. GGB0 the R/3 system generates coding according to validation
definition.
aa = Application Area
Example:
The validation ensures that postings only with Document type (Belegart) 'SA' can be performed in
Company Code VATO. In case the Document type is different an error message appears and no
posting can be carried out.
In transaction FB01 the two different outcome of the validation can be realized
In case you would like to analyse it coding side:
You can use „=SHCE“ and „=SHCF“ in the command field while you are on the validation step:
The command will bring you to coding part of „Prerequisite“
Substitution
A substitution is the checking process of entered values against a user-defined Boolean
statement. If the statement is true, the system substitutes specified values into the system.
Important to mention that the system performs substitutions before validations so that
substituted values can also be validated.
Process of a Substitution definition
aa = Application Area
Example
A subsitution was created with the below settings:
As in case of Validations the trace function is also available here. Further information can be
found in KBA 1589540.
User Exit
User exits are user-defined FORM routines, which are used to calculate and/or replace values
within a validation, substitution, or rule.
User exits have the following format: Uxyz, for example: U100
User Exits are stored in Formpools. The name of the Formpool is customized in table T80d
(transaction GCX2)
A). Decide upon the area of application - Application area is where the validation or substitution rule
is used.
FI financial accounting,
CO cost accounting,
AM asset accounting,
CS consolidation,
PS project system,
RE real estate,
GA allocations.
Each application defines the structures available and releases its fields for substitution.
B). Select the call up points – These are specific places in an application that specify the exact
location where a validation or substitution occurs.
2. Document line item - Validation and substitution at document line item level
D). Assignment and Activation – You must assign your validation and substitution to an appropriate
organization unit (e.g. company code for FI).A validation/substitution can be valid for several
company codes at the same time.
Furthermore the validation/substitution for the correct call up point must be activated.
The following degrees of activation exist for the organizational unit (e.g. company code) + call up
point + substitution (or validation) combination:
0 Inactive
IMG Path - SAP Reference IMG -> Financial Accounting -> General Ledger Accounting -> Business
Transaction -> GL account posting -> Carry out and check document setting -> Validation in
accounting document
Transaction: OB28
Case:
Management has decided that car rent paid shall not exceed 10000 USD per document.
Hence the company has decided that maximum line item amount for Car Rent GL a/c will be less
than USD 1000.
Validation rule for this will be set at the line item level as follows:
Select the company code in which validation rule is to be set or if new company code is to be added
then select the “New Entry” tab.
5. Select the arrow for line item and select the validation step relevant to your company code
6. Select the “Insert step” tab for creation of new validation rule. A new step 008 will get added up.
Now click on Prerequisite.
8. We have to select that table which contains the field for which validation rule needs to be set.
We need GL account and amount field which are present in the table structure BSEG.
Double click on the BSEG-HKONT field and then “=” sign followed by clicking the constant and then
enter the GL A/c number therein.
10. Click on the “Check” tab and select the WRBTR field with respect to line item amount in table
BSEG and then specify the condition “Amount<=10000
11. Now select the “Message” and enter the message which should be displayed in case the
document amount exceeds USD 1000.
Save the above created validation rule and post a document with amount greater than amount
USD1000.
In a similar way validation can be defined at Document Header Level and at the overall document
level.
IMG Path: IMG* Financial Accounting * General Ledger Accounting * Business Transactions * GL
Account Posting * Carry out and check document settings * Substitution in Accounting Documents
Transaction: OBBH
Case:
Accounting department wants that for a combination of GL a/c 260671000 and transaction code
FB60 (Vendor Invoices), profit center should be 1241 only.
Hence using substitution profit center can be substituted for the specified combination.
2. Select the company code in which validation rule is to be set or if new company code is to be
added then select the “New Entry” tab.
3. In general substitution rule is present at document header, line item and at complete document
level.
4. Since in this case the GL account and transaction code combination is needed, hence we will select
the line item level and then select the down arrow for it.
5. User can create his own substitution or can add a step in the already existing substitution.
8. Give the description and select the table structure from which the field needs to be specified in
prerequisite.
9. Currently we need to specify GL account (BSEG-HKONT) and transaction code (SYST-TCODE) and
select the AND operator since both the conditions are needed to be fulfilled.
12. Save the substitution rule and post an entry using transaction FB60 and GL a/c 260671000, and
the profit center 1241 will get automatically substituted.
IV. Conclusion
In this manner, validation and substitution rules can be set up with respect to business transactional
requirements.
Validation and substitution are useful in every aspect whether it is GL accounting or cost accounting.
Business rules can be set up at line item level, header level or at the whole of FI document level
making it one of the most useful tools with SAP consultants.
Validation
Save and double click on entry
Click on Validation
Name it
Click on steps
Click on prerequisite
Now search for text
Now click on messages
Back
We have assigned one GL for on group of material, but for posting we need two GLs for record
material as well as penalty cost, so we need substitution
TCode: CO01 to create production order (to issue stock to production order)
TCode: SE16 to check same entry for above will give below
screen
Step for substitution3
Example: Prerequisites:
3
https://www.youtube.com/watch?v=G0NmjbzTNn0
Substitute with header text : BKPF-BKTXT
Tcode: SE38
In line item
G/L
Field HKONT