Paul Ovigele, Ovigele Consulting
SAP Query is a very useful tool that functional consultants and power users can use to quickly create reports by joining tables or accessing a logical database. A great benefit of SAP Queries is that you do not require ABAP knowledge to create these reports, and you can use them for your benefit alone or make them available to a wider user base. Moving a query from one client to the other normally requires a transport request. However, this is sometimes limits the flexibility of wanting to quickly see how a report will be run in a different client. Also, you are limited by the direction of the transport landscape. For example if you created a query in the Quality Assurance client you cannot move it to the any other system if since QA client is not normally set up for automatic change recording and will hence not generate a transport for you to move it elsewhere.
An easier way to move queries between clients is to use the download/upload functionality which is available in the query transaction (SQ01). Note that this functionality can only be used for “Standard Queries” and not “Global Queries”. The difference between these two query areas is that “standard queries” are client dependent and “global queries” are client-independent. Also, global queries generate a transport request automatically, while for standard queries, you have to prepare the transport request manually. To ensure that you are in the “Standard Query” screen in transaction SQ01, go to the top-menu in this transaction and choose &ldq uo;Environment -> Query Areas” and choose “Standard area (client-specific).
When you have created your query and you are ready to move it to a different client, you need to go to the “InfoSets” screen by going to the top menu and choosing Environment -> InfoSets. Then highlight the InfoSet for your query and click on the ‘Transports’ button. You can then click on the ‘Download’ radio button in the ‘Transport Action Selection’ section, and check the relevant boxes “Overwriting Allowed” and “Transport Query Variants” if applicable. Then in the ‘Transport Option Selection’ section, enter your InfoSet and Query as shown below.
When you hit the ‘Execute’ button, you will get a prompt for where you should save the file. Once you have named and saved the file in a directory you will get an export log message indicating how many bytes have been transferred to your file.
Now you can go to the destination client and upload the file by going to the InfoSet screen in the standard query area of transaction SQ01 (as described above) and click on the ‘Transports’ button . You can then click on the ‘Upload’ radio button in the ‘Transport Action Selection’ section, and check the relevant boxes “Overwriting Allowed” and “Transport Query Variants” if applicable. Then in the ‘Transport Option Selection’ section, enter the InfoSet and Query name in the relevant fields. When you hit the ‘Execute button’ you will get a prompt for where you extract the file. You can then locate the file th at you saved and upload it into the system. Once this is complete, you will be able to run your query in the target client.
For more information on using SAP Queries, and other ideas on how to optimize your SAP Financials landscape, I've put together my top tips in the book "100 Things You Should Know About Financial Accounting with SAP" which is published by SAP Press.