Hi Rahul,
I didnt get you !! For what you want to write an ABAP Program ?? To update material master ( AUOM ) in ECC ?? It hardly takes 10-15 mins in desinging the LSMW for that task. Writing an ABAP Program is not a feasable solution i think.
Also, by CIF only you can maintain consistency between the masters in ECC & APO. It is advisible to have CIF jobs peroidically or CIF job whenever you have a data change in ECCwhich is relevant in APO.
I never thought establishing synchrony between the two masters is Headache ... IF you have proper and periodic CIF jobs its the most easiest one as everything is automated. Please note that you are facing error in APO BEACUSE YOU HAVE NOT MAINTAINED PROPER UOM IN ECC BUT NOT / MAY BE NOT BEACSUE THERE WAS NO UOM MAINTAINED IN APO.
Hope you understood the difference.
Thanks,
emani