SAP Message R9E977 - Query cannot be generated; first correct it in Query Designer

Diagnosis
While generating a query, the system detected that it was already markedas incorrect by the Query Designer. It cannot be generated in thisstate.

System Response
Query generation is terminated with this message.

Procedure
Correct the query in the Query Designer so that there are no more errorsfor this query. You can then generate and execute the query.