car bogs down when i give it gas on 2001 BMW 325Ci

check engine light is on and when i give it gas the car bogs down and then shut off

Asked by for the 2001 BMW 325Ci
Do you know what code has turned on the check engine light?