Article Series: ERPConnect Services
In this part I am going to explain how you can use Nintex to connect to an SAP system with ERPConnect Services. The actions, which comes with a .wsp solution, get shipped with the ERPConnect Services software on installation and needs to be installed seperatly on SharePoint.
There are three different actions. One is for calling SAP function, another for getting data from a SAP table and a third to do XQL (Extract Query Language) queries against SAP. XQL is used to query against the ERPConnect Services webservice directly.
Example Workflow – Read SAP table
In this section I am going to explain the „Read SAP table“-action which will query against the standard SAP table VBAP. For this I used several workflow variables
all the data is returned as XML which is saved in the variable XML Table Output. After parsing the XML the returned values are saved in the other variables. For the action itself we need a already configured SAP connection in the install ERPConnect Service. This simply means we created a SharePoint Service Application configuration in the Central Administration which holds the credentials (with in the Service Application directly or somewhere in the Secure Store). You would then see the Service Application to choose from. Then we need to fill in the name of the name of the table and give the variable where to save the return data. In the screenshot below I also used a Where clause, which can be used to prefilter the data on the SAP side. This can save bandwidth depending on the size of data. Here I filter by a given Title from a title of a list item in a SharePoint list.
The workflow itself looks like this, which also consists of parsing the data and then saving it to a SharePoint list. In this case the workflow is a list workflow which gets always triggered when an item is created. It takes the title and tries to use the titles content to get data from SAP.
The return data from the SAP table VBAP in the action look as follow.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?><TABLES><TABLE name="VBAP">
We can then use the XML data and use the Query XML standard Nintex action and get the values we need with XPATH.
Then for debug reasons you can save the raw XML data also into a list.
And then just save the return data with XPATH into a choosen list.
Nintex Action – Call SAP Function
This action is similar to the previous one. Here instead, we call a SAP function. The diference here is, that we have defined input and export parameters which depends on the function you are using. I am not explaining the returns, because they have the same structure like returned from inside of SAP.
But the output is XML again, which can be parsed.
Nintex Action – Query XQL
This action can be used to freely query anything with the XPL query language. It works very similar to SQL query language. An detailed example is explained at the Theobald website.