Show TOC

Creating and Changing Consistency ValidationsLocate this document in the navigation structure

Context

Business Object Builder (BO Builder) provides you with a wizard for creating a consistency validation.

Procedure

  1. Starting the Wizard
    Note

    You can assign consistency validations only to the following types of nodes:

    • Extensible nodes that are created in the business object that is currently open

    • Extensible nodes that are created in the business object enhancement (enhancement) that is currently open

    • Extensible nodes that are created in the base object of the enhancement

    Open the business object or the business object enhancement (enhancement) in which you want to create a consistency validation.

    In the Node Browser navigation, choose the node you need to extend with a consistency validation.

    To start the Create Consistency Validation wizard, choose Create Consistency Validation in the context menu of the node.

    Note

    The consistency validation checks only instances of its corresponding node.

  2. Name and Description

    In this step, you enter the name and the description of the consistency validation.

    Input Field

    Description

    Node Name

    This displays the node to which the consistency validation is assigned in the model of the business object.

    Consistency Validation Name

    The name of the consistency validation must be unique in the business object. If the consistency validation is created in an enhancement, it must start with the namespace or the prefix of the enhancement. This ensures that the entities of different enhancements are clearly separated.

    The namespace or prefix must be completed with a consistency validation name.

    Example

    <namespace or prefix>_<consistency validation name>

    Description

    Enter a short description about the purpose of the node.

  3. Implementing Class

    The implementing class contains the business logic of the consistency validation. The implementing class is automatically created after finishing the wizard and you must subsequently implement it manually.

    Since the implementing class name must meet naming conventions, the wizard automatically suggests a valid class name.

    You can also define an existing class by implementing the /BOBF/IF_FRW_VALIDATION interface. This is useful if the business logic of another consistency validation can be reused. The system does not overwrite existing implementing classes.

  4. Request Nodes

    A consistency validation is automatically executed as soon as one of the triggering conditions of its request nodes is fulfilled. For more information, see section Validations. At this wizard step, the request nodes and the corresponding triggering condition must be defined.

    The screen shows all nodes that are, through an association, connected to the node to which the consistency validation is assigned. To define a request node, select the appropriate node and triggering condition (Create, Update, or Delete).

  5. Behavior

    The purpose of a consistency validation is to return messages that indicate that changed node instances are inconsistent. You can prevent the system from saving the entire transaction if a changed instance fails the consistency validation, or fails to set a consistency status. You can specify how the consistency validation behaves when it detects inconsistent node instances.

    Option

    Description

    Return messages

    This is the default behavior of a consistency validation. The validation implementation returns messages to the consumer if node instances are inconsistent.

    Return messages and prevent saving

    If the inconsistency of a node instance must be resolved before saving the transaction, you select this behavior.

    Return messages and set a consistency status

    If a base object contains a consistency status, this status can be influenced by a consistency validation. When a changed instance fails the consistency validation, the consistency status is automatically set to inconsistent.

    Status Variable

    Choose the appropriate status variable to indicate the consistency status of a node instance.

  6. Finishing the Wizard

    To create the consistency validation and finish the wizard, see Finishing the Wizard in Creating and Changing a Business Object.

Results

  • The system adds the new consistency validation to the model of the business object or of the enhancement and displays it in the Entity Browser navigation.

  • The implementing class is generated.

    You must implement it manually.

  • The constants interface of the business object or of the enhancement is regenerated and contains a unique constant identifying the consistency validation.

After you have created a consistency validation, you can change the following specifications:

  • Consistency Validation Name

  • Description

  • Implementing Class

  • Request Nodes

  • Behavior