Creating a ValidationIn Customizing for For more information about creating logical rules, see the Implementation Guide (IMG) under
The
Validation Maintenance
screen appears. In the Control area on the left, expand the node for the required application area. You can then expand the node for your required callup point.
Note
This node contains both the validation and the rule list that have been created for this application area and callup point. You can also process the rules from here (create/change/display/delete).
Choose .
The
Create Validation: New validation (Header data)
appears.
Enter the following data:
– Validation name
– Validation description
You can also enter an authorization group to limit the number of users that can process this validation.
To accept these entries, press
Enter
.
If you want to create a validation by copying an already existing one, choose the corresponding callup point in Control and mark the rule you want to use as a reference. Wait until both screen areas of the system are ready for entry, and then choose . Enter data as described in Step 3 above.
The validation must have the same Boolean class as the validation you are creating.
If you are creating a matrix validation, allowing you to validate data for an entire document, you use callup point code 0003 in Financial Accounting (FI), Legal Consolidation (FI-LC), and Consolidation (EC-CS).
The following table shows example entries for the application area/callup point combinations.
Application area |
Callup point |
Description |
CO |
0001 |
Document line item |
GL |
0001 0002 |
Document header Document line item |
FI |
0001 0002 0003 |
Document header Document line item Total document |
Choose
Save
.
The
Create Validation: <Validation Name> (Header data)
screen appears.
You can use the following additional functions on this screen.
Additional Processing Functions Create Validation: <Validation Name> (Header data) Screen Screen
Choose |
Function |
|
Create a validation |
|
Select a validation. The system expands the corresponding node down to the selected validation automatically. A confirmation prompt gives you the opportunity to change your selection. |
|
The system creates a new validation by copying the validation currently marked. |
|
Switch to change mode |
|
Switch to display mode |
|
Save the validation |
|
Insert new step (empty). If steps already exist, the new step is inserted as the last step. |
|
Display a list of valid fields that you can use for the validation. These fields are determined based on the Boolean class of the validation. |
|
Display a list of valid fields that can be changed within a substitution |
|
Display a list of rules that you can use for the newly created validation |
|
List sets that have been created in your system. For more information, see Displaying a Set Directory . |
|
Switch on the tracing function. While posting a document, the system calls the validation and shows you which data is used. This function allows you to diagnose possible errors in the validation definition. For further information, see Tracing a Validation/Substitution/Rule . |
|
Switch off the tracing function |
|
Display where the validation is currently used. |
|
Create/change/display rules. Select the node containing the rule list. |
|
Create a rule |
|
Select a rule |
|
Create/change/display/delete messages and message classes. |
To create a new step for your validation, choose
or choose the corresponding function from the application tool bar. The
Create Validation: <validation name> - Step <step number> - Overview
appears.
You can use the following additional functions on this screen.
|
Insert a new step directly before the step currently being processed |
|
Insert a new step with the content of the step currently being processed |
|
Delete a step |
|
Return to validation header data |
To process an existing validation step, mark the
step <no.>
node in Control. You will then see an overview of the prerequisites, checks and messages created for this step. ). If required, enter a description for the validation step. To edit any of these elements, either double-click in the corresponding area or navigate in Control by choosing the required node.
Define the Boolean statement used as the prerequisite statement for selecting data for validation.
If the prerequisite statement is false, the entered value is not selected for validation and the transaction continues. If the prerequisite statement is true, the entered value is checked against the check statement entered in the
Check
field.
The Formula Builder provides an easy-to-use interface for entering logical statements in validations, substitutions, and rules. For more information, see Formula Builder .
Define the Boolean statement used as the check for validating the data selected by the statement in the
Prerequisite
field.
If the check statement is true, the entered value is valid and the transaction continues. If the check statement is false, the system sends a message to the user.
The Formula Builder provides an easy-to-use interface for entering logical statements in validations, substitutions, and rules. For more information, see Formula Builder .
For more information about the syntax rules for entering Boolean statements, see Syntax Rules for Boolean Statements .
You can also enter a user exit (type 1 or 3) in the prerequisite and/or check statement. For further information about user exits, see User Exits in Validations/Substitutions/Rules .
In the
Create Validation: <validation name> - Step <step no.> - Message,
enter the following data:
- Message type and number
You must enter all digits for the number, including the leading zeros.
– Message variables
There are four (1-4) table/field entry fields for up to four message variables (&). When the system encounters a variable (&) in a message, it replaces the variable with the corresponding table/field value. The order of the table/field names corresponds to the order in which the variables appear in the message.
Example
There are two variables in the following message:
Cost center & cannot be used with account &
The first variable (&) refers to table GLU1 and the dimension "Cost Center" (RCNTR). Therefore, the entries in the first
Output fields
are as follows:
Output fields 1 GLU1 RCNTR
The second variable (&) refers to table GLU1 and the dimension "Account" (RACCT). Therefore, the entries in the second
Output fields
are as follows:
Output fields 2 GLU1 RACCT
If the value entered for cost center is 100, the value entered for account is 0000050000, and the check statement is false, the system displays the message:
Cost center 100 cannot be used with account 0000050000
The table/field combinations that can be used for this validation depend on the fields used in the prerequisite and check statements. All fields used in the prerequisite and/or check statements can be used in the validation message. You can call up valid table/field combinations via the entry help.
For more information about entering messages, see Validation Messages .
Indicator that determines whether a workflow is started from the validation step in addition to a system message, if the prerequisite statement is true and the check statement is false.
If you want to start a workflow from a validation step, you must first define your own workflow and workflow action in the
SAP Business Workflow
(Development)
menu (
).
The object type VALIDATION and the event Triggered , which is started when the validation fails, are delivered with the validations and substitutions software.
The standard function MsgDisplay is also delivered with the validations and substitutions software. This function allows you to display the message to be output by the validation (including the output fields for the message variables) after a workflow has been started from the validation.
You must specify the name of the user(s) who receive(s) the validation message and workflow. This recipient then receives a list of work items in the system inbox, detailing the activities to be processed.
For more information about workflows in FI-SL, see the SAP Library
Triggering a Workflow from a Validation (FI-SL)
documentation (
).
For general information about business workflows, see the SAP Library
SAP Business Workflow
documentation (
).
During processing of a validation the steps are numbered sequentially by the system automatically. Move steps as follows: Mark the node of the step you wish to move. You can then move the step to the node of a different step. The selected step is inserted after the target step (Drag and Drop method). This only possible within a validation.
Once you have finished processing the validation, choose .