Configuring SAP NetWeaver Query To Accept New Data Sources

Overview

SAP ships with over 100,000 tables by default and almost all SAP Netweaver implementations are highly customised. For this reason the Netweaver component only has a limited number of Data Sources available. This article discusses how to add additional Data Sources.

The first step is to create a blank API profile for SAP. This is done in the Manage API Profiles box. Click on the plus symbol to add a new API profile and name it ‘SAP’.

Optional Use the Matillion SAP Netweaver Component to copy the DD02T table. Browsing this table will give a list of all SAP tables on the server. Next, import the attached job into Matillion. This contains a Python Component with a script which accepts the below variables:

  • hostname​
  • user​
  • password​
  • client:​
  • tablesToCreate: a comma separated list of the tables to be included in the Data Sources dropdown in the SAP Netweaver Component
 

The script will connect to the Host with the details provided and will create one RSD file in the SAP API Profile in Matillion per table to connect to in the tables named in the tablesToCreate variable. Modify lines 10 to 14 with the correct details for your SAP environment:

hostname = '34.253.154.72'
user = 'username'
password = 'password'
client = '001'
tablesToCreate='table1,table2,table3'

Still within the Python Component, hit run to run the code. The output should show the code has run successfully and the file(s) have been created. These files will now be available to view the Manage API Profiles box.

Now in the Netweaver Component, add an additional Connection Option for the Parameter Location with the value:

/usr/share/tomcat8/api_profiles/SAP
 

The Data Source drop down will now include the tables required. Please note this may take a few minutes to filter through but these tables will be available to select immediately in Advanced mode.

Attachments

ConfigSAP.json