I am going to fit a new battery to the Z4 when I get it. Its just for peace of mind, heavy electronics, don't when last changed, only driven occasionally etc.
so does it need to be coded ?? If so how and why, what happens if its not ??
Yes it does - when you code a newly installed battery you are telling the electronics ECU etc that partake in the charging process that the battery is new and the electronics are adjusted to charge a new battery correctly.
Over time the system monitors the battery as it inevitably degrades.
So, if you dont code a new battery the system thinks the new battery is an old one and charging will be inadequate.
Anyone on the forum in your area can code your new battery for free if they have the 'Carly for BMW' app.
whereabouts are you located?
If you get the same rated battery then it needs registering so the cat knows how it should be charged as the old battery won’t accept or hold the same charge as a new one, if you get a different rated battery then it needs coding, to do this you need a reasonable code reader or laptop/tablet/phone app
You should be able to tell the age of your battery by looking at the top of the positive post, it should be marked with the production week/year. Also consider changing the two salmon relays in the boot for the roof (about £16 each from BMW)