Wednesday, April 24, 2019

Connect to your on-premises SAP system from Azure Logic Apps (II)

In this post, we will see how to connect from an Azure Logic App to SAP and get the schemas of the different operations from SAP System. This post continues the series of SAP Connector for Azure Logic Apps.

You can see the previous post:


The first step is create a new Logic App, for example I will create a simple HTTP Request-Response Logic App:


Important, create de Azure Logic App in the same Region as your On-Premises Data Gateway (see the previous post):


Next step is add a SAP - Generate Schemas (Preview) connector, after When a HTTP request is received trigger:


When you add the Generate Schemas (Preview), you have to set the connection data to SAP according your system:


After you set your connection data, you can see all the BAPI, IDOC, RFC and tRFC operations that your SAP system has:


If you can't see this menu, you will receive an error that explains why the connector can't reach SAP.

Now, we can select the operations that we want the schemas. For example, I select the BAPI operation Customer Management - Service Notifications - Service Notification - GETLIST.


To get the result, we can add the Generate Schemas Response as the body of HTTP Response:


Done! Now we can use Postman to invoke our Logic App and we get the Generate Schemas Response:


We receive a JSON and the content is for each schemas that uses the SAP operation, we get the Name (Schemas - Name) and the Base64 representation of the XSD file (Schemas - Content).

In the sample of the Microsoft documentation (link), they upload each schema directly to the Integration Account.

I implemented in GitHub a simple Console App, that invokes this Logic App and stores the different XSDs in the temp directory. I get the XSDs and implement Integration Account Maps for mapping incoming values to the SAP corresponding schema and invoke correctly the SAP action. We will see this in the next post ...

No comments: