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.
Supported objectsThe SAP Query connector supports the SAP Query object only.
Establishing a connection
Do the following:
- Start QlikView.
- Open the Script Editor.
Select the Data tab, and then select the QvSAPQueryConnector.dll option from the drop down list.
- Click Connect....
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.
Enter the Username and Password of the user that is to be used for this specific download.
- Click Test Connection to verify that all fields are correctly filled in.
- Finally, click OK to get a connection string in the script.
Passing through a SAP Router
Do the following:
When you are creating the connection, go to the Application Server Host/Message Server Host field.
Input the following string: /H/<Host name or IP number of SAP Router>/S/3299/H/<Fully Qualified Domain Name of target system>
The port which the SAP Router is listening to is always 3299.
(Optional) Fill in the following connection string properties: SAPRouter, GatewayHost, and GatewayService. These are described below under "Connection string properties".
This step is not mandatory, but is useful if the connection needs to be made through a firewall via SAP router.
If passing through a Message server, please read that section below. Note that the services file must also be updated on the SAP Router server. In that case, the SAP Router needs to be restarted.
Passing through a Message server
If passing through a Message server, you may need an entry for the Message server port in the services file.
Do the following:
Locate the services file in: C:\Windows\System32\drivers\etc
Add sapmsxxx 36nn/tcp, where:
xxx is the system ID
nn is the system number (of the Message server).
If it is the last line in the file, add a new line break after the entry.
There is an alternative to updating the services file. When you create the connector connection, you can enter the Message server port number directly, instead of the System ID.
The port number is of the form 36nn, where nn is the system number.
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.
SAPRouter: Use this field to specify the SAPRouter 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
GatewayHost: 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).
GatewayService: 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:
Click Queries in the Script Editor.
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.
- Click OK.
Enter the search criteria (query name and/or query description) in the Search for field.
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.
It is also possible to choose the Select Options button to create a variant.
- Click OK to return to the Script Editor with the generated script.