How to setup OutSystems for SAP ODATA

How to consume SAP ODATA in OutSystems

Consuming an SAP ODATA service might be tricky and best left to developers experienced in SAP and OutSystems. Also, the OutSystems architecture is challenging. You need to have a proper understanding of the data you want to manipulate. Concepts of SAP Masterdata, Transactional data, slow-moving and fast-moving data, calculated data etc. Using wrong architecture design patterns for SAP integrations is the main cause for failing integrations up to the point where your SAP system can crash. Note: OutSystems does NOT know anything about SAP, their architectural patterns are therefore not a complete overview of the solutions required to set up a proper architectural design. When you are new to SAP OutSystems integrations here is how to embed an SAP ODATA service in OutSystems.

Create a new module

You should isolate the consumed service in a separate module, created for this specific purpose, according to the following guidelines: If you only use the service in Reactive Web and Mobile Apps, create a "Library" module. If you need to use the service in a Traditional Web App, create a "Service" module.

Create an OutSystems Module to consume a sap odata service

Create a service from the specification.

In Service Studio, create the OutSystems SAP integration by consuming the service using the JSON Swagger specification file you previously downloaded.

Do the following:

1)In the Logic tab of your module, right-click the REST element under Integrations (not the SAP element) and choose Consume REST API.

Consume a rest service to integrate SAP and OutSystems

2)Choose the Add All Methods option.

Consuming a rest service from SAP

3)Click Choose a File, select the specification file you downloaded previously, and click Finish.

Import sap rest api into OutSystems

It takes just these three steps to import a rest web service like ODATA is into OutSystems. After these steps, you will be able to re-use the service in OutSystems. Make sure to take care of the SAP Authentication. You need proper authentication and authorisation profiles set up in SAP, preferably synchronized with OutSystems in order to mitigate the risk of users not being able to perform the updates needed or worse, the wrong people get the possibility to edit your SAP data.

Need more information or have questions? Visit the OutSystems LinkedIn group on SAP OutSystems integrations and you will find the help you need or contact B-Synergy, we are happy to help you out.

About the author