In this document the methods are described for defining virtual fields in 'Virtual Fields. Connect' (CMS012) for fields that do not exist in any BE table. Use alternative 12='Virtual fields' (Ctrl+12) in these programs to launch (CMS012):
The naming convention for a virtual field is &XXXX.
On (CMS012/B), specify the virtual field ID and use alternative 1='Create'.
Specify a name for a virtual field by entering either a description or a message ID. If you specify a description, it can also be defined per language by clicking the 'Language' button. If you specify a message ID, the column heading is automatically displayed in the end user's M3 language.
Define a field type. Use these alternatives:
1 = Value calculated by a formula
2 = Value retrieved by a function program
3 = Value from a description field in CSYTAB
4 = Value from a name field in CSYTAB
5 = Value from a currency conversion
6 = Value from a logical formula
7 = Date conversion
8 = Merge data
Specify a 'Calc sequence'.
The calculation sequence is used if other virtual fields are used as objects in the calculation formula. The current virtual field must have a higher calculation sequence than the virtual fields used as objects in the calculation formula. The number of decimal places is controlled either by specifying the number of decimal places (0–4) or selecting a field information code.
Click 'Next' to activate the virtual field.
The value is calculated based on fields from the master table, related tables, or other virtual fields. Specify the calculation formula by entering a value for 'Operator' (+, -, /, *), 'Object' (field from master table, related table, or other virtual field), and 'Factor'.
The value is retrieved from the 'Description' or 'Name' field in the system table CSYTAB.
You can also perform a quick entry to define a virtual field for the name from the related system table (CSYTAB):
Click 'Related System Table' on (CMS012/E).
Specify the key value (for example MMCUCD for the currency code name based on MITMAS).
The value is retrieved from a currency conversion.
Specify the read option for these fields:
Values are displayed (or not) based on a logical formula.
Specify this information:
Convert a date to a unique serial number. The serial number starts by 1 on the first day in the system calendar. By using two virtual fields for a date in a virtual field for calculation, it is possible to calculate the difference between two dates. It is also possible to decide whether the unique sequence number should include all days, only working days, or only banking days.
Specify this information:
The value is merged from different fields into one field, for example to display an order number and an order line number in the same field like this: 3953987-0020. Up to five different sections may be merged into the new virtual field. For every section, a number of parameters are specified.
Specify the following information:
These characters are the valid alternatives:
Forward slash (/)
These formats are the valid alternatives:
Blank = Date format according to user setting in 'User. Open' (MNS150)
1 = YYMMDD (year, month, day)
2 = DDMMYY (day, month, year)
3 = MMDDYY (month, day, year)
4 = YYWWD (year, week, weekday)
5 = YYYYMMDD (year, month, day)
6 = YYYY-MM-DD (year, month, day)
7 = YYWW (year, week)
8 = DDMMYYYY (day, month, year)
Blank = no separator is used
/ = is used as a separator
, = is used as a separator
. = is used as a separator
You may define an unlimited number of virtual fields. When created, the field group is updated with this field. The virtual fields can be selected as fields (columns) in the list.