Skip to main content

Using the SAP Query Connector


Using the SAP Query Connector

The SAP Query Connector works with QlikView. It is strongly recommended to test the query in transaction SQ01 prior to testing it with QlikView. If the query prompts for variable input, create a variant of the query with pre-defined values for the variables.

Note: This SAP connector is only available in QlikView.

Establishing a connection

Do the following:

  1. Start QlikView.
  2. Open the Script Editor.
  3. Select the Data tab, and then select the QvSAPQueryConnector.dll option from the drop down list.

    Data tab with QvSAPQueryConnector.dll selected

  4. Click Connect....
  5. SAP connection dialogue image

  6. Enter the Application Server Host address, Client, and System Number of the target SAP system, or select the Message Server Host option and enter the Message Server Address, Client, System ID, and Group.

    If passing through a message server, an entry may have to be added in the C:\WINDOWS\system32\drivers\etc\services file. Add sapmsxxx 36nn/tcp, where xxx is the system ID and nn is the system number. If it is the last line in the file, add a new line break after the entry.If passing through an SAP router, paste the router string in the Application Server Host/Message Server Host address field.
  7. Enter the Username and Password of the user that is to be used for this specific download.

  8. Click Test Connection to verify that all fields are correctly filled in.
  9. Finally, click OK to get a connection string in the script.

Connection string properties

There are a number of properties that can be added to the connection string, if needed. Normally, the default values for the properties are sufficient. Separate properties with ; (semi colon) in the connection string:

  • ENotationLegacy=0/1(default/off = 0, on = 1): When the property is turned on, fields of the type CHAR that contain a value that can be interpreted as a Scientific Notation Number are converted to a number in QlikView. When the property is turned off, all values that can be interpreted as a Scientific Notation Number are handed as text values.

    A value that can be interpreted as a Scientific Notation Number consists of numbers and the letter E, where E appears within the string of numbers. For example, 2E2, 0E123456, 1e2349.

  • Logpath=xxxx: Places log files in a subfolder named xxxx. The folder is created, if needed. xxxx can be any text string that can be a valid part of a folder name in Windows.

  • LogFile=yyyy: Names the log file yyyydatetime-n.txt. yyyy can be any text string that can be a valid part of a filename in Windows.

  • SAP Router: Use this field to specify the SAP Router parameters if the connection needs to be made through a firewall via a SAP Router. Possible value is a string of host name and service name/ port in the following format: /H/hostname/S/portnumber

  • Gateway Host: The hostname of the Gateway at which you want to register. It must be the same as defined in SAP transaction SM59 (if the RFC destination defines an explicit gateway).

  • Gateway Service: The Service name (as defined in etc/services) or the port number under which the gateway is listening. Possible values are sapgw00 - sapgw99, 3300 - 3399

Select data to load

Do the following:

  1. Click Queries in the Script Editor.

    Data tab with QvSAPQueryConnector.dll selected

  2. Enter the search criteria for the User Groups in the Search for field, or select the required groups by checking the boxes next to the group names. The checkbox Name can be used to select or deselect all groups. The button Clear selections can be used to deselect all groups.

    QvSAPQueryConnector Select User Groups dialog

  3. Click OK.
  4. Enter the search criteria (query name and/or query description) in the Search for field.

    SAP Query selection dialog

  5. Select a query and click Preview or Add to Script. To go back to the previous window to select a different group, click the Select User Groups button.

  6. It is also possible to choose the Select Options button to create a variant.

    SAP Queries Select Options dialog

  7. Click OK to return to the Script Editor with the generated script.