Technical Blog Post
Inventory Defaults Dialog Loads Without Values Set
This post describes a solution to the Locale-specific decimal separator-related problem that may cause the Inventory Options dialog to load without values. This document will be useful to you if you see the following when going to Administration > Organizations > Inventory Options > Inventory Defaults:
Out-of-box Maximo has 3 inventory-related MAXVARS that, like all MAXVARS, are stored as String values in MAXVARS.VARVALUE and MAXVARTYPE.DEFAULTVALUE. These MAXVARS, A_BREAKPOINT, B_BREAKPOINT, and C_BREAKPOINT, are used to group inventory into 3 percentile groups based on cost and rate of consumption. This ABC Breakpoint analysis is used for inventory cycle counting. These three values, when converted to decimals, must total 1. Out-of-box they are 0.8, 0.15, and 0.050 in the MAXVARS table and are viewed and/or modified in the Administration > Organizations > Inventory Options > Inventory Defaults dialog as follows:
If the application server's JVM Locale uses the comma (",") decimal separator, the out-of-box point decimal separator (".") is not recognized when the String MAXVARS Breakpoint values are parsed as decimal values as the dialog loads. As a result, "0.800","0.150", and "0.050" are parsed as "800.0", "150.0", and "50.0" respectively. In addition to the Inventory Defaults dialog opening without values, the following error may be seen in the logs: "psdi.util.MXApplicationException: BMXAA4163E - The specified value 800.0 exceeds the maximum field length for the Type A Breakpoint field. The maximum length is specified in the Database Configuration application." This error is not displayed in the UI.
You also may see the following if you immediately try to go back into the Inventory Defaults dialog:
The failure of the other MAXVARS values to properly initialize is due to the Breakpoint value parsing problem. These other values do not need reformatting, but they may need to be re-entered as explained in the Solution section.
This problem is addressed by providing ABC Breakpoint values in the dialog formatted appropriately for the application server's JVM Locale and clicking OK.
You will need to perform this update for all organizations if the dialog loads without values.
If you have too many organizations to go through every one and perform this update in the UI, you can use the following SQL updates instead:
update maxvars set varvalue=replace(varvalue,'.',',') where varname='A_BREAKPOINT';
update maxvars set varvalue=replace(varvalue,'.',',') where varname='B_BREAKPOINT';
update maxvars set varvalue=replace(varvalue,'.',',') where varname='C_BREAKPOINT';
These Breakpoint value decimal separator updates, whether they are done in the UI or the back end, will ensure that the Inventory Defaults dialog will load properly for the organization.
You may also have to provide values for the other Inventory Defaults dialog MAXVARS as those values may have been set to null if OK was clicked to close the empty dialog before Locale-appropriate Breakpoint values were provided. The following shows the mapping of the MAXVARS.VARNAMEs (shown in BLUE) to the controls in the Inventory Defaults dialog:
Preventing This Problem with Future Organizations
If you plan on adding more organizations, you will also want to update these values in the MAXVARTYPE table so that the decimal separator is the correct one for the application server's JVM. The values as they appear in MAXVARTYPE are:
You can view your values using the following SQL query:
select varname,vartype,defaultvalue,description from maxvartype where varname like '__BREAKPOINT';
The updates to change from the out-of-box point decimal separator to the comma decimal separator need to be done via the back end using the following SQL updates:
update maxvartype set defaultvalue=replace(defaultvalue,'.',',') where varname='A_BREAKPOINT';
update maxvartype set defaultvalue=replace(defaultvalue,'.',',') where varname='B_BREAKPOINT';
update maxvartype set defaultvalue=replace(defaultvalue,'.',',') where varname='C_BREAKPOINT';
Using the same SQL query as above after the updates, these values will appear as:
This update will ensure that any organizations added in the future will not run into this problem of the Inventory Defaults dialog loading without values.