Please contact the BMW of Springfield Service department at (973) 379-7744. We would be happy to assist you!
Normally BMW has to reprogram it when batteries are changed out.
You may be able to find find the serial number of the radio on the screen of your bmw radio itself. There are different types of bmw serial numbers, or as called sometimes "Security Code". Consider taking it back to the place that replaced the battery and knocked out the code in the first place. Get it done for free as replacing the battery shouldn't have caused your radio code to disappear.
Thanks! Your answer is awaiting moderation.