Connect ERP Data Hub to SAP using OData and HTTP
Summarize
Summary of Connect ERP Data Hub to SAP using OData and HTTP
This guide explains how ServiceNow customers can securely extract data from SAP ERP systems using OData v2 APIs via HTTP connections in ERP Data Hub. The integration allows data extraction into remote tables and extraction tables within ServiceNow, enabling efficient use of SAP data. Note that OData v2 does not support snapshot isolation, which may cause some data consistency challenges during extraction.
Show less
To enable OData access, the SAP system must be configured to allow OData connections, and appropriate OData service authorizations must be assigned to users on the SAP backend.
Key Features
- OData v2 Integration: Connects to SAP using HTTP for data extraction via ERP Data Hub.
- Configurable Properties: Several system properties control the OData connection and behavior:
- responsetimeout: Timeout value for OData responses, default 100 seconds; increase if calls frequently time out.
- usecsrftoken: Boolean to specify whether to send a CSRF token with OData calls.
- catalogservicepath: URL path to access SAP catalog services; when enabled, retrieves all SAP services and stores them as XML for offline use.
- odataservicepath: URL path to access specific SAP OData services.
- Heartbeat Monitoring: Separate heartbeat indicators for RFC and HTTP connections monitor the status of the ERP system. Successful heartbeats trigger parallel BAPI (RFC) and OData (HTTP) data retrievals, with status visible on the system record.
Practical Guidance
- Ensure your SAP system is enabled for OData access and users have correct authorizations.
- Adjust the response timeout property if you encounter frequent timeouts.
- Use the catalog service property to retrieve and cache SAP service metadata for offline parsing and reference.
- Monitor heartbeat statuses to track connection health and troubleshoot errors promptly.
What to Expect
By configuring ERP Data Hub to connect to SAP via OData and HTTP, ServiceNow customers can reliably extract SAP ERP data into ServiceNow tables for integration, reporting, and automation purposes. While OData v2 limitations around snapshot isolation exist, the setup supports parallel data retrieval with RFC and HTTP and offers configurable settings to optimize performance and security.
Extract data securely from ERP OData APIs using ETL for use in remote tables and extraction tables. OData connects to SAP via HTTP.
OData v2 does not use snapshot isolation so you might experience some data consistency issues when retrieving data from an external ERP source.
Providing OData access to users
You must have an SAP system that has been enabled to make an OData connection.
As of Xanadu Store Release 2, extract data using OData and an HTTP connection. To give users OData access, see the following instructions on the SAP help site Back-End Server: Assign OData Service Authorization to Users.
New properties
| Property | Type | Description | Create manually? |
|---|---|---|---|
| sn_erp_integration.response_timeout | integer | Specifies the timeout value for OData response. If OData calls are timed out frequently, increase the timeout value. Specify the value in seconds. The default is 100 seconds. This value is used for responses both from external web and from a MID Server. | No |
| sn_erp_integration.use_csrf_token | true | false | Indicates if CSRF token should be sent for OData calls in ERP Data Hub operations. | No |
| sn_erp_integration.catalog_service_path | string | After the hostname and port, this is the path to connect with any SAP catalog service. The default is: /sap/opu/odata/iwfnd/CATALOGSERVICE;v=2/ServiceCollection. After creating the property and setting it to true, a list of all services are retrieved from SAP. The information is stored in an XML file and attached to the system record. The XML can be used later. For example, parse the XML while offline with no connection to SAP. | Yes |
| sn_erp_integration.odata_service_path | string | After the hostname and port, this is the path to connect with any SAP OData service. Add a URL in Value to specify the OData service. The default is: /sap/opu/odata/sap. | Yes |
Heartbeat information
For an ERP system, there are separate heartbeat indicators for RFC and HTTP. When a system is established, the heartbeats become active and the status is updated, including any errors. If the heartbeat calls are successful, BAPI and OData retrieval is triggered in parallel and the status can be seen on the system record. BAPI and table list retrieval is done via RFC. OData retrieval is done via HTTP.
More information
For more information about using OData in ERP Data Hub, see Create an OData connection in ERP Data Hub and OData capabilities supported by ERP Data Hub.