Conversion Codes

Previous  Next |  Direct link to this topic

Conversion Codes for the Perfion Extension can be found on the following path: Administration > Add-Ons > B1 Usability Package > Module configuration > Perfion Extension > Conversion Codes

 

Conversion Codes allow you define "translation" for data imported from Perfion.

For example you could have a conversion code that converting the value "Enabled" to "True" and "Disabled" to "False".

 

PerfionConversionCodes

 

The Conversion Codes have two persistent fields on header level, code and name, and a single transient field, enum type.

On the lines they have two columns, one for the Perfion value and one for the equivalent SAP B1 value.

 

The code is the primary key for the Conversion Codes, while the name is a longer descriptor for the Conversion Code and is what will be shown on the Import Setup's mapping line once the Conversion Code has been chosen.

On the lines the Perfion value is the what will be replaced when the Conversion Code is used and the SAP B1 value is what will be replaced with.

 

The enum type allows you to select an SAP B1 enum and then click the "Add enum rows" to add a line for each valid value for the selected enum with the SAP B1 values filled out, allowing for easier conversion for enum data types.

The value chosen in this field will not be saved as the field is mere there to allow select of which enum to use for the "Add enum rows" button.

 

Conversions are case insensitive and do not allow for wildcards, but do allow for free texts (meaning the value does not have to match a valid value for any of the SAP B1 enums).

So "MRP", "Mrp" and "mrp" will all be converted to the same value in the above screenshot, however "MRP 123" will not be converted as it was not defined on the Conversion Code.

 

Conversions happen before the value is interpreted as the fields data type.

This means that you for example can convert text to numbers, for example converting "One and a half" or "1½" to "1.5".

However if the result is not a valid value for the data type the import using the conversion will fail due to the mismatch with the data type.

For example if the data type is an integer and you have a conversion code on the mapping that converts "1" to "one" which is a text, it will be unable to interpret the value as an integer and the import will fail.

 

 

You can also import and export your Conversion Codes using the "Import" and "Export" located on the bottom right of the form.