Adding Validations

This option allows you to create a validation.

Context

A validation is an element of a business object node that describes some internal checking business logic on the business object. BOPF uses the Validations entity to:

  • validate whether a specific action can be executed on a specific node instance (action validations)
  • validate whether a set of node instances is consistent (consistency validations)

Validation does not modify any data. It simply returns messages and keys of failed node instances.

The framework generates default triggers Create and Update, when you add a validation. These triggers are generated only for the Consistency Check validation category.

Procedure

  1. Select a node.
  2. Press Ctrl + click to open the node Overview page.
  3. Choose the Validations page.
  4. Choose New.
  5. In the New Validation wizard, enter the following details:
    1. Name: Enter a unique validation name.
    2. Description: This is an optional field. Enter a short description about the purpose of the validation.
    3. Implementation Class: This class contains the validation implementation. You can either choose an existing class or create a new one.
    4. Validation Category: In this field choose a category. The various categories and their descriptions are as listed in the table below:
      Validation Category Description
      Consistency Check This validation verifies consistency of node instances. It contains read-only logic. BOPF uses consistency check to verify triggering condition at several time points during a transaction.
      Action Check This validation refers to an Action entity. Action check can be used to check if an action can be carried out.
  6. Choose Finish.
  7. Configure triggers. This is a mandatory step.
    1. For information on the consistency check , see
    2. For information on the action check, see
  8. Choose (Check ABAP Development Object) from the toolbar and check the Problems view for any errors.
  9. To activate the business object, choose Edit > Activate ABAP Development Object.

    TIP

    You can also use (Activate ABAP Development Object) in the toolbar.