BMW 520i - BMW central locking - polly60

I've recently had a problem with my rearstat which resulted in my battery going flat. I've had the rearstat replaced but now I can't open the car with my key fob. Does anyone know what the solution is please?