Check your abs unit under the bonnet on the aluminium block the part number its a 001 good chance its failing/failed if its a very common weak spot my own was refurbished by Bosch ,there's a crowd that refurb them for the cost of a second hand unit now can't remember the name at present though

What are you using for diagnosing bmw specific software's best for this kind of stuff