One use of Code Conversion tables is to create rules which can be applied to a classification variable in IFP. Mapping rules can then be based upon values of other classification variables or item codes. For example, the Local BU in a Sales database can be mapped using the entries for Product Group / Brand.
Creating the Code Conversion Table
Before creating a set of rules you will first need to create the Code Conversion Table. To do this, proceed as follows:
- From IFP Home, select Codes Maintenance > Code Conversion Tables
- Select the folder you wish to create the conversion table in and click Add from the toolbar
- Enter the source code length (must be sufficient to allow for maximum total length of source code used)
- Enter the source variable name, this is for reference only
- Enter the target code length (must equal the length of the target classification variable)
- Enter the target variable name, this is for reference only.
- You can then enter the rules by selecting the Rules tab
Creating / Maintaining Rules
The source code for item mapping rules are maintained in 2 ways. This will depend if the rule is a Classification variable based rule (where the 3rd character of the source code should be C) or an Item code rule (3rd character is I). Which of these are required depends on how the target is defined.
If the rule uses a classification variable (contains a C after the Target Variable Index) then the Source Code in the rule will be broken down as follows:
[Target Variable Index] C [Source Variable Index] [Source Variable Value]
Note: The index relates to the variable number used and is usually a 2 character value, this can be found in Item Code Classification Variables Maintenance.
If the rule uses an Item Code (contains an I after the Target Variable Index) then the Source Code in the rule will be broken down as follows:
[Target Variable Index] I [Item Code]
An example of this could be 03IABC01_??_??_01.
This will be followed in both cases by the required target classification variable code.
Rule Application Logic
It is important to take account of the logic used by IFP when applying mapping rules.
- A rule is only applied for an item code if the source value matches the required value
- Rules are applied in strict sequence starting from the first rule to the last
- Once a matching rule is found no further rules are considered, the same source code cannot be used for different target codes
- Hence, it is essential that individual rules appear before any general rules which apply a set mapping to a group of item codes.
Using the Item Code Conversion Table
For information on how to use these conversion tables, please see Applying Item Code Mapping Models.