IBM Support

Prerequisites for using the SAP ODATA Connector

Question & Answer


Question

What are the prerequisites for using the SAP ODATA Connector?

Answer

Contents

Introduction

Datastage: HTTP Proxy usage. 1

Datastage: Adding DNS entry to host file

Configuring SAP OData Service on S/4HANA on premise. 1

Enabling ICM Services. 1

Activating the SAP Gateway. 1

Activating OData services. 1

Testing activated OData service on SAP server 1

Configuring SAP OData Service on S/4HANA Cloud. 1

Creating Communication User 1

Creating communication System.. 1

Creating communication arrangement 1

Introduction

Before you use the SAP OData services, some basic configuration needs to be done on Datastage and SAP Servers. Follow this document to meet the required prerequisites.

Datastage: HTTP Proxy usage

The OData connector be used with an HTTP proxy when direct Internet connection is not available. For more details see technote 0957673.

Datastage: Adding DNS entry to host file

The hosts file is used to map hostnames to IP addresses. If the host name cannot be resolved directly, add an entry for the SAP server exposing the OData service. The location of the hosts file on the Datastage Engine tier machine depends on the operating system:

Windows: SystemRoot > system32 > drivers > etc > hosts
(e.g. C:\Windows\System32\drivers\etc\hosts)

Unix: /etc/hosts

