did this on a e46 320d to 330d, and it was honestly just not worth it..
if you want to have it 100% OEM, there is hundreds of little bits and pieces you will come across that needs to be changed,
if its a hackjob, the car will have no resale value afterwards..
only viable reason i can see for doing this , is if you are building a track car or such..
a modern BMW is just a too intricate machine to make this type of swop an option.. 99% of the time it is easier to just sell the 320d and buy a 330d..
just my 2c ofc..