Connecting excel to a custom query
I report out of B1 using excel.
From excel I create an odbc connection, change the definition from table to sql and paste my previously designed sql statement within the definition.
It works fine, but I have seen a consultant designing a custom query, and I do mean a custom query made of several tables and joins, using the sap b1 query generator, and then linking excel to that same query without pasting anything within excel.
I would like my next queries to be based on the same method, but haven't worked out how to do this.
The only options available for an odbc definition are table or sql, and it seems to me that I can only paste an sql in there or specify a table, which doesn't work for what I am trying to achieve.
What is the correct way to do this?