When you add a stored procedure to a data model, you receive an invalid object name error message.
Your stored procedure contains a temporary table. Due to a product limitation, you cannot use stored procedures with temporary tables in data models.
7.0 and later.
Use a table variable. For more information, read this article.