ChittaRanjanS
ServiceNow Employee
ServiceNow Employee

ERP Model creation using OData Service: A Step-by-Step Guide

 

OData (Open Data Protocol) has become a preferred protocol for integrating enterprise applications with ERP systems like SAP S/4HANA although it supports other integration technologies. This article will guide you through the process of building an ERP model using OData APIs. You can refer to the documentation link(Managing how models read and update the ERP system) to understand some of the general information on Model creation.

 

Let’s take the example case of managing Maintenance Notification in an S/4HANA system, covering the following operations:

  • Creating a maintenance notification
  • Reading outstanding notifications in the system.
  • Updating the status to "InProgress." And marking it as "Complete" when the maintenance task is done.

 

Key Considerations Before You Start

Before diving into the model creation process, consider the following factors to ensure a smooth implementation:

  • Finding the Right API: Search for available APIs on Business Accelerator hub on SAP website. For S/4HANA Private Cloud or On-Premise, you can directly access the page https://api.sap.com/products/SAPS4HANACloudPrivateEdition/apis/all as shown on the screenshot.
  • API Availability: The availability of specific APIs depends on the S/4HANA product version used by the customer. Ensure compatibility before proceeding.
  • API Activation: If the required API is not listed, verify whether it has been activated in your system. If not, you can activate the service using the steps mentioned at Activate the OData Service | SAP Help Portal.
  • OData Protocol Version: Check which OData version is supported by your ERP Canvas. Currently, only OData V2 is supported, and V4 is not yet supported in our environment.

     

ChittaRanjanS_0-1737765650104.png

 

 

Step-by-Step Guide to Building the Model

Follow these steps to design an efficient ERP model using OData APIs:

Begin by creating a new model in your ERP tool that will serve as the foundation for your operations.

 

Add Operation (Read/Update/Create)

Define the operations required for your business object based on your use-case, such as:

  • Create: Use this operation to generate new maintenance notification.
  • Read: Retrieve outstanding notifications.
  • Update: Progress the notification status OR Update any of the notification attributes.

 

Manage Entities

This is one of the important steps to choose the right service and the end-points.

  • Add Entity Type

Select “OData” as the entity type. The subsequent inputs depend on the entity type selected.

 

ChittaRanjanS_1-1737764239852.png

 

  • Select the Service

Select the relevant OData service that serves your use-case( e.g. API_MAINTNOTIFICATION for our example use-case), ensuring it provides the required operations. In most cases, there is usually one OData service offering all required operations for a business object.

  • Choose the Endpoint

Identify and configure the appropriate API endpoint to interact with the ERP system.

Note: It might take some time to load the end points as these are fetched real-time from the connected SAP system. Have patience till all information is retrieved.

ChittaRanjanS_2-1737763476182.png

 

 

The available “Endpoints” are proposed in a combo-box as shown on the above screenshot. Let’s dive into understanding the entries. Each entry has 2 lines.

  • The first line is the endpoint (the root entity for selection and filtering).
  • The second line specifies the return/output and has 2 parts – the entity name and the return type. Return type specifies if it is going to be an array(multi-line) OR single instance of the Entity.

 

Configure Input and Output Fields

After defining the Service and end point, configure the required fields for input and output:

  • Select Input Fields: Choose the necessary parameters based on business requirements (e.g., notification ID, status, etc.)

If the output is a single object instance, the keys of the entity are expected and shown as mandatory fields.

  • Select Output Fields: Define the output fields that will return the required data from the ERP system. You can also include the related entities into the output which are usually defined like to_*.

 

Conclusion

By following these steps, you can easily and efficiently build an ERP model leveraging OData APIs and utilise it for multiple use-cases. In this example we have used an SAP delivered standard service, however you can also discover and utilise custom built OData Services using the same approach.

Note: This article focuses on model design only. Setting up the connection, authentication, and system-level configurations are not covered here.

 

Comments
artemzhuchkov
ServiceNow Employee
ServiceNow Employee

Very helpful article!

Daniel Oderbolz
Kilo Sage

Maybe the article should mention clearly that ServiceNow currently (Yokohama) can consume OData APIs but that to provide an OData API, developers need to add OData themselves.

 

If you want ServiceNow to provide OData OOTB, vote for this idea please:  Native functionality to offer inbound OData REST APIs

Version history
Last update:
‎01-24-2025 04:52 PM
Updated by:
Contributors