Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

SAP Netweaver Gateway connector:Connect to on-premise SAP S4/HANA via OData service

The SAP Gateway connector lets you perform create, get, list, update and delete operations on SAP Gateway OData Services.

Supported versions

This connector uses the SAP Gateway API to enable bidirectional access to SAP services that use the gateway. The following SAP editions are supported:

  • S/4 HANA Cloud
  • S/4 HANA On-Premise
  • SAP ERP
  • Any other SAP editions that support the SAP Gateway API

In this article I’ll showcase how to configure SAP gateway connection to test SAP OData Service on S/4HANA on-premise.

Prerequisites:

Test the OData services in the SAP HANA

Screenshot 2025-01-14 at 2.53.03 PM.png

Use this connector if your SAP data is exposed as an OData service. This connector facilitates data insertion,fetch and updates using OData. This approach provides a standardized and RESTful interface for accessing and modifying data, which in turn simplifies integration with external systems and applications.

Follow the below steps to configure and test the OData services in SAP HANA using SAP Connector.

Login to the SAP HANA on-premise using SAP Logon

Mamatha_0-1734075767429.png

Once you logged in, the search for your OData service

Mamatha_1-1734075807855.png

Then it will list all the OData services available. In this case I’m interested in API_SALES_ORDER_SRV

Mamatha_2-1734075846446.png

You can execute/test the OData api API_SALES_ORDER_SRV to see the data/results. 

Mamatha_3-1734075952289.png

Below is the execution result. Let’s query the same from application integration and query the results to make sure it’s working as expected. Here Sales Order number is 1. 

Screenshot from 2024-12-11 14-17-17.png

Create SAP gateway connection

In your Google Cloud project search for Integration Connector and click on Integration Connector. 

Mamatha_0-1733869572228.png

Under Integration Connector-Connections, click on create new.

Mamatha_1-1733869610602.png

Specify the location where your connection will run. Here I’m specifying it as europe-west4.

Mamatha_12-1734076635004.png

Provide the Connection Details(connector, version, connection name, description and service account(select a service account that has the required roles.) and click on NEXT.

  • Optionally, you can enable Cloud logging, and then select a log level. By default, the log level is set to Error.

Mamatha_15-1734077281887.png

  • Selecting the “Enable event subscription” option enables the connection to listen to event notifications from your backend application. You can use the event notifications to trigger your integrations. This article is for establishing connectivity from Application integration to SAP(outbound connection). 
  • Mention namespace, service and data format. In this case I’m not using any CustomUrlParamsconfigure the Connection node settings:
    • Minimum number of nodes: Enter the minimum number of connection nodes.
    • Maximum number of nodes: Enter the maximum number of connection nodes.

      A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.

Mamatha_16-1734077369882.png

  • Under Advanced Settings, you can enable Use proxy: Select this checkbox to configure a proxy server for the connection
  • Under Advanced settings you can enable SSL and provide the certificate details. In this case I’m not using Proxy or the SSL.

Mamatha_17-1734077501403.png

Provide the Destination Details and click on NEXT

Set this to the URL your SAP Gateway environment or to the full URL of the OData service, Example format; ${ENVIRONMENT_URL}/sap/opu/odata/${NAMESPACE}/${SERVICE}/, sample URL: https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/. Add any additional properties using the CustomUrlParams property.

Mamatha_18-1734077547139.png

Configure the Authentication details: Enter the details based on the authentication you want to use and click on NEXT

  • Username and password
    • Username: Username for connector
    • Password: Secret Manager Secret containing the password associated with the connector.
  • Anonymous-If you want to use anonymous login, select Not Available.
    • API Key: The API key of the currently authenticated user.
  • OAuth 2.0 Auth code flow
    • Client ID-The client ID used for requesting access tokens.
    • Scopes-A comma-separated list of desired scopes
    • Client Secret-Secret Manager Secret containing the client secret for the connected app you created.
    • Authorization URL-Authorization URL generated when creating client in SAP Gateway instance

In this case I’m using the Username Password method

Mamatha_19-1734077664317.png

Review all the details in the connection's configuration and click on CREATE

Mamatha_20-1734077690863.png

Mamatha_21-1734077706095.png

Now, you should have the connection status as active under connections.

Mamatha_22-1734077780028.png

Create Application Integration 

Let’s create an integration and test the connection. Search the application integration in the search bar and click on “Application Integration”

Mamatha_23-1734077817522.png

Under “Application Integration” select “Integrations” and click on CREATE INTEGRATION 

Mamatha_24-1734077853195.png

Mamatha_25-1734077872070.png

Enter the integration name and description and click on CREATE

Mamatha_26-1734077904427.png

Choose the “sap-gateway-hana-onpremise” connection under task and click on it.

Mamatha_27-1734077931076.png

Add the API trigger under api trigger(this is required to test the integration). Draw a connection from API Trigger to the sap-gateway-hana-onpremise task.

Mamatha_28-1734077987785.png

Let’s configure the sap-gateway-hana-onpremise task. Click on Configure Connector.

Mamatha_29-1734078035234.png

Region and Connection is auto populated. Now select the entity and click on NEXT

Mamatha_30-1734078056856.png

Under the list of entities select A_SalesOrder and select list operation and click on NEXT. 

Mamatha_31-1734078079979.png

Click on DONE to Configure Connector task under task editor.

Mamatha_32-1734078109029.png

Test the integration to list all the sales orders.

Mamatha_5-1734076350182.png

Now you can goto execution results to see and compare the sales order from the SAP system. I see the Sales Order Number and other details matching the sap system. Now you can do all mapping and transformation in Application Integration so extract the SAP data and send it to any other applications.

Mamatha_4-1734076287005.png

 

 

 

3 0 1,220
0 REPLIES 0
Top Labels in this Space