It is interesting that you are following scenarios posted in another website and seeking then for help in SCN. Wouldn't it be logical to contact the author of the article in the other website if his stuff doesn't work?
That is actually exact what I initially meant, just following unexplained scenarios by retyping of some code does not really get you anywhere.
It is very important to understand interrelations and to think beyond. So you already found that SAP updated table MARM when you create the material master. What is your conclusion from this experience? What does that mean for your code? Do you have any such values in your data template as you could see in MARM? Do you have any coding that would enable the update of table MARM in your BAPI?
What is MARM about? Answer: units of measures
What is the part in the parameters/tables of the BAPI that care about that?
This one eventually?:
* UNITSOFMEASURE = IT_UNITSOFMEASURE
* UNITSOFMEASUREX = IT_UNITSOFMEASUREX