Use the SAP OData Connector

Last update: Download PDF Edit

1 Introduction

The SAP OData Connector is a specific SAP connector for integrating with SAP back-end systems like SAP Business Suite (SAP ERP 6.0), SAP S/4HANA, SAP S/4HANA Cloud, and SAP SuccessFactors.

This how-to will teach you how to do the following:

  • Add the SAP OData Connector to your Mendix app
  • Configure the SAP OData Connector

2 Prerequisites

Before starting this how-to, make sure you have completed the following prerequisites:

  • Create the app in Mendix Studio Pro
  • Get the SAP OData Connector module
  • Get an SAP data model

2.1 Getting the SAP OData Connector Module

To be able to use the OData Connector; first create your project. Inside , navigate to the Mendix App Store to download the SAP OData Connector module. You will then find this module in your app project’s App Store modules.

For more information, see How to Use App Store Content.

2.2 Getting an SAP Data Model

To get started quickly, you can download one of the SAP data models available in the Mendix App Store. An SAP data model is available as a module that you can add to your app. The module contains a pre-built domain model for a specific service of SAP.

If you want to use an SAP data model that is not available in the Mendix App Store, you can generate the SAP data model based on an OData service from an SAP back-end system.

For more information, see SAP Data Models and Use the SAP OData Model Creator.

3 Using the SAP OData Connector

In this section, you will learn how to implement the data connector in your Mendix app.

3.1 Creating a Microflow

In this example, you are retrieving a list of customers that is available in the SAP data model named SAP Check Price and Availability Connector.

To create the microflow for this retrieve, follow these steps:

  1. Create a microflow in .
  2. From the Toolbox, drag the Get List operator into your microflow.
  3. Fill in the required fields of the Get List connector. For this example, you should use these settings:

    • Query@SAPCheckPriceandAvailability.SRA016_PRICE_AVAIL_SRV_URL +'/' + toString(SAPCheckPriceandAvailability.EntitySetNames.Customers)
    • Response type – the type you want to query from the OData service; in this example, Customer is used
    • Request parameters – empty
    • Parent – empty
    • Result info – empty
    • Use Cloud Connector – Yes
  4. In the microflow, make the return value of the microflow List of Customers. This is so that you can call the microflow as a data source in a page.

The final result of your microflow should look like this:

3.2 Creating a Page

To create a page to show the objects in a list, follow these steps:

  1. Create a blank page and insert a Data grid widget.
  2. Select the microflow you created in section 3.1 Creating a Microflow as the data source for the grid. Your page should look like this:

  3. Create a simple button on your homepage.

  4. Set the action to Open page and select the page you have just created.

Congratulations! You can now run your app and see a list of the customers available in the public Check Price and Availability application of SAP Fiori Cloud Demo.

4 Read More