Background documentation -7080: Query in statement not allowed Locate the document in its SAP Library structure

Explanation:

The search condition of an IF or WHILE statement contains a query statement.

This is not allowed.

User Action:

Execute the query statement outside of the IF or WHILE statement, and save the results in program variables.

Then use these results in the IF or WHILE statement.