Use tablename() not TABLENAME.