Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member202465
Contributor

Here is a common example of input validation in an application:

In this example we want to make sure that:

  • At least one input is provided.
  • The dates range is at least 14 days

The Validation feature appears in the configuration properties for the control:

1. Open the validation dialog for the second date control, and define the invalid value. Use the DADD() functions to compute From Date + 14 Days, in this manner: =DADD(@from_date,14,"D")

2. Run the application and test the results:

Specify the other condition, that at least one input should be provided. There are several options, we could make the error appear on the first control.

3. Define the following validation for the control:

  • Condition: User defined
  • Value: =ISNULL(@from_date)&&ISNULL(@to_date)&&ISNULL(@id)

You could use the Dynamic Expression dialog to find the required functions / values:

4. Run the application:

5 Comments