I can't remember the exact code I had, but something similar to this hit me about 2 years ago (I'm pretty sure the code mapped to a purge valve issue) on the BMW. I noticed a pattern that the error appeared right after I had put fuel in the car and then eventually went away after driving around a few days. Upon closer inspection of the gas cap, I noticed the seal around the gas cap itself had started to warp (cupped and pushed in the middle) and was cracking on the edges, so I ordered a new cap. Haven't had a problem since! Unfortunately I don't recall the exact code other than it being purge valve related, but maybe take a look at the seal on your cap to see if it is in good shape.