If you set this for only 1 group, it won't work. For every group sum of the ratios must be equal to 1. If you want to change this you have to work on the procedure just a little bit. Just an advice you can put a condition that is checking NULL or not in front of the ADD_ITEM_EXTERN... block. If its not NULL then continue the process, if its NULL break the process.
Also, be careful on the DECIMAL(4,3) data type.
I use 5.2 and keep control of each element and not depending on a total 1