Werder Bremen kept their hopes of Bundesliga football next season alive against Heidenheim on Thursday.