BAPI_MATERIAL_SAVEDATA - Unit of Measure
I have problem when created material using 'BAPI_MATERIAL_SAVEDATA'.
I put different value of unitsofmeasure-alt_unit againts clientdata-base_uom. When i executed the program, there is error 'The field MARA-BRGEW is defined as a required field; it does not contain an entry'. Because of in include program L1001UEBF01, there is coding as below.
read table tmarm_ueb with key meinh = tmara_ueb-meins.
if sy-subrc = 0.
move-corresponding tmarm_ueb to tmara_ueb.
modify tmara_ueb index 1.
It means field meinh and meins should have the same value. Then i changed value unitsofmeasure-al_unit = clientdata-base_uom. There is an error 'The alternative unit of measure is the same as the base unit of measure'
How to handle this problem.
Thanks in advance.