One line answer - subqueries not allowed.
But if you need to handle your scenario then you can do the following:
Encapsulate the entire query into a stored procedure, and then use the stored procedure.
Create a view. Views are created to process main queries or subqueries.
Create a table-level variable and store the final result of the view in it, and then continue to get the value of the table variable in the main query.
The above is the detailed content of Condition variables in SAP subquery. For more information, please follow other related articles on the PHP Chinese website!