Variant Tables: 1. Overview
Variant Tables: 1. Overview
1. Overview
2. Example Model
3. Variant Table Structure (CU61, CU62, CU63)
4. Maintaining Variant Table Entries
o 4.1 Table Maintenance CU60
o 4.2 Excel-Import (CU60E)
5. Linking Variant Tables to Database Tables
6. Variant Tables in Dependencies
o 6.1 Inferring Values
o 6.2 Validating Values
1. Overview
Variant tables are used to store combinations of characteristic values. They can be
referenced in dependencies to infer, check and restrict values. More specifically, they are
used in:
One advantage of using them is that you only need to change the variant table, if the
interdependencies between characteristics change, and not the dependencies. This greatly
simplifies the maintenance tasks when a model changes.
The relevant transactions for variant tables are the following:
Transaction Description
CU61 Create variant table
CU62 Change variant table
CU63 Display variant table
CU64 Variant table structure list
CU60 Variant table maintenance
CU59 Transfer variant table contents to database table (Report
RCCUVTDB)
CU60E Excel upload for variant table contents
Remark: In order to delete a variant table, you need to first remove all the lines in the
CU60 and then the table itself is deleted in the CU62. However, once a variant table was
maintained with a change number, the table can no longer be deleted.
2. Example Model
In order to discuss the various features of variant tables is a concrete manner, we will use a
very simple example model, which describes the properties of a Personal Computer (PC). It
consists of 4 single-valued characteristics with the following values:
Using a variant table we will build the following combinations of characteristic values:
In the field Date the current date is entered by default, so you don't need to worry about
that. In the next screen you need to enter a description for the variant table. Note that the
Status is currently 0(In Preparation) - this needs to be changed later on.
As you can see, in this screen there exists also the possibility to link the variant table to a
database table. This functionality will be discussed in section 5.
After pressing on Characteristics you enter the following screen:
Here you can enter the characteristics that you want to use in the variant table. We set the
characteristic CH_PCTYPE as a Key Field. This means that each entry in the column
CH_PCTYPE must be unique. By using dependencies we will use this characteristics later
on to infer values for CH_PROCESSOR, CH_MEMORY and CH_HARDDISK in section 6.
Remark: Marking a characteristic as a Key field is only relevant if you want to infer values
using dependencies.
After pressing Back(F3) you return to the previous screen.
There you need to change the Status to 1(Released). Finally, confirm everything by
pressing Save(Ctrl+S).
In the transaction CU62 the variant table structure can be changed and in the CU63 it can
be displayed.
Here we have already entered the characteristic values for our model according to the table
from section 2.
By using the Check (Shift+F4) functionality, you can make sure that your variant table
complies with the standard (Key Field entries are unique, no empty entries etc.). For the
table maintenance the properties of the used characteristics (single/multi-valued,
restictable, entry required) are irrelevant.
Remark: In order to enter multiple values in a multi-valued characteristic you need to
double-click on a field in the table maintenance CU60. In the pop-up that appears, you can
select the characteristic values using radio-buttons. Note that this representation is not IPC-
compatible. However, there exists the possibility to normalize a variant table with multiple
values by navigating to Table → Untag. As a result, a row of the form
01 AA, BB
is converted to
01 AA
01 BB
In this representation the variant table is IPC-compatible again. Also note that this
normalization should be used cautiously in conjunction with Key Fields, as this might result
in errors during the variant table Check (Shift + F4).
Alternatively to the Standard View of the CU60, there exists the possibility to display the
allowed value combinations in a matrix form. By selecting Table → Decision table →
Presentation: Matrix, the following screens appears:
Each column in this matrix corresponds to an a priori possible value combination. Since our
variant table contains 4 characteristics, with 3 values each, there 3·3·3·3=81 columns. The
variant table restricts this list to 3 combinations - these are the green columns in the table.
In this matrix representation these 3 value combinations are marked with a red X. This way
one can view and maintain allowed value combinations very quickly.
In addition this matrix form, there is the possibility to select Presentation: Number of
combinations under Table as a presentation style. This provides a list view of all possible
combinations - the allowed combinations are marked with a + sign.
The columns must have the same order as in the variant table.
Use no header lines. The Excel table must only contain the characteristic values.
All characteristic values must have text format. (This also holds for numerical values.)
For the characteristic values only the language-independent format must be used.
The Excel-file must have .csv format.
If we were to fill the variant table for our example with the CU60E instead of the CU60 from
section 4.1, the corresponding Excel-file would look as follows:
After you have prepared your Excel-file, you need to enter the name of the variant table
and the location of the file in the transaction CU60E:
After pressing Execute(F8) the content of the Excel-file is transferred to the variant table.
Remark: Note that the CU60E does not support a change-import - when an Excel-file is
uploaded, all entries in the variant table are deleted and replaced by the values from the
Excel-file. In particular, a change-import using change numbers is not supported in the
CU60E.
A more detailed documentation for the CU60E can be found in the attachment of
note 516885 .
It is initialized with the keyword table, followed by the name of the variant table. In
parenthesis you start with a column-name of table and set it equal to some characteristic in
your variant class. The various column-characteristic pairs are separated by commas. Note
that you don't have to use all the columns from the variant table.
1. table VT_PC (
2. CH_PCTYPE = $self.CH_PCTYPE,
3. CH_PROCESSOR = $self.CH_PROCESSOR,
4. CH_MEMORY = $self.CH_MEMORY,
5. CH_HARDDISK = $self.CH_HARDDISK )
1. OBJECTS:
2. PC is_a (300) EMM_CLASS_PC
3.
4. CONDITION:
5. PC.CH_PCTYPE specified
6.
7. RESTRICTION:
8. table VT_PC (
9. CH_PCTYPE = PC.CH_PCTYPE,
10. CH_PROCESSOR = PC.CH_PROCESSOR,
11. CH_MEMORY = PC.CH_MEMORY,
12. CH_HARDDISK = PC.CH_HARDDISK )
13.
14. INFERENCES:
15. PC.CH_PROCESSOR, PC.CH_MEMORY, PC.CH_HARDDISK
Here the variant class, that contains the characteristics of our model, is called
EMM_CLASS_PC.
1. OBJECTS:
2. PC is_a (300) EMM_CLASS_PC
3.
4. RESTRICTION:
5. table VT_PC (
6. CH_PCTYPE = PC.CH_PCTYPE,
7. CH_PROCESSOR = PC.CH_PROCESSOR,
8. CH_MEMORY = PC.CH_MEMORY,
9. CH_HARDDISK = PC.CH_HARDDISK )
So if we enter, for example, CH_PCTYPE = OFFICE, CH_PROCESSOR = 3 GHZ,
CH_MEMORY = 8 GB and CH_HARDDISK = 3 TB, then I get an inconsistency, because
this value combination doesn't exist in the variant table.