Consistency checks are used to check the validity of the profile values imported into the system. SAP provides 2 standard checks: Overlap (to check if values are imported for the same period again) and Status (to check if the status of profile values for import is valid or not).
The checks can be grouped together in consistency check groups and given priority in execution. We have 3 different actions based on the execution of the check. These are as below:
- Profile values not saved.
- Profile values not saved. Cancel import.
- Profile values saved despite errors.
Consistency Check groups is defined at the profile header and is not a mandatory parameter to be filled during creation of profile header. So it can changed at any point of time.
Here I have defined a consistency check group named ‘flatline’ which logs a message if there are continuous 3 “same” readings.
Below I will show the execution for all the 3 actions for this custom check group.
Above is the new consistency check and have allocated the custom function module. This module holds the logic for capturing ‘flatlining’.
Here for the custom check, the action has been defined as ‘profile values saved despite errors’.
Below I have assigned the consistency check group at the header level.
Now the profile import has been done and we can see the values have been imported successfully. The screenshot below shows 902 imported more than 3 times for continuous periods. So basically my code for ‘flatline’ should have captured this.
If I check the logs I can see logs for the same in warning. The profile values were still imported as the action was to save the profile values despite errors.
Now the action has been changed to ‘profile values not saved. Cancel import’. As we can see the profile values were not imported and the log shows the same.
Now the action has been changed to ‘profile values not saved.’ As we can see the profile values were not imported and the log shows the same.
Now below I have executed the standard check of ‘overlap’. The profile import has been done, the action defined was Profile values are saved despite errors.
The log captures the warning messages.
Now below I have executed the standard check of ‘status’. The profile import has not been done, even though the action defined was Profile values are saved despite errors. This happened because the error code describing such an event was not defined.
The standard function module for the consistency check provided by SAP are below:
ISU_EDM_CONS_CHECK_STATUS
ISU_EDM_CONS_CHECK_OVERLAP
That’s it. A primer on how consistency check group works. 🙂