For example to resolve yourdomain.com to IP address 1.2.3.4: open the hosts file with a text editor and append the following line (note an # character in front of the IP address will deactivate the entry):
1.2.3.4 yourdomain.com www.yourdomain.com

Note:
S/4HANA on-premise or ERP system: you may need to add the SAP Server DNS entry to the Datastage Engine tier machine.
S4/HANA cloud system: DNS entry may not required as the host is resolved in general publicly.

 

Configuring SAP OData Service on S/4HANA on-premise

Enabling ICM Services

SAP OData service operates on the HTTP or HTTPS protocol. Therefore, the corresponding services must be enabled in the Internet Communication Manager (ICM). It is recommended to use HTTPS service as it is more secure and offers an extra layer of security because it uses SSL to transfer data.

1. Go to Transaction SMICM. Goto -> Services (Refer Figure 1).

image-20190627180150-1

Figure 1: How to Open Services Panel

2. Service -> Create (Refer figure 2).

image-20190627180210-2

Figure 2:Creating SAP Profile Parameters

3. Define new service (Refer figure 3).

image-20190627180225-3

Figure 3: Defining new service

While defining the service ports, some of the parameters will be pre-populated according to the SAP system. Set the following parameters:

For HTTP:
New Service Port = <http port>
Bind to Host Name = <Host name of the server>

Protocol = HTTP
Keep Alive (in Sec.) = 60
Max. Processing Time = 60

For HTTPS:
New Service Port = <https port>

Bind to Host Name = <Host name of the server>
Protocol = HTTPS
Keep Alive (in Sec.) = 60
Max. Processing Time = 60

image-20190627180324-4

Figure 4: Ports setting in ICM

Activating the SAP Gateway

Perform the following steps to activate the SAP Gateway:

1. Go to transaction SPRO and click SAP Reference IMG (Refer figure 5).

image-20190627180829-1

Figure 5: Customising Execute Project

2. Right-click on node SAP NetWeaver > SAP Gateway >  OData Channel > Configuration > Activate or Deactivate SAP Gateway and select Edit Activity from context menu. (Refer figure 6)
image-20190627180910-2

Figure 6: Activate or Deactivate SAP Gateway

3. If message in dialog reads SAP Gateway is currently active, click Cancel (Refer Figure 7). Otherwise click Activate. (Refer figure 8).

image-20190627181008-3

Figure 7:Cancel already activated Gateway
 

image-20190627181039-4

Figure 8: Activate gateway services

Activating OData services


To activate OData services, proceed as follows.

1. Call transaction SICF.
2. Skip Filter selection screen by clicking Execute (or press F8). (Refer figure 9)

image-20190627181124-5

Figure 9: Defining Services

3. Navigate to tree node default_host > sap > opu > OData, if you want to activate all OData (V2) services. Alternatively, if you want to activate an individual service, navigate to the corresponding node deeper in the tree. Right-click on the OData service node and select Activate Service from context menu to activate all OData services. (Refer figure 10). Example shown in figure 10 for standard Odata service ADT_SRV.

image-20190627181204-6

Figure 10: Activating the required services.

Testing activated OData service on SAP server

The SAP Gateway Client is a tool that can be used to execute OData requests. It is integral part of the SAP Gateway.

The tool is started by calling transaction /n/IWFND/GW_CLIENT (Refer figure 11).  

  1. Specify the OData request URI.
  2. Select the HTTP method, the protocol (HTTP or HTTPS), the request headers and the request body.
  3. After you have entered all necessary request data, click button “Execute” to send the request.
  4. After executing, the response headers and response data are displayed.

image-20190627181956-1

Figure 11:Testing SAP OData service through SAP Gateway Client

Configuring SAP OData Service on S/4HANA Cloud

Creating Communication User

Communication user is a special type of technical user used for external Odata service calls. It is used for SAP communication with the external system only, It is not possible to log on using SAP GUI using communication user. The “Maintain Communication Users” app enables you to define these settings in Cloud.

1. Navigate to Maintain Communication Users App (Refer figure 12).

image-20190627182024-2

Figure 12: Go to maintain communication user app

2. Create a new user by clicking New (Refer figure 13).

image-20190627182040-3

Figure 13: Create new communication user

3. Enter user name and description of your user.
4. Enter the password. It is recommended to use propose password button since the password has to be 20 characters and generate the password (Refer figure 14).

image-20190627182104-4

Figure 14: Creating password for Communication user

5. Click Create (Refer figure 15).

image-20190627182127-5

Figure 15: Create Communication user

Creating communication System

A communication system is a specification of a system that represents a communication partner and all the necessary technical information needed for the communication, like hostname/IP-Address, identity, user information, certificates, etc. In S/4HANA Cloud systems, these entities are required for external communication. The “Communication Systems” app enables you to define these settings in Cloud.

1. Go to Communication System app (Refer figure 16).

image-20190627182202-6

Figure 16: Communication system app

2. Create a new communication system by clicking New (Refer figure 17).

image-20190627182214-7

Figure 17: Create new communication system.

3. Add system ID and system name and click on create (Refer figure 18).
image-20190627182240-8

Figure 18: Communication system ID and name.

4. Click + button to add the created communication user for inbound communication. Enter the details of communication user (Refer figure 19 and 20). Inbound communication means that defined system is used from a communication partner to call from external into the SAP S/4HANA system.
image-20190627182323-9

Figure 19: Communication system details

image-20190627182342-10

Figure 20: Add user to communication system.

5. Click on Save (Refer figure 19).


Creating communication arrangement

A Communication Arrangement describes a communication scenario with a remote system during configuration. It provides necessary metadata for the service configurations like credentials, outbound ports, destinations, and URLs. It consists of several service specifications, which contains the technical data to enable inbound and outbound communication. The “Communication Arrangements” app enables you to define these settings in Cloud.

1. Go to Communication Arrangements app (Refer figure 21).

image-20190627182431-11

Figure 21: Communication arrangement app.

2. Create a new communication arrangement by clicking New (Refer figure 22).

image-20190627182448-12

Figure 22: New communication arrangement.

3. Select your communication scenario, enter arrangement name and click on Create (Refer figure 23).

Communication scenario defines a set of inbound and outbound services for a business process. Inbound services are Web services that have been created based on an SAP or custom business object, or Web services provided by SAP. Outbound services are external Web services that have been integrated into your solution. Based on a communication scenario, a customer can create a communication arrangement in SAP’s cloud solution to exchange business documents electronically. For Example, Standard communication scenario SAP_COM_0053 is used for purchase order integration with SAP system. API API_PURCHASEORDER_PROCESS_SRV is exposed in this scenario to create, delete or update purchase order.

image-20190627182511-13

Figure 23: Adding scenario and communication arrangement name.

4. Add your communication system and select the communication user to be used in this communication arrangement (Refer figure 24).
image-20190627182546-14

Figure 24: Details of communication arrangement

5. URL to call OData service can be found in Communication arrangement (Refer figure 25) in this format:

https://<your-system>-api.s4hana.ondemand.com/sap/opu/odata/sap/<API-name>

  1. Click Save
    image-20190627182655-15

Figure 25: OData service URL and save.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Component":"Pack for SAP Applications","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
03 July 2019

UID

ibm10886655