Hierarchy

⤷

⤷

⤷

IMG Activity
ID | OKCM_KCVA | Maintain/activate validations |
Transaction Code | S_ALR_87000440 | IMG Activity: OKCM_KCVA |
Created on | 19981222 | |
Customizing Attributes | OKCM_KCVA | Maintain/activate validations |
Customizing Activity | OKCM_KCVA | Maintain/activate validations |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | OKCM_KCVA |
Overview
There are two different types of Validations:
- Single record validations
- Matrix validations
With the Single record validation every new or changed data record is individually checked. A test can be executed, for example, as to whether the sum of 2 key figures is smaller or the same as a third.
With the Matrix validation however, the entirety of the data records is checked. You can, for example, check whether the sum of the credit is the same as the debit.
After defining the validations they can be activated for the following points in time:
- Before the update in the manual data entry
- After the summarization and before the update in the data transfer
If big errors occur, the data cannot be updated. However, if only warnings or information appear the data is updated, but the messages are written in the log which you can check later.
Activities
Create your validations and rules.
Preparations
- Enter an aspect, for which you wish to maintain validations. Validations are always valid for one aspect. It is possible to copy validations, in order to use them in other aspects.
If you are using the transaction for the first time for an aspect the validation environment (table entries and program code for the validation)is generated. This process can take some time but is omitted with the next start of the transaction. - For the desired type of validation, select the function 'Maintain validation'. Then select 'Validation -> Create' and enter a name for the validation.
The system then asks which message classes you wish to use in the aspect (or Boolean class). You can maintain 1000 messages per message class, which are then given in the case of an error in the validation. - Define a new message class with the function 'Create', it should start with a 'Z'. You can use various areas for various aspects in this message class (e.g. Message 1 ... 50 for aspect 900, 51 ... 100 for aspect 901 etc.). In this way you only have to create a new message class once. The assignment of the message class only takes place when you are maintaining a validation or rule for the first time for a particular aspect.
- Select 'ENTER' to leave the dialog window. You then get to the maintenance of validations.
Maintaining validations
Each Validation consists of several steps (up to 1000) and each validation step consists of a prerequisite, a check and a message. The steps are worked through with one check after another. The message is always given if the prerequisite is fulfilled but the check is not.
Enter a name and select 'Edit -> Insert entry' in order to get to the editor.
Expert mode
If you know the syntax of the Boolean rules, you can enter the formulas directly on this screen in the so-called expert mode.
You can list the permitted fields of the aspect using the key 'Fields for cond.' and transfer them to the rows.
You can get an exact overview of the syntax and the possibilities if you put the cursor on a row of the validation and press F1.
Formula Builder Using the formula builder you can create formulas without having to learn the syntax. You can select the characteristics and key figures of the data records and calculate with these fields and set up comparisons. In addition you access the following system fields: User (SYST-UNAME) Date (at time of validation) (SYST-DATUM) Time (at time of validation) (SYST-UZEIT) Logon language (SYST-LANGU) Transaction code (SYST-TCODE)
- You can select the operators and formula symbols using pushbuttons. If you wish to use a number in your formula, choose the function 'Constants'.
You can find an exact description for creating a formula under 'Edit -> User information'.
In the following Example with the prerequisite, a check is made as to whether sales are greater than zero. This check ensures that the sales are greater than the sum of the volume-based rebate and sales provision. The formulas are written here with the technical name of the expert mode.
Prerequisite:
<CF001> $REVEN > '0'
"Check only if sales are greater than zero!"
Check:
CF001-REVEN > ( CF001-BONUS + CF001-VPROV )
"Revenue must be greater than volume-based rebate and sales prov."
Message:
Type E No. 003 Text Division &1: Revenue is smaller than rebates and
sales prov.
Output fields: 1 CF001 - DIV
Among others you should note the following rules:
Please note the following:
- Currencies and decimal places
If you use amounts (e.g. CF001-REVEN > '1000'), the number 1000 is interpreted as an amount with 2 places behind the decimal point. If the revenue is given in Lira, which has no places after the decimal point, you must enter CF001 -REVEN > '1000 (ITL)'. Note: If you use reference currencies, which depend on the values of a characteristic and different places after the decimal point occur, several validation levels must be defined, which keep apart the cases with the different places after the decimal point using the validation condition. The same goes for the units.
Maintaining messages
With the key 'Maintain messages' you go to the editor for messages. Here you can enter message texts in the message classes you created. Then you van use them in the validation steps.
You can define up to four variables with the placeholders &1 to &4. These variables are filled and displayed using the fields from the data record - i.e. the value of a characteristic - in the validation. So, in the example above the column in which the error appeared is displayed in the message. These message variables only make sense in the single record validation, as in the matrix validation the fields from the last record are set in the message variables. There are four types or grades of messages:
- Type 'A': Termination
- Type 'E': Error
- Type 'W': Warning
- Type 'I': Information
In the above, messages of type 'A' and 'E' are real errors which prevent the posting of the data. Messages of type 'W' and 'I' are only extra information, which is logged. The posting of the data is still allowed.
Maintaining rules
In Rules you can store parts of validations, which you use more regularly or which you want to use in several validations at the same time.
Example
You often ask if the value type equals '1' and whether the division only takes the values '00000001' to '00000010' and '00000020' to '00000030'. So that you do not have to always enter this condition (or even longer ones) each time, define the corresponding rule.
You can either do this directly in maintenance of the validation (function 'Maintain rules') or going from the starting screen of the transaction.
Then you can combine this rule in validations or in further rules from the rule list. The rules are valid for one aspect respectively and and cannot be used in other aspects. Furthermore, a rule which has been defined for single record validations cannot be used in a matrix validation and vice versa. There is, however, a Tool for copying rules to other aspects or from matrix to single record validation.
The following Example shows a matrix validation, which uses two rules and in which a check is made as to whether plan data for 1998 does not vary by more than 20% from actual data for 1997. Thereby, the total volume of the record is limited using the where-condition on the actual values for 1997 or plan 1998. It is because of the Group statement that the variance of the respective total sums is not checked, rather the sum of the revenue for each combination of division and period is formed and the variance checked. The group statements should, therefore, be identical on both sides of the comparison operator.
- Rule 'ACT97' :
CF001-PLACTI = '0' "Act." AND CF001-YEARB = '1997' - Rule 'PLAN98' :
CF001-PLACTI = '1' "Plan" AND CF001-YEARB = '1998'
AND CF001-VERSIO = '001' "(Version 1)" - Validation 'PREVYEAR':
SUM ( CF001-REVEN ) WHERE ACT97
Business Attributes
ASAP Roadmap ID | 203 | Establish Master Data |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | A | Valid for all countries |
Assigned Application Components
Documentation Object Class | Documentation Object Name | Current line number | Application Component | Application Component Name |
---|---|---|---|---|
SIMG | OKCM_KCVA | 0 | HLA0009495 | Data Basis |
Maintenance Objects
Maintenance object type | C | Customizing Object |
Assigned objects | ||||||
---|---|---|---|---|---|---|
Customizing Object | Object Type | Transaction Code | Sub-object | Do not Summarize | Skip Subset Dialog Box | Description for multiple selections |
IMGDUMMY | D - Dummy object | KCVA | KCVA | Maintain Validation |
History
Last changed by/on | SAP | 19981222 |
SAP Release Created in |