Hi Radoslav -
In S/4 HANA you can no longer update commodity codes using material master (MM02). You can only do this using Fiori views.
There is a BAPI called /SAPSLL/CL_PRCLS_API but it is an older BAPI and may not be available in more current S/4HANA versions. It does work in Studio but it doesn't give a good log message, and you won't be able to see that it worked in MM02, as the commodity code data no longer shows there in S/4HANA. I've attached an example for reference.
So depending on your S/4HANA version you may or may not be able to use Studio with a BAPI for that.
Thank you!
------------------------------
Jennifer Hwang | SE
Winshuttle North America
------------------------------