Reuse of Validation Rules

Use

You use this function to be able to create frequently-used validation rules for validation methods once only. You then reference the reusable validation rules in the customizing settings for the validation methods that should use these rules. Making frequently-used validation rules centrally available has the following benefits:

  • Improved consistency in customizing settings

  • Easier change management

  • Reduced customizing effort

    Note Note

    Changes to reusable validation rules affect all validation methods that use those rules. Before making a change, we recommend that you create a where-used list for the validation rule (using the context menu for the rule) to estimate the follow-up effort that will be required (for activities such as testing the changed functionality). You may want to consider copying the validation rule and making the changes to the copy only.

    End of the note.

Integration

You cannot operate validation rules as stand-alone functions. Validation rules are executed from within validation methods.

Prerequisites

You have assigned a technical name to one or more validation rules.

Features

Validation rules must be named before they can be reused. You can assign a technical name in one of the following ways:

  • You create a validation rule within a validation method and you assign it a technical name. In this case, you have to proactively assign a name because validation rules do not need to be named when you work within a method and you are not prompted to enter a name.

  • You create a validation rule without any reference to a validation method (in the consolidation workbench choose Start of the navigation path Consolidation Functions Next navigation step Validation Next navigation step Validation Rule End of the navigation path ). In this case, the rule applies to a combination of validation type and data stream, rather than to a single validation method. The system uses technical names to identify validation rules that are created independently like this. Therefore, the system prompts you for a technical name (input is required).

You can also enter a description.

Named rules are available in all validation methods that have the same validation type and the same data stream.

Reusable Validation Rules Within Validation Methods

In the customizing settings for validation methods, you can define named rules as well as unnamed rules. You also can change the definition of a named rule you have referenced in another method. This raises questions concerning the consistency of customizing settings which are hopefully answered in the scenarios that follow.

Reuse of a Validation Rule

To create a reference to a named validation rule, you add a validation rule in the method settings and you immediately either enter the technical name of a rule that is available to the current method or select a rule using input help (F4). The system then uses the definition of the validation rule in the method you are currently editing.

Creation of a Reusable Validation Rule

To create a new reusable validation rule, you add a validation rule in the method settings and enter a an unused technical name for this rule. You then create the formula and save the entry. The system then uses the definition created in the method with the name you entered and makes it available as a reusable validation rule.

Resolving of Conflicts Between Named and Unnamed Validation Rules

You have created an unnamed validation rule in a validation method, and have begun to create the formula. If you now enter a technical name of a validation rule that already exists, the system does not know which of the two rules you want to use. In this situation, the system asks you whether you want to replace the unnamed rule with the named rule. You have the following options:

  • Yes

    The system deletes the definition of the unnamed rule and adds a reference to the named rule to the validation method.

  • No

    The system deletes the technical name you entered. The definition of the unnamed validation rule is retained.

Replacing of a Named Validation Rule

A named validation rule has already been assigned to a validation method. You now enter the name of a different named rule. The system replaces the reference to the previously-assigned rule with a reference to the new rule. If you made changes to the definition of the previously-assigned validation rule, the system automatically saves these changes.

Copying of a Named Validation Rule

A named validation rule has already been assigned to a validation method. You now enter a new name that does not yet exist. The system copies the previously-assigned validation rule and assigns the new name to the copy. The system also replaces the reference to the previously-assigned rule with a reference to the new rule. If you made changes to the definition of the previously-assigned validation rule, the system automatically saves these changes.

Replacing of a Named Validation Rule with an Unnamed Validation Rule

A named validation rule has already been assigned to a validation method. You now delete this name. The system copies the previously-assigned validation rule and assigns the copy to the method as an unnamed rule. If you made changes to the definition of the previously-assigned validation rule, the system automatically saves these changes.