You can run a query in Excel

QUERY> Work with the QUERY add-in for Microsoft Excel

Work with the QUERY add-in for Microsoft Excel

QUERY offers an add-in for Excel, the so-called QUERY add-in. You can use this add-in to run existing queries or update the mapping of existing queries, but you cannot use it to create or edit queries. A query can be executed in Excel when it is published by the QUERY client in an Excel file or template. If TRANSACTION is installed on the computer together with QUERY, you can use the QUERY add-in to query and edit data, and then use TRANSACTION to load data back into SAP.

When installing QUERY, the add-in is automatically installed in Excel.

To view the QUERY add-in in Microsoft Office Excel 2007 or Excel 2010:

  • Click the Winshuttle tab and then on QUERY.

How to view the QUERY add-in in Microsoft Excel 2003

  • Click the QUERY add-in.

Settings of the QUERY add-in

The default values ​​for the execution settings are the same as those in the query file. However, they can be changed at run time.

Select query file

This option is only available if the Excel file does not contain a published file. Click Browse and select the query file you want to open. The file details are displayed automatically. The file path cannot be entered.

Published query files

All queries that have been published in the Excel file are listed. Select a file to see the details.

Start line

A mandatory field. If no value is entered, the 2nd line is the start line. The setting is not saved in the Excel sheet or in the published query file after the runtime.

Log column or cell

Enter the Excel column in which the log message is to be output. If no value is entered, the log message is written in the first cell of the last column.

Extract all records

Select this option if you want all records to be extracted.

Number of records to be extracted

Enter the required number of records to extract. If you select the "Extract all records" option, this setting is deactivated. This field is a required field. If no value is entered, the value is set to 100000.

Write a header

Adds or removes the column header in the output file.

Reason for execution

Enter a reason for the execution. This is a runtime setting that is not saved in the Excel sheet or in the published query file.

To run

Click Run to run the query and download the records.

Number of entries

Click the Number of Entries button, to get the number of records extracted from this query.

Status bar

This bar contains the login information. It can also be used to log out of the same system.

Run queries in the QUERY add-in for Excel

How to run a query in Excel

  1. Select the query file or published file to run.
  2. Enter the details in the run settings.
  3. Click on Run to run the query. The data records are loaded into the Excel sheet.

    Each cell is designed for 8192 characters in Excel 2007 and 1024 characters in Excel 2003. If a long text field used in the query contains more characters, the field must be shortened to ensure a successful download.

Using the QUERY add-in for Excel with TRANSACTION

The QUERY add-in and the TRANSACTION add-in can be used together in Excel.

How to download data from an Excel sheet, edit it, and upload query results

  1. Select the published query file to run.
  2. Enter the details in the run settings.
  3. To change the column mapping, click Change mapping. The new assignment only affects this execution and is not saved in the Excel or query file.
  4. Click on Run to run the query. The data records are loaded into the Excel sheet.

    Make the necessary changes in the downloaded records.

  5. To open QUERY in Excel 2007 or Excel 2003, click the QUERY add-in.
  6. Select an existing .TxR file that was created in the same file or template. Edit the execution settings.
  7. Click on Run to run the .TxR file. The changes are uploaded to SAP.

CENTRAL information

Status: The status of the query template, ie "Review", "In progress" or "Production".

Status of the query file: The status of the query file, ie "Review", "In progress" or "Production".

System Usage Level: The usage level assigned to the file, that is, low, medium, or high.