Maintaining and Executing Validations

Objective

After completing this lesson, you will be able to maintain validations

Validation Procedures

A two-step validation process showing decision flows, checks, and warnings to ensure document accuracy, highlighting potential mismatches in dates and predefined conditions.

Validation enables customer-specific validation of certain fields, field combinations, and document types.

Validation consists of several steps (up to 999 steps are possible). Each step has the following parts:

  • Prerequisite
  • Check
  • Message

If the prerequisite statement is satisfied (true), a check is performed by the Rule Manager in the system. If the result of the check is FALSE, the system posts a message. For example, in certain invoices, the document date is compared with the posting date. If the dates do not match, a warning is issued.

Messages

Flowchart illustrating a validation process with prerequisites, checks, and error messaging logic for ensuring compliance with specific accounting parameters.

You can use a predefined message or create a new message for the validation.

A message can contain up to four fields. The "&" character is used as a placeholder for field values to be output in the message.

Types of messages include:

  • I = Information
  • W = Warning
  • E = Error (requires the entry to be corrected)
  • A = Cancel

Validation Examples

Illustration of a financial posting validation process, where incorrect cost center entries trigger error messages, prompting user correction before document posting.

The figure, shows a sample validation for the callup point 2. If account 61003000 is entered, a check is executed to determine whether the cost center is an administration center. If the cost center is an administration center, the relevant message is the output and you must make a correction.

Field Comparison

Diagram explaining three types of data comparisons—partial field, field constant, and pattern matching—used in a logic or validation process with specific examples.

You can use boolean logic to define different types of logical statements. You can create simple statements that use only one of the statement types, as shown in the preceding figure, or complex statements that use combinations of different statement types.

Tasks Performed in a Logical Statement

You can perform the following tasks in a logical statement using boolean logic:

  1. Compare fields with one another:

    BKPF-BUDAT <> BKPF-BLDAT.

    This statement is true if the date in the BUDAT field is not the same as the date in the BLDAT field.

  2. Validate field contents for certain values:

    BKPF-BLART = SA.

    In this example, the document type must be SA.

  3. Check or compare only a part of the field:

    If you want to execute a partial check, enter the following information:

    • The table name and the field name
    • A blank space before the first colon
    • A colon (:)
    • The digits that you want checked in the field name
    • A colon (:)

      1 always represents the first digit of the field. The number you enter does not represent a value; it represents the position of a value within the field string.

      Example: BSEG-HKONT: 3:

      The system checks only the third digit of the Account field to determine if a condition is true.

      Example: BSEG-HKONT: 1-3:

      The system checks only the first three digits of the Account field to determine if a condition is true.

      Example: BSEG-HKONT: 3-:

    The system checks from digit 3 to the end of the Account field to determine if a condition is true.

  4. Compare text patterns in your statements using the LIKE keyword.

    Example: BSEG-KOSTL LIKE ‘*3*3’.

    In this example, the * sign represents any combination of characters. The system searches for all cost centers (field KOSTL) where the value ‘3’ is used after the first and second combination of characters (for example, 363, 323, and 2303).

    Within text-pattern searches, you can also use the + sign to represent a single character.

How to Create a Validation for the Document Header

Create and Execute a Validation for a Line Item

Summary

  • Validation consists of prerequisites, checks, and messages.
  • Validation ensures data consistency and accuracy in FI documents.
  • Messages can be informational, warnings, errors, or cancellations.