Checks
The purpose of a check is to identify if a specified condition is true or false for the given input values. With checks, you can conditionally influence the processing in AIF.
You can assign checks in different places, for example, to conditionally skip a specific mapping step, to conditionally execute a specific function of an action, or to identify application error situations in which the processing should be stopped immediately.
In the SAP Application Interface Framework, a check has a well-defined input (up to five field values) and a well-defined output (a success checkbox indicating the result of the check), and they remain independent of the context in which they are used. As a result, checks can easily be reused by several interfaces in the SAP Application Interface Framework.
You can create a reusable check in the AIF Customizing via the Define Checks Customizing activity.
There are some simple field checks that are already predefined, for example:
To check the data from a database table, you have to fill the Table Name and Where Condition for Select Statement fields. In the case of a database check, you have two options:
If a function module should be used to check the data, it must have the same signature as the /AIF/FILE_TEMPL_CHECK template function module provided.
One reusable check can consist of multiple single checks. These single checks are concatenated with "OR", which means that if one of the single checks is successful, the complete check is regarded as successful.
If a check cannot be processed successfully, AIF adds a default error message to the application log. However, as these error messages are generic, they might not give the business user a hint about the error. Therefore, it is possible to define a check-specific error message.
The error message belonging to a check is defined during the first step of check creation. The error message is defined together with the check description. You can enter an error message (message class and number) and define up to 4 variables. This can be a constant value (%value) or a placeholder, which will be dynamically exchanged with the actual data at runtime.
The success message is defined in the single check. You can enter a success message class, a success message number, and define up to 4 variables.
Explanations about the level, on which a check can be used:
Check on structure level
You can assign a check on structure level in AIF Customizing in the Define Structure Mapping activity via Assign Checks.
You are required to specify which data structure should be checked. This can be the raw or SAP structure. You also need to define the behavior of the check in case of an error. There are two options:
You can use a check that already exists. Then, you have to select the corresponding check and namespace in the namespace and check field. As well as using an existing check, you can define a check directly.
Check on field level