If I remember correctly it should be direct swap, but some users reported issues with shifter, need to search forum, pretty sure it was a thread on this.
Here:
https://f15.bimmerpost.com/forums/sh....php?t=1589526
But it looks like people buying shifter off Ebay, so probably plug&play no coding needed.
UPD:
Yes, plug&play:
https://f15.bimmerpost.com/forums/sh....php?t=1799943