This issue seems to pop up quite regularly doesn't it. It amazes me that the BMW sensor and control system is that sensitive it can detect of loss of fuel tank pressure due to the cap not being on properly.
People often find that replacing the fuel cap is enough to sort this problem out BUT sometimes not (there may be an underlying problem). Follow bills advise - make sure the cap is on properly then disconnect the neg lead from the battery, this resets all the warnings from the computer. Next run the car as normal and if the light comes on again shortly after, you may have bigger problems - now is the time to get your hands on a fault code reader.